Merge branch 'qms/zhangke' into qms/develop
This commit is contained in:
commit
179730148d
|
|
@ -248,7 +248,7 @@
|
|||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
<mainClass>com.nflg.qms.admin.QmsApplication</mainClass>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
|
|
|
|||
|
|
@ -4,25 +4,29 @@ import com.nflg.qms.admin.pojo.qo.PqcInspectionRuleAddQO;
|
|||
import com.nflg.qms.admin.pojo.qo.PqcInspectionRuleAuditQO;
|
||||
import com.nflg.qms.admin.pojo.qo.PqcInspectionRuleEditQO;
|
||||
import com.nflg.qms.admin.pojo.qo.PqcInspectionRuleSearchQO;
|
||||
import com.nflg.qms.admin.pojo.vo.PqcInspectionPointListVO;
|
||||
import com.nflg.qms.admin.pojo.vo.PqcInspectionRuleDetailVO;
|
||||
import com.nflg.qms.admin.pojo.vo.PqcInspectionRuleVO;
|
||||
import com.nflg.qms.admin.service.QmsPqcInspectionRuleControllerService;
|
||||
import com.nflg.wms.common.constant.Constant;
|
||||
import com.nflg.wms.common.pojo.ApiResult;
|
||||
import com.nflg.wms.common.pojo.PageData;
|
||||
import com.nflg.wms.common.pojo.vo.QmsPqcInspectionPointItemsGroupedVO;
|
||||
import com.nflg.wms.common.pojo.qo.PqcInspectionRuleExportQO;
|
||||
import com.nflg.wms.common.util.MultilingualUtil;
|
||||
import com.nflg.wms.repository.entity.DictionaryItem;
|
||||
import com.nflg.wms.repository.service.IDictionaryItemService;
|
||||
import com.nflg.wms.starter.BaseController;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* PQC检验规则管理
|
||||
|
|
@ -53,31 +57,16 @@ public class QmsPqcInspectionRuleController extends BaseController {
|
|||
return ApiResult.success(ruleControllerService.getDetail(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据机型编号查询该机型最新启用PQC规则下的检查点列表
|
||||
*/
|
||||
@GetMapping("/points")
|
||||
public ApiResult<List<PqcInspectionPointListVO>> listPointsByModelNo(@NotNull String modelNo) {
|
||||
return ApiResult.success(ruleControllerService.listPointsByModelNo(modelNo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据检查点ID查询对应的检测项列表(分组返回)
|
||||
* 返回三类:关键物料拍照类、工序检查-自检复核类、工序检查-QC检测类
|
||||
*/
|
||||
@GetMapping("/items")
|
||||
public ApiResult<QmsPqcInspectionPointItemsGroupedVO> listItemsByInspectionPointId(@NotNull Long inspectionPointId) {
|
||||
return ApiResult.success(ruleControllerService.listItemsByInspectionPointIdGrouped(inspectionPointId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增规则
|
||||
*/
|
||||
@PostMapping("/add")
|
||||
@Transactional
|
||||
public ApiResult<Void> add(@Valid @RequestBody PqcInspectionRuleAddQO qo) {
|
||||
ruleControllerService.add(qo);
|
||||
return ApiResult.success();
|
||||
public ApiResult<Map<String, Long>> add(@Valid @RequestBody PqcInspectionRuleAddQO qo) {
|
||||
Long id = ruleControllerService.add(qo);
|
||||
Map<String, Long> result = new HashMap<>();
|
||||
result.put("id", id);
|
||||
return ApiResult.success(result);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -85,9 +74,11 @@ public class QmsPqcInspectionRuleController extends BaseController {
|
|||
*/
|
||||
@PostMapping("/edit")
|
||||
@Transactional
|
||||
public ApiResult<Void> edit(@Valid @RequestBody PqcInspectionRuleEditQO qo) {
|
||||
ruleControllerService.edit(qo);
|
||||
return ApiResult.success();
|
||||
public ApiResult<Map<String, Long>> edit(@Valid @RequestBody PqcInspectionRuleEditQO qo) {
|
||||
Long id = ruleControllerService.edit(qo);
|
||||
Map<String, Long> result = new HashMap<>();
|
||||
result.put("id", id);
|
||||
return ApiResult.success(result);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -124,11 +115,23 @@ public class QmsPqcInspectionRuleController extends BaseController {
|
|||
*/
|
||||
@PostMapping("/toggleDisabled")
|
||||
@Transactional
|
||||
public ApiResult<Void> toggleDisabled(@NotNull Long id) {
|
||||
public ApiResult<Void> toggleDisabled(@NotNull @RequestParam Long id) {
|
||||
ruleControllerService.toggleDisabled(id);
|
||||
return ApiResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除检查点(含其下检查项)
|
||||
*/
|
||||
@PostMapping("/deletePoint")
|
||||
@Transactional
|
||||
public ApiResult<Map<String, Long>> deletePoint(@NotNull @RequestParam Long pointId) {
|
||||
Long ruleId = ruleControllerService.deletePoint(pointId);
|
||||
Map<String, Long> result = new HashMap<>();
|
||||
result.put("id", ruleId);
|
||||
return ApiResult.success(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取步装字典
|
||||
*/
|
||||
|
|
@ -137,4 +140,34 @@ public class QmsPqcInspectionRuleController extends BaseController {
|
|||
return ApiResult.success(dictionaryItemService.getListByDictionaryCode(
|
||||
Constant.DICTIONARY_STEP_POSITION, MultilingualUtil.getLanguage()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出PQC检测规则
|
||||
* 如果ids不为空则导出指定ID数据,否则导出查询条件匹配的全部数据
|
||||
*/
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, @Valid @RequestBody PqcInspectionRuleExportQO qo) throws IOException {
|
||||
ruleControllerService.export(response, qo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 下载导入模板
|
||||
*/
|
||||
@GetMapping("/importTemplate")
|
||||
public void importTemplate(HttpServletResponse response) throws IOException {
|
||||
ruleControllerService.downloadTemplate(response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入PQC检测规则
|
||||
* @param file Excel文件
|
||||
* @param importMode 导入方式:overwrite=覆盖导入,append=追加导入
|
||||
*/
|
||||
@PostMapping("/import")
|
||||
@Transactional
|
||||
public ApiResult<?> importData(@RequestParam("file") MultipartFile file,
|
||||
@NotNull(message = "导入方式不能为空") @RequestParam String importMode) throws Exception {
|
||||
ruleControllerService.importFromExcel(file, importMode);
|
||||
return ApiResult.success();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,15 +47,13 @@ public class PqcInspectionRuleAddQO {
|
|||
private Long stepDicItemId;
|
||||
|
||||
/**
|
||||
* 检查点编号(必填)
|
||||
* 检查点编号
|
||||
*/
|
||||
@NotBlank(message = "检查点编号不能为空")
|
||||
private String inspectionPointCode;
|
||||
|
||||
/**
|
||||
* 检查点名称(必填)
|
||||
* 检查点名称
|
||||
*/
|
||||
@NotBlank(message = "检查点名称不能为空")
|
||||
private String inspectionPointName;
|
||||
|
||||
/**
|
||||
|
|
@ -78,9 +76,9 @@ public class PqcInspectionRuleAddQO {
|
|||
private String inspectionContent;
|
||||
|
||||
/**
|
||||
* 检查类型:0=工序检查,1=关键物料拍照,2=全部(必填)
|
||||
* 检查类型:0=工序检查,1=关键物料拍照,2=关键物料采集(多选)
|
||||
*/
|
||||
private Integer inspectionType;
|
||||
private List<Integer> inspectionType;
|
||||
|
||||
/**
|
||||
* 判定类型:0=目视,1=量具(必填)
|
||||
|
|
|
|||
|
|
@ -86,9 +86,9 @@ public class PqcInspectionRuleEditQO {
|
|||
private String inspectionContent;
|
||||
|
||||
/**
|
||||
* 检查类型
|
||||
* 检查类型:多选
|
||||
*/
|
||||
private Integer inspectionType;
|
||||
private List<Integer> inspectionType;
|
||||
|
||||
/**
|
||||
* 判定类型
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import lombok.Data;
|
|||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 检查项VO
|
||||
|
|
@ -20,70 +21,45 @@ public class PqcInspectionPointItemVO {
|
|||
/**
|
||||
* 检查点ID
|
||||
*/
|
||||
private Long pointId;
|
||||
private Long inspectionCodeId;
|
||||
|
||||
/**
|
||||
* 检验规则ID
|
||||
*/
|
||||
private Long ruleId;
|
||||
|
||||
/**
|
||||
* 检查项名称
|
||||
*/
|
||||
private String itemName;
|
||||
|
||||
/**
|
||||
* 检查项编码
|
||||
*/
|
||||
private String itemCode;
|
||||
|
||||
/**
|
||||
* 检验标准
|
||||
*/
|
||||
private String standard;
|
||||
|
||||
/**
|
||||
* 检验方法
|
||||
*/
|
||||
private String inspectionMethod;
|
||||
|
||||
/**
|
||||
* 上限值
|
||||
*/
|
||||
private String upperLimit;
|
||||
|
||||
/**
|
||||
* 下限值
|
||||
*/
|
||||
private String lowerLimit;
|
||||
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
private String unit;
|
||||
|
||||
/**
|
||||
* 检查顺序
|
||||
* 排序
|
||||
*/
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 是否必填:0-否,1-是
|
||||
* 检查内容
|
||||
*/
|
||||
private Short isRequired;
|
||||
private String inspectionContent;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
* 检查类型:0=工序检查,1=关键物料拍照,2=关键物料采集(多选,返回数组)
|
||||
*/
|
||||
private String remark;
|
||||
private List<Integer> inspectionType;
|
||||
|
||||
/**
|
||||
* 创建人ID
|
||||
* 判定类型:0=目视,1=量具
|
||||
*/
|
||||
private Long createId;
|
||||
private Integer inspectionMethods;
|
||||
|
||||
/**
|
||||
* 创建人名称
|
||||
* 样例图地址
|
||||
*/
|
||||
private String inspectionImgUrl;
|
||||
|
||||
/**
|
||||
* 星级(1-3级)
|
||||
*/
|
||||
private Integer inspectionLevel;
|
||||
|
||||
/**
|
||||
* 创建人编号
|
||||
*/
|
||||
private Long createBy;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
private String createName;
|
||||
|
||||
|
|
@ -93,17 +69,17 @@ public class PqcInspectionPointItemVO {
|
|||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 修改人ID
|
||||
* 修改人编号
|
||||
*/
|
||||
private Long modifyId;
|
||||
private Long updateBy;
|
||||
|
||||
/**
|
||||
* 修改人名称
|
||||
* 修改人姓名
|
||||
*/
|
||||
private String modifyName;
|
||||
private String updateName;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private LocalDateTime modifyTime;
|
||||
private LocalDateTime updateTime;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,37 +19,37 @@ public class PqcInspectionPointVO {
|
|||
private Long id;
|
||||
|
||||
/**
|
||||
* 检验规则ID
|
||||
* 规则主表ID
|
||||
*/
|
||||
private Long ruleId;
|
||||
private Long pqcRuleId;
|
||||
|
||||
/**
|
||||
* 步装名称
|
||||
*/
|
||||
private String stepName;
|
||||
|
||||
/**
|
||||
* 步装字典ID
|
||||
*/
|
||||
private Long stepDicItemId;
|
||||
|
||||
/**
|
||||
* 检查点编号
|
||||
*/
|
||||
private String inspectionPointCode;
|
||||
|
||||
/**
|
||||
* 检查点名称
|
||||
*/
|
||||
private String pointName;
|
||||
private String inspectionPointName;
|
||||
|
||||
/**
|
||||
* 检查点编码
|
||||
* 创建人编号
|
||||
*/
|
||||
private String pointCode;
|
||||
private Long createBy;
|
||||
|
||||
/**
|
||||
* 检查顺序
|
||||
*/
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 创建人ID
|
||||
*/
|
||||
private Long createId;
|
||||
|
||||
/**
|
||||
* 创建人名称
|
||||
* 创建人姓名
|
||||
*/
|
||||
private String createName;
|
||||
|
||||
|
|
@ -59,19 +59,19 @@ public class PqcInspectionPointVO {
|
|||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 修改人ID
|
||||
* 修改人编号
|
||||
*/
|
||||
private Long modifyId;
|
||||
private Long updateBy;
|
||||
|
||||
/**
|
||||
* 修改人名称
|
||||
* 修改人姓名
|
||||
*/
|
||||
private String modifyName;
|
||||
private String updateName;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private LocalDateTime modifyTime;
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 检查项列表
|
||||
|
|
|
|||
|
|
@ -19,72 +19,52 @@ public class PqcInspectionRuleDetailVO {
|
|||
private Long id;
|
||||
|
||||
/**
|
||||
* 规则编码
|
||||
* 机型编号
|
||||
*/
|
||||
private String ruleCode;
|
||||
private String modelNo;
|
||||
|
||||
/**
|
||||
* 规则名称
|
||||
* 规则编号
|
||||
*/
|
||||
private String ruleName;
|
||||
private String pqcRuleCode;
|
||||
|
||||
/**
|
||||
* 物料编码
|
||||
* 版本号
|
||||
*/
|
||||
private String materialCode;
|
||||
private Integer ruleVersion;
|
||||
|
||||
/**
|
||||
* 物料描述
|
||||
* 是否禁用
|
||||
*/
|
||||
private String materialName;
|
||||
private Boolean isDisabled;
|
||||
|
||||
/**
|
||||
* 规则类型
|
||||
* 审核状态:0=未审核,1=已审核,2=已驳回
|
||||
*/
|
||||
private Short ruleType;
|
||||
private Integer auditStatus;
|
||||
|
||||
/**
|
||||
* 规则类型名称
|
||||
* 驳回原因
|
||||
*/
|
||||
private String ruleTypeName;
|
||||
private String auditRemark;
|
||||
|
||||
/**
|
||||
* 适用工序
|
||||
* 审核人姓名
|
||||
*/
|
||||
private String processCode;
|
||||
private String auditUserName;
|
||||
|
||||
/**
|
||||
* 适用工序名称
|
||||
* 审核时间
|
||||
*/
|
||||
private String processName;
|
||||
private LocalDateTime auditDateTime;
|
||||
|
||||
/**
|
||||
* 审核状态:0-待审核,1-审核通过,2-审核不通过
|
||||
* 创建人编号
|
||||
*/
|
||||
private Short auditStatus;
|
||||
private Long createBy;
|
||||
|
||||
/**
|
||||
* 审核状态名称
|
||||
*/
|
||||
private String auditStatusName;
|
||||
|
||||
/**
|
||||
* 启用状态:0-停用,1-启用
|
||||
*/
|
||||
private Short enableStatus;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 创建人ID
|
||||
*/
|
||||
private Long createId;
|
||||
|
||||
/**
|
||||
* 创建人名称
|
||||
* 创建人姓名
|
||||
*/
|
||||
private String createName;
|
||||
|
||||
|
|
@ -94,34 +74,19 @@ public class PqcInspectionRuleDetailVO {
|
|||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 修改人ID
|
||||
* 修改人编号
|
||||
*/
|
||||
private Long modifyId;
|
||||
private Long updateBy;
|
||||
|
||||
/**
|
||||
* 修改人名称
|
||||
* 修改人姓名
|
||||
*/
|
||||
private String modifyName;
|
||||
private String updateName;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private LocalDateTime modifyTime;
|
||||
|
||||
/**
|
||||
* 审核人
|
||||
*/
|
||||
private String auditBy;
|
||||
|
||||
/**
|
||||
* 审核时间
|
||||
*/
|
||||
private LocalDateTime auditTime;
|
||||
|
||||
/**
|
||||
* 审核说明
|
||||
*/
|
||||
private String auditMsg;
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 检查点列表
|
||||
|
|
|
|||
|
|
@ -5,12 +5,15 @@ import com.nflg.qms.admin.pojo.qo.PqcInspectionRuleAddQO;
|
|||
import com.nflg.qms.admin.pojo.qo.PqcInspectionRuleAuditQO;
|
||||
import com.nflg.qms.admin.pojo.qo.PqcInspectionRuleEditQO;
|
||||
import com.nflg.qms.admin.pojo.qo.PqcInspectionRuleSearchQO;
|
||||
import com.nflg.qms.admin.pojo.vo.PqcInspectionPointListVO;
|
||||
import com.nflg.qms.admin.pojo.vo.PqcInspectionRuleDetailVO;
|
||||
import com.nflg.qms.admin.pojo.vo.PqcInspectionRuleVO;
|
||||
import com.nflg.wms.common.pojo.PageData;
|
||||
import com.nflg.wms.common.pojo.vo.QmsPqcInspectionPointItemsGroupedVO;
|
||||
import com.nflg.wms.common.pojo.qo.PqcInspectionRuleExportQO;
|
||||
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
|
@ -30,13 +33,15 @@ public interface QmsPqcInspectionRuleControllerService {
|
|||
|
||||
/**
|
||||
* 新增规则
|
||||
* @return 新创建的规则ID
|
||||
*/
|
||||
void add(PqcInspectionRuleAddQO qo);
|
||||
Long add(PqcInspectionRuleAddQO qo);
|
||||
|
||||
/**
|
||||
* 编辑规则(含版本管理)
|
||||
* 已审核规则有变化时会 fork 出新版本,返回实际保存的规则ID
|
||||
*/
|
||||
void edit(PqcInspectionRuleEditQO qo);
|
||||
Long edit(PqcInspectionRuleEditQO qo);
|
||||
|
||||
/**
|
||||
* 批量删除规则(只能删除未审核的)
|
||||
|
|
@ -58,10 +63,27 @@ public interface QmsPqcInspectionRuleControllerService {
|
|||
*/
|
||||
void toggleDisabled(Long id);
|
||||
|
||||
List<PqcInspectionPointListVO> listPointsByModelNo(String modelNo);
|
||||
/**
|
||||
* 删除检查点(含其下检查项)
|
||||
* 已审核规则会 fork 出新版本后执行删除,返回新版本规则ID;未审核规则返回原规则ID
|
||||
*/
|
||||
Long deletePoint(Long pointId);
|
||||
|
||||
/**
|
||||
* 根据检查点ID查询检测项列表(分组返回)
|
||||
* 导入PQC检测规则
|
||||
* @param file Excel文件
|
||||
* @param importMode 导入方式:overwrite=覆盖导入,append=追加导入
|
||||
*/
|
||||
QmsPqcInspectionPointItemsGroupedVO listItemsByInspectionPointIdGrouped(Long inspectionPointId);
|
||||
void importFromExcel(MultipartFile file, String importMode) throws Exception;
|
||||
|
||||
/**
|
||||
* 导出PQC检测规则
|
||||
* 如果ids不为空则导出指定ID数据,否则导出查询条件匹配的全部数据
|
||||
*/
|
||||
void export(HttpServletResponse response, PqcInspectionRuleExportQO qo) throws IOException;
|
||||
|
||||
/**
|
||||
* 下载导入模板
|
||||
*/
|
||||
void downloadTemplate(HttpServletResponse response) throws IOException;
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,94 @@
|
|||
package com.nflg.wms.common.pojo.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.ttzero.excel.annotation.ExcelColumn;
|
||||
import org.ttzero.excel.annotation.MediaColumn;
|
||||
|
||||
/**
|
||||
* PQC检测规则 导出DTO
|
||||
* 将规则、检查点、检查项三层结构展平为单行导出
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class PqcInspectionRuleExportDTO {
|
||||
|
||||
/**
|
||||
* 机型编号
|
||||
*/
|
||||
@ExcelColumn("机型编号")
|
||||
private String modelNo;
|
||||
|
||||
/**
|
||||
* 步装名称
|
||||
*/
|
||||
@ExcelColumn("步装名称")
|
||||
private String stepName;
|
||||
|
||||
/**
|
||||
* 检查点编号
|
||||
*/
|
||||
@ExcelColumn("检查点编号")
|
||||
private String inspectionPointCode;
|
||||
|
||||
/**
|
||||
* 检查点名称
|
||||
*/
|
||||
@ExcelColumn("检查点名称")
|
||||
private String inspectionPointName;
|
||||
|
||||
/**
|
||||
* 检查项内容
|
||||
*/
|
||||
@ExcelColumn("检查项内容")
|
||||
private String inspectionContent;
|
||||
|
||||
/**
|
||||
* 检查项类别(工序检查/关键物料采集拍照/全部)
|
||||
*/
|
||||
@ExcelColumn("检查项类别")
|
||||
private String inspectionTypeText;
|
||||
|
||||
/**
|
||||
* 检测方法(目视/量具)
|
||||
*/
|
||||
@ExcelColumn("检测方法")
|
||||
private String inspectionMethodsText;
|
||||
|
||||
/**
|
||||
* 等级(1-3)
|
||||
*/
|
||||
@ExcelColumn("等级")
|
||||
private String inspectionLevelText;
|
||||
|
||||
/**
|
||||
* 实例图
|
||||
*/
|
||||
@ExcelColumn("实例图")
|
||||
@MediaColumn
|
||||
private String inspectionImage;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
@ExcelColumn("排序")
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 规则编号
|
||||
*/
|
||||
@ExcelColumn("规则编号")
|
||||
private String pqcRuleCode;
|
||||
|
||||
/**
|
||||
* 版本号
|
||||
*/
|
||||
@ExcelColumn("版本号")
|
||||
private Integer ruleVersion;
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
@ExcelColumn("审核状态")
|
||||
private String auditStatusText;
|
||||
}
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
package com.nflg.wms.common.pojo.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.ttzero.excel.annotation.ExcelColumn;
|
||||
|
||||
/**
|
||||
* PQC检测规则 导入DTO
|
||||
* Excel模板列:机型编号*, 步装名称*, 检查点编号*, 检查点名称, 检查项内容*, 检查项类别*, 检测方法*, 等级*, 实例图, 排序
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class PqcInspectionRuleImportDTO {
|
||||
|
||||
/**
|
||||
* 机型编号(必填)
|
||||
*/
|
||||
@ExcelColumn("机型编号*")
|
||||
private String modelNo;
|
||||
|
||||
/**
|
||||
* 步装名称(必填)
|
||||
*/
|
||||
@ExcelColumn("步装名称*")
|
||||
private String stepName;
|
||||
|
||||
/**
|
||||
* 检查点编号(必填)
|
||||
*/
|
||||
@ExcelColumn("检查点编号*")
|
||||
private String inspectionPointCode;
|
||||
|
||||
/**
|
||||
* 检查点名称(可选)
|
||||
*/
|
||||
@ExcelColumn("检查点名称")
|
||||
private String inspectionPointName;
|
||||
|
||||
/**
|
||||
* 检查项内容(必填)
|
||||
*/
|
||||
@ExcelColumn("检查项内容*")
|
||||
private String inspectionContent;
|
||||
|
||||
/**
|
||||
* 检查项类别(必填):工序检查/关键物料采集拍照/全部
|
||||
*/
|
||||
@ExcelColumn("检查项类别*")
|
||||
private String inspectionTypeText;
|
||||
|
||||
/**
|
||||
* 检测方法(必填):目视/量具
|
||||
*/
|
||||
@ExcelColumn("检测方法*")
|
||||
private String inspectionMethodsText;
|
||||
|
||||
/**
|
||||
* 等级(必填):1-3
|
||||
*/
|
||||
@ExcelColumn("等级*")
|
||||
private String inspectionLevelText;
|
||||
|
||||
/**
|
||||
* 实例图(可选,支持DISPIMG公式)
|
||||
*/
|
||||
@ExcelColumn("实例图")
|
||||
private String inspectionImage;
|
||||
|
||||
/**
|
||||
* 排序(可选)
|
||||
*/
|
||||
@ExcelColumn("排序")
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 错误信息(导入时填写)
|
||||
*/
|
||||
@ExcelColumn("错误信息")
|
||||
private String error;
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
package com.nflg.wms.common.pojo.qo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* PQC检测规则 导出请求参数
|
||||
*/
|
||||
@Data
|
||||
public class PqcInspectionRuleExportQO {
|
||||
|
||||
/**
|
||||
* 指定导出的规则ID列表(可选,为空则导出查询条件匹配的全部数据)
|
||||
*/
|
||||
private List<Long> ids;
|
||||
|
||||
/**
|
||||
* 查询条件(可选,当ids为空时用于导出查询条件匹配的数据)
|
||||
*/
|
||||
private String modelNo;
|
||||
|
||||
private String pqcRuleCode;
|
||||
|
||||
private Boolean isDisabled;
|
||||
|
||||
private Integer auditStatus;
|
||||
|
||||
private String createTimeStart;
|
||||
|
||||
private String createTimeEnd;
|
||||
}
|
||||
|
|
@ -47,7 +47,7 @@ public class QmsPqcInspectionPointItems implements Serializable {
|
|||
private String inspectionContent;
|
||||
|
||||
/**
|
||||
* 检查类型:0=工序检查,1=关键物料拍照,2=全部
|
||||
* 检查类型(位标志,支持多选):bit0=工序检查(1), bit1=关键物料拍照(2), bit2=关键物料采集(4)
|
||||
*/
|
||||
private Integer inspectionType;
|
||||
|
||||
|
|
|
|||
|
|
@ -41,13 +41,14 @@ public class RustFSServiceImpl implements FileUploadService {
|
|||
@Override
|
||||
public String upload(String filePath, InputStream stream, String contentType) throws Exception {
|
||||
ensureBucketExists();
|
||||
byte[] bytes = stream.readAllBytes();
|
||||
s3Client.putObject(
|
||||
PutObjectRequest.builder()
|
||||
.bucket(bucketName)
|
||||
.key(filePath)
|
||||
.contentType(contentType)
|
||||
.build(),
|
||||
RequestBody.fromInputStream(stream, stream.available())
|
||||
RequestBody.fromBytes(bytes)
|
||||
);
|
||||
return StrUtil.format("{}/{}/{}", domain, bucketName, filePath);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue