Compare commits
48 Commits
b475bee7ed
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| d53ac1db32 | |||
| 8cfd69d9bb | |||
| 5544056833 | |||
| bf7ee08b08 | |||
| b2a9a117bc | |||
| 234e5b866f | |||
| e6a4f475a4 | |||
| 00ad7fdf06 | |||
| 5790f7e9ec | |||
| 980aeb1bb0 | |||
| 94c5e076f8 | |||
| 046f4c5e1b | |||
| c6a3b6723f | |||
| c4f0070065 | |||
| acaf13ff95 | |||
| 88c374952a | |||
| 8ad3f2d7dd | |||
| 2b19ef7d68 | |||
| f7c4d3fb90 | |||
| ec464c7d28 | |||
| 2f92ef57de | |||
| 184202b82f | |||
| 7efc03570d | |||
| c1a382c255 | |||
| 44949287e0 | |||
| d294c7b5cd | |||
| 8e34f2eb62 | |||
| b7af1b87ab | |||
| 2575483122 | |||
| 22f7c53914 | |||
| 9e6ae1eca9 | |||
| 690729e266 | |||
| 1e140cf1da | |||
| 4f0b919235 | |||
| f745651370 | |||
| a4f479454f | |||
| 7a2603e1f9 | |||
| 23f65c738d | |||
| d46754ede8 | |||
| faca2f85eb | |||
| 005cf47424 | |||
| 6f64c3d4af | |||
| db7cbf8157 | |||
| a9c9b8a5ea | |||
| e5bfa0c78c | |||
| 79e536aeca | |||
| 3334248847 | |||
| 370142a99f |
@@ -1,6 +1,7 @@
|
||||
package com.ruoyi.hrm.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
@@ -18,8 +19,10 @@ import com.ruoyi.hrm.domain.vo.HrmMyApplyVo;
|
||||
import com.ruoyi.hrm.domain.vo.HrmReimburseReqVo;
|
||||
import com.ruoyi.hrm.domain.vo.HrmSealReqVo;
|
||||
import com.ruoyi.hrm.domain.vo.HrmTravelReqVo;
|
||||
import com.ruoyi.hrm.domain.HrmFlowInstance;
|
||||
import com.ruoyi.hrm.mapper.HrmAppropriationReqMapper;
|
||||
import com.ruoyi.hrm.mapper.HrmEmployeeMapper;
|
||||
import com.ruoyi.hrm.mapper.HrmFlowInstanceMapper;
|
||||
import com.ruoyi.hrm.mapper.HrmLeaveReqMapper;
|
||||
import com.ruoyi.hrm.mapper.HrmReimburseReqMapper;
|
||||
import com.ruoyi.hrm.mapper.HrmSealReqMapper;
|
||||
@@ -32,7 +35,9 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -48,6 +53,8 @@ public class HrmMyApplyController extends BaseController {
|
||||
private final HrmSealReqMapper sealReqMapper;
|
||||
private final HrmReimburseReqMapper reimburseReqMapper;
|
||||
private final HrmAppropriationReqMapper appropriationReqMapper;
|
||||
private final HrmFlowInstanceMapper flowInstanceMapper;
|
||||
private final ObjectMapper objectMapper;
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<HrmMyApplyVo> list(String bizType, String status, String keyword, PageQuery pageQuery) {
|
||||
@@ -80,6 +87,9 @@ public class HrmMyApplyController extends BaseController {
|
||||
all.addAll(mapAppropriation(appropriationReqMapper.selectVoWithProjectList(buildAppropriationBo(emp.getEmpId(), status)), nickName));
|
||||
}
|
||||
|
||||
// 用流程实例状态覆盖业务表状态,避免历史数据状态未同步
|
||||
overrideStatusByFlowInstance(all);
|
||||
|
||||
if (keyword != null && !keyword.isEmpty()) {
|
||||
String lower = keyword.toLowerCase();
|
||||
all = all.stream().filter(v -> contains(v, lower)).collect(Collectors.toList());
|
||||
@@ -93,6 +103,52 @@ public class HrmMyApplyController extends BaseController {
|
||||
return TableDataInfo.build(page);
|
||||
}
|
||||
|
||||
private void overrideStatusByFlowInstance(List<HrmMyApplyVo> all) {
|
||||
if (all == null || all.isEmpty()) return;
|
||||
Map<String, List<Long>> bizIdsByType = all.stream()
|
||||
.filter(v -> v.getBizType() != null && v.getBizId() != null)
|
||||
.collect(Collectors.groupingBy(
|
||||
HrmMyApplyVo::getBizType,
|
||||
Collectors.mapping(HrmMyApplyVo::getBizId, Collectors.toList())
|
||||
));
|
||||
Map<String, String> statusByKey = new HashMap<>();
|
||||
bizIdsByType.forEach((bizType, bizIds) -> {
|
||||
if (bizIds.isEmpty()) return;
|
||||
List<HrmFlowInstance> insts = flowInstanceMapper.selectList(
|
||||
new com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper<HrmFlowInstance>()
|
||||
.eq(HrmFlowInstance::getBizType, bizType)
|
||||
.in(HrmFlowInstance::getBizId, bizIds)
|
||||
);
|
||||
for (HrmFlowInstance inst : insts) {
|
||||
if (inst.getStatus() == null) continue;
|
||||
// 合并多个流程实例:优先终态 (approved/rejected/withdrawn) > 进行中 (running/pending),
|
||||
// 否则前面遗留的"running"会盖掉新的"approved",导致前端永远显示审批中
|
||||
statusByKey.merge(bizType + "_" + inst.getBizId(), inst.getStatus(),
|
||||
(oldS, newS) -> _statusPriority(newS) > _statusPriority(oldS) ? newS : oldS);
|
||||
}
|
||||
});
|
||||
for (HrmMyApplyVo v : all) {
|
||||
String s = statusByKey.get(v.getBizType() + "_" + v.getBizId());
|
||||
if (s != null) v.setStatus(s);
|
||||
}
|
||||
}
|
||||
|
||||
private int _statusPriority(String s) {
|
||||
if (s == null) return 0;
|
||||
switch (s) {
|
||||
case "approved":
|
||||
case "done":
|
||||
return 3;
|
||||
case "rejected":
|
||||
case "withdrawn":
|
||||
return 2;
|
||||
case "running":
|
||||
case "pending":
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
private boolean contains(HrmMyApplyVo v, String lower) {
|
||||
return Objects.toString(v.getTitle(), "").toLowerCase().contains(lower)
|
||||
|| Objects.toString(v.getRemark(), "").toLowerCase().contains(lower)
|
||||
@@ -107,13 +163,14 @@ public class HrmMyApplyController extends BaseController {
|
||||
private HrmReimburseReqBo buildReimburseBo(Long empId, String status) { HrmReimburseReqBo bo = new HrmReimburseReqBo(); bo.setEmpId(empId); bo.setStatus(status); return bo; }
|
||||
private HrmAppropriationReqBo buildAppropriationBo(Long empId, String status) { HrmAppropriationReqBo bo = new HrmAppropriationReqBo(); bo.setEmpId(empId); bo.setStatus(status); return bo; }
|
||||
|
||||
private List<HrmMyApplyVo> mapLeave(List<HrmLeaveReqVo> list, String nickName) { return list.stream().map(v -> toVo("leave", v.getBizId(), v.getEmpId(), nickName, v.getReason(), v.getStatus(), v.getCreateTime())).collect(Collectors.toList()); }
|
||||
private List<HrmMyApplyVo> mapTravel(List<HrmTravelReqVo> list, String nickName) { return list.stream().map(v -> toVo("travel", v.getBizId(), v.getEmpId(), nickName, v.getReason(), v.getStatus(), v.getCreateTime())).collect(Collectors.toList()); }
|
||||
private List<HrmMyApplyVo> mapSeal(List<HrmSealReqVo> list, String nickName) { return list.stream().map(v -> toVo("seal", v.getBizId(), v.getEmpId(), nickName, v.getRemark(), v.getStatus(), v.getCreateTime())).collect(Collectors.toList()); }
|
||||
private List<HrmMyApplyVo> mapReimburse(List<HrmReimburseReqVo> list, String nickName) { return list.stream().map(v -> toVo("reimburse", v.getBizId(), v.getEmpId(), nickName, v.getReason(), v.getStatus(), v.getCreateTime())).collect(Collectors.toList()); }
|
||||
private List<HrmMyApplyVo> mapAppropriation(List<HrmAppropriationReqVo> list, String nickName) { return list.stream().map(v -> toVo("appropriation", v.getBizId(), v.getEmpId(), nickName, v.getReason(), v.getStatus(), v.getCreateTime())).collect(Collectors.toList()); }
|
||||
private List<HrmMyApplyVo> mapLeave(List<HrmLeaveReqVo> list, String nickName) { return list.stream().map(v -> toVo("leave", v.getBizId(), v.getEmpId(), nickName, v.getReason(), v.getStatus(), v.getCreateTime(), v)).collect(Collectors.toList()); }
|
||||
private List<HrmMyApplyVo> mapTravel(List<HrmTravelReqVo> list, String nickName) { return list.stream().map(v -> toVo("travel", v.getBizId(), v.getEmpId(), nickName, v.getReason(), v.getStatus(), v.getCreateTime(), v)).collect(Collectors.toList()); }
|
||||
private List<HrmMyApplyVo> mapSeal(List<HrmSealReqVo> list, String nickName) { return list.stream().map(v -> toVo("seal", v.getBizId(), v.getEmpId(), nickName, v.getPurpose() != null ? v.getPurpose() : v.getRemark(), v.getStatus(), v.getCreateTime(), v)).collect(Collectors.toList()); }
|
||||
private List<HrmMyApplyVo> mapReimburse(List<HrmReimburseReqVo> list, String nickName) { return list.stream().map(v -> toVo("reimburse", v.getBizId(), v.getEmpId(), nickName, v.getReason(), v.getStatus(), v.getCreateTime(), v)).collect(Collectors.toList()); }
|
||||
private List<HrmMyApplyVo> mapAppropriation(List<HrmAppropriationReqVo> list, String nickName) { return list.stream().map(v -> toVo("appropriation", v.getBizId(), v.getEmpId(), nickName, v.getReason(), v.getStatus(), v.getCreateTime(), v)).collect(Collectors.toList()); }
|
||||
|
||||
private HrmMyApplyVo toVo(String bizType, Long bizId, Long empId, String nickName, String title, String status, java.util.Date createTime) {
|
||||
@SuppressWarnings("unchecked")
|
||||
private HrmMyApplyVo toVo(String bizType, Long bizId, Long empId, String nickName, String title, String status, java.util.Date createTime, Object source) {
|
||||
HrmMyApplyVo vo = new HrmMyApplyVo();
|
||||
vo.setBizType(bizType);
|
||||
vo.setBizId(bizId);
|
||||
@@ -122,6 +179,9 @@ public class HrmMyApplyController extends BaseController {
|
||||
vo.setTitle(title);
|
||||
vo.setStatus(status);
|
||||
vo.setCreateTime(createTime);
|
||||
if (source != null) {
|
||||
vo.setBizData(objectMapper.convertValue(source, Map.class));
|
||||
}
|
||||
return vo;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import lombok.Data;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
@Data
|
||||
public class HrmFlowInstanceVo implements Serializable {
|
||||
@@ -41,4 +42,7 @@ public class HrmFlowInstanceVo implements Serializable {
|
||||
private Date createTime;
|
||||
private String updateBy;
|
||||
private Date updateTime;
|
||||
|
||||
/** 业务表回填的数据,用于列表关键信息展示 */
|
||||
private Map<String, Object> bizData;
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
@Data
|
||||
public class HrmMyApplyVo implements Serializable {
|
||||
@@ -21,4 +22,5 @@ public class HrmMyApplyVo implements Serializable {
|
||||
private Date endTime;
|
||||
private Date actualEndTime;
|
||||
private String remark;
|
||||
private Map<String, Object> bizData;
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import cn.hutool.core.bean.BeanUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.core.service.UserService;
|
||||
@@ -27,7 +28,9 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@RequiredArgsConstructor
|
||||
@@ -42,6 +45,11 @@ public class HrmFlowInstanceServiceImpl implements IHrmFlowInstanceService {
|
||||
private final UserService userService;
|
||||
private final HrmFlowCcMapper ccMapper;
|
||||
private final HrmTravelReqMapper travelReqMapper;
|
||||
private final HrmLeaveReqMapper leaveReqMapper;
|
||||
private final HrmSealReqMapper sealReqMapper;
|
||||
private final HrmReimburseReqMapper reimburseReqMapper;
|
||||
private final HrmAppropriationReqMapper appropriationReqMapper;
|
||||
private final ObjectMapper objectMapper;
|
||||
private final ApplicationEventPublisher eventPublisher;
|
||||
|
||||
@Override
|
||||
@@ -188,9 +196,55 @@ public class HrmFlowInstanceServiceImpl implements IHrmFlowInstanceService {
|
||||
}
|
||||
}
|
||||
}
|
||||
fillInstanceBizData(result.getRecords());
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private void fillInstanceBizData(List<HrmFlowInstanceVo> records) {
|
||||
if (records == null || records.isEmpty()) return;
|
||||
Map<String, List<Long>> bizIdsByType = records.stream()
|
||||
.filter(v -> v.getBizType() != null && v.getBizId() != null)
|
||||
.collect(Collectors.groupingBy(
|
||||
HrmFlowInstanceVo::getBizType,
|
||||
Collectors.mapping(HrmFlowInstanceVo::getBizId, Collectors.toList())
|
||||
));
|
||||
Map<String, Object> bizDataMap = new HashMap<>();
|
||||
bizIdsByType.forEach((bizType, bizIds) -> {
|
||||
if (bizIds.isEmpty()) return;
|
||||
switch (bizType) {
|
||||
case "leave":
|
||||
leaveReqMapper.selectBatchIds(bizIds).forEach(d ->
|
||||
bizDataMap.put("leave_" + d.getBizId(), objectMapper.convertValue(d, Map.class)));
|
||||
break;
|
||||
case "travel":
|
||||
travelReqMapper.selectBatchIds(bizIds).forEach(d ->
|
||||
bizDataMap.put("travel_" + d.getBizId(), objectMapper.convertValue(d, Map.class)));
|
||||
break;
|
||||
case "seal":
|
||||
sealReqMapper.selectBatchIds(bizIds).forEach(d ->
|
||||
bizDataMap.put("seal_" + d.getBizId(), objectMapper.convertValue(d, Map.class)));
|
||||
break;
|
||||
case "reimburse":
|
||||
reimburseReqMapper.selectBatchIds(bizIds).forEach(d ->
|
||||
bizDataMap.put("reimburse_" + d.getBizId(), objectMapper.convertValue(d, Map.class)));
|
||||
break;
|
||||
case "appropriation":
|
||||
appropriationReqMapper.selectBatchIds(bizIds).forEach(d ->
|
||||
bizDataMap.put("appropriation_" + d.getBizId(), objectMapper.convertValue(d, Map.class)));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
});
|
||||
records.forEach(vo -> {
|
||||
Object data = bizDataMap.get(vo.getBizType() + "_" + vo.getBizId());
|
||||
if (data != null) {
|
||||
vo.setBizData((Map<String, Object>) data);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HrmFlowInstanceVo> queryList(HrmFlowInstanceBo bo) {
|
||||
LambdaQueryWrapper<HrmFlowInstance> lqw = buildQueryWrapper(bo);
|
||||
|
||||
@@ -286,6 +286,7 @@ private void fillBizData(List<HrmFlowTaskVo> tasks) {
|
||||
sealReqService.stampWithJava(inst.getBizId(), stampBo);
|
||||
}
|
||||
}
|
||||
bizStatusSyncHelper.setBizApproved(inst.getBizType(), inst.getBizId());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
package com.ruoyi.hrm.service.impl;
|
||||
|
||||
import cn.hutool.core.io.IoUtil;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.databind.node.ArrayNode;
|
||||
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||
import com.google.zxing.BinaryBitmap;
|
||||
import com.google.zxing.DecodeHintType;
|
||||
import com.google.zxing.MultiFormatReader;
|
||||
@@ -26,22 +30,34 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.File;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.OutputStream;
|
||||
import java.math.BigDecimal;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.EnumMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* 发票识别服务实现:本地三段式管线,无任何外部 API 调用。
|
||||
* 单据识别服务实现:按附件类型分流。
|
||||
*
|
||||
* <p><b>图片单据</b>(jpg/png 等,可不是规范发票):直接调用小米 MiMo 多模态大模型识别,
|
||||
* 返回标题 + 金额(复用 application.yml 中 mimo.* 配置)。
|
||||
*
|
||||
* <p><b>PDF 电子发票</b>:本地三段式管线,无外部 API:
|
||||
* <ol>
|
||||
* <li>PDFBox 文本层抽取:原生电子发票直接搞定(毫秒级,几乎零算力)</li>
|
||||
* <li>ZXing 二维码识别:拍照/扫描发票 PDF,从二维码读结构化字段</li>
|
||||
@@ -57,11 +73,28 @@ import java.util.regex.Pattern;
|
||||
public class HrmInvoiceOcrServiceImpl implements IHrmInvoiceOcrService {
|
||||
|
||||
private final SysOssMapper sysOssMapper;
|
||||
private final ObjectMapper jsonMapper = new ObjectMapper();
|
||||
|
||||
/** 可通过 application.yml 覆盖;默认 jar 同级目录下的 tessdata */
|
||||
@Value("${fad.ocr.tessdata-path:}")
|
||||
private String tessdataPathConfig;
|
||||
|
||||
// === 小米 MiMo 多模态大模型(识别图片单据,复用 application.yml 里的 mimo.* 配置)===
|
||||
@Value("${mimo.base-url:https://api.xiaomimimo.com/v1}")
|
||||
private String mimoBaseUrl;
|
||||
@Value("${mimo.api-key:}")
|
||||
private String mimoApiKey;
|
||||
@Value("${mimo.model:mimo-v2.5}")
|
||||
private String mimoModel;
|
||||
@Value("${mimo.max-tokens:8192}")
|
||||
private Integer mimoMaxTokens;
|
||||
@Value("${mimo.timeout:180}")
|
||||
private Integer mimoTimeout;
|
||||
|
||||
/** 走多模态识别的图片后缀 */
|
||||
private static final Set<String> IMAGE_SUFFIXES =
|
||||
new HashSet<>(Arrays.asList("jpg", "jpeg", "png", "webp", "bmp", "gif"));
|
||||
|
||||
private String tessdataPath;
|
||||
|
||||
@PostConstruct
|
||||
@@ -108,9 +141,6 @@ public class HrmInvoiceOcrServiceImpl implements IHrmInvoiceOcrService {
|
||||
throw new ServiceException("附件不存在: " + ossId);
|
||||
}
|
||||
String suffix = StringUtils.defaultIfBlank(oss.getFileSuffix(), "").toLowerCase().replace(".", "");
|
||||
if (!"pdf".equals(suffix)) {
|
||||
throw new ServiceException("仅支持 PDF 电子发票,当前文件类型: " + suffix);
|
||||
}
|
||||
|
||||
byte[] fileBytes;
|
||||
try (InputStream in = OssFactory.instance().getObjectContent(oss.getUrl())) {
|
||||
@@ -119,6 +149,15 @@ public class HrmInvoiceOcrServiceImpl implements IHrmInvoiceOcrService {
|
||||
throw new ServiceException("读取附件失败: " + e.getMessage());
|
||||
}
|
||||
|
||||
// 图片单据:直接走小米多模态大模型识别(可识别非发票单据)
|
||||
if (IMAGE_SUFFIXES.contains(suffix)) {
|
||||
log.info("[Invoice] 图片单据走多模态识别, suffix={}", suffix);
|
||||
return recognizeImageByMiMo(fileBytes, suffix);
|
||||
}
|
||||
if (!"pdf".equals(suffix)) {
|
||||
throw new ServiceException("仅支持 PDF 电子发票或图片单据(jpg/png),当前文件类型: " + suffix);
|
||||
}
|
||||
|
||||
try (PDDocument doc = PDDocument.load(new ByteArrayInputStream(fileBytes))) {
|
||||
// 第一步:文本层
|
||||
String text = extractText(doc);
|
||||
@@ -342,4 +381,149 @@ public class HrmInvoiceOcrServiceImpl implements IHrmInvoiceOcrService {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
// ==================== 图片单据:小米多模态识别 ====================
|
||||
|
||||
private static final String VISION_SYSTEM_PROMPT =
|
||||
"你是财务单据识别助手。用户上传的是报销/拨款单据图片,可能是增值税发票、收据、出租车/火车票、"
|
||||
+ "餐饮小票、合同、对账单等,不一定是规范发票。请仔细识别图片中的费用条目与金额。";
|
||||
|
||||
private static final String VISION_USER_PROMPT =
|
||||
"请识别这张单据,只输出严格的 JSON(不要任何解释文字、不要 markdown 代码块),格式:"
|
||||
+ "{\"items\":[{\"title\":\"简洁的费用标题,如 滴滴出行-市内交通 / 餐饮-海底捞 / XX酒店住宿\",\"amount\":数字}],"
|
||||
+ "\"totalAmount\":数字}。amount 与 totalAmount 均为纯数字(不带货币符号/逗号);"
|
||||
+ "识别不到金额则填 0;一般一张单据对应一条 items,若单据内含多笔明细可拆成多条。";
|
||||
|
||||
/** 图片 → 多模态识别 → 结构化结果 */
|
||||
private HrmInvoiceOcrResultVo recognizeImageByMiMo(byte[] bytes, String suffix) {
|
||||
if (StringUtils.isBlank(mimoApiKey)) {
|
||||
throw new ServiceException("未配置 AI 识别服务(mimo.api-key),无法识别图片单据");
|
||||
}
|
||||
String mime = "jpg".equals(suffix) ? "jpeg" : suffix;
|
||||
String dataUri = "data:image/" + mime + ";base64,"
|
||||
+ java.util.Base64.getEncoder().encodeToString(bytes);
|
||||
String content = callMiMoVision(dataUri);
|
||||
return parseVisionJson(content);
|
||||
}
|
||||
|
||||
/** 调用小米 MiMo /chat/completions(OpenAI 兼容,多模态、非流式),返回 message.content */
|
||||
private String callMiMoVision(String imageDataUri) {
|
||||
ObjectNode body = jsonMapper.createObjectNode();
|
||||
body.put("model", mimoModel);
|
||||
body.put("max_completion_tokens", mimoMaxTokens);
|
||||
body.put("max_tokens", mimoMaxTokens);
|
||||
body.put("temperature", 0.2);
|
||||
body.put("stream", false);
|
||||
ArrayNode messages = body.putArray("messages");
|
||||
messages.addObject().put("role", "system").put("content", VISION_SYSTEM_PROMPT);
|
||||
ObjectNode userMsg = messages.addObject();
|
||||
userMsg.put("role", "user");
|
||||
ArrayNode contentArr = userMsg.putArray("content");
|
||||
contentArr.addObject().put("type", "text").put("text", VISION_USER_PROMPT);
|
||||
ObjectNode img = contentArr.addObject();
|
||||
img.put("type", "image_url");
|
||||
img.putObject("image_url").put("url", imageDataUri);
|
||||
|
||||
HttpURLConnection conn = null;
|
||||
try {
|
||||
URL url = new URL(mimoBaseUrl + "/chat/completions");
|
||||
conn = (HttpURLConnection) url.openConnection();
|
||||
conn.setRequestMethod("POST");
|
||||
conn.setDoOutput(true);
|
||||
conn.setConnectTimeout(10_000);
|
||||
conn.setReadTimeout((mimoTimeout == null ? 180 : mimoTimeout) * 1000);
|
||||
conn.setRequestProperty("Content-Type", "application/json");
|
||||
conn.setRequestProperty("api-key", mimoApiKey);
|
||||
conn.setRequestProperty("Authorization", "Bearer " + mimoApiKey);
|
||||
try (OutputStream os = conn.getOutputStream()) {
|
||||
os.write(jsonMapper.writeValueAsString(body).getBytes(StandardCharsets.UTF_8));
|
||||
}
|
||||
int code = conn.getResponseCode();
|
||||
if (code >= 400) {
|
||||
String err = readStream(conn.getErrorStream());
|
||||
throw new ServiceException("AI 识别服务返回 " + code + ":" + StringUtils.substring(err, 0, 300));
|
||||
}
|
||||
JsonNode root = jsonMapper.readTree(readStream(conn.getInputStream()));
|
||||
JsonNode message = root.path("choices").path(0).path("message");
|
||||
String content = message.path("content").asText("");
|
||||
if (StringUtils.isBlank(content)) {
|
||||
String finish = root.path("choices").path(0).path("finish_reason").asText("");
|
||||
if ("length".equals(finish)) {
|
||||
throw new ServiceException("AI 识别输出被截断,请重试或提高 mimo.max-tokens");
|
||||
}
|
||||
throw new ServiceException("AI 未返回有效识别内容");
|
||||
}
|
||||
return content;
|
||||
} catch (ServiceException e) {
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
log.error("[Invoice] 调用 MiMo 多模态识别失败", e);
|
||||
throw new ServiceException("AI 识别服务调用失败:" + e.getMessage());
|
||||
} finally {
|
||||
if (conn != null) conn.disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
/** 解析模型返回的 JSON(容错:去掉 markdown 代码块,截取首尾花括号) */
|
||||
private HrmInvoiceOcrResultVo parseVisionJson(String content) {
|
||||
HrmInvoiceOcrResultVo vo = new HrmInvoiceOcrResultVo();
|
||||
vo.setInvoiceType("AI图片识别");
|
||||
List<HrmInvoiceOcrResultVo.Item> items = new ArrayList<>();
|
||||
try {
|
||||
String jsonStr = extractJson(content);
|
||||
JsonNode root = jsonMapper.readTree(jsonStr);
|
||||
JsonNode arr = root.path("items");
|
||||
if (arr.isArray()) {
|
||||
for (JsonNode n : arr) {
|
||||
HrmInvoiceOcrResultVo.Item it = new HrmInvoiceOcrResultVo.Item();
|
||||
it.setItemName(StringUtils.trimToEmpty(n.path("title").asText("")));
|
||||
it.setAmount(parseBigDecimal(n.path("amount").asText(null)));
|
||||
items.add(it);
|
||||
}
|
||||
}
|
||||
JsonNode total = root.get("totalAmount");
|
||||
if (total != null && !total.isNull()) {
|
||||
vo.setTotalAmount(parseBigDecimal(total.asText(null)));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.warn("[Invoice] 解析 AI 识别 JSON 失败,原始内容: {}", StringUtils.substring(content, 0, 300));
|
||||
}
|
||||
if (items.isEmpty()) {
|
||||
HrmInvoiceOcrResultVo.Item it = new HrmInvoiceOcrResultVo.Item();
|
||||
it.setItemName("");
|
||||
it.setAmount(vo.getTotalAmount());
|
||||
items.add(it);
|
||||
}
|
||||
// 无总额时用明细汇总
|
||||
if (vo.getTotalAmount() == null) {
|
||||
BigDecimal sum = BigDecimal.ZERO;
|
||||
for (HrmInvoiceOcrResultVo.Item it : items) {
|
||||
if (it.getAmount() != null) sum = sum.add(it.getAmount());
|
||||
}
|
||||
vo.setTotalAmount(sum);
|
||||
}
|
||||
vo.setItems(items);
|
||||
return vo;
|
||||
}
|
||||
|
||||
/** 从可能带 ```json 包裹或前后缀文字的字符串里截取 JSON 主体 */
|
||||
private static String extractJson(String raw) {
|
||||
if (raw == null) return "{}";
|
||||
String s = raw.trim();
|
||||
int begin = s.indexOf('{');
|
||||
int end = s.lastIndexOf('}');
|
||||
return (begin >= 0 && end > begin) ? s.substring(begin, end + 1) : s;
|
||||
}
|
||||
|
||||
private static String readStream(InputStream in) {
|
||||
if (in == null) return "";
|
||||
try (BufferedReader r = new BufferedReader(new InputStreamReader(in, StandardCharsets.UTF_8))) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
String l;
|
||||
while ((l = r.readLine()) != null) sb.append(l).append('\n');
|
||||
return sb.toString();
|
||||
} catch (Exception e) {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
47
fad-rolling-mill/migration_layer1.js
Normal file
47
fad-rolling-mill/migration_layer1.js
Normal file
@@ -0,0 +1,47 @@
|
||||
const mysql = require('mysql2/promise');
|
||||
|
||||
async function run() {
|
||||
const conn = await mysql.createConnection({
|
||||
host: '49.232.154.205',
|
||||
port: 13306,
|
||||
user: 'root',
|
||||
password: 'Root@12345',
|
||||
database: 'fad_oa_dev'
|
||||
});
|
||||
|
||||
console.log('Connected. Running migration...\n');
|
||||
|
||||
// 1. Add manager_id to fad_rm_project
|
||||
await conn.execute(`
|
||||
ALTER TABLE fad_rm_project
|
||||
ADD COLUMN manager_id BIGINT DEFAULT NULL COMMENT '项目经理用户ID,关联sys_user.user_id'
|
||||
AFTER manager
|
||||
`);
|
||||
console.log('✓ Added manager_id to fad_rm_project');
|
||||
|
||||
// 2. Create fad_rm_project_member table
|
||||
await conn.execute(`
|
||||
CREATE TABLE IF NOT EXISTS fad_rm_project_member (
|
||||
member_id BIGINT NOT NULL AUTO_INCREMENT COMMENT '成员ID',
|
||||
project_id BIGINT NOT NULL COMMENT '项目ID',
|
||||
user_id BIGINT NOT NULL COMMENT '用户ID',
|
||||
role VARCHAR(50) DEFAULT 'member' COMMENT '角色: manager/member/viewer',
|
||||
create_by VARCHAR(64) DEFAULT '' COMMENT '创建者',
|
||||
create_time DATETIME DEFAULT NULL COMMENT '创建时间',
|
||||
update_by VARCHAR(64) DEFAULT '' COMMENT '更新者',
|
||||
update_time DATETIME DEFAULT NULL COMMENT '更新时间',
|
||||
del_flag INT DEFAULT 0 COMMENT '删除标志',
|
||||
PRIMARY KEY (member_id),
|
||||
UNIQUE KEY uk_project_user (project_id, user_id)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='项目成员表'
|
||||
`);
|
||||
console.log('✓ Created fad_rm_project_member table');
|
||||
|
||||
await conn.end();
|
||||
console.log('\nMigration complete!');
|
||||
}
|
||||
|
||||
run().catch(err => {
|
||||
console.error('Migration failed:', err.message);
|
||||
process.exit(1);
|
||||
});
|
||||
40
fad-rolling-mill/pom.xml
Normal file
40
fad-rolling-mill/pom.xml
Normal file
@@ -0,0 +1,40 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-flowable-plus</artifactId>
|
||||
<version>0.8.3</version>
|
||||
</parent>
|
||||
<artifactId>fad-rolling-mill</artifactId>
|
||||
<name>fad-rolling-mill</name>
|
||||
<description>连轧机/可逆轧机设备总包项目管理系统</description>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-common</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-system</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-annotation</artifactId>
|
||||
<version>3.5.9</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba.fastjson2</groupId>
|
||||
<artifactId>fastjson2</artifactId>
|
||||
<version>2.0.35</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
132
fad-rolling-mill/seed_data.js
Normal file
132
fad-rolling-mill/seed_data.js
Normal file
@@ -0,0 +1,132 @@
|
||||
const mysql = require('mysql2/promise');
|
||||
|
||||
async function run() {
|
||||
const conn = await mysql.createConnection({
|
||||
host: '49.232.154.205', port: 13306, user: 'root', password: 'Root@12345',
|
||||
database: 'fad_oa_dev',
|
||||
supportBigNumbers: true,
|
||||
bigNumberStrings: true
|
||||
});
|
||||
|
||||
// 获取真实项目ID(避免JS Number精度丢失)
|
||||
const [projs] = await conn.execute('SELECT project_id, project_name FROM fad_rm_project ORDER BY project_id');
|
||||
const PROJ_A = projs[0].project_id; // 1380mm六辊可逆轧机设备总包项目
|
||||
const PROJ_B = projs[1].project_id; // 测试项目A
|
||||
console.log('项目A ID:', PROJ_A, projs[0].project_name);
|
||||
console.log('项目B ID:', PROJ_B, projs[1].project_name);
|
||||
console.log('');
|
||||
|
||||
// 清除两项目现有数据
|
||||
const tables = ['fad_rm_budget','fad_rm_tech_plan_item','fad_rm_layout_file','fad_rm_tech_review_item','fad_rm_drawing_design','fad_rm_drawing_review','fad_rm_procurement_progress','fad_rm_mfg_device','fad_rm_drawing_compare','fad_rm_doc_lib','fad_rm_site_mod','fad_rm_shipping_checklist','fad_rm_manual','fad_rm_install_tool','fad_rm_install_feedback','fad_rm_acceptance_checklist','fad_rm_commissioning_checklist'];
|
||||
for (const t of tables) {
|
||||
await conn.execute('DELETE FROM ' + t + ' WHERE project_id IN (?,?)', [PROJ_A, PROJ_B]);
|
||||
}
|
||||
console.log('已清除两项目旧数据\n');
|
||||
|
||||
//==================== 项目A:6 done + 5 progress + 6 pending ====================
|
||||
console.log('--- 项目A:1380mm六辊可逆轧机设备总包项目 ---');
|
||||
|
||||
await conn.execute("INSERT INTO fad_rm_budget (project_id,category,item,budget_amount,spent_amount,status) VALUES (?,?,?,?,?,?)", [PROJ_A,'电气','主电机','500000','480000','approved']);
|
||||
await conn.execute("INSERT INTO fad_rm_budget (project_id,category,item,budget_amount,spent_amount,status) VALUES (?,?,?,?,?,?)", [PROJ_A,'机械','轧机机架','800000','790000','approved']);
|
||||
await conn.execute("INSERT INTO fad_rm_budget (project_id,category,item,budget_amount,spent_amount,status) VALUES (?,?,?,?,?,?)", [PROJ_A,'液压','液压站','300000','290000','approved']);
|
||||
console.log(' budget: 3条 (全部approved → done)');
|
||||
|
||||
await conn.execute("INSERT INTO fad_rm_tech_plan_item (project_id,item_name,description,owner,status) VALUES (?,?,?,?,?)", [PROJ_A,'1380mm六辊轧机技术方案','主传动系统方案设计','张工','approved']);
|
||||
await conn.execute("INSERT INTO fad_rm_tech_plan_item (project_id,item_name,description,owner,status) VALUES (?,?,?,?,?)", [PROJ_A,'AGC液压系统方案','厚度自动控制系统','李工','pending']);
|
||||
console.log(' tech_plan: 2条 → progress');
|
||||
|
||||
await conn.execute("INSERT INTO fad_rm_layout_file (project_id,file_name,file_type,status) VALUES (?,?,?,?)", [PROJ_A,'车间总布局图','dwg','approved']);
|
||||
await conn.execute("INSERT INTO fad_rm_layout_file (project_id,file_name,file_type,status) VALUES (?,?,?,?)", [PROJ_A,'设备基础图','pdf','pending']);
|
||||
console.log(' layout: 2条 → progress');
|
||||
|
||||
console.log(' tech_review: 0条 → pending');
|
||||
|
||||
await conn.execute("INSERT INTO fad_rm_drawing_design (project_id,drawing_name,drawing_no,drawer,status) VALUES (?,?,?,?,?)", [PROJ_A,'轧机机架装配图','DR-001','王工','approved']);
|
||||
await conn.execute("INSERT INTO fad_rm_drawing_design (project_id,drawing_name,drawing_no,drawer,status) VALUES (?,?,?,?,?)", [PROJ_A,'主传动系统图','DR-002','王工','approved']);
|
||||
console.log(' drawing_design: 2条 (全部approved → done)');
|
||||
|
||||
console.log(' drawing_review: 0条 → pending');
|
||||
console.log(' procurement: 0条 → pending');
|
||||
console.log(' manufacturing: 0条 → pending');
|
||||
console.log(' drawing_compare: 0条 → pending');
|
||||
console.log(' doc_lib: 0条 → pending');
|
||||
console.log(' site_mod: 0条 → pending');
|
||||
|
||||
await conn.execute("INSERT INTO fad_rm_shipping_checklist (project_id,item_text,is_checked,sort_order) VALUES (?,?,?,?)", [PROJ_A,'主电机','1','1']);
|
||||
await conn.execute("INSERT INTO fad_rm_shipping_checklist (project_id,item_text,is_checked,sort_order) VALUES (?,?,?,?)", [PROJ_A,'轧机机架','1','2']);
|
||||
await conn.execute("INSERT INTO fad_rm_shipping_checklist (project_id,item_text,is_checked,sort_order) VALUES (?,?,?,?)", [PROJ_A,'液压站','1','3']);
|
||||
console.log(' shipping: 3条 (全部已勾选 → done)');
|
||||
|
||||
console.log(' manuals: 0条 → pending');
|
||||
|
||||
await conn.execute("INSERT INTO fad_rm_install_tool (project_id,name,spec,qty,unit,status,category) VALUES (?,?,?,?,?,?,?)", [PROJ_A,'千斤顶','50T','4','台','已到位','起重工具']);
|
||||
await conn.execute("INSERT INTO fad_rm_install_tool (project_id,name,spec,qty,unit,status,category) VALUES (?,?,?,?,?,?,?)", [PROJ_A,'扭力扳手','200N·m','2','把','待确认','安装工具']);
|
||||
await conn.execute("INSERT INTO fad_rm_install_tool (project_id,name,spec,qty,unit,status,category) VALUES (?,?,?,?,?,?,?)", [PROJ_A,'水平仪','0.02mm/m','1','台','待确认','测量工具']);
|
||||
console.log(' install_tool: 3条 → progress');
|
||||
|
||||
console.log(' install_feedback: 0条 → pending');
|
||||
console.log(' acceptance: 0条 → pending');
|
||||
console.log(' commissioning: 0条 → pending');
|
||||
|
||||
//==================== 项目B:3 done + 8 progress + 6 pending ====================
|
||||
console.log('\n--- 项目B:测试项目A ---');
|
||||
|
||||
await conn.execute("INSERT INTO fad_rm_budget (project_id,category,item,budget_amount,spent_amount,status) VALUES (?,?,?,?,?,?)", [PROJ_B,'电气','传感器','50000','30000','approved']);
|
||||
await conn.execute("INSERT INTO fad_rm_budget (project_id,category,item,budget_amount,spent_amount,status) VALUES (?,?,?,?,?,?)", [PROJ_B,'机械','支架','80000','0','draft']);
|
||||
console.log(' budget: 2条 (1 approved → progress)');
|
||||
|
||||
console.log(' tech_plan: 0条 → pending');
|
||||
console.log(' layout: 0条 → pending');
|
||||
|
||||
await conn.execute("INSERT INTO fad_rm_tech_review_item (project_id,review_type,item_name,conclusion,reviewer) VALUES (?,?,?,?,?)", [PROJ_B,'电气','PLC控制柜方案','approved','赵工']);
|
||||
await conn.execute("INSERT INTO fad_rm_tech_review_item (project_id,review_type,item_name,conclusion,reviewer) VALUES (?,?,?,?,?)", [PROJ_B,'机械','底座安装方案','pending','钱工']);
|
||||
console.log(' tech_review: 2条 → progress');
|
||||
|
||||
console.log(' drawing_design: 0条 → pending');
|
||||
|
||||
await conn.execute("INSERT INTO fad_rm_drawing_review (project_id,drawing_name,drawing_no,reviewer,status) VALUES (?,?,?,?,?)", [PROJ_B,'底座基础图','BASE-001','孙工','approved']);
|
||||
console.log(' drawing_review: 1条 (approved → done)');
|
||||
|
||||
await conn.execute("INSERT INTO fad_rm_procurement_progress (project_id,item_name,supplier_name,amount,current_stage) VALUES (?,?,?,?,?)", [PROJ_B,'电机','上海电机厂','120000','1']);
|
||||
await conn.execute("INSERT INTO fad_rm_procurement_progress (project_id,item_name,supplier_name,amount,current_stage) VALUES (?,?,?,?,?)", [PROJ_B,'减速机','南京减速机厂','80000','2']);
|
||||
console.log(' procurement: 2条 → progress');
|
||||
|
||||
await conn.execute("INSERT INTO fad_rm_mfg_device (project_id,device_name,spec,supplier_name,delivery_date) VALUES (?,?,?,?,?)", [PROJ_B,'主电机','500kW','上海电机厂','2026-08-15']);
|
||||
await conn.execute("INSERT INTO fad_rm_mfg_device (project_id,device_name,spec,supplier_name,delivery_date) VALUES (?,?,?,?,?)", [PROJ_B,'减速机','ZLY560','南京减速机厂','2026-09-01']);
|
||||
console.log(' manufacturing: 2条 → progress');
|
||||
|
||||
console.log(' drawing_compare: 0条 → pending');
|
||||
|
||||
await conn.execute("INSERT INTO fad_rm_doc_lib (project_id,doc_name,category,version,uploader,description) VALUES (?,?,?,?,?,?)", [PROJ_B,'技术规格书','技术文档','V1.0','周工','电机技术参数']);
|
||||
await conn.execute("INSERT INTO fad_rm_doc_lib (project_id,doc_name,category,version,uploader,description) VALUES (?,?,?,?,?,?)", [PROJ_B,'检测报告','质检报告','V1.0','吴工','出厂检测报告']);
|
||||
console.log(' doc_lib: 2条 → progress');
|
||||
|
||||
await conn.execute("INSERT INTO fad_rm_site_mod (project_id,device_name,location,mod_reason,status) VALUES (?,?,?,?,?)", [PROJ_B,'底座','基础坑','基础尺寸偏差20mm','pending']);
|
||||
console.log(' site_mod: 1条 → progress');
|
||||
|
||||
console.log(' shipping: 0条 → pending');
|
||||
|
||||
await conn.execute("INSERT INTO fad_rm_manual (project_id,manual_name,doc_type,version,description) VALUES (?,?,?,?,?)", [PROJ_B,'操作手册','说明书','V1.0','主电机操作说明']);
|
||||
await conn.execute("INSERT INTO fad_rm_manual (project_id,manual_name,doc_type,version,description) VALUES (?,?,?,?,?)", [PROJ_B,'维护手册','维护手册','V1.0','日常维护指南']);
|
||||
console.log(' manuals: 2条 → progress');
|
||||
|
||||
console.log(' install_tool: 0条 → pending');
|
||||
|
||||
await conn.execute("INSERT INTO fad_rm_install_feedback (project_id,title,location,issue_desc,status) VALUES (?,?,?,?,?)", [PROJ_B,'地脚螺栓孔偏位','基础坑','地脚螺栓孔位偏差5mm','pending']);
|
||||
await conn.execute("INSERT INTO fad_rm_install_feedback (project_id,title,location,issue_desc,status) VALUES (?,?,?,?,?)", [PROJ_B,'电缆预留不足','电气室','进线电缆预留长度不够','solved']);
|
||||
console.log(' install_feedback: 2条 → progress');
|
||||
|
||||
await conn.execute("INSERT INTO fad_rm_acceptance_checklist (project_id,item_text,is_checked,sort_order) VALUES (?,?,?,?)", [PROJ_B,'设备外观检查','1','1']);
|
||||
await conn.execute("INSERT INTO fad_rm_acceptance_checklist (project_id,item_text,is_checked,sort_order) VALUES (?,?,?,?)", [PROJ_B,'安装精度检查','1','2']);
|
||||
await conn.execute("INSERT INTO fad_rm_acceptance_checklist (project_id,item_text,is_checked,sort_order) VALUES (?,?,?,?)", [PROJ_B,'电气接线检查','1','3']);
|
||||
console.log(' acceptance: 3条 (全部已勾选 → done)');
|
||||
|
||||
console.log(' commissioning: 0条 → pending');
|
||||
|
||||
await conn.end();
|
||||
console.log('\n=== 测试数据插入完成 ===');
|
||||
console.log('项目A: 3 done (budget, drawing_design, shipping) + 3 progress (tech_plan, layout, install_tool) + 11 pending');
|
||||
console.log('项目B: 2 done (drawing_review, acceptance) + 8 progress + 7 pending');
|
||||
}
|
||||
|
||||
run().catch(e => { console.error(e); process.exit(1); });
|
||||
585
fad-rolling-mill/seed_test_a.js
Normal file
585
fad-rolling-mill/seed_test_a.js
Normal file
@@ -0,0 +1,585 @@
|
||||
const mysql = require('mysql2/promise');
|
||||
|
||||
async function run() {
|
||||
const conn = await mysql.createConnection({
|
||||
host: '49.232.154.205', port: 13306, user: 'root', password: 'Root@12345',
|
||||
database: 'fad_oa_dev',
|
||||
supportBigNumbers: true,
|
||||
bigNumberStrings: true
|
||||
});
|
||||
|
||||
// 获取测试项目A的ID
|
||||
const [projs] = await conn.execute(
|
||||
"SELECT project_id, project_name FROM fad_rm_project WHERE project_name LIKE '%测试%' ORDER BY project_id LIMIT 1"
|
||||
);
|
||||
if (projs.length === 0) {
|
||||
console.error('未找到测试项目');
|
||||
await conn.end();
|
||||
return;
|
||||
}
|
||||
const PID = projs[0].project_id;
|
||||
console.log('测试项目A ID:', PID, projs[0].project_name);
|
||||
|
||||
// 清除该项目所有旧数据
|
||||
// 注:fad_rm_mfg_stage 通过 device_id 关联,fad_rm_site_mod_media 通过 mod_id 关联,单独处理
|
||||
const tables = [
|
||||
'fad_rm_budget','fad_rm_tech_plan_item','fad_rm_layout_file','fad_rm_tech_review_item',
|
||||
'fad_rm_drawing_design','fad_rm_drawing_review','fad_rm_procurement_quote',
|
||||
'fad_rm_procurement_contract','fad_rm_procurement_progress','fad_rm_mfg_device',
|
||||
'fad_rm_drawing_compare','fad_rm_doc_lib','fad_rm_site_mod',
|
||||
'fad_rm_shipping_checklist','fad_rm_shipping_item',
|
||||
'fad_rm_manual','fad_rm_install_tool','fad_rm_install_personnel',
|
||||
'fad_rm_install_precision','fad_rm_install_progress','fad_rm_install_daily',
|
||||
'fad_rm_install_handover','fad_rm_install_feedback','fad_rm_acceptance_item',
|
||||
'fad_rm_acceptance_checklist','fad_rm_commissioning_checklist',
|
||||
'fad_rm_commissioning_clause','fad_rm_commissioning_record'
|
||||
];
|
||||
for (const t of tables) {
|
||||
await conn.execute('DELETE FROM ' + t + ' WHERE project_id = ?', [PID]);
|
||||
}
|
||||
// 制造阶段通过 device_id 关联
|
||||
await conn.execute(
|
||||
'DELETE FROM fad_rm_mfg_stage WHERE device_id IN (SELECT device_id FROM fad_rm_mfg_device WHERE project_id = ?)',
|
||||
[PID]
|
||||
);
|
||||
// 现场修改多媒体通过 mod_id 关联
|
||||
await conn.execute('DELETE FROM fad_rm_site_mod_media WHERE mod_id IN (SELECT mod_id FROM fad_rm_site_mod WHERE project_id = ?)', [PID]);
|
||||
console.log('已清除测试项目A旧数据\n');
|
||||
|
||||
// =====================================================================
|
||||
// 1. 项目预算 fad_rm_budget
|
||||
// =====================================================================
|
||||
console.log('--- 1. 项目预算 ---');
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_budget (project_id,category,item,budget_amount,spent_amount,status) VALUES (?,?,?,?,?,?)",
|
||||
[PID, '电气设备', '传感器模组', 50000, 30000, 'approved']
|
||||
);
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_budget (project_id,category,item,budget_amount,spent_amount,status) VALUES (?,?,?,?,?,?)",
|
||||
[PID, '机械设备', '底座支架加工', 80000, 0, 'draft']
|
||||
);
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_budget (project_id,category,item,budget_amount,spent_amount,status) VALUES (?,?,?,?,?,?)",
|
||||
[PID, '液压设备', '液压缸总成', 120000, 50000, 'approved']
|
||||
);
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_budget (project_id,category,item,budget_amount,spent_amount,status) VALUES (?,?,?,?,?,?)",
|
||||
[PID, '安装费用', '现场安装调试费', 60000, 0, 'draft']
|
||||
);
|
||||
console.log(' 4条预算 √');
|
||||
|
||||
// =====================================================================
|
||||
// 2. 技术方案 fad_rm_tech_plan_item
|
||||
// =====================================================================
|
||||
console.log('--- 2. 技术方案 ---');
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_tech_plan_item (project_id,item_name,description,owner,status) VALUES (?,?,?,?,?)",
|
||||
[PID, 'PLC控制方案设计', '西门子S7-1500系列PLC控制方案', '赵工', 'done']
|
||||
);
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_tech_plan_item (project_id,item_name,description,owner,status) VALUES (?,?,?,?,?)",
|
||||
[PID, '液压系统方案', '液压站及管路布局设计', '钱工', 'progress']
|
||||
);
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_tech_plan_item (project_id,item_name,description,owner,status) VALUES (?,?,?,?,?)",
|
||||
[PID, '电气布线方案', '主电机及辅机电气管线走向', '孙工', 'pending']
|
||||
);
|
||||
console.log(' 3条方案 √');
|
||||
|
||||
// =====================================================================
|
||||
// 3. 布局图 fad_rm_layout_file
|
||||
// =====================================================================
|
||||
console.log('--- 3. 布局图 ---');
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_layout_file (project_id,file_name,file_type,upload_date,status,version,file_url) VALUES (?,?,?,?,?,?,?)",
|
||||
[PID, '设备基础布局图', 'DWG', '2026-06-01', 'approved', 'V1.0', '/upload/rm/layout/PID/base_layout.dwg']
|
||||
);
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_layout_file (project_id,file_name,file_type,upload_date,status,version,file_url) VALUES (?,?,?,?,?,?,?)",
|
||||
[PID, '电气室布局图', 'PDF', '2026-06-05', 'pending', 'V0.9', '/upload/rm/layout/PID/electrical_room.pdf']
|
||||
);
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_layout_file (project_id,file_name,file_type,upload_date,status,version,file_url) VALUES (?,?,?,?,?,?,?)",
|
||||
[PID, '液压站平面图', 'DWG', '2026-06-10', 'pending', 'V1.0', '/upload/rm/layout/PID/hydraulic_plan.dwg']
|
||||
);
|
||||
console.log(' 3个布局图 √');
|
||||
|
||||
// =====================================================================
|
||||
// 4. 技术审查 fad_rm_tech_review_item
|
||||
// =====================================================================
|
||||
console.log('--- 4. 技术审查 ---');
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_tech_review_item (project_id,review_type,item_name,conclusion,reviewer,review_date,review_opinion) VALUES (?,?,?,?,?,?,?)",
|
||||
[PID, 'electrical', 'PLC控制柜方案', 'pass', '赵工', '2026-06-08', '方案符合要求,同意通过']
|
||||
);
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_tech_review_item (project_id,review_type,item_name,conclusion,reviewer,review_date,review_opinion) VALUES (?,?,?,?,?,?,?)",
|
||||
[PID, 'mechanical', '底座安装方案', 'pending', '钱工', null, '待补充强度计算书']
|
||||
);
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_tech_review_item (project_id,review_type,item_name,conclusion,reviewer,review_date,review_opinion) VALUES (?,?,?,?,?,?,?)",
|
||||
[PID, 'hydraulic', '液压管路设计审查', 'pass', '孙工', '2026-06-12', '管路走向合理,密封选型正确']
|
||||
);
|
||||
console.log(' 3条审查 √');
|
||||
|
||||
// =====================================================================
|
||||
// 5. 图纸设计 fad_rm_drawing_design
|
||||
// =====================================================================
|
||||
console.log('--- 5. 图纸设计 ---');
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_drawing_design (project_id,drawing_name,drawing_no,version,drawing_type,drawer,start_date,end_date,file_url,status) VALUES (?,?,?,?,?,?,?,?,?,?)",
|
||||
[PID, '底座基础图', 'BASE-001', 'V1.0', '零件图', '王工', '2026-05-20', '2026-06-01', '/upload/rm/dwg/PID/base_001.dwg', 'completed']
|
||||
);
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_drawing_design (project_id,drawing_name,drawing_no,version,drawing_type,drawer,start_date,end_date,file_url,status) VALUES (?,?,?,?,?,?,?,?,?,?)",
|
||||
[PID, '电气原理图', 'ELEC-001', 'V0.8', '电气原理图', '周工', '2026-06-01', null, '/upload/rm/dwg/PID/elec_001.dwg', 'in_progress']
|
||||
);
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_drawing_design (project_id,drawing_name,drawing_no,version,drawing_type,drawer,start_date,end_date,file_url,status) VALUES (?,?,?,?,?,?,?,?,?,?)",
|
||||
[PID, '液压系统图', 'HYD-001', 'V1.0', '液压原理图', '吴工', '2026-05-25', '2026-06-10', '/upload/rm/dwg/PID/hyd_001.dwg', 'completed']
|
||||
);
|
||||
console.log(' 3张图纸 √');
|
||||
|
||||
// =====================================================================
|
||||
// 6. 图纸审查 fad_rm_drawing_review
|
||||
// =====================================================================
|
||||
console.log('--- 6. 图纸审查 ---');
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_drawing_review (project_id,drawing_name,drawing_no,version,file_url,status,reviewer,review_date,review_opinion) VALUES (?,?,?,?,?,?,?,?,?)",
|
||||
[PID, '底座基础图', 'BASE-001', 'V1.0', '/upload/rm/dwg/PID/base_001.dwg', 'approved', '孙工', '2026-06-05', '尺寸标注完整,同意通过']
|
||||
);
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_drawing_review (project_id,drawing_name,drawing_no,version,file_url,status,reviewer,review_date,review_opinion) VALUES (?,?,?,?,?,?,?,?,?)",
|
||||
[PID, '电气原理图', 'ELEC-001', 'V0.8', '/upload/rm/dwg/PID/elec_001.dwg', 'pending', '李工', null, null]
|
||||
);
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_drawing_review (project_id,drawing_name,drawing_no,version,file_url,status,reviewer,review_date,review_opinion) VALUES (?,?,?,?,?,?,?,?,?)",
|
||||
[PID, '液压系统图', 'HYD-001', 'V1.0', '/upload/rm/dwg/PID/hyd_001.dwg', 'approved', '赵工', '2026-06-12', '液压原理正确,同意通过']
|
||||
);
|
||||
console.log(' 3条审查 √');
|
||||
|
||||
// =====================================================================
|
||||
// 7. 采购管理
|
||||
// =====================================================================
|
||||
console.log('--- 7. 采购管理 ---');
|
||||
|
||||
// 7a. 供应商报价
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_procurement_quote (project_id,supplier_name,item_name,spec,qty,unit,unit_price,total_price,delivery_days,warranty_months,score_price,score_delivery,score_warranty,score_total,score_rank,status) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)",
|
||||
[PID, '上海电机厂', '主电机', '500kW', 1, '台', 120000, 120000, 45, 24, 8.5, 7.0, 9.0, 8.2, 1, '2']
|
||||
);
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_procurement_quote (project_id,supplier_name,item_name,spec,qty,unit,unit_price,total_price,delivery_days,warranty_months,score_price,score_delivery,score_warranty,score_total,score_rank,status) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)",
|
||||
[PID, '南京减速机厂', '减速机', 'ZLY560', 1, '台', 80000, 80000, 60, 18, 7.5, 6.5, 8.0, 7.3, 2, '1']
|
||||
);
|
||||
|
||||
// 7b. 采购合同
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_procurement_contract (project_id,contract_no,contract_name,supplier_name,total_amount,sign_date,file_url,status,clauses,penalty_clause) VALUES (?,?,?,?,?,?,?,?,?,?)",
|
||||
[PID, 'CG-2026-001', '主电机采购合同', '上海电机厂', 120000, '2026-06-01', '/upload/rm/contract/PID/motor_contract.pdf', 'signed', '1. 供方提供500kW主电机1台\n2. 交货期45天\n3. 质保期24个月', '逾期交货按合同总价0.5%/天罚款']
|
||||
);
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_procurement_contract (project_id,contract_no,contract_name,supplier_name,total_amount,sign_date,file_url,status,clauses,penalty_clause) VALUES (?,?,?,?,?,?,?,?,?,?)",
|
||||
[PID, 'CG-2026-002', '减速机采购合同', '南京减速机厂', 80000, '2026-06-05', '/upload/rm/contract/PID/reducer_contract.pdf', 'draft', '1. 供方提供ZLY560减速机1台\n2. 交货期60天', '']
|
||||
);
|
||||
|
||||
// 7c. 采购进度
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_procurement_progress (project_id,item_name,supplier_name,contract_no,amount,order_date,current_stage,expect_date,actual_date,stages) VALUES (?,?,?,?,?,?,?,?,?,?)",
|
||||
[PID, '主电机', '上海电机厂', 'CG-2026-001', 120000, '2026-06-01', '5', '2026-07-15', null, '{"0":"done","1":"done","2":"done","3":"done","4":"done","5":"progress"}']
|
||||
);
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_procurement_progress (project_id,item_name,supplier_name,contract_no,amount,order_date,current_stage,expect_date,actual_date,stages) VALUES (?,?,?,?,?,?,?,?,?,?)",
|
||||
[PID, '减速机', '南京减速机厂', 'CG-2026-002', 80000, '2026-06-05', '2', '2026-08-01', null, '{"0":"done","1":"done","2":"progress"}']
|
||||
);
|
||||
console.log(' 报价2条 + 合同2份 + 进度2条 √');
|
||||
|
||||
// =====================================================================
|
||||
// 8. 制造进度
|
||||
// =====================================================================
|
||||
console.log('--- 8. 制造进度 ---');
|
||||
// 设备1: 主电机
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_mfg_device (project_id,device_name,spec,supplier_name,contract_no,order_date,delivery_date,penalty_rate) VALUES (?,?,?,?,?,?,?,?)",
|
||||
[PID, '主电机', '500kW', '上海电机厂', 'CG-2026-001', '2026-06-01', '2026-07-15', 500]
|
||||
);
|
||||
const [dev1] = await conn.execute('SELECT LAST_INSERT_ID() as id');
|
||||
const DEV1_ID = dev1[0].id;
|
||||
// 主电机制造阶段
|
||||
const stages1 = [
|
||||
['0', '原材料采购', '2', '2026-06-01', '2026-06-10', '2026-06-01', '2026-06-09', 1],
|
||||
['1', '机加工', '2', '2026-06-11', '2026-06-20', '2026-06-11', '2026-06-19', 2],
|
||||
['2', '绕组焊接', '2', '2026-06-21', '2026-06-28', '2026-06-21', '2026-06-27', 3],
|
||||
['3', '组装', '1', '2026-06-29', '2026-07-05', '2026-06-29', null, 4],
|
||||
['4', '喷漆', '0', '2026-07-06', '2026-07-08', null, null, 5],
|
||||
['5', '验收', '0', '2026-07-09', '2026-07-12', null, null, 6],
|
||||
['6', '包装', '0', '2026-07-13', '2026-07-13', null, null, 7],
|
||||
['7', '发货', '0', '2026-07-14', '2026-07-15', null, null, 8],
|
||||
];
|
||||
for (const st of stages1) {
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_mfg_stage (device_id,stage_key,stage_name,status,plan_start_date,plan_end_date,actual_start,actual_end,sort_order) VALUES (?,?,?,?,?,?,?,?,?)",
|
||||
[DEV1_ID, st[0], st[1], st[2], st[3], st[4], st[5], st[6], st[7]]
|
||||
);
|
||||
}
|
||||
|
||||
// 设备2: 减速机
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_mfg_device (project_id,device_name,spec,supplier_name,contract_no,order_date,delivery_date,penalty_rate) VALUES (?,?,?,?,?,?,?,?)",
|
||||
[PID, '减速机', 'ZLY560', '南京减速机厂', 'CG-2026-002', '2026-06-05', '2026-08-01', 300]
|
||||
);
|
||||
const [dev2] = await conn.execute('SELECT LAST_INSERT_ID() as id');
|
||||
const DEV2_ID = dev2[0].id;
|
||||
const stages2 = [
|
||||
['0', '原材料采购', '2', '2026-06-05', '2026-06-15', '2026-06-05', '2026-06-14', 1],
|
||||
['1', '机加工', '2', '2026-06-16', '2026-06-30', '2026-06-16', '2026-06-28', 2],
|
||||
['2', '焊接', '1', '2026-07-01', '2026-07-10', '2026-07-01', null, 3],
|
||||
['3', '组装', '0', '2026-07-11', '2026-07-18', null, null, 4],
|
||||
['4', '喷漆', '0', '2026-07-19', '2026-07-20', null, null, 5],
|
||||
['5', '验收', '0', '2026-07-21', '2026-07-25', null, null, 6],
|
||||
['6', '包装', '0', '2026-07-26', '2026-07-27', null, null, 7],
|
||||
['7', '发货', '0', '2026-07-28', '2026-08-01', null, null, 8],
|
||||
];
|
||||
for (const st of stages2) {
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_mfg_stage (device_id,stage_key,stage_name,status,plan_start_date,plan_end_date,actual_start,actual_end,sort_order) VALUES (?,?,?,?,?,?,?,?,?)",
|
||||
[DEV2_ID, st[0], st[1], st[2], st[3], st[4], st[5], st[6], st[7]]
|
||||
);
|
||||
}
|
||||
console.log(' 2台设备 + 16个阶段 √');
|
||||
|
||||
// =====================================================================
|
||||
// 9. 图纸优化比较 fad_rm_drawing_compare
|
||||
// =====================================================================
|
||||
console.log('--- 9. 图纸优化比较 ---');
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_drawing_compare (project_id,drawing_name,old_version,new_version,optimizer,compare_date,status,before_desc,after_desc,old_file_url,new_file_url,diff_notes) VALUES (?,?,?,?,?,?,?,?,?,?,?,?)",
|
||||
[PID, '底座基础图', 'V1.0', 'V1.1', '王工', '2026-06-15', 'approved', '原始设计地脚螺栓孔距为800mm,现场反馈偏大',
|
||||
'优化为760mm,与设备实际安装孔距匹配', '/upload/rm/dwg/PID/base_001_v1.0.dwg', '/upload/rm/dwg/PID/base_001_v1.1.dwg',
|
||||
'孔距调整:800→760mm;增加4个M24螺纹孔']
|
||||
);
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_drawing_compare (project_id,drawing_name,old_version,new_version,optimizer,compare_date,status,before_desc,after_desc,old_file_url,new_file_url,diff_notes) VALUES (?,?,?,?,?,?,?,?,?,?,?,?)",
|
||||
[PID, '电气原理图', 'V1.0', 'V1.1', '周工', '2026-06-16', 'pending', '原设计主电机回路未设置软启动器',
|
||||
'增加软启动器及旁路接触器', '/upload/rm/dwg/PID/elec_001_v1.0.dwg', '/upload/rm/dwg/PID/elec_001_v1.1.dwg',
|
||||
'新增软启动器回路;调整热继电器整定值']
|
||||
);
|
||||
console.log(' 2条优化记录 √');
|
||||
|
||||
// =====================================================================
|
||||
// 10. 资料库 fad_rm_doc_lib
|
||||
// =====================================================================
|
||||
console.log('--- 10. 资料库 ---');
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_doc_lib (project_id,doc_name,category,file_url) VALUES (?,?,?,?)",
|
||||
[PID, '电机技术规格书', '技术文档', '/upload/rm/doc/PID/motor_spec.pdf']
|
||||
);
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_doc_lib (project_id,doc_name,category,file_url) VALUES (?,?,?,?)",
|
||||
[PID, '出厂检测报告', '质检报告', '/upload/rm/doc/PID/inspection_report.pdf']
|
||||
);
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_doc_lib (project_id,doc_name,category,file_url) VALUES (?,?,?,?)",
|
||||
[PID, '安装手册', '技术文档', '/upload/rm/doc/PID/install_manual.pdf']
|
||||
);
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_doc_lib (project_id,doc_name,category,file_url) VALUES (?,?,?,?)",
|
||||
[PID, '验收报告模板', '质检报告', '/upload/rm/doc/PID/acceptance_template.pdf']
|
||||
);
|
||||
console.log(' 4份资料 √');
|
||||
|
||||
// =====================================================================
|
||||
// 11. 现场修改 fad_rm_site_mod + media
|
||||
// =====================================================================
|
||||
console.log('--- 11. 现场修改 ---');
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_site_mod (project_id,device_name,location,mod_reason,solution,mod_person,mod_date,status,prevent_action,drawing_updated) VALUES (?,?,?,?,?,?,?,?,?,?)",
|
||||
[PID, '底座', '基础坑', '地脚螺栓孔位偏差20mm', '现场扩孔处理,增加垫片调整', '李工', '2026-06-10', 'done',
|
||||
'加强来料检验,增加出厂前预装工序', '1']
|
||||
);
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_site_mod (project_id,device_name,location,mod_reason,solution,mod_person,mod_date,status,prevent_action,drawing_updated) VALUES (?,?,?,?,?,?,?,?,?,?)",
|
||||
[PID, '电机', '电机基础', '电机底座与基础安装孔距不匹配', '重新加工电机底座安装板', '王工', '2026-06-12', 'pending',
|
||||
'要求供应商提供实物尺寸确认后再出图', '0']
|
||||
);
|
||||
// 现场修改多媒体
|
||||
const [modRows] = await conn.execute(
|
||||
"SELECT mod_id FROM fad_rm_site_mod WHERE project_id = ? ORDER BY mod_id LIMIT 1", [PID]
|
||||
);
|
||||
if (modRows.length > 0) {
|
||||
const MOD_ID = modRows[0].mod_id;
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_site_mod_media (mod_id,media_type,file_name,file_url,file_size) VALUES (?,?,?,?,?)",
|
||||
[MOD_ID, 'image', '地脚螺栓偏差.jpg', '/upload/rm/site/PID/bolt_deviation.jpg', 204800]
|
||||
);
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_site_mod_media (mod_id,media_type,file_name,file_url,file_size) VALUES (?,?,?,?,?)",
|
||||
[MOD_ID, 'image', '扩孔处理后.jpg', '/upload/rm/site/PID/after_repair.jpg', 153600]
|
||||
);
|
||||
}
|
||||
console.log(' 2条修改记录 + 2张现场照片 √');
|
||||
|
||||
// =====================================================================
|
||||
// 12. 发货清单
|
||||
// =====================================================================
|
||||
console.log('--- 12. 发货清单 ---');
|
||||
|
||||
// 12a. 发货前CheckList
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_shipping_checklist (project_id,item_text,is_checked,sort_order) VALUES (?,?,?,?)",
|
||||
[PID, '主电机已装箱固定', '1', 1]
|
||||
);
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_shipping_checklist (project_id,item_text,is_checked,sort_order) VALUES (?,?,?,?)",
|
||||
[PID, '减速机已打包防锈', '1', 2]
|
||||
);
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_shipping_checklist (project_id,item_text,is_checked,sort_order) VALUES (?,?,?,?)",
|
||||
[PID, '随机备件清点齐全', '0', 3]
|
||||
);
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_shipping_checklist (project_id,item_text,is_checked,sort_order) VALUES (?,?,?,?)",
|
||||
[PID, '技术资料已随货', '0', 4]
|
||||
);
|
||||
|
||||
// 12b. 发货设备项
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_shipping_item (project_id,device_name,spec,qty,packed,photos,note,destination,ship_date,status) VALUES (?,?,?,?,?,?,?,?,?,?)",
|
||||
[PID, '主电机', '500kW', 2, '1', '["motor_packed_1.jpg","motor_packed_2.jpg"]', '注意防潮', '江苏张家港项目现场', '2026-07-20', '0']
|
||||
);
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_shipping_item (project_id,device_name,spec,qty,packed,photos,note,destination,ship_date,status) VALUES (?,?,?,?,?,?,?,?,?,?)",
|
||||
[PID, '减速机', 'ZLY560', 1, '0', '[]', '轻拿轻放', '江苏张家港项目现场', null, '0']
|
||||
);
|
||||
console.log(' 4条CheckList + 2项设备 √');
|
||||
|
||||
// =====================================================================
|
||||
// 13. 说明书 fad_rm_manual
|
||||
// =====================================================================
|
||||
console.log('--- 13. 说明书 ---');
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_manual (project_id,manual_name,doc_type,version,upload_date,file_url,description) VALUES (?,?,?,?,?,?,?)",
|
||||
[PID, '主电机操作手册', '说明书', 'V1.0', '2026-06-01', '/upload/rm/manual/PID/motor_manual.pdf', '500kW主电机操作与维护说明']
|
||||
);
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_manual (project_id,manual_name,doc_type,version,upload_date,file_url,description) VALUES (?,?,?,?,?,?,?)",
|
||||
[PID, '减速机维护手册', '维护手册', 'V1.0', '2026-06-05', '/upload/rm/manual/PID/reducer_maintenance.pdf', 'ZLY560减速机日常维护指南']
|
||||
);
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_manual (project_id,manual_name,doc_type,version,upload_date,file_url,description) VALUES (?,?,?,?,?,?,?)",
|
||||
[PID, '随机备件清单', '备件清单', 'V1.0', '2026-06-10', '/upload/rm/manual/PID/spare_parts.pdf', '随机备件明细及订购信息']
|
||||
);
|
||||
console.log(' 3份说明书 √');
|
||||
|
||||
// =====================================================================
|
||||
// 14. 安装准备(6张子表)
|
||||
// =====================================================================
|
||||
console.log('--- 14. 安装准备 ---');
|
||||
|
||||
// 14a. 安装工具
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_install_tool (project_id,name,name_en,spec,qty,unit,unit_price,total_price,priority,arrival_date,purpose,responsible,status,category) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?)",
|
||||
[PID, '千斤顶', 'Jack', '50T', 4, '台', 1200, 4800, '高', '2026-06-01', '设备就位顶升', '刘工', '已到位', '起重吊装']
|
||||
);
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_install_tool (project_id,name,name_en,spec,qty,unit,unit_price,total_price,priority,arrival_date,purpose,responsible,status,category) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?)",
|
||||
[PID, '扭力扳手', 'Torque Wrench', '200N·m', 2, '把', 850, 1700, '中', '2026-06-05', '螺栓紧固', '刘工', '已到位', '机械安装']
|
||||
);
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_install_tool (project_id,name,name_en,spec,qty,unit,unit_price,total_price,priority,arrival_date,purpose,responsible,status,category) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?)",
|
||||
[PID, '水平仪', 'Level Meter', '0.02mm/m', 1, '台', 3500, 3500, '高', '2026-06-10', '设备水平度检测', '陈工', '已到位', '测量仪器']
|
||||
);
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_install_tool (project_id,name,name_en,spec,qty,unit,unit_price,total_price,priority,arrival_date,purpose,responsible,status,category) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?)",
|
||||
[PID, '激光对中仪', 'Laser Aligner', '0.001mm', 1, '台', 28000, 28000, '高', '2026-06-15', '联轴器对中', '陈工', '待确认', '测量仪器']
|
||||
);
|
||||
|
||||
// 14b. 安装人员
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_install_personnel (project_id,name,name_en,position,position_en,plan_in,plan_out,days,daily_rate,total_wages,duty,qualification,phone) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)",
|
||||
[PID, '刘建国', 'Liu JG', '安装队长', 'Installation Foreman', '2026-06-15', '2026-08-30', 76, 500, 38000, '现场安装总协调', '10年以上安装经验', '13800001111']
|
||||
);
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_install_personnel (project_id,name,name_en,position,position_en,plan_in,plan_out,days,daily_rate,total_wages,duty,qualification,phone) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)",
|
||||
[PID, '陈伟', 'Chen W', '机械安装工', 'Mechanical Fitter', '2026-06-15', '2026-08-30', 76, 350, 26600, '机械设备安装', '中级钳工', '13800002222']
|
||||
);
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_install_personnel (project_id,name,name_en,position,position_en,plan_in,plan_out,days,daily_rate,total_wages,duty,qualification,phone) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)",
|
||||
[PID, '张明', 'Zhang M', '电气安装工', 'Electrician', '2026-06-20', '2026-08-15', 56, 400, 22400, '电气设备安装接线', '中级电工', '13800003333']
|
||||
);
|
||||
|
||||
// 14c. 安装精度标准
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_install_precision (project_id,system_name,item_name,name_en,target_value,unit,importance,tool,method_desc,standard_ref,requirement,is_qualified) VALUES (?,?,?,?,?,?,?,?,?,?,?,?)",
|
||||
[PID, '轧辊系统', '辊缝平行度', 'Roll Gap Parallelism', '≤0.02', 'mm/m', '★★★', '精密水平仪', '使用水平仪在辊面两端测量',
|
||||
'GB/T 1239.2', '0.02mm/m以内', '1']
|
||||
);
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_install_precision (project_id,system_name,item_name,name_en,target_value,unit,importance,tool,method_desc,standard_ref,requirement,is_qualified) VALUES (?,?,?,?,?,?,?,?,?,?,?,?)",
|
||||
[PID, '主机框架', '机架垂直度', 'Frame Verticality', '≤0.05', 'mm/m', '★★★', '经纬仪', '使用经纬仪测量机架四角立柱',
|
||||
'GB 50231', '0.05mm/m以内', '1']
|
||||
);
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_install_precision (project_id,system_name,item_name,name_en,target_value,unit,importance,tool,method_desc,standard_ref,requirement,is_qualified) VALUES (?,?,?,?,?,?,?,?,?,?,?,?)",
|
||||
[PID, 'AGC系统', '液压缸垂直度', 'Cylinder Verticality', '≤0.10', 'mm/m', '★★', '框式水平仪', '使用框式水平仪在缸体外壁测量',
|
||||
'JB/T 7929', '0.10mm/m以内', '0']
|
||||
);
|
||||
|
||||
// 14d. 安装进度计划
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_install_progress (project_id,item_name,plan_start,plan_end,actual_start,actual_end,status,delay_reason,images,videos) VALUES (?,?,?,?,?,?,?,?,?,?)",
|
||||
[PID, '基础验收', '2026-06-15', '2026-06-20', '2026-06-15', '2026-06-19', 'done', null,
|
||||
'["foundation_1.jpg","foundation_2.jpg"]', '["foundation_check.mp4"]']
|
||||
);
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_install_progress (project_id,item_name,plan_start,plan_end,actual_start,actual_end,status,delay_reason,images,videos) VALUES (?,?,?,?,?,?,?,?,?,?)",
|
||||
[PID, '底座安装', '2026-06-21', '2026-06-28', '2026-06-21', null, 'progress', null,
|
||||
'["base_install_1.jpg"]', '[]']
|
||||
);
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_install_progress (project_id,item_name,plan_start,plan_end,actual_start,actual_end,status,delay_reason,images,videos) VALUES (?,?,?,?,?,?,?,?,?,?)",
|
||||
[PID, '主电机安装', '2026-06-29', '2026-07-10', null, null, 'pending', null, '[]', '[]']
|
||||
);
|
||||
|
||||
// 14e. 施工日志
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_install_daily (project_id,log_date,weather,temperature,work_content,photo_urls) VALUES (?,?,?,?,?,?)",
|
||||
[PID, '2026-06-15', '晴', '28°C', '基础验收:检查基础尺寸、标高、地脚螺栓位置,完成验收记录',
|
||||
'["daily_0615_1.jpg","daily_0615_2.jpg"]']
|
||||
);
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_install_daily (project_id,log_date,weather,temperature,work_content,photo_urls) VALUES (?,?,?,?,?,?)",
|
||||
[PID, '2026-06-16', '多云', '26°C', '基础清理:清除基础表面杂物,打磨地脚螺栓孔',
|
||||
'["daily_0616_1.jpg"]']
|
||||
);
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_install_daily (project_id,log_date,weather,temperature,work_content,photo_urls) VALUES (?,?,?,?,?,?)",
|
||||
[PID, '2026-06-21', '晴', '30°C', '底座安装:底座吊装就位,初找水平',
|
||||
'["daily_0621_1.jpg","daily_0621_2.jpg","daily_0621_3.jpg"]']
|
||||
);
|
||||
|
||||
// 14f. 工序交接
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_install_handover (project_id,transfer_from,transfer_to,content,handover_date,sign_photo_url) VALUES (?,?,?,?,?,?)",
|
||||
[PID, '土建施工队', '安装施工队', '设备基础及地脚螺栓验收交接,基础尺寸符合图纸要求', '2026-06-14', '/upload/rm/handover/PID/handover_001.jpg']
|
||||
);
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_install_handover (project_id,transfer_from,transfer_to,content,handover_date,sign_photo_url) VALUES (?,?,?,?,?,?)",
|
||||
[PID, '安装施工队', '电气施工队', '电机基础已安装完成,移交电气施工队进行接线', '2026-06-28', null]
|
||||
);
|
||||
console.log(' 工具4件 + 人员3人 + 精度3项 + 进度3项 + 日志3条 + 交接2条 √');
|
||||
|
||||
// =====================================================================
|
||||
// 15. 安装问题反馈 fad_rm_install_feedback
|
||||
// =====================================================================
|
||||
console.log('--- 15. 安装问题反馈 ---');
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_install_feedback (project_id,device_name,title,location,issue_desc,proposer,issue_date,feedback_date,status,resolution,solution,prevent_action) VALUES (?,?,?,?,?,?,?,?,?,?,?,?)",
|
||||
[PID, '底座', '地脚螺栓孔偏位', '基础坑', 'A列2号地脚螺栓孔位偏差5mm,无法安装', '刘建国', '2026-06-22', null,
|
||||
'pending', null, '现场扩孔至设计尺寸', '加强预埋件定位精度控制']
|
||||
);
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_install_feedback (project_id,device_name,title,location,issue_desc,proposer,issue_date,feedback_date,status,resolution,solution,prevent_action) VALUES (?,?,?,?,?,?,?,?,?,?,?,?)",
|
||||
[PID, '电缆', '进线电缆预留不足', '电气室', '主电机进线电缆预留长度不够,需增加中间接线盒', '张明', '2026-06-23', '2026-06-25',
|
||||
'resolved', '已增加中间接线盒,电缆已接续完成', '增加一个中间接线盒过渡', '后续设计阶段预留足够电缆长度余量']
|
||||
);
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_install_feedback (project_id,device_name,title,location,issue_desc,proposer,issue_date,feedback_date,status,resolution,solution,prevent_action) VALUES (?,?,?,?,?,?,?,?,?,?,?,?)",
|
||||
[PID, '液压站', '液压管接头渗油', '液压站', '液压站出口管接头处轻微渗油,需更换密封圈', '刘建国', '2026-06-24', '2026-06-26',
|
||||
'resolved', '已更换密封圈,打压测试无渗漏', '更换O型密封圈并重新紧固', '来料检验增加密封圈材质检测']
|
||||
);
|
||||
console.log(' 3条反馈 √');
|
||||
|
||||
// =====================================================================
|
||||
// 16. 安装验收
|
||||
// =====================================================================
|
||||
console.log('--- 16. 安装验收 ---');
|
||||
|
||||
// 16a. 验收条目
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_acceptance_item (project_id,item_name,standard,result,inspector,inspect_date) VALUES (?,?,?,?,?,?)",
|
||||
[PID, '设备外观检查', '无锈蚀、无变形、无损伤', '1', '赵工', '2026-06-25']
|
||||
);
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_acceptance_item (project_id,item_name,standard,result,inspector,inspect_date) VALUES (?,?,?,?,?,?)",
|
||||
[PID, '安装精度检查', '水平度≤0.05mm/m,垂直度≤0.05mm/m', '1', '赵工', '2026-06-25']
|
||||
);
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_acceptance_item (project_id,item_name,standard,result,inspector,inspect_date) VALUES (?,?,?,?,?,?)",
|
||||
[PID, '电气接线检查', '接线正确,绝缘电阻≥1MΩ', '0', null, null]
|
||||
);
|
||||
|
||||
// 16b. 验收CheckList
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_acceptance_checklist (project_id,item_text,is_checked,sort_order) VALUES (?,?,?,?)",
|
||||
[PID, '设备外观检查', '1', 1]
|
||||
);
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_acceptance_checklist (project_id,item_text,is_checked,sort_order) VALUES (?,?,?,?)",
|
||||
[PID, '安装精度检查', '1', 2]
|
||||
);
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_acceptance_checklist (project_id,item_text,is_checked,sort_order) VALUES (?,?,?,?)",
|
||||
[PID, '电气接线检查', '1', 3]
|
||||
);
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_acceptance_checklist (project_id,item_text,is_checked,sort_order) VALUES (?,?,?,?)",
|
||||
[PID, '空载试运行', '0', 4]
|
||||
);
|
||||
console.log(' 验收条目3条 + CheckList4项 √');
|
||||
|
||||
// =====================================================================
|
||||
// 17. 热负荷试车
|
||||
// =====================================================================
|
||||
console.log('--- 17. 热负荷试车 ---');
|
||||
|
||||
// 17a. 试车CheckList
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_commissioning_checklist (project_id,item_text,is_checked,sort_order) VALUES (?,?,?,?)",
|
||||
[PID, '冷却水系统已投入', '0', 1]
|
||||
);
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_commissioning_checklist (project_id,item_text,is_checked,sort_order) VALUES (?,?,?,?)",
|
||||
[PID, '润滑系统已运行正常', '0', 2]
|
||||
);
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_commissioning_checklist (project_id,item_text,is_checked,sort_order) VALUES (?,?,?,?)",
|
||||
[PID, '电气保护整定值已确认', '0', 3]
|
||||
);
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_commissioning_checklist (project_id,item_text,is_checked,sort_order) VALUES (?,?,?,?)",
|
||||
[PID, '紧急停止按钮功能测试通过', '0', 4]
|
||||
);
|
||||
|
||||
// 17b. 试车条款
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_commissioning_clause (project_id,clause_content,sort_order) VALUES (?,?,?)",
|
||||
[PID, '轧机在额定转速下连续运行2小时,轴承温升不超过40°C', 1]
|
||||
);
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_commissioning_clause (project_id,clause_content,sort_order) VALUES (?,?,?)",
|
||||
[PID, '轧制力控制系统响应时间不超过50ms', 2]
|
||||
);
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_commissioning_clause (project_id,clause_content,sort_order) VALUES (?,?,?)",
|
||||
[PID, '厚度控制精度达到±0.05mm', 3]
|
||||
);
|
||||
|
||||
// 17c. 试车记录
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_commissioning_record (project_id,record_date,record_type,param_name,param_value,result,issue_desc) VALUES (?,?,?,?,?,?,?)",
|
||||
[PID, '2026-06-26', '0', '电机空载电流', '120A', '1', null]
|
||||
);
|
||||
await conn.execute(
|
||||
"INSERT INTO fad_rm_commissioning_record (project_id,record_date,record_type,param_name,param_value,result,issue_desc) VALUES (?,?,?,?,?,?,?)",
|
||||
[PID, '2026-06-26', '0', '轴承温升', '35°C', '1', null]
|
||||
);
|
||||
console.log(' CheckList4项 + 条款3条 + 记录2条 √');
|
||||
|
||||
await conn.end();
|
||||
console.log('\n=======================================');
|
||||
console.log('测试项目A — 全部17阶段数据插入完成!');
|
||||
console.log('=======================================');
|
||||
}
|
||||
|
||||
run().catch(e => { console.error('插入失败:', e); process.exit(1); });
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.ruoyi.rm.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.rm.domain.bo.RmAcceptanceChecklistBo;
|
||||
import com.ruoyi.rm.domain.vo.RmAcceptanceChecklistVo;
|
||||
import com.ruoyi.rm.service.IRmAcceptanceChecklistService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Arrays;
|
||||
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/rm/acceptanceChecklist")
|
||||
public class RmAcceptanceChecklistController extends BaseController {
|
||||
|
||||
private final IRmAcceptanceChecklistService service;
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<RmAcceptanceChecklistVo> list(RmAcceptanceChecklistBo bo, PageQuery pageQuery) {
|
||||
return service.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@GetMapping("/{checkId}")
|
||||
public R<RmAcceptanceChecklistVo> getInfo(@PathVariable @NotNull Long checkId) {
|
||||
return R.ok(service.queryById(checkId));
|
||||
}
|
||||
|
||||
@Log(title = "验收检查清单", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated @RequestBody RmAcceptanceChecklistBo bo) {
|
||||
return toAjax(service.insertByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "验收检查清单", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated @RequestBody RmAcceptanceChecklistBo bo) {
|
||||
return toAjax(service.updateByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "验收检查清单", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{checkIds}")
|
||||
public R<Void> remove(@PathVariable @NotEmpty Long[] checkIds) {
|
||||
return toAjax(service.deleteWithValidByIds(Arrays.asList(checkIds), true));
|
||||
}
|
||||
|
||||
@GetMapping("/all")
|
||||
public R<java.util.List<RmAcceptanceChecklistVo>> all(RmAcceptanceChecklistBo bo) {
|
||||
return R.ok(service.queryList(bo));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.ruoyi.rm.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.rm.domain.bo.RmAcceptanceItemBo;
|
||||
import com.ruoyi.rm.domain.vo.RmAcceptanceItemVo;
|
||||
import com.ruoyi.rm.service.IRmAcceptanceItemService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Arrays;
|
||||
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/rm/acceptanceItem")
|
||||
public class RmAcceptanceItemController extends BaseController {
|
||||
|
||||
private final IRmAcceptanceItemService service;
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<RmAcceptanceItemVo> list(RmAcceptanceItemBo bo, PageQuery pageQuery) {
|
||||
return service.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@GetMapping("/{acceptItemId}")
|
||||
public R<RmAcceptanceItemVo> getInfo(@PathVariable @NotNull Long acceptItemId) {
|
||||
return R.ok(service.queryById(acceptItemId));
|
||||
}
|
||||
|
||||
@Log(title = "安装验收项", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated @RequestBody RmAcceptanceItemBo bo) {
|
||||
return toAjax(service.insertByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "安装验收项", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated @RequestBody RmAcceptanceItemBo bo) {
|
||||
return toAjax(service.updateByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "安装验收项", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{acceptItemIds}")
|
||||
public R<Void> remove(@PathVariable @NotEmpty Long[] acceptItemIds) {
|
||||
return toAjax(service.deleteWithValidByIds(Arrays.asList(acceptItemIds), true));
|
||||
}
|
||||
|
||||
@GetMapping("/all")
|
||||
public R<java.util.List<RmAcceptanceItemVo>> all(RmAcceptanceItemBo bo) {
|
||||
return R.ok(service.queryList(bo));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.rm.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.rm.domain.bo.RmBudgetBo;
|
||||
import com.ruoyi.rm.domain.vo.RmBudgetVo;
|
||||
import com.ruoyi.rm.service.IRmBudgetService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/rm/budget")
|
||||
public class RmBudgetController extends BaseController {
|
||||
|
||||
private final IRmBudgetService service;
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<RmBudgetVo> list(RmBudgetBo bo, PageQuery pageQuery) {
|
||||
return service.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@GetMapping("/{budgetId}")
|
||||
public R<RmBudgetVo> getInfo(@PathVariable @NotNull Long budgetId) {
|
||||
return R.ok(service.queryById(budgetId));
|
||||
}
|
||||
|
||||
@Log(title = "项目预算", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated @RequestBody RmBudgetBo bo) {
|
||||
return toAjax(service.insertByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "项目预算", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated @RequestBody RmBudgetBo bo) {
|
||||
return toAjax(service.updateByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "项目预算", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{budgetIds}")
|
||||
public R<Void> remove(@PathVariable @NotEmpty Long[] budgetIds) {
|
||||
return toAjax(service.deleteWithValidByIds(Arrays.asList(budgetIds), true));
|
||||
}
|
||||
|
||||
@GetMapping("/all")
|
||||
public R<List<RmBudgetVo>> all(RmBudgetBo bo) {
|
||||
return R.ok(service.queryList(bo));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.ruoyi.rm.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.rm.domain.bo.RmColorCardBo;
|
||||
import com.ruoyi.rm.domain.vo.RmColorCardVo;
|
||||
import com.ruoyi.rm.service.IRmColorCardService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Arrays;
|
||||
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/rm/colorCard")
|
||||
public class RmColorCardController extends BaseController {
|
||||
|
||||
private final IRmColorCardService service;
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<RmColorCardVo> list(RmColorCardBo bo, PageQuery pageQuery) {
|
||||
return service.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@GetMapping("/{colorCardId}")
|
||||
public R<RmColorCardVo> getInfo(@PathVariable @NotNull Long colorCardId) {
|
||||
return R.ok(service.queryById(colorCardId));
|
||||
}
|
||||
|
||||
@Log(title = "色卡管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated @RequestBody RmColorCardBo bo) {
|
||||
return toAjax(service.insertByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "色卡管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated @RequestBody RmColorCardBo bo) {
|
||||
return toAjax(service.updateByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "色卡管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{colorCardIds}")
|
||||
public R<Void> remove(@PathVariable @NotEmpty Long[] colorCardIds) {
|
||||
return toAjax(service.deleteWithValidByIds(Arrays.asList(colorCardIds), true));
|
||||
}
|
||||
|
||||
@GetMapping("/all")
|
||||
public R<java.util.List<RmColorCardVo>> all(RmColorCardBo bo) {
|
||||
return R.ok(service.queryList(bo));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.ruoyi.rm.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.rm.domain.bo.RmCommissioningChecklistBo;
|
||||
import com.ruoyi.rm.domain.vo.RmCommissioningChecklistVo;
|
||||
import com.ruoyi.rm.service.IRmCommissioningChecklistService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Arrays;
|
||||
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/rm/commissioningChecklist")
|
||||
public class RmCommissioningChecklistController extends BaseController {
|
||||
|
||||
private final IRmCommissioningChecklistService service;
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<RmCommissioningChecklistVo> list(RmCommissioningChecklistBo bo, PageQuery pageQuery) {
|
||||
return service.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@GetMapping("/{checkId}")
|
||||
public R<RmCommissioningChecklistVo> getInfo(@PathVariable @NotNull Long checkId) {
|
||||
return R.ok(service.queryById(checkId));
|
||||
}
|
||||
|
||||
@Log(title = "热负荷试车CheckList", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated @RequestBody RmCommissioningChecklistBo bo) {
|
||||
return toAjax(service.insertByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "热负荷试车CheckList", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated @RequestBody RmCommissioningChecklistBo bo) {
|
||||
return toAjax(service.updateByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "热负荷试车CheckList", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{checkIds}")
|
||||
public R<Void> remove(@PathVariable @NotEmpty Long[] checkIds) {
|
||||
return toAjax(service.deleteWithValidByIds(Arrays.asList(checkIds), true));
|
||||
}
|
||||
|
||||
@GetMapping("/all")
|
||||
public R<java.util.List<RmCommissioningChecklistVo>> all(RmCommissioningChecklistBo bo) {
|
||||
return R.ok(service.queryList(bo));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.ruoyi.rm.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.rm.domain.bo.RmCommissioningClauseBo;
|
||||
import com.ruoyi.rm.domain.vo.RmCommissioningClauseVo;
|
||||
import com.ruoyi.rm.service.IRmCommissioningClauseService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Arrays;
|
||||
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/rm/commissioningClause")
|
||||
public class RmCommissioningClauseController extends BaseController {
|
||||
|
||||
private final IRmCommissioningClauseService service;
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<RmCommissioningClauseVo> list(RmCommissioningClauseBo bo, PageQuery pageQuery) {
|
||||
return service.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@GetMapping("/{clauseId}")
|
||||
public R<RmCommissioningClauseVo> getInfo(@PathVariable @NotNull Long clauseId) {
|
||||
return R.ok(service.queryById(clauseId));
|
||||
}
|
||||
|
||||
@Log(title = "热负荷试车条款", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated @RequestBody RmCommissioningClauseBo bo) {
|
||||
return toAjax(service.insertByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "热负荷试车条款", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated @RequestBody RmCommissioningClauseBo bo) {
|
||||
return toAjax(service.updateByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "热负荷试车条款", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{clauseIds}")
|
||||
public R<Void> remove(@PathVariable @NotEmpty Long[] clauseIds) {
|
||||
return toAjax(service.deleteWithValidByIds(Arrays.asList(clauseIds), true));
|
||||
}
|
||||
|
||||
@GetMapping("/all")
|
||||
public R<java.util.List<RmCommissioningClauseVo>> all(RmCommissioningClauseBo bo) {
|
||||
return R.ok(service.queryList(bo));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
package com.ruoyi.rm.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import javax.validation.constraints.*;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.validate.AddGroup;
|
||||
import com.ruoyi.common.core.validate.EditGroup;
|
||||
import com.ruoyi.common.core.validate.QueryGroup;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.rm.domain.vo.RmCommissioningVo;
|
||||
import com.ruoyi.rm.domain.bo.RmCommissioningBo;
|
||||
import com.ruoyi.rm.service.IRmCommissioningService;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/rm/commissioning")
|
||||
public class RmCommissioningController extends BaseController {
|
||||
|
||||
private final IRmCommissioningService iRmCommissioningService;
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<RmCommissioningVo> list(RmCommissioningBo bo, PageQuery pageQuery) {
|
||||
return iRmCommissioningService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@GetMapping("/all")
|
||||
public R<List<RmCommissioningVo>> all(RmCommissioningBo bo) {
|
||||
return R.ok(iRmCommissioningService.queryList(bo));
|
||||
}
|
||||
|
||||
@GetMapping("/byProject/{projectId}")
|
||||
public R<RmCommissioningVo> getByProjectId(@PathVariable Long projectId) {
|
||||
return R.ok(iRmCommissioningService.queryByProjectId(projectId));
|
||||
}
|
||||
|
||||
@GetMapping("/{commissioningId}")
|
||||
public R<RmCommissioningVo> getInfo(@NotNull(message = "主键不能为空") @PathVariable Long commissioningId) {
|
||||
return R.ok(iRmCommissioningService.queryById(commissioningId));
|
||||
}
|
||||
|
||||
@PostMapping()
|
||||
@RepeatSubmit()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody RmCommissioningBo bo) {
|
||||
return toAjax(iRmCommissioningService.insertByBo(bo));
|
||||
}
|
||||
|
||||
@PutMapping()
|
||||
@RepeatSubmit()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody RmCommissioningBo bo) {
|
||||
return toAjax(iRmCommissioningService.updateByBo(bo));
|
||||
}
|
||||
|
||||
@DeleteMapping("/{commissioningIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空") @PathVariable Long[] commissioningIds) {
|
||||
return toAjax(iRmCommissioningService.deleteWithValidByIds(Arrays.asList(commissioningIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.ruoyi.rm.controller;
|
||||
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.rm.service.IRmDashboardService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Map;
|
||||
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/rm/dashboard")
|
||||
public class RmDashboardController extends BaseController {
|
||||
|
||||
private final IRmDashboardService dashboardService;
|
||||
|
||||
@GetMapping("/stageStatus/{projectId}")
|
||||
public R<Map<String, Object>> stageStatus(@PathVariable @NotNull Long projectId) {
|
||||
return R.ok(dashboardService.getStageStatus(projectId));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.ruoyi.rm.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.rm.domain.bo.RmDocLibBo;
|
||||
import com.ruoyi.rm.domain.vo.RmDocLibVo;
|
||||
import com.ruoyi.rm.service.IRmDocLibService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Arrays;
|
||||
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/rm/docLib")
|
||||
public class RmDocLibController extends BaseController {
|
||||
|
||||
private final IRmDocLibService service;
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<RmDocLibVo> list(RmDocLibBo bo, PageQuery pageQuery) {
|
||||
return service.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@GetMapping("/{docId}")
|
||||
public R<RmDocLibVo> getInfo(@PathVariable @NotNull Long docId) {
|
||||
return R.ok(service.queryById(docId));
|
||||
}
|
||||
|
||||
@Log(title = "图纸资料库", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated @RequestBody RmDocLibBo bo) {
|
||||
return toAjax(service.insertByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "图纸资料库", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated @RequestBody RmDocLibBo bo) {
|
||||
return toAjax(service.updateByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "图纸资料库", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{docIds}")
|
||||
public R<Void> remove(@PathVariable @NotEmpty Long[] docIds) {
|
||||
return toAjax(service.deleteWithValidByIds(Arrays.asList(docIds), true));
|
||||
}
|
||||
|
||||
@GetMapping("/all")
|
||||
public R<java.util.List<RmDocLibVo>> all(RmDocLibBo bo) {
|
||||
return R.ok(service.queryList(bo));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.ruoyi.rm.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.rm.domain.bo.RmDrawingCompareBo;
|
||||
import com.ruoyi.rm.domain.vo.RmDrawingCompareVo;
|
||||
import com.ruoyi.rm.service.IRmDrawingCompareService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Arrays;
|
||||
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/rm/drawingCompare")
|
||||
public class RmDrawingCompareController extends BaseController {
|
||||
|
||||
private final IRmDrawingCompareService service;
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<RmDrawingCompareVo> list(RmDrawingCompareBo bo, PageQuery pageQuery) {
|
||||
return service.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@GetMapping("/{compareId}")
|
||||
public R<RmDrawingCompareVo> getInfo(@PathVariable @NotNull Long compareId) {
|
||||
return R.ok(service.queryById(compareId));
|
||||
}
|
||||
|
||||
@Log(title = "图纸优化比较", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated @RequestBody RmDrawingCompareBo bo) {
|
||||
return toAjax(service.insertByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "图纸优化比较", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated @RequestBody RmDrawingCompareBo bo) {
|
||||
return toAjax(service.updateByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "图纸优化比较", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{compareIds}")
|
||||
public R<Void> remove(@PathVariable @NotEmpty Long[] compareIds) {
|
||||
return toAjax(service.deleteWithValidByIds(Arrays.asList(compareIds), true));
|
||||
}
|
||||
|
||||
@GetMapping("/all")
|
||||
public R<java.util.List<RmDrawingCompareVo>> all(RmDrawingCompareBo bo) {
|
||||
return R.ok(service.queryList(bo));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.ruoyi.rm.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.rm.domain.bo.RmDrawingDesignBo;
|
||||
import com.ruoyi.rm.domain.vo.RmDrawingDesignVo;
|
||||
import com.ruoyi.rm.service.IRmDrawingDesignService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Arrays;
|
||||
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/rm/drawingDesign")
|
||||
public class RmDrawingDesignController extends BaseController {
|
||||
|
||||
private final IRmDrawingDesignService service;
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<RmDrawingDesignVo> list(RmDrawingDesignBo bo, PageQuery pageQuery) {
|
||||
return service.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@GetMapping("/{drawingId}")
|
||||
public R<RmDrawingDesignVo> getInfo(@PathVariable @NotNull Long drawingId) {
|
||||
return R.ok(service.queryById(drawingId));
|
||||
}
|
||||
|
||||
@Log(title = "图纸详细设计", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated @RequestBody RmDrawingDesignBo bo) {
|
||||
return toAjax(service.insertByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "图纸详细设计", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated @RequestBody RmDrawingDesignBo bo) {
|
||||
return toAjax(service.updateByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "图纸详细设计", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{drawingIds}")
|
||||
public R<Void> remove(@PathVariable @NotEmpty Long[] drawingIds) {
|
||||
return toAjax(service.deleteWithValidByIds(Arrays.asList(drawingIds), true));
|
||||
}
|
||||
|
||||
@GetMapping("/all")
|
||||
public R<java.util.List<RmDrawingDesignVo>> all(RmDrawingDesignBo bo) {
|
||||
return R.ok(service.queryList(bo));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.ruoyi.rm.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.rm.domain.bo.RmDrawingReviewBo;
|
||||
import com.ruoyi.rm.domain.vo.RmDrawingReviewVo;
|
||||
import com.ruoyi.rm.service.IRmDrawingReviewService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Arrays;
|
||||
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/rm/drawingReview")
|
||||
public class RmDrawingReviewController extends BaseController {
|
||||
|
||||
private final IRmDrawingReviewService service;
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<RmDrawingReviewVo> list(RmDrawingReviewBo bo, PageQuery pageQuery) {
|
||||
return service.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@GetMapping("/{reviewId}")
|
||||
public R<RmDrawingReviewVo> getInfo(@PathVariable @NotNull Long reviewId) {
|
||||
return R.ok(service.queryById(reviewId));
|
||||
}
|
||||
|
||||
@Log(title = "图纸审查", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated @RequestBody RmDrawingReviewBo bo) {
|
||||
return toAjax(service.insertByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "图纸审查", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated @RequestBody RmDrawingReviewBo bo) {
|
||||
return toAjax(service.updateByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "图纸审查", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{reviewIds}")
|
||||
public R<Void> remove(@PathVariable @NotEmpty Long[] reviewIds) {
|
||||
return toAjax(service.deleteWithValidByIds(Arrays.asList(reviewIds), true));
|
||||
}
|
||||
|
||||
@GetMapping("/all")
|
||||
public R<java.util.List<RmDrawingReviewVo>> all(RmDrawingReviewBo bo) {
|
||||
return R.ok(service.queryList(bo));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.ruoyi.rm.controller;
|
||||
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.rm.domain.bo.RmFileReviewBo;
|
||||
import com.ruoyi.rm.domain.vo.RmFileReviewVo;
|
||||
import com.ruoyi.rm.service.IRmFileReviewService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/rm/fileReview")
|
||||
public class RmFileReviewController extends BaseController {
|
||||
|
||||
private final IRmFileReviewService fileReviewService;
|
||||
|
||||
@GetMapping("/list")
|
||||
public R<List<RmFileReviewVo>> list(String fileModule, Long fileId) {
|
||||
return R.ok(fileReviewService.queryByFile(fileModule, fileId));
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
public R<RmFileReviewVo> add(@RequestBody RmFileReviewBo bo) {
|
||||
return R.ok(fileReviewService.addReview(bo));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.ruoyi.rm.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.rm.domain.bo.RmInstallFeedbackBo;
|
||||
import com.ruoyi.rm.domain.vo.RmInstallFeedbackVo;
|
||||
import com.ruoyi.rm.service.IRmInstallFeedbackService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Arrays;
|
||||
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/rm/installFeedback")
|
||||
public class RmInstallFeedbackController extends BaseController {
|
||||
|
||||
private final IRmInstallFeedbackService service;
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<RmInstallFeedbackVo> list(RmInstallFeedbackBo bo, PageQuery pageQuery) {
|
||||
return service.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@GetMapping("/{feedbackId}")
|
||||
public R<RmInstallFeedbackVo> getInfo(@PathVariable @NotNull Long feedbackId) {
|
||||
return R.ok(service.queryById(feedbackId));
|
||||
}
|
||||
|
||||
@Log(title = "安装问题反馈", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated @RequestBody RmInstallFeedbackBo bo) {
|
||||
return toAjax(service.insertByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "安装问题反馈", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated @RequestBody RmInstallFeedbackBo bo) {
|
||||
return toAjax(service.updateByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "安装问题反馈", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{feedbackIds}")
|
||||
public R<Void> remove(@PathVariable @NotEmpty Long[] feedbackIds) {
|
||||
return toAjax(service.deleteWithValidByIds(Arrays.asList(feedbackIds), true));
|
||||
}
|
||||
|
||||
@GetMapping("/all")
|
||||
public R<java.util.List<RmInstallFeedbackVo>> all(RmInstallFeedbackBo bo) {
|
||||
return R.ok(service.queryList(bo));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.ruoyi.rm.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.rm.domain.bo.RmInstallPersonnelBo;
|
||||
import com.ruoyi.rm.domain.vo.RmInstallPersonnelVo;
|
||||
import com.ruoyi.rm.service.IRmInstallPersonnelService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Arrays;
|
||||
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/rm/installPersonnel")
|
||||
public class RmInstallPersonnelController extends BaseController {
|
||||
|
||||
private final IRmInstallPersonnelService service;
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<RmInstallPersonnelVo> list(RmInstallPersonnelBo bo, PageQuery pageQuery) {
|
||||
return service.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@GetMapping("/{personnelId}")
|
||||
public R<RmInstallPersonnelVo> getInfo(@PathVariable @NotNull Long personnelId) {
|
||||
return R.ok(service.queryById(personnelId));
|
||||
}
|
||||
|
||||
@Log(title = "安装人员", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated @RequestBody RmInstallPersonnelBo bo) {
|
||||
return toAjax(service.insertByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "安装人员", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated @RequestBody RmInstallPersonnelBo bo) {
|
||||
return toAjax(service.updateByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "安装人员", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{personnelIds}")
|
||||
public R<Void> remove(@PathVariable @NotEmpty Long[] personnelIds) {
|
||||
return toAjax(service.deleteWithValidByIds(Arrays.asList(personnelIds), true));
|
||||
}
|
||||
|
||||
@GetMapping("/all")
|
||||
public R<java.util.List<RmInstallPersonnelVo>> all(RmInstallPersonnelBo bo) {
|
||||
return R.ok(service.queryList(bo));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.ruoyi.rm.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.rm.domain.bo.RmInstallPrecisionBo;
|
||||
import com.ruoyi.rm.domain.vo.RmInstallPrecisionVo;
|
||||
import com.ruoyi.rm.service.IRmInstallPrecisionService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Arrays;
|
||||
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/rm/installPrecision")
|
||||
public class RmInstallPrecisionController extends BaseController {
|
||||
|
||||
private final IRmInstallPrecisionService service;
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<RmInstallPrecisionVo> list(RmInstallPrecisionBo bo, PageQuery pageQuery) {
|
||||
return service.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@GetMapping("/{precisionId}")
|
||||
public R<RmInstallPrecisionVo> getInfo(@PathVariable @NotNull Long precisionId) {
|
||||
return R.ok(service.queryById(precisionId));
|
||||
}
|
||||
|
||||
@Log(title = "安装精度", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated @RequestBody RmInstallPrecisionBo bo) {
|
||||
return toAjax(service.insertByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "安装精度", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated @RequestBody RmInstallPrecisionBo bo) {
|
||||
return toAjax(service.updateByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "安装精度", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{precisionIds}")
|
||||
public R<Void> remove(@PathVariable @NotEmpty Long[] precisionIds) {
|
||||
return toAjax(service.deleteWithValidByIds(Arrays.asList(precisionIds), true));
|
||||
}
|
||||
|
||||
@GetMapping("/all")
|
||||
public R<java.util.List<RmInstallPrecisionVo>> all(RmInstallPrecisionBo bo) {
|
||||
return R.ok(service.queryList(bo));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.ruoyi.rm.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.rm.domain.bo.RmInstallProgressBo;
|
||||
import com.ruoyi.rm.domain.vo.RmInstallProgressVo;
|
||||
import com.ruoyi.rm.service.IRmInstallProgressService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Arrays;
|
||||
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/rm/installProgress")
|
||||
public class RmInstallProgressController extends BaseController {
|
||||
|
||||
private final IRmInstallProgressService service;
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<RmInstallProgressVo> list(RmInstallProgressBo bo, PageQuery pageQuery) {
|
||||
return service.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@GetMapping("/{progressId}")
|
||||
public R<RmInstallProgressVo> getInfo(@PathVariable @NotNull Long progressId) {
|
||||
return R.ok(service.queryById(progressId));
|
||||
}
|
||||
|
||||
@Log(title = "安装进度", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated @RequestBody RmInstallProgressBo bo) {
|
||||
return toAjax(service.insertByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "安装进度", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated @RequestBody RmInstallProgressBo bo) {
|
||||
return toAjax(service.updateByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "安装进度", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{progressIds}")
|
||||
public R<Void> remove(@PathVariable @NotEmpty Long[] progressIds) {
|
||||
return toAjax(service.deleteWithValidByIds(Arrays.asList(progressIds), true));
|
||||
}
|
||||
|
||||
@GetMapping("/all")
|
||||
public R<java.util.List<RmInstallProgressVo>> all(RmInstallProgressBo bo) {
|
||||
return R.ok(service.queryList(bo));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.ruoyi.rm.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.rm.domain.bo.RmInstallToolBo;
|
||||
import com.ruoyi.rm.domain.vo.RmInstallToolVo;
|
||||
import com.ruoyi.rm.service.IRmInstallToolService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Arrays;
|
||||
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/rm/installTool")
|
||||
public class RmInstallToolController extends BaseController {
|
||||
|
||||
private final IRmInstallToolService service;
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<RmInstallToolVo> list(RmInstallToolBo bo, PageQuery pageQuery) {
|
||||
return service.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@GetMapping("/{toolId}")
|
||||
public R<RmInstallToolVo> getInfo(@PathVariable @NotNull Long toolId) {
|
||||
return R.ok(service.queryById(toolId));
|
||||
}
|
||||
|
||||
@Log(title = "安装工具", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated @RequestBody RmInstallToolBo bo) {
|
||||
return toAjax(service.insertByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "安装工具", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated @RequestBody RmInstallToolBo bo) {
|
||||
return toAjax(service.updateByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "安装工具", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{toolIds}")
|
||||
public R<Void> remove(@PathVariable @NotEmpty Long[] toolIds) {
|
||||
return toAjax(service.deleteWithValidByIds(Arrays.asList(toolIds), true));
|
||||
}
|
||||
|
||||
@GetMapping("/all")
|
||||
public R<java.util.List<RmInstallToolVo>> all(RmInstallToolBo bo) {
|
||||
return R.ok(service.queryList(bo));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.ruoyi.rm.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.rm.domain.bo.RmLayoutFileBo;
|
||||
import com.ruoyi.rm.domain.vo.RmLayoutFileVo;
|
||||
import com.ruoyi.rm.service.IRmLayoutFileService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Arrays;
|
||||
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/rm/layout")
|
||||
public class RmLayoutFileController extends BaseController {
|
||||
|
||||
private final IRmLayoutFileService service;
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<RmLayoutFileVo> list(RmLayoutFileBo bo, PageQuery pageQuery) {
|
||||
return service.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@GetMapping("/{layoutFileId}")
|
||||
public R<RmLayoutFileVo> getInfo(@PathVariable @NotNull Long layoutFileId) {
|
||||
return R.ok(service.queryById(layoutFileId));
|
||||
}
|
||||
|
||||
@Log(title = "布局图确定", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated @RequestBody RmLayoutFileBo bo) {
|
||||
return toAjax(service.insertByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "布局图确定", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated @RequestBody RmLayoutFileBo bo) {
|
||||
return toAjax(service.updateByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "布局图确定", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{layoutFileIds}")
|
||||
public R<Void> remove(@PathVariable @NotEmpty Long[] layoutFileIds) {
|
||||
return toAjax(service.deleteWithValidByIds(Arrays.asList(layoutFileIds), true));
|
||||
}
|
||||
|
||||
@GetMapping("/all")
|
||||
public R<java.util.List<RmLayoutFileVo>> all(RmLayoutFileBo bo) {
|
||||
return R.ok(service.queryList(bo));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.ruoyi.rm.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.rm.domain.bo.RmManualBo;
|
||||
import com.ruoyi.rm.domain.vo.RmManualVo;
|
||||
import com.ruoyi.rm.service.IRmManualService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Arrays;
|
||||
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/rm/manual")
|
||||
public class RmManualController extends BaseController {
|
||||
|
||||
private final IRmManualService service;
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<RmManualVo> list(RmManualBo bo, PageQuery pageQuery) {
|
||||
return service.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@GetMapping("/{manualId}")
|
||||
public R<RmManualVo> getInfo(@PathVariable @NotNull Long manualId) {
|
||||
return R.ok(service.queryById(manualId));
|
||||
}
|
||||
|
||||
@Log(title = "设备说明书", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated @RequestBody RmManualBo bo) {
|
||||
return toAjax(service.insertByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "设备说明书", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated @RequestBody RmManualBo bo) {
|
||||
return toAjax(service.updateByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "设备说明书", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{manualIds}")
|
||||
public R<Void> remove(@PathVariable @NotEmpty Long[] manualIds) {
|
||||
return toAjax(service.deleteWithValidByIds(Arrays.asList(manualIds), true));
|
||||
}
|
||||
|
||||
@GetMapping("/all")
|
||||
public R<java.util.List<RmManualVo>> all(RmManualBo bo) {
|
||||
return R.ok(service.queryList(bo));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.ruoyi.rm.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.rm.domain.bo.RmMfgDeviceBo;
|
||||
import com.ruoyi.rm.domain.vo.RmMfgDeviceVo;
|
||||
import com.ruoyi.rm.service.IRmMfgDeviceService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Arrays;
|
||||
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/rm/mfgDevice")
|
||||
public class RmMfgDeviceController extends BaseController {
|
||||
|
||||
private final IRmMfgDeviceService service;
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<RmMfgDeviceVo> list(RmMfgDeviceBo bo, PageQuery pageQuery) {
|
||||
return service.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@GetMapping("/{deviceId}")
|
||||
public R<RmMfgDeviceVo> getInfo(@PathVariable @NotNull Long deviceId) {
|
||||
return R.ok(service.queryById(deviceId));
|
||||
}
|
||||
|
||||
@Log(title = "设备制造", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated @RequestBody RmMfgDeviceBo bo) {
|
||||
return toAjax(service.insertByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "设备制造", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated @RequestBody RmMfgDeviceBo bo) {
|
||||
return toAjax(service.updateByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "设备制造", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{deviceIds}")
|
||||
public R<Void> remove(@PathVariable @NotEmpty Long[] deviceIds) {
|
||||
return toAjax(service.deleteWithValidByIds(Arrays.asList(deviceIds), true));
|
||||
}
|
||||
|
||||
@GetMapping("/all")
|
||||
public R<java.util.List<RmMfgDeviceVo>> all(RmMfgDeviceBo bo) {
|
||||
return R.ok(service.queryList(bo));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.ruoyi.rm.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.rm.domain.bo.RmMfgStageBo;
|
||||
import com.ruoyi.rm.domain.vo.RmMfgStageVo;
|
||||
import com.ruoyi.rm.service.IRmMfgStageService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Arrays;
|
||||
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/rm/mfgStage")
|
||||
public class RmMfgStageController extends BaseController {
|
||||
|
||||
private final IRmMfgStageService service;
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<RmMfgStageVo> list(RmMfgStageBo bo, PageQuery pageQuery) {
|
||||
return service.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@GetMapping("/{stageId}")
|
||||
public R<RmMfgStageVo> getInfo(@PathVariable @NotNull Long stageId) {
|
||||
return R.ok(service.queryById(stageId));
|
||||
}
|
||||
|
||||
@Log(title = "制造阶段", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated @RequestBody RmMfgStageBo bo) {
|
||||
return toAjax(service.insertByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "制造阶段", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated @RequestBody RmMfgStageBo bo) {
|
||||
return toAjax(service.updateByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "制造阶段", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{stageIds}")
|
||||
public R<Void> remove(@PathVariable @NotEmpty Long[] stageIds) {
|
||||
return toAjax(service.deleteWithValidByIds(Arrays.asList(stageIds), true));
|
||||
}
|
||||
|
||||
@GetMapping("/all")
|
||||
public R<java.util.List<RmMfgStageVo>> all(RmMfgStageBo bo) {
|
||||
return R.ok(service.queryList(bo));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.ruoyi.rm.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.rm.domain.bo.RmProcurementContractBo;
|
||||
import com.ruoyi.rm.domain.vo.RmProcurementContractVo;
|
||||
import com.ruoyi.rm.service.IRmProcurementContractService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Arrays;
|
||||
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/rm/contract")
|
||||
public class RmProcurementContractController extends BaseController {
|
||||
|
||||
private final IRmProcurementContractService service;
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<RmProcurementContractVo> list(RmProcurementContractBo bo, PageQuery pageQuery) {
|
||||
return service.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@GetMapping("/{contractId}")
|
||||
public R<RmProcurementContractVo> getInfo(@PathVariable @NotNull Long contractId) {
|
||||
return R.ok(service.queryById(contractId));
|
||||
}
|
||||
|
||||
@Log(title = "合同管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated @RequestBody RmProcurementContractBo bo) {
|
||||
return toAjax(service.insertByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "合同管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated @RequestBody RmProcurementContractBo bo) {
|
||||
return toAjax(service.updateByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "合同管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{contractIds}")
|
||||
public R<Void> remove(@PathVariable @NotEmpty Long[] contractIds) {
|
||||
return toAjax(service.deleteWithValidByIds(Arrays.asList(contractIds), true));
|
||||
}
|
||||
|
||||
@GetMapping("/all")
|
||||
public R<java.util.List<RmProcurementContractVo>> all(RmProcurementContractBo bo) {
|
||||
return R.ok(service.queryList(bo));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.ruoyi.rm.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.rm.domain.bo.RmProcurementProgressBo;
|
||||
import com.ruoyi.rm.domain.vo.RmProcurementProgressVo;
|
||||
import com.ruoyi.rm.service.IRmProcurementProgressService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Arrays;
|
||||
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/rm/procProgress")
|
||||
public class RmProcurementProgressController extends BaseController {
|
||||
|
||||
private final IRmProcurementProgressService service;
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<RmProcurementProgressVo> list(RmProcurementProgressBo bo, PageQuery pageQuery) {
|
||||
return service.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@GetMapping("/{progressId}")
|
||||
public R<RmProcurementProgressVo> getInfo(@PathVariable @NotNull Long progressId) {
|
||||
return R.ok(service.queryById(progressId));
|
||||
}
|
||||
|
||||
@Log(title = "采购进度", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated @RequestBody RmProcurementProgressBo bo) {
|
||||
return toAjax(service.insertByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "采购进度", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated @RequestBody RmProcurementProgressBo bo) {
|
||||
return toAjax(service.updateByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "采购进度", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{progressIds}")
|
||||
public R<Void> remove(@PathVariable @NotEmpty Long[] progressIds) {
|
||||
return toAjax(service.deleteWithValidByIds(Arrays.asList(progressIds), true));
|
||||
}
|
||||
|
||||
@GetMapping("/all")
|
||||
public R<java.util.List<RmProcurementProgressVo>> all(RmProcurementProgressBo bo) {
|
||||
return R.ok(service.queryList(bo));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.ruoyi.rm.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.rm.domain.bo.RmProcurementQuoteBo;
|
||||
import com.ruoyi.rm.domain.vo.RmProcurementQuoteVo;
|
||||
import com.ruoyi.rm.service.IRmProcurementQuoteService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Arrays;
|
||||
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/rm/quote")
|
||||
public class RmProcurementQuoteController extends BaseController {
|
||||
|
||||
private final IRmProcurementQuoteService service;
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<RmProcurementQuoteVo> list(RmProcurementQuoteBo bo, PageQuery pageQuery) {
|
||||
return service.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@GetMapping("/{quoteId}")
|
||||
public R<RmProcurementQuoteVo> getInfo(@PathVariable @NotNull Long quoteId) {
|
||||
return R.ok(service.queryById(quoteId));
|
||||
}
|
||||
|
||||
@Log(title = "报价管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated @RequestBody RmProcurementQuoteBo bo) {
|
||||
return toAjax(service.insertByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "报价管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated @RequestBody RmProcurementQuoteBo bo) {
|
||||
return toAjax(service.updateByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "报价管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{quoteIds}")
|
||||
public R<Void> remove(@PathVariable @NotEmpty Long[] quoteIds) {
|
||||
return toAjax(service.deleteWithValidByIds(Arrays.asList(quoteIds), true));
|
||||
}
|
||||
|
||||
@GetMapping("/all")
|
||||
public R<java.util.List<RmProcurementQuoteVo>> all(RmProcurementQuoteBo bo) {
|
||||
return R.ok(service.queryList(bo));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.rm.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.rm.domain.bo.RmProjectBo;
|
||||
import com.ruoyi.rm.domain.vo.RmProjectVo;
|
||||
import com.ruoyi.rm.service.IRmProjectService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/rm/project")
|
||||
public class RmProjectController extends BaseController {
|
||||
|
||||
private final IRmProjectService service;
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<RmProjectVo> list(RmProjectBo bo, PageQuery pageQuery) {
|
||||
return service.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@GetMapping("/{projectId}")
|
||||
public R<RmProjectVo> getInfo(@PathVariable @NotNull Long projectId) {
|
||||
return R.ok(service.queryById(projectId));
|
||||
}
|
||||
|
||||
@Log(title = "轧机项目管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated @RequestBody RmProjectBo bo) {
|
||||
return toAjax(service.insertByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "轧机项目管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated @RequestBody RmProjectBo bo) {
|
||||
return toAjax(service.updateByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "轧机项目管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{projectIds}")
|
||||
public R<Void> remove(@PathVariable @NotEmpty Long[] projectIds) {
|
||||
return toAjax(service.deleteWithValidByIds(Arrays.asList(projectIds), true));
|
||||
}
|
||||
|
||||
@GetMapping("/all")
|
||||
public R<List<RmProjectVo>> all(RmProjectBo bo) {
|
||||
return R.ok(service.queryList(bo));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.rm.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.rm.domain.bo.RmProjectMemberBo;
|
||||
import com.ruoyi.rm.domain.vo.RmProjectMemberVo;
|
||||
import com.ruoyi.rm.service.IRmProjectMemberService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/rm/projectMember")
|
||||
public class RmProjectMemberController extends BaseController {
|
||||
|
||||
private final IRmProjectMemberService service;
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<RmProjectMemberVo> list(RmProjectMemberBo bo, PageQuery pageQuery) {
|
||||
return service.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@GetMapping("/{memberId}")
|
||||
public R<RmProjectMemberVo> getInfo(@PathVariable @NotNull Long memberId) {
|
||||
return R.ok(service.queryById(memberId));
|
||||
}
|
||||
|
||||
@Log(title = "项目成员", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated @RequestBody RmProjectMemberBo bo) {
|
||||
return toAjax(service.insertByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "项目成员", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated @RequestBody RmProjectMemberBo bo) {
|
||||
return toAjax(service.updateByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "项目成员", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{memberIds}")
|
||||
public R<Void> remove(@PathVariable @NotEmpty Long[] memberIds) {
|
||||
return toAjax(service.deleteWithValidByIds(Arrays.asList(memberIds), true));
|
||||
}
|
||||
|
||||
@GetMapping("/all")
|
||||
public R<List<RmProjectMemberVo>> all(RmProjectMemberBo bo) {
|
||||
return R.ok(service.queryList(bo));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.ruoyi.rm.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.rm.domain.bo.RmShippingChecklistBo;
|
||||
import com.ruoyi.rm.domain.vo.RmShippingChecklistVo;
|
||||
import com.ruoyi.rm.service.IRmShippingChecklistService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Arrays;
|
||||
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/rm/shippingChecklist")
|
||||
public class RmShippingChecklistController extends BaseController {
|
||||
|
||||
private final IRmShippingChecklistService service;
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<RmShippingChecklistVo> list(RmShippingChecklistBo bo, PageQuery pageQuery) {
|
||||
return service.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@GetMapping("/{checklistId}")
|
||||
public R<RmShippingChecklistVo> getInfo(@PathVariable @NotNull Long checklistId) {
|
||||
return R.ok(service.queryById(checklistId));
|
||||
}
|
||||
|
||||
@Log(title = "发货前检查清单", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated @RequestBody RmShippingChecklistBo bo) {
|
||||
return toAjax(service.insertByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "发货前检查清单", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated @RequestBody RmShippingChecklistBo bo) {
|
||||
return toAjax(service.updateByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "发货前检查清单", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{checklistIds}")
|
||||
public R<Void> remove(@PathVariable @NotEmpty Long[] checklistIds) {
|
||||
return toAjax(service.deleteWithValidByIds(Arrays.asList(checklistIds), true));
|
||||
}
|
||||
|
||||
@GetMapping("/all")
|
||||
public R<java.util.List<RmShippingChecklistVo>> all(RmShippingChecklistBo bo) {
|
||||
return R.ok(service.queryList(bo));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.ruoyi.rm.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.rm.domain.bo.RmShippingItemBo;
|
||||
import com.ruoyi.rm.domain.vo.RmShippingItemVo;
|
||||
import com.ruoyi.rm.service.IRmShippingItemService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Arrays;
|
||||
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/rm/shippingItem")
|
||||
public class RmShippingItemController extends BaseController {
|
||||
|
||||
private final IRmShippingItemService service;
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<RmShippingItemVo> list(RmShippingItemBo bo, PageQuery pageQuery) {
|
||||
return service.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@GetMapping("/{itemId}")
|
||||
public R<RmShippingItemVo> getInfo(@PathVariable @NotNull Long itemId) {
|
||||
return R.ok(service.queryById(itemId));
|
||||
}
|
||||
|
||||
@Log(title = "发货设备项", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated @RequestBody RmShippingItemBo bo) {
|
||||
return toAjax(service.insertByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "发货设备项", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated @RequestBody RmShippingItemBo bo) {
|
||||
return toAjax(service.updateByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "发货设备项", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{itemIds}")
|
||||
public R<Void> remove(@PathVariable @NotEmpty Long[] itemIds) {
|
||||
return toAjax(service.deleteWithValidByIds(Arrays.asList(itemIds), true));
|
||||
}
|
||||
|
||||
@GetMapping("/all")
|
||||
public R<java.util.List<RmShippingItemVo>> all(RmShippingItemBo bo) {
|
||||
return R.ok(service.queryList(bo));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.ruoyi.rm.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.rm.domain.bo.RmSiteModBo;
|
||||
import com.ruoyi.rm.domain.vo.RmSiteModVo;
|
||||
import com.ruoyi.rm.service.IRmSiteModService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Arrays;
|
||||
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/rm/siteMod")
|
||||
public class RmSiteModController extends BaseController {
|
||||
|
||||
private final IRmSiteModService service;
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<RmSiteModVo> list(RmSiteModBo bo, PageQuery pageQuery) {
|
||||
return service.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@GetMapping("/{modId}")
|
||||
public R<RmSiteModVo> getInfo(@PathVariable @NotNull Long modId) {
|
||||
return R.ok(service.queryById(modId));
|
||||
}
|
||||
|
||||
@Log(title = "现场修改", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated @RequestBody RmSiteModBo bo) {
|
||||
return toAjax(service.insertByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "现场修改", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated @RequestBody RmSiteModBo bo) {
|
||||
return toAjax(service.updateByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "现场修改", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{modIds}")
|
||||
public R<Void> remove(@PathVariable @NotEmpty Long[] modIds) {
|
||||
return toAjax(service.deleteWithValidByIds(Arrays.asList(modIds), true));
|
||||
}
|
||||
|
||||
@GetMapping("/all")
|
||||
public R<java.util.List<RmSiteModVo>> all(RmSiteModBo bo) {
|
||||
return R.ok(service.queryList(bo));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.ruoyi.rm.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.rm.domain.bo.RmSiteModMediaBo;
|
||||
import com.ruoyi.rm.domain.vo.RmSiteModMediaVo;
|
||||
import com.ruoyi.rm.service.IRmSiteModMediaService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Arrays;
|
||||
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/rm/siteModMedia")
|
||||
public class RmSiteModMediaController extends BaseController {
|
||||
|
||||
private final IRmSiteModMediaService service;
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<RmSiteModMediaVo> list(RmSiteModMediaBo bo, PageQuery pageQuery) {
|
||||
return service.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@GetMapping("/{mediaId}")
|
||||
public R<RmSiteModMediaVo> getInfo(@PathVariable @NotNull Long mediaId) {
|
||||
return R.ok(service.queryById(mediaId));
|
||||
}
|
||||
|
||||
@Log(title = "现场修改多媒体", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated @RequestBody RmSiteModMediaBo bo) {
|
||||
return toAjax(service.insertByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "现场修改多媒体", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{mediaIds}")
|
||||
public R<Void> remove(@PathVariable @NotEmpty Long[] mediaIds) {
|
||||
return toAjax(service.deleteWithValidByIds(Arrays.asList(mediaIds), true));
|
||||
}
|
||||
|
||||
@GetMapping("/all")
|
||||
public R<java.util.List<RmSiteModMediaVo>> all(RmSiteModMediaBo bo) {
|
||||
return R.ok(service.queryList(bo));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.ruoyi.rm.controller;
|
||||
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.rm.domain.bo.RmStageConfirmBo;
|
||||
import com.ruoyi.rm.domain.vo.RmStageConfirmVo;
|
||||
import com.ruoyi.rm.service.IRmStageConfirmService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/rm/stageConfirm")
|
||||
public class RmStageConfirmController extends BaseController {
|
||||
|
||||
private final IRmStageConfirmService stageConfirmService;
|
||||
|
||||
@GetMapping("/{projectId}")
|
||||
public R<List<RmStageConfirmVo>> list(@PathVariable @NotNull Long projectId) {
|
||||
return R.ok(stageConfirmService.queryByProjectId(projectId));
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
public R<Void> confirm(@RequestBody @Validated RmStageConfirmBo bo) {
|
||||
return toAjax(stageConfirmService.confirmStage(bo));
|
||||
}
|
||||
|
||||
@PostMapping("/override")
|
||||
public R<Void> override(@RequestBody @Validated RmStageConfirmBo bo) {
|
||||
bo.setConfirmType("override");
|
||||
return toAjax(stageConfirmService.confirmStage(bo));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.rm.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.rm.domain.bo.RmStageImageBo;
|
||||
import com.ruoyi.rm.domain.vo.RmStageImageVo;
|
||||
import com.ruoyi.rm.service.IRmStageImageService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/rm/stageImage")
|
||||
public class RmStageImageController extends BaseController {
|
||||
|
||||
private final IRmStageImageService service;
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<RmStageImageVo> list(RmStageImageBo bo, PageQuery pageQuery) {
|
||||
return service.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@GetMapping("/{imageId}")
|
||||
public R<RmStageImageVo> getInfo(@PathVariable @NotNull Long imageId) {
|
||||
return R.ok(service.queryById(imageId));
|
||||
}
|
||||
|
||||
@Log(title = "阶段图片", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated @RequestBody RmStageImageBo bo) {
|
||||
return toAjax(service.insertByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "阶段图片", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated @RequestBody RmStageImageBo bo) {
|
||||
return toAjax(service.updateByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "阶段图片", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{imageIds}")
|
||||
public R<Void> remove(@PathVariable @NotEmpty Long[] imageIds) {
|
||||
return toAjax(service.deleteWithValidByIds(Arrays.asList(imageIds), true));
|
||||
}
|
||||
|
||||
@GetMapping("/all")
|
||||
public R<List<RmStageImageVo>> all(RmStageImageBo bo) {
|
||||
return R.ok(service.queryList(bo));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.ruoyi.rm.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.rm.domain.bo.RmStageUserPermBo;
|
||||
import com.ruoyi.rm.domain.vo.RmStageUserPermVo;
|
||||
import com.ruoyi.rm.service.IRmStageUserPermService;
|
||||
import com.ruoyi.system.domain.SysUserRole;
|
||||
import com.ruoyi.system.mapper.SysUserMapper;
|
||||
import com.ruoyi.system.mapper.SysUserRoleMapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/rm/stageUserPerm")
|
||||
public class RmStageUserPermController extends BaseController {
|
||||
|
||||
private final IRmStageUserPermService stageUserPermService;
|
||||
private final SysUserMapper sysUserMapper;
|
||||
private final SysUserRoleMapper sysUserRoleMapper;
|
||||
|
||||
@GetMapping("/list")
|
||||
public R<List<RmStageUserPermVo>> list(RmStageUserPermBo bo) {
|
||||
return R.ok(stageUserPermService.queryList(bo));
|
||||
}
|
||||
|
||||
@PostMapping("/batchSave")
|
||||
public R<Void> batchSave(@RequestBody List<RmStageUserPermBo> list) {
|
||||
stageUserPermService.batchSave(list);
|
||||
return R.ok("保存成功");
|
||||
}
|
||||
|
||||
@GetMapping("/users")
|
||||
public R<List<Map<String, Object>>> listUsers() {
|
||||
List<SysUser> users = sysUserMapper.selectList(
|
||||
Wrappers.<SysUser>lambdaQuery()
|
||||
.eq(SysUser::getStatus, "0")
|
||||
.orderByAsc(SysUser::getUserId));
|
||||
|
||||
// Build userId -> roleIds map
|
||||
List<SysUserRole> allUserRoles = sysUserRoleMapper.selectList(Wrappers.emptyWrapper());
|
||||
Map<Long, List<Long>> userRoleMap = allUserRoles.stream()
|
||||
.collect(Collectors.groupingBy(SysUserRole::getUserId,
|
||||
Collectors.mapping(SysUserRole::getRoleId, Collectors.toList())));
|
||||
|
||||
List<Map<String, Object>> result = new ArrayList<>();
|
||||
for (SysUser user : users) {
|
||||
Map<String, Object> item = new LinkedHashMap<>();
|
||||
item.put("userId", user.getUserId());
|
||||
item.put("nickName", user.getNickName());
|
||||
item.put("roleIds", userRoleMap.getOrDefault(user.getUserId(), Collections.emptyList()));
|
||||
result.add(item);
|
||||
}
|
||||
return R.ok(result);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.ruoyi.rm.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.rm.domain.bo.RmTechPlanItemBo;
|
||||
import com.ruoyi.rm.domain.vo.RmTechPlanItemVo;
|
||||
import com.ruoyi.rm.service.IRmTechPlanItemService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Arrays;
|
||||
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/rm/techPlan")
|
||||
public class RmTechPlanItemController extends BaseController {
|
||||
|
||||
private final IRmTechPlanItemService service;
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<RmTechPlanItemVo> list(RmTechPlanItemBo bo, PageQuery pageQuery) {
|
||||
return service.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@GetMapping("/{planItemId}")
|
||||
public R<RmTechPlanItemVo> getInfo(@PathVariable @NotNull Long planItemId) {
|
||||
return R.ok(service.queryById(planItemId));
|
||||
}
|
||||
|
||||
@Log(title = "技术方案确定", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated @RequestBody RmTechPlanItemBo bo) {
|
||||
return toAjax(service.insertByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "技术方案确定", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated @RequestBody RmTechPlanItemBo bo) {
|
||||
return toAjax(service.updateByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "技术方案确定", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{planItemIds}")
|
||||
public R<Void> remove(@PathVariable @NotEmpty Long[] planItemIds) {
|
||||
return toAjax(service.deleteWithValidByIds(Arrays.asList(planItemIds), true));
|
||||
}
|
||||
|
||||
@GetMapping("/all")
|
||||
public R<java.util.List<RmTechPlanItemVo>> all(RmTechPlanItemBo bo) {
|
||||
return R.ok(service.queryList(bo));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.ruoyi.rm.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.rm.domain.bo.RmTechReviewItemBo;
|
||||
import com.ruoyi.rm.domain.vo.RmTechReviewItemVo;
|
||||
import com.ruoyi.rm.service.IRmTechReviewItemService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Arrays;
|
||||
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/rm/techReview")
|
||||
public class RmTechReviewItemController extends BaseController {
|
||||
|
||||
private final IRmTechReviewItemService service;
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<RmTechReviewItemVo> list(RmTechReviewItemBo bo, PageQuery pageQuery) {
|
||||
return service.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@GetMapping("/{reviewItemId}")
|
||||
public R<RmTechReviewItemVo> getInfo(@PathVariable @NotNull Long reviewItemId) {
|
||||
return R.ok(service.queryById(reviewItemId));
|
||||
}
|
||||
|
||||
@Log(title = "技术审查", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated @RequestBody RmTechReviewItemBo bo) {
|
||||
return toAjax(service.insertByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "技术审查", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated @RequestBody RmTechReviewItemBo bo) {
|
||||
return toAjax(service.updateByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "技术审查", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{reviewItemIds}")
|
||||
public R<Void> remove(@PathVariable @NotEmpty Long[] reviewItemIds) {
|
||||
return toAjax(service.deleteWithValidByIds(Arrays.asList(reviewItemIds), true));
|
||||
}
|
||||
|
||||
@GetMapping("/all")
|
||||
public R<java.util.List<RmTechReviewItemVo>> all(RmTechReviewItemBo bo) {
|
||||
return R.ok(service.queryList(bo));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.ruoyi.rm.domain.bo;
|
||||
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class RmAcceptanceChecklistBo extends BaseEntity {
|
||||
private Long checkId;
|
||||
private Long projectId;
|
||||
private String itemText;
|
||||
private String isChecked;
|
||||
private Integer sortOrder;
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.ruoyi.rm.domain.bo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class RmAcceptanceItemBo extends BaseEntity {
|
||||
private Long acceptItemId;
|
||||
private Long projectId;
|
||||
private String itemName;
|
||||
private String requirement;
|
||||
private String actualValue;
|
||||
private String result;
|
||||
private String notes;
|
||||
private String inspector;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date inspectDate;
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.ruoyi.rm.domain.bo;
|
||||
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class RmBudgetBo extends BaseEntity {
|
||||
|
||||
private Long budgetId;
|
||||
private Long projectId;
|
||||
private String category;
|
||||
private String item;
|
||||
private BigDecimal budgetAmount;
|
||||
private BigDecimal spentAmount;
|
||||
private String status;
|
||||
private String archiveBatch;
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.ruoyi.rm.domain.bo;
|
||||
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class RmColorCardBo extends BaseEntity {
|
||||
|
||||
private Long colorCardId;
|
||||
private Long projectId;
|
||||
private String colorName;
|
||||
private String hexValue;
|
||||
private String standard;
|
||||
private String standardLabel;
|
||||
private String category;
|
||||
private String usageDesc;
|
||||
private String description;
|
||||
private Integer sortOrder;
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.ruoyi.rm.domain.bo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class RmCommissioningBo extends BaseEntity {
|
||||
private Long commissioningId;
|
||||
private Long projectId;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date commissioningDate;
|
||||
private String confirmer;
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.ruoyi.rm.domain.bo;
|
||||
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class RmCommissioningChecklistBo extends BaseEntity {
|
||||
private Long checkId;
|
||||
private Long projectId;
|
||||
private String itemText;
|
||||
private String isChecked;
|
||||
private Integer sortOrder;
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.ruoyi.rm.domain.bo;
|
||||
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class RmCommissioningClauseBo extends BaseEntity {
|
||||
private Long clauseId;
|
||||
private Long projectId;
|
||||
private String clause;
|
||||
private String standard;
|
||||
private String result;
|
||||
private String passFlag;
|
||||
private Integer sortOrder;
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.ruoyi.rm.domain.bo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class RmDocLibBo extends BaseEntity {
|
||||
private Long docId;
|
||||
private Long projectId;
|
||||
private String docName;
|
||||
private String category;
|
||||
private String version;
|
||||
private String uploader;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date uploadDate;
|
||||
private String fileUrl;
|
||||
private String description;
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.ruoyi.rm.domain.bo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class RmDrawingCompareBo extends BaseEntity {
|
||||
private Long compareId;
|
||||
private Long projectId;
|
||||
private String drawingName;
|
||||
private String oldVersion;
|
||||
private String newVersion;
|
||||
private String optimizer;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date compareDate;
|
||||
private String status;
|
||||
private String beforeDesc;
|
||||
private String afterDesc;
|
||||
private String diffNotes;
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.ruoyi.rm.domain.bo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class RmDrawingDesignBo extends BaseEntity {
|
||||
|
||||
private Long drawingId;
|
||||
private Long projectId;
|
||||
private String drawingName;
|
||||
private String drawingNo;
|
||||
private String version;
|
||||
private String drawingType;
|
||||
private String drawer;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date startDate;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date endDate;
|
||||
private String fileUrl;
|
||||
private String status;
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.ruoyi.rm.domain.bo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class RmDrawingReviewBo extends BaseEntity {
|
||||
|
||||
private Long reviewId;
|
||||
private Long projectId;
|
||||
private Long drawingId;
|
||||
private String drawingName;
|
||||
private String drawingNo;
|
||||
private String version;
|
||||
private String fileUrl;
|
||||
private String status;
|
||||
private String reviewer;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date reviewDate;
|
||||
private String reviewOpinion;
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.ruoyi.rm.domain.bo;
|
||||
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class RmFileReviewBo extends BaseEntity {
|
||||
private Long id;
|
||||
private Long fileId;
|
||||
private String fileModule;
|
||||
private Long reviewerId;
|
||||
private String content;
|
||||
private String reviewAction;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.ruoyi.rm.domain.bo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class RmInstallFeedbackBo extends BaseEntity {
|
||||
private Long feedbackId;
|
||||
private Long projectId;
|
||||
private String title;
|
||||
private String location;
|
||||
private String proposer;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date feedbackDate;
|
||||
private String issueDesc;
|
||||
private String solution;
|
||||
private String preventAction;
|
||||
private String status;
|
||||
private String attachmentUrl;
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.ruoyi.rm.domain.bo;
|
||||
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class RmInstallPersonnelBo extends BaseEntity {
|
||||
private Long personnelId;
|
||||
private Long projectId;
|
||||
private String name;
|
||||
private String nameEn;
|
||||
private String position;
|
||||
private String positionEn;
|
||||
private String planIn;
|
||||
private String planOut;
|
||||
private Integer days;
|
||||
private BigDecimal dailyRate;
|
||||
private BigDecimal totalWages;
|
||||
private String duty;
|
||||
private String qualification;
|
||||
private String phone;
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.ruoyi.rm.domain.bo;
|
||||
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class RmInstallPrecisionBo extends BaseEntity {
|
||||
private Long precisionId;
|
||||
private Long projectId;
|
||||
private String systemName;
|
||||
private String itemName;
|
||||
private String nameEn;
|
||||
private String targetValue;
|
||||
private String unit;
|
||||
private String importance;
|
||||
private String tool;
|
||||
private String methodDesc;
|
||||
private String standardRef;
|
||||
private String requirement;
|
||||
private String actualValue;
|
||||
private String isQualified;
|
||||
private String photos;
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.ruoyi.rm.domain.bo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class RmInstallProgressBo extends BaseEntity {
|
||||
|
||||
private Long progressId;
|
||||
private Long projectId;
|
||||
private String itemName;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date planStart;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date planEnd;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date actualStart;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date actualEnd;
|
||||
private String status;
|
||||
private String delayReason;
|
||||
private String images;
|
||||
private String videos;
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.ruoyi.rm.domain.bo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class RmInstallToolBo extends BaseEntity {
|
||||
private Long toolId;
|
||||
private Long projectId;
|
||||
private String name;
|
||||
private String nameEn;
|
||||
private String spec;
|
||||
private Integer qty;
|
||||
private String unit;
|
||||
private BigDecimal unitPrice;
|
||||
private BigDecimal totalPrice;
|
||||
private String priority;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date arrivalDate;
|
||||
private String purpose;
|
||||
private String responsible;
|
||||
private String status;
|
||||
private String category;
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.ruoyi.rm.domain.bo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class RmLayoutFileBo extends BaseEntity {
|
||||
|
||||
private Long layoutFileId;
|
||||
private Long projectId;
|
||||
private String fileName;
|
||||
private String version;
|
||||
private String fileType;
|
||||
private String fileUrl;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date uploadDate;
|
||||
private String status;
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.ruoyi.rm.domain.bo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class RmManualBo extends BaseEntity {
|
||||
private Long manualId;
|
||||
private Long projectId;
|
||||
private String manualName;
|
||||
private String docType;
|
||||
private String version;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date uploadDate;
|
||||
private String fileUrl;
|
||||
private String description;
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.ruoyi.rm.domain.bo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class RmMfgDeviceBo extends BaseEntity {
|
||||
|
||||
private Long deviceId;
|
||||
private Long projectId;
|
||||
private String deviceName;
|
||||
private String spec;
|
||||
private String supplierName;
|
||||
private String contractNo;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date orderDate;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date deliveryDate;
|
||||
private BigDecimal penaltyRate;
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.ruoyi.rm.domain.bo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class RmMfgStageBo extends BaseEntity {
|
||||
|
||||
private Long stageId;
|
||||
private Long deviceId;
|
||||
private String stageKey;
|
||||
private String stageName;
|
||||
private String status;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date planStartDate;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date planEndDate;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date actualStart;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date actualEnd;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date submittedDate;
|
||||
private String manufacturingPhotos;
|
||||
private String manufacturingVideo;
|
||||
private String materialReport;
|
||||
private String precisionReport;
|
||||
private Integer sortOrder;
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.ruoyi.rm.domain.bo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class RmProcurementContractBo extends BaseEntity {
|
||||
|
||||
private Long contractId;
|
||||
private Long projectId;
|
||||
private String contractNo;
|
||||
private String contractName;
|
||||
private String supplierName;
|
||||
private BigDecimal totalAmount;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date signDate;
|
||||
private String fileUrl;
|
||||
private String status;
|
||||
private String clauses;
|
||||
private String penaltyClause;
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.ruoyi.rm.domain.bo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class RmProcurementProgressBo extends BaseEntity {
|
||||
|
||||
private Long progressId;
|
||||
private Long projectId;
|
||||
private String itemName;
|
||||
private String supplierName;
|
||||
private String contractNo;
|
||||
private BigDecimal amount;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date orderDate;
|
||||
private String currentStage;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date expectDate;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date actualDate;
|
||||
private String stages;
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.ruoyi.rm.domain.bo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class RmProcurementQuoteBo extends BaseEntity {
|
||||
|
||||
private Long quoteId;
|
||||
private Long projectId;
|
||||
private String supplierName;
|
||||
private String itemName;
|
||||
private String spec;
|
||||
private Integer qty;
|
||||
private String unit;
|
||||
private BigDecimal unitPrice;
|
||||
private BigDecimal totalPrice;
|
||||
private Integer deliveryDays;
|
||||
private Integer warrantyMonths;
|
||||
private BigDecimal scorePrice;
|
||||
private BigDecimal scoreDelivery;
|
||||
private BigDecimal scoreWarranty;
|
||||
private BigDecimal scoreTotal;
|
||||
private Integer scoreRank;
|
||||
private String status;
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.ruoyi.rm.domain.bo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class RmProjectBo extends BaseEntity {
|
||||
|
||||
private Long projectId;
|
||||
private String projectName;
|
||||
private String projectNo;
|
||||
private String clientName;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date startDate;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date endDate;
|
||||
private String manager;
|
||||
private Long managerId;
|
||||
private String status;
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.ruoyi.rm.domain.bo;
|
||||
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class RmProjectMemberBo extends BaseEntity {
|
||||
private Long memberId;
|
||||
private Long projectId;
|
||||
private Long userId;
|
||||
private String role;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.ruoyi.rm.domain.bo;
|
||||
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class RmShippingChecklistBo extends BaseEntity {
|
||||
private Long checklistId;
|
||||
private Long projectId;
|
||||
private String itemText;
|
||||
private String isChecked;
|
||||
private Integer sortOrder;
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.ruoyi.rm.domain.bo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class RmShippingItemBo extends BaseEntity {
|
||||
private Long itemId;
|
||||
private Long projectId;
|
||||
private String deviceName;
|
||||
private String spec;
|
||||
private Integer qty;
|
||||
private String packed;
|
||||
private String photos;
|
||||
private String note;
|
||||
private String destination;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date shipDate;
|
||||
private String status;
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.ruoyi.rm.domain.bo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class RmSiteModBo extends BaseEntity {
|
||||
private Long modId;
|
||||
private Long projectId;
|
||||
private String deviceName;
|
||||
private String location;
|
||||
private String modReason;
|
||||
private String solution;
|
||||
private String modPerson;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date modDate;
|
||||
private String status;
|
||||
private String preventAction;
|
||||
private String drawingUpdated;
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.ruoyi.rm.domain.bo;
|
||||
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class RmSiteModMediaBo extends BaseEntity {
|
||||
private Long mediaId;
|
||||
private Long modId;
|
||||
private String mediaType;
|
||||
private String fileName;
|
||||
private String fileUrl;
|
||||
private Long fileSize;
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.ruoyi.rm.domain.bo;
|
||||
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class RmStageConfirmBo extends BaseEntity {
|
||||
private Long confirmId;
|
||||
private Long projectId;
|
||||
private String stageKey;
|
||||
private String confirmType;
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.ruoyi.rm.domain.bo;
|
||||
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class RmStageImageBo extends BaseEntity {
|
||||
|
||||
private Long imageId;
|
||||
private Long projectId;
|
||||
private String stageKey;
|
||||
private String imageUrl;
|
||||
private String description;
|
||||
private Integer sortOrder;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.ruoyi.rm.domain.bo;
|
||||
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class RmStageUserPermBo extends BaseEntity {
|
||||
private Long id;
|
||||
private Long userId;
|
||||
private String stageKey;
|
||||
private String canOverride;
|
||||
private String canConfirm;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.ruoyi.rm.domain.bo;
|
||||
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class RmTechPlanItemBo extends BaseEntity {
|
||||
|
||||
private Long planItemId;
|
||||
private Long projectId;
|
||||
private String itemName;
|
||||
private String status;
|
||||
private String description;
|
||||
private String owner;
|
||||
private String completionDate;
|
||||
private String endDate;
|
||||
private String attachmentUrl;
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.ruoyi.rm.domain.bo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class RmTechReviewItemBo extends BaseEntity {
|
||||
|
||||
private Long reviewItemId;
|
||||
private Long projectId;
|
||||
private String reviewType;
|
||||
private String itemName;
|
||||
private String conclusion;
|
||||
private String reviewer;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date reviewDate;
|
||||
private String reviewOpinion;
|
||||
private String thinking;
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.ruoyi.rm.domain.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("fad_rm_acceptance_checklist")
|
||||
public class RmAcceptanceChecklist extends BaseEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId
|
||||
private Long checkId;
|
||||
private Long projectId;
|
||||
private String itemText;
|
||||
private String isChecked;
|
||||
private Integer sortOrder;
|
||||
private String remark;
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.ruoyi.rm.domain.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("fad_rm_acceptance_item")
|
||||
public class RmAcceptanceItem extends BaseEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId
|
||||
private Long acceptItemId;
|
||||
private Long projectId;
|
||||
private String itemName;
|
||||
private String requirement;
|
||||
private String actualValue;
|
||||
private String result;
|
||||
private String notes;
|
||||
private String inspector;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date inspectDate;
|
||||
private String remark;
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.ruoyi.rm.domain.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("fad_rm_budget")
|
||||
public class RmBudget extends BaseEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId
|
||||
private Long budgetId;
|
||||
private Long projectId;
|
||||
private String category;
|
||||
private String item;
|
||||
private BigDecimal budgetAmount;
|
||||
private BigDecimal spentAmount;
|
||||
private String status;
|
||||
private String archiveBatch;
|
||||
private String remark;
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.ruoyi.rm.domain.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("fad_rm_color_card")
|
||||
public class RmColorCard extends BaseEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId
|
||||
private Long colorCardId;
|
||||
private Long projectId;
|
||||
private String colorName;
|
||||
private String hexValue;
|
||||
private String standard;
|
||||
private String standardLabel;
|
||||
private String category;
|
||||
private String usageDesc;
|
||||
private String description;
|
||||
private Integer sortOrder;
|
||||
private String remark;
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.ruoyi.rm.domain.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("fad_rm_commissioning")
|
||||
public class RmCommissioning extends BaseEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId
|
||||
private Long commissioningId;
|
||||
private Long projectId;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date commissioningDate;
|
||||
private String confirmer;
|
||||
private String remark;
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.ruoyi.rm.domain.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("fad_rm_commissioning_checklist")
|
||||
public class RmCommissioningChecklist extends BaseEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId
|
||||
private Long checkId;
|
||||
private Long projectId;
|
||||
private String itemText;
|
||||
private String isChecked;
|
||||
private Integer sortOrder;
|
||||
private String remark;
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.ruoyi.rm.domain.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("fad_rm_commissioning_clause")
|
||||
public class RmCommissioningClause extends BaseEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId
|
||||
private Long clauseId;
|
||||
private Long projectId;
|
||||
private String clause;
|
||||
private String standard;
|
||||
private String result;
|
||||
private String passFlag;
|
||||
private Integer sortOrder;
|
||||
private String remark;
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.ruoyi.rm.domain.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("fad_rm_doc_lib")
|
||||
public class RmDocLib extends BaseEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId
|
||||
private Long docId;
|
||||
private Long projectId;
|
||||
private String docName;
|
||||
private String category;
|
||||
private String version;
|
||||
private String uploader;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date uploadDate;
|
||||
private String fileUrl;
|
||||
private String description;
|
||||
private String remark;
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.ruoyi.rm.domain.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("fad_rm_drawing_compare")
|
||||
public class RmDrawingCompare extends BaseEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId
|
||||
private Long compareId;
|
||||
private Long projectId;
|
||||
private String drawingName;
|
||||
private String oldVersion;
|
||||
private String newVersion;
|
||||
private String optimizer;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date compareDate;
|
||||
private String status;
|
||||
private String beforeDesc;
|
||||
private String afterDesc;
|
||||
private String diffNotes;
|
||||
private String remark;
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.ruoyi.rm.domain.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("fad_rm_drawing_design")
|
||||
public class RmDrawingDesign extends BaseEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId
|
||||
private Long drawingId;
|
||||
private Long projectId;
|
||||
private String drawingName;
|
||||
private String drawingNo;
|
||||
private String version;
|
||||
private String drawingType;
|
||||
private String drawer;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date startDate;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date endDate;
|
||||
private String fileUrl;
|
||||
private String status;
|
||||
private String remark;
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.ruoyi.rm.domain.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("fad_rm_drawing_review")
|
||||
public class RmDrawingReview extends BaseEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId
|
||||
private Long reviewId;
|
||||
private Long projectId;
|
||||
private Long drawingId;
|
||||
private String drawingName;
|
||||
private String drawingNo;
|
||||
private String version;
|
||||
private String fileUrl;
|
||||
private String status;
|
||||
private String reviewer;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date reviewDate;
|
||||
private String reviewOpinion;
|
||||
private String remark;
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.ruoyi.rm.domain.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("fad_rm_file_review")
|
||||
public class RmFileReview extends BaseEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId
|
||||
private Long id;
|
||||
private Long fileId;
|
||||
private String fileModule;
|
||||
private Long reviewerId;
|
||||
private String content;
|
||||
private String reviewAction;
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.ruoyi.rm.domain.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("fad_rm_install_feedback")
|
||||
public class RmInstallFeedback extends BaseEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId
|
||||
private Long feedbackId;
|
||||
private Long projectId;
|
||||
private String title;
|
||||
private String location;
|
||||
private String proposer;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date feedbackDate;
|
||||
private String issueDesc;
|
||||
private String solution;
|
||||
private String preventAction;
|
||||
private String status;
|
||||
private String attachmentUrl;
|
||||
private String remark;
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.ruoyi.rm.domain.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("fad_rm_install_personnel")
|
||||
public class RmInstallPersonnel extends BaseEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId
|
||||
private Long personnelId;
|
||||
private Long projectId;
|
||||
private String name;
|
||||
private String nameEn;
|
||||
private String position;
|
||||
private String positionEn;
|
||||
private String planIn;
|
||||
private String planOut;
|
||||
private Integer days;
|
||||
private BigDecimal dailyRate;
|
||||
private BigDecimal totalWages;
|
||||
private String duty;
|
||||
private String qualification;
|
||||
private String phone;
|
||||
private String remark;
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.ruoyi.rm.domain.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("fad_rm_install_precision")
|
||||
public class RmInstallPrecision extends BaseEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId
|
||||
private Long precisionId;
|
||||
private Long projectId;
|
||||
private String systemName;
|
||||
private String itemName;
|
||||
private String nameEn;
|
||||
private String targetValue;
|
||||
private String unit;
|
||||
private String importance;
|
||||
private String tool;
|
||||
private String methodDesc;
|
||||
private String standardRef;
|
||||
private String requirement;
|
||||
private String actualValue;
|
||||
private String isQualified;
|
||||
private String photos;
|
||||
private String remark;
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.ruoyi.rm.domain.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("fad_rm_install_progress")
|
||||
public class RmInstallProgress extends BaseEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId
|
||||
private Long progressId;
|
||||
private Long projectId;
|
||||
private String itemName;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date planStart;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date planEnd;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date actualStart;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date actualEnd;
|
||||
private String status;
|
||||
private String delayReason;
|
||||
private String images;
|
||||
private String videos;
|
||||
private String remark;
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.ruoyi.rm.domain.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("fad_rm_install_tool")
|
||||
public class RmInstallTool extends BaseEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId
|
||||
private Long toolId;
|
||||
private Long projectId;
|
||||
private String name;
|
||||
private String nameEn;
|
||||
private String spec;
|
||||
private Integer qty;
|
||||
private String unit;
|
||||
private BigDecimal unitPrice;
|
||||
private BigDecimal totalPrice;
|
||||
private String priority;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date arrivalDate;
|
||||
private String purpose;
|
||||
private String responsible;
|
||||
private String status;
|
||||
private String category;
|
||||
private String remark;
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.ruoyi.rm.domain.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("fad_rm_layout_file")
|
||||
public class RmLayoutFile extends BaseEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId
|
||||
private Long layoutFileId;
|
||||
private Long projectId;
|
||||
private String fileName;
|
||||
private String version;
|
||||
private String fileType;
|
||||
private String fileUrl;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date uploadDate;
|
||||
private String status;
|
||||
private String remark;
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.ruoyi.rm.domain.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("fad_rm_manual")
|
||||
public class RmManual extends BaseEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId
|
||||
private Long manualId;
|
||||
private Long projectId;
|
||||
private String manualName;
|
||||
private String docType;
|
||||
private String version;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date uploadDate;
|
||||
private String fileUrl;
|
||||
private String description;
|
||||
private String remark;
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user