Compare commits
73 Commits
455f3bbf09
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 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 | |||
| b475bee7ed | |||
| a556139b68 | |||
| 9ce3bbf118 | |||
| c6e4c4bb06 | |||
| 03ed8f258f | |||
| bb45c2bb38 | |||
| 55443dac9e | |||
| 434e874777 | |||
| 900b3638d4 | |||
| ffcb62cece | |||
| dcc66aa4a9 | |||
| a28ea44cab | |||
| 3dafaceef2 | |||
| 95141d0e1f | |||
| 12076c5d0b | |||
| 81e529a2dd | |||
| 305d8524d1 | |||
| 47baa575df | |||
| 9ce5cb8f2e | |||
| ccf87c06ff | |||
| 156602fd59 | |||
| 2752a31a49 | |||
| 40fdd14d13 | |||
| f1158d1e16 | |||
| 6055f06f83 | |||
| a0d8f459e4 | |||
| 5672b1c07a | |||
| 89f47860a7 | |||
| 7f9ae18022 | |||
| f5b2ddb743 | |||
| 1e128cecfe | |||
| 534a64a874 | |||
| c412f73b80 | |||
| 28a37f4105 | |||
| 975c57f12b | |||
| 67d4519462 | |||
| dc67788f51 | |||
| 04c84a3ed3 | |||
| acf0048bf1 | |||
| 2ac3901f75 | |||
| 3613b6d83a | |||
| 4faad94c79 | |||
| f6b5940a27 | |||
| db90e2a084 | |||
| f48818b14d | |||
| 602928dc0b |
@@ -9,6 +9,9 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* FAD APP 定位控制器
|
||||
*/
|
||||
@@ -21,14 +24,14 @@ public class FadAppLocationController {
|
||||
private final IFadAppLocationService locationService;
|
||||
|
||||
/**
|
||||
* 根据经纬度获取城市
|
||||
*
|
||||
* @param latitude 纬度
|
||||
* @param longitude 经度
|
||||
* @return 城市名称
|
||||
* 根据经纬度获取地址(精确到区/县)。
|
||||
* <p>用 Map 包一层避开 R.ok(String) 把字符串塞到 msg 字段的重载冲突。
|
||||
*/
|
||||
@GetMapping("/city")
|
||||
public R<String> getCity(@RequestParam Double latitude, @RequestParam Double longitude) {
|
||||
return R.ok(locationService.getCityByLocation(latitude, longitude));
|
||||
public R<Map<String, Object>> getCity(@RequestParam Double latitude,
|
||||
@RequestParam Double longitude) {
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
data.put("city", locationService.getCityByLocation(latitude, longitude));
|
||||
return R.ok(data);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,11 +6,12 @@ package com.ruoyi.fadapp.service;
|
||||
public interface IFadAppLocationService {
|
||||
|
||||
/**
|
||||
* 根据经纬度获取城市
|
||||
* 根据经纬度返回最精准的地址(精确到区/县)。
|
||||
* 例如 "烟台市芝罘区"、"北京市朝阳区",直辖市可能只有 "朝阳区"。
|
||||
*
|
||||
* @param latitude 纬度
|
||||
* @param longitude 经度
|
||||
* @return 城市名称
|
||||
* @return 地址字符串,失败返回 ""
|
||||
*/
|
||||
String getCityByLocation(Double latitude, Double longitude);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.ruoyi.fadapp.service.impl;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.ruoyi.fadapp.service.IFadAppLocationService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -11,25 +12,27 @@ import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* FAD APP 定位服务实现
|
||||
* FAD APP 定位服务实现,调高德逆地理编码 API
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class FadAppLocationServiceImpl implements IFadAppLocationService {
|
||||
|
||||
private static final String AMAP_REVERSE_URL = "https://restapi.amap.com/v3/geocode/regeo";
|
||||
|
||||
private final RestTemplate restTemplate = new RestTemplate();
|
||||
private final RestTemplate restTemplate;
|
||||
|
||||
@Value("${fad.amap.key:}")
|
||||
private String amapKey;
|
||||
|
||||
/**
|
||||
* 根据经纬度返回最精准的可读地址:优先到区/县。
|
||||
* 返回示例:"烟台市芝罘区" / "北京市朝阳区" / "山东省"(兜底)。
|
||||
*/
|
||||
@Override
|
||||
public String getCityByLocation(Double latitude, Double longitude) {
|
||||
if (latitude == null || longitude == null) {
|
||||
return "";
|
||||
}
|
||||
|
||||
if (latitude == null || longitude == null) return "";
|
||||
if (!org.springframework.util.StringUtils.hasText(amapKey)) {
|
||||
log.warn("高德地图 key 未配置");
|
||||
return "";
|
||||
@@ -45,43 +48,40 @@ public class FadAppLocationServiceImpl implements IFadAppLocationService {
|
||||
params.put("output", "JSON");
|
||||
|
||||
StringBuilder url = new StringBuilder(AMAP_REVERSE_URL).append("?");
|
||||
params.forEach((key, value) -> url.append(key).append("=").append(value).append("&"));
|
||||
params.forEach((k, v) -> url.append(k).append("=").append(v).append("&"));
|
||||
url.setLength(url.length() - 1);
|
||||
|
||||
JSONObject response = restTemplate.getForObject(url.toString(), JSONObject.class);
|
||||
if (response == null) {
|
||||
return "";
|
||||
}
|
||||
|
||||
if (!"1".equals(response.getString("status"))) {
|
||||
if (response == null || !"1".equals(response.getString("status"))) {
|
||||
log.warn("高德逆地理编码失败: {}", response);
|
||||
return "";
|
||||
}
|
||||
|
||||
JSONObject regeocode = response.getJSONObject("regeocode");
|
||||
if (regeocode == null) {
|
||||
return "";
|
||||
}
|
||||
if (regeocode == null) return "";
|
||||
JSONObject ac = regeocode.getJSONObject("addressComponent");
|
||||
if (ac == null) return "";
|
||||
|
||||
JSONObject addressComponent = regeocode.getJSONObject("addressComponent");
|
||||
if (addressComponent == null) {
|
||||
return "";
|
||||
// 优先到区县级别
|
||||
String district = _str(ac, "district");
|
||||
String city = _str(ac, "city");
|
||||
String province = _str(ac, "province");
|
||||
if (!district.isEmpty()) {
|
||||
// 直辖市 city 为空时只显示区,否则拼"市+区"
|
||||
return city.isEmpty() ? district : (city + district);
|
||||
}
|
||||
|
||||
String city = addressComponent.getString("city");
|
||||
if (org.springframework.util.StringUtils.hasText(city)) {
|
||||
return city;
|
||||
}
|
||||
|
||||
String province = addressComponent.getString("province");
|
||||
if (org.springframework.util.StringUtils.hasText(province)) {
|
||||
return province;
|
||||
}
|
||||
|
||||
return "";
|
||||
if (!city.isEmpty()) return city;
|
||||
return province;
|
||||
} catch (Exception e) {
|
||||
log.warn("根据经纬度获取城市失败, latitude={}, longitude={}, err={}", latitude, longitude, e.getMessage());
|
||||
log.warn("根据经纬度获取地址失败, lat={}, lng={}, err={}", latitude, longitude, e.getMessage());
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
/** 高德对部分字段(直辖市的 city、无下级的乡镇)返回 [],统一收敛成 "" */
|
||||
private String _str(JSONObject o, String key) {
|
||||
Object v = o.get(key);
|
||||
if (v == null) return "";
|
||||
if (v instanceof java.util.List && ((java.util.List<?>) v).isEmpty()) return "";
|
||||
return v.toString();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,5 +50,28 @@
|
||||
<artifactId>pdfbox</artifactId>
|
||||
<version>2.0.29</version>
|
||||
</dependency>
|
||||
<!-- 二维码识别(发票二维码兜底) -->
|
||||
<dependency>
|
||||
<groupId>com.google.zxing</groupId>
|
||||
<artifactId>core</artifactId>
|
||||
<version>3.5.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.zxing</groupId>
|
||||
<artifactId>javase</artifactId>
|
||||
<version>3.5.1</version>
|
||||
</dependency>
|
||||
<!-- 本地 OCR(Tesseract JNA 绑定):仅在 PDF 没有文本层且二维码不可读时启用 -->
|
||||
<dependency>
|
||||
<groupId>net.sourceforge.tess4j</groupId>
|
||||
<artifactId>tess4j</artifactId>
|
||||
<version>5.11.0</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-log4j12</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
||||
@@ -9,7 +9,9 @@ import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.helper.LoginHelper;
|
||||
import com.ruoyi.hrm.domain.bo.HrmAppropriationReqBo;
|
||||
import com.ruoyi.hrm.domain.vo.HrmAppropriationReqVo;
|
||||
import com.ruoyi.hrm.domain.vo.HrmInvoiceOcrResultVo;
|
||||
import com.ruoyi.hrm.service.IHrmAppropriationReqService;
|
||||
import com.ruoyi.hrm.service.IHrmInvoiceOcrService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -29,6 +31,7 @@ import java.util.List;
|
||||
public class HrmAppropriationReqController extends BaseController {
|
||||
|
||||
private final IHrmAppropriationReqService service;
|
||||
private final IHrmInvoiceOcrService invoiceOcrService;
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<HrmAppropriationReqVo> list(HrmAppropriationReqBo bo, PageQuery pageQuery) {
|
||||
@@ -64,5 +67,10 @@ public class HrmAppropriationReqController extends BaseController {
|
||||
bo.setCreateBy(String.valueOf(LoginHelper.getUserId()));
|
||||
return R.ok(service.queryList(bo));
|
||||
}
|
||||
|
||||
@PostMapping("/ocr-by-oss")
|
||||
public R<HrmInvoiceOcrResultVo> ocrByOss(@RequestParam @NotNull Long ossId) {
|
||||
return R.ok(invoiceOcrService.recognizeByOssId(ossId));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,117 @@
|
||||
package com.ruoyi.hrm.controller;
|
||||
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
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.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.hrm.domain.bo.HrmEmergencyContactBo;
|
||||
import com.ruoyi.hrm.domain.vo.HrmEmergencyContactImportVo;
|
||||
import com.ruoyi.hrm.domain.vo.HrmEmergencyContactVo;
|
||||
import com.ruoyi.hrm.service.IHrmEmergencyContactService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.ServletOutputStream;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.IOException;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/hrm/emergencyContact")
|
||||
public class HrmEmergencyContactController extends BaseController {
|
||||
|
||||
private final IHrmEmergencyContactService service;
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<HrmEmergencyContactVo> list(HrmEmergencyContactBo bo, PageQuery pageQuery) {
|
||||
return service.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@GetMapping("/{contactId}")
|
||||
public R<HrmEmergencyContactVo> getInfo(@NotNull(message = "主键不能为空") @PathVariable Long contactId) {
|
||||
return R.ok(service.queryById(contactId));
|
||||
}
|
||||
|
||||
@Log(title = "紧急联系人管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated @RequestBody HrmEmergencyContactBo bo) {
|
||||
return toAjax(service.insertByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "紧急联系人管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated @RequestBody HrmEmergencyContactBo bo) {
|
||||
return toAjax(service.updateByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "紧急联系人管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{contactIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空") @PathVariable Long[] contactIds) {
|
||||
return toAjax(service.deleteWithValidByIds(Arrays.asList(contactIds), true));
|
||||
}
|
||||
|
||||
@Log(title = "紧急联系人管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HrmEmergencyContactBo bo, HttpServletResponse response) {
|
||||
List<HrmEmergencyContactVo> list = service.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "紧急联系人数据", HrmEmergencyContactVo.class, response);
|
||||
}
|
||||
|
||||
@PostMapping(value = "/importData", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
|
||||
public R<String> importData(@RequestPart("file") MultipartFile file, @RequestParam(defaultValue = "false") boolean updateSupport) throws IOException {
|
||||
List<HrmEmergencyContactImportVo> list = ExcelUtil.importExcel(file.getInputStream(), HrmEmergencyContactImportVo.class, false).getList();
|
||||
String msg = service.importByVoList(list, updateSupport);
|
||||
return R.ok(msg);
|
||||
}
|
||||
|
||||
@PostMapping("/importTemplate")
|
||||
public void importTemplate(HttpServletResponse response) throws IOException {
|
||||
// 设置响应头
|
||||
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
|
||||
response.setCharacterEncoding("utf-8");
|
||||
String fileName = URLEncoder.encode("紧急联系人导入模板", "UTF-8").replaceAll("\\+", "%20");
|
||||
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
|
||||
|
||||
// 示例数据(字段名第一行,示例数据第二行)
|
||||
List<HrmEmergencyContactImportVo> exampleList = new ArrayList<>();
|
||||
|
||||
// 添加示例数据
|
||||
HrmEmergencyContactImportVo example = new HrmEmergencyContactImportVo();
|
||||
example.setHireDate("2025.06.18");
|
||||
example.setCompanyName("山东福安德信息科技有限公司");
|
||||
example.setDeptName("信息化部");
|
||||
example.setRealName("张三");
|
||||
example.setPhone("183xxxxxxxx");
|
||||
example.setIdCard("341xxxxxxxxxxxxxxx");
|
||||
example.setGender("男");
|
||||
example.setAge(23);
|
||||
example.setEmergencyContact("李四");
|
||||
example.setRelationship("母子");
|
||||
example.setEmergencyPhone1("159xxxxxxxx");
|
||||
example.setEmergencyPhone2("");
|
||||
example.setEmergencyAddress("xx省xx市xx县xx镇xx村");
|
||||
example.setRemark("仅紧急情况联系");
|
||||
exampleList.add(example);
|
||||
|
||||
// 使用EasyExcel写入(字段名在第一行,示例数据在第二行)
|
||||
ServletOutputStream out = response.getOutputStream();
|
||||
EasyExcel.write(out, HrmEmergencyContactImportVo.class)
|
||||
.sheet("导入模板")
|
||||
.doWrite(exampleList);
|
||||
out.flush();
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,9 @@ import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.helper.LoginHelper;
|
||||
import com.ruoyi.hrm.domain.bo.HrmReimburseReqBo;
|
||||
import com.ruoyi.hrm.domain.vo.HrmInvoiceOcrResultVo;
|
||||
import com.ruoyi.hrm.domain.vo.HrmReimburseReqVo;
|
||||
import com.ruoyi.hrm.service.IHrmInvoiceOcrService;
|
||||
import com.ruoyi.hrm.service.IHrmReimburseReqService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@@ -29,6 +31,7 @@ import java.util.List;
|
||||
public class HrmReimburseReqController extends BaseController {
|
||||
|
||||
private final IHrmReimburseReqService service;
|
||||
private final IHrmInvoiceOcrService invoiceOcrService;
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<HrmReimburseReqVo> list(HrmReimburseReqBo bo, PageQuery pageQuery) {
|
||||
@@ -64,5 +67,10 @@ public class HrmReimburseReqController extends BaseController {
|
||||
bo.setCreateBy(LoginHelper.getUsername());
|
||||
return R.ok(service.queryList(bo));
|
||||
}
|
||||
|
||||
@PostMapping("/ocr-by-oss")
|
||||
public R<HrmInvoiceOcrResultVo> ocrByOss(@RequestParam @NotNull Long ossId) {
|
||||
return R.ok(invoiceOcrService.recognizeByOssId(ossId));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.ruoyi.hrm.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
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.util.Date;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("hrm_emergency_contact")
|
||||
public class HrmEmergencyContact extends BaseEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long contactId;
|
||||
private Long userId;
|
||||
private Long deptId;
|
||||
private String realName;
|
||||
private String phone;
|
||||
private String idCard;
|
||||
private String gender;
|
||||
private Integer age;
|
||||
private String companyName;
|
||||
private Date hireDate;
|
||||
private String emergencyContact;
|
||||
private String relationship;
|
||||
private String emergencyPhone1;
|
||||
private String emergencyPhone2;
|
||||
private String emergencyAddress;
|
||||
private String remark;
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.ruoyi.hrm.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 发票条目子表(报销单/拨款单共用)
|
||||
*/
|
||||
@Data
|
||||
@TableName("hrm_invoice_item")
|
||||
public class HrmInvoiceItem {
|
||||
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
/** 业务类型 reimburse / appropriation */
|
||||
private String bizType;
|
||||
|
||||
/** 关联业务单ID */
|
||||
private Long bizId;
|
||||
|
||||
/** 来源附件ossId */
|
||||
private Long ossId;
|
||||
|
||||
/** 排序序号 */
|
||||
private Integer sortNo;
|
||||
|
||||
/** OCR识别项目名称 */
|
||||
private String itemName;
|
||||
|
||||
/** 事由说明(用户可编辑) */
|
||||
private String reason;
|
||||
|
||||
/** 金额 */
|
||||
private BigDecimal amount;
|
||||
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
}
|
||||
@@ -6,6 +6,7 @@ import lombok.EqualsAndHashCode;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 拨款申请 Bo
|
||||
@@ -59,5 +60,8 @@ public class HrmAppropriationReqBo extends BaseEntity {
|
||||
private String remark;
|
||||
|
||||
private Long tplId;
|
||||
|
||||
/** 发票条目列表(前端提交时携带) */
|
||||
private List<HrmInvoiceItemBo> invoiceItems;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.ruoyi.hrm.domain.bo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class HrmEmergencyContactBo extends BaseEntity {
|
||||
|
||||
private Long contactId;
|
||||
|
||||
@NotNull(message = "用户ID不能为空")
|
||||
private Long userId;
|
||||
|
||||
private Long deptId;
|
||||
private String realName;
|
||||
private String phone;
|
||||
private String idCard;
|
||||
private String gender;
|
||||
private Integer age;
|
||||
private String companyName;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date hireDate;
|
||||
|
||||
@NotBlank(message = "紧急联系人姓名不能为空")
|
||||
private String emergencyContact;
|
||||
|
||||
private String relationship;
|
||||
|
||||
@NotBlank(message = "紧急联系人电话1不能为空")
|
||||
private String emergencyPhone1;
|
||||
|
||||
private String emergencyPhone2;
|
||||
private String emergencyAddress;
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.ruoyi.hrm.domain.bo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 发票条目 BO(用于表单提交)
|
||||
*/
|
||||
@Data
|
||||
public class HrmInvoiceItemBo {
|
||||
|
||||
/** 来源附件ossId */
|
||||
private Long ossId;
|
||||
|
||||
/** 排序序号 */
|
||||
private Integer sortNo;
|
||||
|
||||
/** OCR识别项目名称 */
|
||||
private String itemName;
|
||||
|
||||
/** 事由说明 */
|
||||
private String reason;
|
||||
|
||||
/** 金额 */
|
||||
private BigDecimal amount;
|
||||
}
|
||||
@@ -6,6 +6,7 @@ import lombok.EqualsAndHashCode;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@@ -39,5 +40,8 @@ public class HrmReimburseReqBo extends BaseEntity {
|
||||
private String remark;
|
||||
|
||||
private Long tplId;
|
||||
|
||||
/** 发票条目列表(前端提交时携带) */
|
||||
private List<HrmInvoiceItemBo> invoiceItems;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,8 @@ import lombok.Data;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import com.ruoyi.hrm.domain.HrmInvoiceItem;
|
||||
|
||||
/**
|
||||
* 拨款申请 VO
|
||||
@@ -108,5 +110,7 @@ public class HrmAppropriationReqVo implements Serializable {
|
||||
|
||||
/** 流程实例ID */
|
||||
private Long instId;
|
||||
|
||||
private List<HrmInvoiceItem> invoiceItems;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,138 @@
|
||||
package com.ruoyi.hrm.domain.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.alibaba.excel.annotation.write.style.ColumnWidth;
|
||||
import com.alibaba.excel.annotation.write.style.ContentStyle;
|
||||
import com.alibaba.excel.annotation.write.style.HeadStyle;
|
||||
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 紧急联系人导入 VO
|
||||
* 与用户提供的Excel格式保持一致
|
||||
*
|
||||
* Excel表头顺序:
|
||||
* 入职时间 | 公司名称 | 部门 | 姓名 | 联系电话 | 身份证号 | 性别 | 年龄 | 紧急联系人 | 与本人关系 | 联系电话1 | 联系电话2 | 紧急联系人地址 | 备注
|
||||
*/
|
||||
@Data
|
||||
@HeadStyle(fillForegroundColor = 44, horizontalAlignment = HorizontalAlignmentEnum.CENTER)
|
||||
@ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.LEFT)
|
||||
public class HrmEmergencyContactImportVo implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 入职时间
|
||||
* 格式:yyyy.MM.dd 或 yyyy-MM-dd
|
||||
*/
|
||||
@Excel(name = "入职时间", width = 12)
|
||||
@ExcelProperty("入职时间")
|
||||
@ColumnWidth(12)
|
||||
private String hireDate;
|
||||
|
||||
/**
|
||||
* 公司名称
|
||||
*/
|
||||
@Excel(name = "公司名称", width = 40)
|
||||
@ExcelProperty("公司名称")
|
||||
@ColumnWidth(40)
|
||||
private String companyName;
|
||||
|
||||
/**
|
||||
* 部门
|
||||
*/
|
||||
@Excel(name = "部门", width = 12)
|
||||
@ExcelProperty("部门")
|
||||
@ColumnWidth(12)
|
||||
private String deptName;
|
||||
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
@Excel(name = "姓名", width = 10)
|
||||
@ExcelProperty("姓名")
|
||||
@ColumnWidth(10)
|
||||
private String realName;
|
||||
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
@Excel(name = "联系电话", width = 15)
|
||||
@ExcelProperty("联系电话")
|
||||
@ColumnWidth(15)
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
@Excel(name = "身份证号", width = 22)
|
||||
@ExcelProperty("身份证号")
|
||||
@ColumnWidth(22)
|
||||
private String idCard;
|
||||
|
||||
/**
|
||||
* 性别
|
||||
*/
|
||||
@Excel(name = "性别", width = 8, readConverterExp = "男=0,女=1,未知=2")
|
||||
@ExcelProperty("性别")
|
||||
@ColumnWidth(8)
|
||||
private String gender;
|
||||
|
||||
/**
|
||||
* 年龄
|
||||
*/
|
||||
@Excel(name = "年龄", width = 8)
|
||||
@ExcelProperty("年龄")
|
||||
@ColumnWidth(8)
|
||||
private Integer age;
|
||||
|
||||
/**
|
||||
* 紧急联系人
|
||||
*/
|
||||
@Excel(name = "紧急联系人", width = 12)
|
||||
@ExcelProperty("紧急联系人")
|
||||
@ColumnWidth(12)
|
||||
private String emergencyContact;
|
||||
|
||||
/**
|
||||
* 与本人关系
|
||||
*/
|
||||
@Excel(name = "与本人关系", width = 12)
|
||||
@ExcelProperty("与本人关系")
|
||||
@ColumnWidth(12)
|
||||
private String relationship;
|
||||
|
||||
/**
|
||||
* 联系电话1
|
||||
*/
|
||||
@Excel(name = "联系电话1", width = 15)
|
||||
@ExcelProperty("联系电话1")
|
||||
@ColumnWidth(15)
|
||||
private String emergencyPhone1;
|
||||
|
||||
/**
|
||||
* 联系电话2
|
||||
*/
|
||||
@Excel(name = "联系电话2", width = 15)
|
||||
@ExcelProperty("联系电话2")
|
||||
@ColumnWidth(15)
|
||||
private String emergencyPhone2;
|
||||
|
||||
/**
|
||||
* 紧急联系人地址
|
||||
*/
|
||||
@Excel(name = "紧急联系人地址", width = 40)
|
||||
@ExcelProperty("紧急联系人地址")
|
||||
@ColumnWidth(40)
|
||||
private String emergencyAddress;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Excel(name = "备注", width = 20)
|
||||
@ExcelProperty("备注")
|
||||
@ColumnWidth(20)
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
package com.ruoyi.hrm.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class HrmEmergencyContactVo implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Excel(name = "联系人ID")
|
||||
private Long contactId;
|
||||
|
||||
@Excel(name = "用户ID")
|
||||
private Long userId;
|
||||
|
||||
@Excel(name = "部门ID")
|
||||
private Long deptId;
|
||||
|
||||
@Excel(name = "部门名称")
|
||||
private String deptName;
|
||||
|
||||
@Excel(name = "姓名")
|
||||
private String realName;
|
||||
|
||||
@Excel(name = "联系电话")
|
||||
private String phone;
|
||||
|
||||
@Excel(name = "身份证号")
|
||||
private String idCard;
|
||||
|
||||
@Excel(name = "性别", readConverterExp = "0=男,1=女,2=未知")
|
||||
private String gender;
|
||||
|
||||
@Excel(name = "年龄")
|
||||
private Integer age;
|
||||
|
||||
@Excel(name = "公司名称")
|
||||
private String companyName;
|
||||
|
||||
@Excel(name = "入职时间", width = 20, dateFormat = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
private Date hireDate;
|
||||
|
||||
@Excel(name = "紧急联系人")
|
||||
private String emergencyContact;
|
||||
|
||||
@Excel(name = "与本人关系")
|
||||
private String relationship;
|
||||
|
||||
@Excel(name = "紧急电话1")
|
||||
private String emergencyPhone1;
|
||||
|
||||
@Excel(name = "紧急电话2")
|
||||
private String emergencyPhone2;
|
||||
|
||||
@Excel(name = "紧急联系人地址")
|
||||
private String emergencyAddress;
|
||||
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
private String createBy;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
private Date createTime;
|
||||
private String updateBy;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
private Date updateTime;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.ruoyi.hrm.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 单张发票OCR识别结果(返回给前端用于填充发票条目)
|
||||
*/
|
||||
@Data
|
||||
public class HrmInvoiceOcrResultVo {
|
||||
|
||||
/** 发票类型 */
|
||||
private String invoiceType;
|
||||
|
||||
/** 销售方名称 */
|
||||
private String sellerName;
|
||||
|
||||
/** 开票日期 */
|
||||
private String invoiceDate;
|
||||
|
||||
/** 价税合计 */
|
||||
private BigDecimal totalAmount;
|
||||
|
||||
/** 识别出的条目列表 */
|
||||
private List<Item> items;
|
||||
|
||||
@Data
|
||||
public static class Item {
|
||||
/** OCR识别名称 */
|
||||
private String itemName;
|
||||
/** 金额(不含税) */
|
||||
private BigDecimal amount;
|
||||
/** 税率 */
|
||||
private String taxRate;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -6,6 +6,8 @@ import lombok.Data;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import com.ruoyi.hrm.domain.HrmInvoiceItem;
|
||||
|
||||
@Data
|
||||
public class HrmReimburseReqVo implements Serializable {
|
||||
@@ -95,5 +97,7 @@ public class HrmReimburseReqVo implements Serializable {
|
||||
private Date updateTime;
|
||||
|
||||
private Long instId;
|
||||
|
||||
private List<HrmInvoiceItem> invoiceItems;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.ruoyi.hrm.event;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 申请提交后产生的事件:通知监听方(如 IM 推送)给当前待办的审批人发提醒。
|
||||
* 由 fad-hrm 发布,ruoyi-oa 监听后调 ImSendService 推送。
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public class ApprovalRequestedEvent {
|
||||
/** 业务类型:seal / leave / travel / reimburse / appropriation */
|
||||
private final String bizType;
|
||||
/** 业务主键 */
|
||||
private final Long bizId;
|
||||
/** 流程实例ID */
|
||||
private final Long instId;
|
||||
/** 待审批人 OA userId */
|
||||
private final Long assigneeUserId;
|
||||
/** 申请发起人 OA userId */
|
||||
private final Long startUserId;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.ruoyi.hrm.mapper;
|
||||
|
||||
import com.ruoyi.common.core.mapper.BaseMapperPlus;
|
||||
import com.ruoyi.hrm.domain.HrmEmergencyContact;
|
||||
import com.ruoyi.hrm.domain.vo.HrmEmergencyContactVo;
|
||||
|
||||
public interface HrmEmergencyContactMapper extends BaseMapperPlus<HrmEmergencyContactMapper, HrmEmergencyContact, HrmEmergencyContactVo> {
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.ruoyi.hrm.mapper;
|
||||
|
||||
import com.ruoyi.common.core.mapper.BaseMapperPlus;
|
||||
import com.ruoyi.hrm.domain.HrmInvoiceItem;
|
||||
|
||||
public interface HrmInvoiceItemMapper extends BaseMapperPlus<HrmInvoiceItemMapper, HrmInvoiceItem, HrmInvoiceItem> {
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.ruoyi.hrm.service;
|
||||
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.hrm.domain.bo.HrmEmergencyContactBo;
|
||||
import com.ruoyi.hrm.domain.vo.HrmEmergencyContactVo;
|
||||
import com.ruoyi.hrm.domain.vo.HrmEmergencyContactImportVo;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
public interface IHrmEmergencyContactService {
|
||||
|
||||
HrmEmergencyContactVo queryById(Long contactId);
|
||||
|
||||
TableDataInfo<HrmEmergencyContactVo> queryPageList(HrmEmergencyContactBo bo, PageQuery pageQuery);
|
||||
|
||||
List<HrmEmergencyContactVo> queryList(HrmEmergencyContactBo bo);
|
||||
|
||||
Boolean insertByBo(HrmEmergencyContactBo bo);
|
||||
|
||||
Boolean updateByBo(HrmEmergencyContactBo bo);
|
||||
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
String importByVoList(List<HrmEmergencyContactImportVo> voList, boolean updateSupport);
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.ruoyi.hrm.service;
|
||||
|
||||
import com.ruoyi.hrm.domain.vo.HrmInvoiceOcrResultVo;
|
||||
|
||||
/**
|
||||
* 发票识别服务:本地解析电子发票 PDF。
|
||||
*/
|
||||
public interface IHrmInvoiceOcrService {
|
||||
|
||||
/** 根据 ossId 解析发票 PDF */
|
||||
HrmInvoiceOcrResultVo recognizeByOssId(Long ossId);
|
||||
}
|
||||
@@ -9,11 +9,14 @@ import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.helper.LoginHelper;
|
||||
import com.ruoyi.hrm.domain.HrmAppropriationReq;
|
||||
import com.ruoyi.hrm.domain.HrmFlowTemplate;
|
||||
import com.ruoyi.hrm.domain.HrmInvoiceItem;
|
||||
import com.ruoyi.hrm.domain.bo.HrmAppropriationReqBo;
|
||||
import com.ruoyi.hrm.domain.bo.HrmFlowStartBo;
|
||||
import com.ruoyi.hrm.domain.bo.HrmInvoiceItemBo;
|
||||
import com.ruoyi.hrm.domain.vo.HrmAppropriationReqVo;
|
||||
import com.ruoyi.hrm.mapper.HrmAppropriationReqMapper;
|
||||
import com.ruoyi.hrm.mapper.HrmFlowTemplateMapper;
|
||||
import com.ruoyi.hrm.mapper.HrmInvoiceItemMapper;
|
||||
import com.ruoyi.hrm.service.IHrmAppropriationReqService;
|
||||
import com.ruoyi.hrm.service.IHrmFlowInstanceService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@@ -33,10 +36,18 @@ public class HrmAppropriationReqServiceImpl implements IHrmAppropriationReqServi
|
||||
private final HrmAppropriationReqMapper baseMapper;
|
||||
private final HrmFlowTemplateMapper flowTemplateMapper;
|
||||
private final IHrmFlowInstanceService flowInstanceService;
|
||||
private final HrmInvoiceItemMapper invoiceItemMapper;
|
||||
|
||||
@Override
|
||||
public HrmAppropriationReqVo queryById(Long bizId) {
|
||||
return baseMapper.selectVoWithProjectById(bizId);
|
||||
HrmAppropriationReqVo vo = baseMapper.selectVoWithProjectById(bizId);
|
||||
if (vo != null) {
|
||||
vo.setInvoiceItems(invoiceItemMapper.selectList(Wrappers.<HrmInvoiceItem>lambdaQuery()
|
||||
.eq(HrmInvoiceItem::getBizType, "appropriation")
|
||||
.eq(HrmInvoiceItem::getBizId, bizId)
|
||||
.orderByAsc(HrmInvoiceItem::getSortNo)));
|
||||
}
|
||||
return vo;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -64,6 +75,12 @@ public class HrmAppropriationReqServiceImpl implements IHrmAppropriationReqServi
|
||||
boolean ok = baseMapper.insert(add) > 0;
|
||||
|
||||
HrmAppropriationReqVo bean = BeanUtil.toBean(add, HrmAppropriationReqVo.class);
|
||||
|
||||
// 保存发票条目
|
||||
if (ok && bo.getInvoiceItems() != null && !bo.getInvoiceItems().isEmpty()) {
|
||||
saveInvoiceItems("appropriation", add.getBizId(), bo.getInvoiceItems());
|
||||
}
|
||||
|
||||
if (ok && "pending".equalsIgnoreCase(add.getStatus())) {
|
||||
// 获取流程启动人ID
|
||||
Long startUserId = LoginHelper.getUserId();
|
||||
@@ -108,7 +125,11 @@ public class HrmAppropriationReqServiceImpl implements IHrmAppropriationReqServi
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean updateByBo(HrmAppropriationReqBo bo) {
|
||||
HrmAppropriationReq update = BeanUtil.toBean(bo, HrmAppropriationReq.class);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
boolean updated = baseMapper.updateById(update) > 0;
|
||||
if (updated && bo.getInvoiceItems() != null) {
|
||||
saveInvoiceItems("appropriation", bo.getBizId(), bo.getInvoiceItems());
|
||||
}
|
||||
return updated;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -125,6 +146,24 @@ public class HrmAppropriationReqServiceImpl implements IHrmAppropriationReqServi
|
||||
return baseMapper.updateById(req) > 0;
|
||||
}
|
||||
|
||||
private void saveInvoiceItems(String bizType, Long bizId, List<HrmInvoiceItemBo> boList) {
|
||||
invoiceItemMapper.delete(Wrappers.<HrmInvoiceItem>lambdaQuery()
|
||||
.eq(HrmInvoiceItem::getBizType, bizType)
|
||||
.eq(HrmInvoiceItem::getBizId, bizId));
|
||||
for (int i = 0; i < boList.size(); i++) {
|
||||
HrmInvoiceItemBo bo = boList.get(i);
|
||||
HrmInvoiceItem item = new HrmInvoiceItem();
|
||||
item.setBizType(bizType);
|
||||
item.setBizId(bizId);
|
||||
item.setOssId(bo.getOssId());
|
||||
item.setSortNo(bo.getSortNo() != null ? bo.getSortNo() : i);
|
||||
item.setItemName(bo.getItemName());
|
||||
item.setReason(bo.getReason());
|
||||
item.setAmount(bo.getAmount());
|
||||
invoiceItemMapper.insert(item);
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private LambdaQueryWrapper<HrmAppropriationReq> buildQueryWrapper(HrmAppropriationReqBo bo) {
|
||||
LambdaQueryWrapper<HrmAppropriationReq> lqw = Wrappers.lambdaQuery();
|
||||
|
||||
@@ -0,0 +1,254 @@
|
||||
package com.ruoyi.hrm.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
import com.ruoyi.hrm.domain.HrmEmergencyContact;
|
||||
import com.ruoyi.hrm.domain.bo.HrmEmergencyContactBo;
|
||||
import com.ruoyi.hrm.domain.vo.HrmEmergencyContactVo;
|
||||
import com.ruoyi.hrm.domain.vo.HrmEmergencyContactImportVo;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.hrm.mapper.HrmEmergencyContactMapper;
|
||||
import com.ruoyi.hrm.service.IHrmEmergencyContactService;
|
||||
import com.ruoyi.system.mapper.SysUserMapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class HrmEmergencyContactServiceImpl implements IHrmEmergencyContactService {
|
||||
|
||||
private final HrmEmergencyContactMapper baseMapper;
|
||||
private final SysUserMapper sysUserMapper;
|
||||
|
||||
// 手机号正则
|
||||
private static final Pattern PHONE_PATTERN = Pattern.compile("^1[3-9]\\d{9}$");
|
||||
// 身份证号正则(15位或18位)
|
||||
private static final Pattern ID_CARD_PATTERN = Pattern.compile("(^\\d{15}$)|(^\\d{18}$)|(^\\d{17}(\\d|X|x)$)");
|
||||
|
||||
@Override
|
||||
public HrmEmergencyContactVo queryById(Long contactId) {
|
||||
return baseMapper.selectVoById(contactId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TableDataInfo<HrmEmergencyContactVo> queryPageList(HrmEmergencyContactBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<HrmEmergencyContact> lqw = buildQueryWrapper(bo);
|
||||
Page<HrmEmergencyContactVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HrmEmergencyContactVo> queryList(HrmEmergencyContactBo bo) {
|
||||
LambdaQueryWrapper<HrmEmergencyContact> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean insertByBo(HrmEmergencyContactBo bo) {
|
||||
HrmEmergencyContact add = BeanUtil.toBean(bo, HrmEmergencyContact.class);
|
||||
return baseMapper.insert(add) > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean updateByBo(HrmEmergencyContactBo bo) {
|
||||
HrmEmergencyContact update = BeanUtil.toBean(bo, HrmEmergencyContact.class);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public String importByVoList(List<HrmEmergencyContactImportVo> voList, boolean updateSupport) {
|
||||
if (CollUtil.isEmpty(voList)) {
|
||||
throw new ServiceException("导入数据不能为空");
|
||||
}
|
||||
int successNum = 0;
|
||||
int failNum = 0;
|
||||
StringBuilder failMsg = new StringBuilder();
|
||||
|
||||
for (int i = 0; i < voList.size(); i++) {
|
||||
HrmEmergencyContactImportVo vo = voList.get(i);
|
||||
int rowNum = i + 2;
|
||||
|
||||
try {
|
||||
// 转换日期格式:将 yyyy.MM.dd 转换为 yyyy-MM-dd
|
||||
Date hireDate = null;
|
||||
if (StrUtil.isNotBlank(vo.getHireDate())) {
|
||||
String dateStr = vo.getHireDate().replace(".", "-");
|
||||
vo.setHireDate(dateStr);
|
||||
hireDate = DateUtil.parseDate(dateStr);
|
||||
}
|
||||
|
||||
// 性别转换:Excel 中为"男"/"女"/"未知",统一转代码值
|
||||
String gender = vo.getGender();
|
||||
if (StrUtil.isNotBlank(gender)) {
|
||||
if ("男".equals(gender)) { gender = "0"; }
|
||||
else if ("女".equals(gender)) { gender = "1"; }
|
||||
else if ("未知".equals(gender)) { gender = "2"; }
|
||||
vo.setGender(gender);
|
||||
}
|
||||
|
||||
// 数据校验
|
||||
String validateMsg = validateImportData(vo);
|
||||
if (StrUtil.isNotBlank(validateMsg)) {
|
||||
failNum++;
|
||||
failMsg.append("<br/>").append(failNum).append("、第").append(rowNum).append("行 ")
|
||||
.append(StrUtil.blankToDefault(vo.getRealName(), "无名")).append(":").append(validateMsg);
|
||||
continue;
|
||||
}
|
||||
|
||||
HrmEmergencyContact entity = BeanUtil.toBean(vo, HrmEmergencyContact.class);
|
||||
// 根据姓名+身份证号匹配 sys_user,自动填充 userId/deptId
|
||||
Long matchedUserId = matchUserId(vo.getRealName(), vo.getIdCard());
|
||||
entity.setUserId(matchedUserId != null ? matchedUserId : 0L);
|
||||
// 显式设置入职日期(BeanUtil 可能无法自动转换 String -> Date)
|
||||
if (hireDate != null) {
|
||||
entity.setHireDate(hireDate);
|
||||
}
|
||||
|
||||
// 按「姓名 + 身份证号」去重
|
||||
LambdaQueryWrapper<HrmEmergencyContact> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(HrmEmergencyContact::getRealName, entity.getRealName());
|
||||
lqw.eq(HrmEmergencyContact::getIdCard, entity.getIdCard());
|
||||
HrmEmergencyContact existing = baseMapper.selectOne(lqw);
|
||||
|
||||
if (existing != null) {
|
||||
if (updateSupport) {
|
||||
entity.setContactId(existing.getContactId());
|
||||
baseMapper.updateById(entity);
|
||||
successNum++;
|
||||
} else {
|
||||
failNum++;
|
||||
failMsg.append("<br/>").append(failNum).append("、第").append(rowNum).append("行 ")
|
||||
.append(vo.getRealName()).append(":数据已存在(姓名+身份证号重复)");
|
||||
}
|
||||
} else {
|
||||
baseMapper.insert(entity);
|
||||
successNum++;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
failNum++;
|
||||
failMsg.append("<br/>").append(failNum).append("、第").append(rowNum).append("行 ")
|
||||
.append(StrUtil.blankToDefault(vo.getRealName(), "无名")).append(":导入失败,").append(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
if (failNum > 0) {
|
||||
return "导入完成!成功 " + successNum + " 条,失败 " + failNum + " 条。错误信息:" + failMsg;
|
||||
}
|
||||
return "恭喜您,数据已全部导入成功!共 " + successNum + " 条";
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据姓名+身份证号匹配 sys_user,返回 userId;匹配不到返回 null
|
||||
*/
|
||||
private Long matchUserId(String realName, String idCard) {
|
||||
// 1. 优先按 realName + idCard 精确匹配
|
||||
if (StrUtil.isNotBlank(realName) && StrUtil.isNotBlank(idCard)) {
|
||||
SysUser user = sysUserMapper.selectOne(Wrappers.<SysUser>lambdaQuery()
|
||||
.eq(SysUser::getNickName, realName)
|
||||
.eq(SysUser::getIdCard, idCard)
|
||||
.last("limit 1"));
|
||||
if (user != null) {
|
||||
return user.getUserId();
|
||||
}
|
||||
}
|
||||
// 2. 仅按 idCard 匹配(唯一性高)
|
||||
if (StrUtil.isNotBlank(idCard)) {
|
||||
SysUser user = sysUserMapper.selectOne(Wrappers.<SysUser>lambdaQuery()
|
||||
.eq(SysUser::getIdCard, idCard)
|
||||
.last("limit 1"));
|
||||
if (user != null) {
|
||||
return user.getUserId();
|
||||
}
|
||||
}
|
||||
// 3. 仅按 realName 匹配(有重名风险,作为最后的兜底)
|
||||
if (StrUtil.isNotBlank(realName)) {
|
||||
SysUser user = sysUserMapper.selectOne(Wrappers.<SysUser>lambdaQuery()
|
||||
.eq(SysUser::getNickName, realName)
|
||||
.last("limit 1"));
|
||||
if (user != null) {
|
||||
return user.getUserId();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验导入数据
|
||||
*/
|
||||
private String validateImportData(HrmEmergencyContactImportVo vo) {
|
||||
StringBuilder msg = new StringBuilder();
|
||||
|
||||
if (StrUtil.isBlank(vo.getRealName())) {
|
||||
msg.append("姓名为空;");
|
||||
}
|
||||
if (StrUtil.isBlank(vo.getPhone())) {
|
||||
msg.append("联系电话为空;");
|
||||
} else if (!PHONE_PATTERN.matcher(vo.getPhone()).matches()) {
|
||||
msg.append("联系电话格式错误(需11位手机号);");
|
||||
}
|
||||
if (StrUtil.isBlank(vo.getIdCard())) {
|
||||
msg.append("身份证号为空;");
|
||||
} else if (!ID_CARD_PATTERN.matcher(vo.getIdCard()).matches()) {
|
||||
msg.append("身份证号格式错误;");
|
||||
}
|
||||
if (StrUtil.isBlank(vo.getGender())) {
|
||||
msg.append("性别为空;");
|
||||
}
|
||||
if (vo.getAge() == null) {
|
||||
msg.append("年龄为空;");
|
||||
}
|
||||
if (StrUtil.isBlank(vo.getEmergencyContact())) {
|
||||
msg.append("紧急联系人为空;");
|
||||
}
|
||||
if (StrUtil.isBlank(vo.getRelationship())) {
|
||||
msg.append("与本人关系为空;");
|
||||
}
|
||||
if (StrUtil.isBlank(vo.getEmergencyPhone1())) {
|
||||
msg.append("联系电话1为空;");
|
||||
} else if (!PHONE_PATTERN.matcher(vo.getEmergencyPhone1()).matches()) {
|
||||
msg.append("联系电话1格式错误(需11位手机号);");
|
||||
}
|
||||
if (StrUtil.isBlank(vo.getEmergencyAddress())) {
|
||||
msg.append("紧急联系人地址为空;");
|
||||
}
|
||||
if (StrUtil.isNotBlank(vo.getEmergencyPhone2()) && !PHONE_PATTERN.matcher(vo.getEmergencyPhone2()).matches()) {
|
||||
msg.append("联系电话2格式错误(需11位手机号);");
|
||||
}
|
||||
|
||||
return msg.toString();
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<HrmEmergencyContact> buildQueryWrapper(HrmEmergencyContactBo bo) {
|
||||
LambdaQueryWrapper<HrmEmergencyContact> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(bo.getContactId() != null, HrmEmergencyContact::getContactId, bo.getContactId());
|
||||
lqw.eq(bo.getUserId() != null, HrmEmergencyContact::getUserId, bo.getUserId());
|
||||
lqw.like(bo.getRealName() != null, HrmEmergencyContact::getRealName, bo.getRealName());
|
||||
lqw.like(bo.getPhone() != null, HrmEmergencyContact::getPhone, bo.getPhone());
|
||||
lqw.like(bo.getEmergencyContact() != null, HrmEmergencyContact::getEmergencyContact, bo.getEmergencyContact());
|
||||
lqw.eq(bo.getDeptId() != null, HrmEmergencyContact::getDeptId, bo.getDeptId());
|
||||
lqw.eq(bo.getGender() != null, HrmEmergencyContact::getGender, bo.getGender());
|
||||
return lqw;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
@@ -17,15 +18,19 @@ import com.ruoyi.hrm.domain.bo.HrmFlowInstanceBo;
|
||||
import com.ruoyi.hrm.domain.vo.HrmFlowInstanceVo;
|
||||
import com.ruoyi.hrm.domain.vo.HrmFlowTaskVo;
|
||||
import com.ruoyi.hrm.domain.vo.HrmTravelReqVo;
|
||||
import com.ruoyi.hrm.event.ApprovalRequestedEvent;
|
||||
import com.ruoyi.hrm.mapper.*;
|
||||
import com.ruoyi.hrm.service.IHrmFlowInstanceService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.context.ApplicationEventPublisher;
|
||||
import org.springframework.stereotype.Service;
|
||||
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
|
||||
@@ -40,6 +45,12 @@ 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
|
||||
public HrmFlowInstanceVo queryById(Long instId) {
|
||||
@@ -84,6 +95,11 @@ public class HrmFlowInstanceServiceImpl implements IHrmFlowInstanceService {
|
||||
task.setBizId(bo.getBizId());
|
||||
taskMapper.insert(task);
|
||||
|
||||
// 发布事件 → ruoyi-oa 监听后推 IM 通知 + 快捷跳转
|
||||
eventPublisher.publishEvent(new ApprovalRequestedEvent(
|
||||
bo.getBizType(), bo.getBizId(), inst.getInstId(),
|
||||
bo.getManualAssigneeUserId(), bo.getStartUserId()));
|
||||
|
||||
return inst.getInstId();
|
||||
}
|
||||
|
||||
@@ -131,6 +147,11 @@ public class HrmFlowInstanceServiceImpl implements IHrmFlowInstanceService {
|
||||
task.setBizId(bo.getBizId());
|
||||
taskMapper.insert(task);
|
||||
|
||||
// 发布事件 → ruoyi-oa 监听后推 IM 通知 + 快捷跳转
|
||||
eventPublisher.publishEvent(new ApprovalRequestedEvent(
|
||||
bo.getBizType(), bo.getBizId(), inst.getInstId(),
|
||||
assignees.get(0), bo.getStartUserId()));
|
||||
|
||||
return inst.getInstId();
|
||||
}
|
||||
|
||||
@@ -175,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;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,345 @@
|
||||
package com.ruoyi.hrm.service.impl;
|
||||
|
||||
import cn.hutool.core.io.IoUtil;
|
||||
import com.google.zxing.BinaryBitmap;
|
||||
import com.google.zxing.DecodeHintType;
|
||||
import com.google.zxing.MultiFormatReader;
|
||||
import com.google.zxing.Result;
|
||||
import com.google.zxing.client.j2se.BufferedImageLuminanceSource;
|
||||
import com.google.zxing.common.HybridBinarizer;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
import com.ruoyi.hrm.domain.vo.HrmInvoiceOcrResultVo;
|
||||
import com.ruoyi.hrm.service.IHrmInvoiceOcrService;
|
||||
import com.ruoyi.oss.factory.OssFactory;
|
||||
import com.ruoyi.system.domain.vo.SysOssVo;
|
||||
import com.ruoyi.system.mapper.SysOssMapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.sourceforge.tess4j.Tesseract;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.pdfbox.pdmodel.PDDocument;
|
||||
import org.apache.pdfbox.rendering.ImageType;
|
||||
import org.apache.pdfbox.rendering.PDFRenderer;
|
||||
import org.apache.pdfbox.text.PDFTextStripper;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.File;
|
||||
import java.io.InputStream;
|
||||
import java.math.BigDecimal;
|
||||
import java.net.URL;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.ArrayList;
|
||||
import java.util.EnumMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* 发票识别服务实现:本地三段式管线,无任何外部 API 调用。
|
||||
*
|
||||
* <ol>
|
||||
* <li>PDFBox 文本层抽取:原生电子发票直接搞定(毫秒级,几乎零算力)</li>
|
||||
* <li>ZXing 二维码识别:拍照/扫描发票 PDF,从二维码读结构化字段</li>
|
||||
* <li>Tesseract OCR(仅在前两步失败时触发):本地 chi_sim 字库,无网络</li>
|
||||
* </ol>
|
||||
*
|
||||
* Tesseract 字库路径默认 {jar 同级目录}/tessdata,可用 fad.ocr.tessdata-path 覆盖。
|
||||
* 系统需预装:apt install -y tesseract-ocr tesseract-ocr-chi-sim
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class HrmInvoiceOcrServiceImpl implements IHrmInvoiceOcrService {
|
||||
|
||||
private final SysOssMapper sysOssMapper;
|
||||
|
||||
/** 可通过 application.yml 覆盖;默认 jar 同级目录下的 tessdata */
|
||||
@Value("${fad.ocr.tessdata-path:}")
|
||||
private String tessdataPathConfig;
|
||||
|
||||
private String tessdataPath;
|
||||
|
||||
@PostConstruct
|
||||
void resolveTessdataPath() {
|
||||
if (StringUtils.isNotBlank(tessdataPathConfig)) {
|
||||
tessdataPath = tessdataPathConfig;
|
||||
} else {
|
||||
tessdataPath = Paths.get(jarDir(), "tessdata").toString();
|
||||
}
|
||||
log.info("[Invoice] tessdata path = {}", tessdataPath);
|
||||
}
|
||||
|
||||
/** 取 jar 所在目录;IDE 调试时 fall back 到工作目录 */
|
||||
private static String jarDir() {
|
||||
try {
|
||||
URL url = HrmInvoiceOcrServiceImpl.class
|
||||
.getProtectionDomain().getCodeSource().getLocation();
|
||||
File f = new File(url.toURI());
|
||||
return (f.isFile() ? f.getParentFile() : f).getAbsolutePath();
|
||||
} catch (Exception e) {
|
||||
return System.getProperty("user.dir");
|
||||
}
|
||||
}
|
||||
|
||||
// === 字段抽取正则 ===
|
||||
private static final Pattern P_TOTAL = Pattern.compile(
|
||||
"(?:价税合计|小写)[^0-9¥¥]{0,30}[¥¥]?\\s*([0-9,]+\\.[0-9]{2})");
|
||||
private static final Pattern P_DATE = Pattern.compile(
|
||||
"开票日期[:: ]*([0-9]{4}[年\\-/][0-9]{1,2}[月\\-/][0-9]{1,2}日?)");
|
||||
private static final Pattern P_TYPE = Pattern.compile(
|
||||
"(电子(?:普通)?发票|增值税电子(?:普通|专用)发票|电子发票([^)]+)|数电(?:普通)?发票|普通发票|专用发票)");
|
||||
private static final Pattern P_SELLER = Pattern.compile(
|
||||
"销\\s*售\\s*方[^名]*名\\s*称[:: ]*([^\\n\\r]+?)(?=\\s{2,}|纳税人|统一社会|地址|开户|$)");
|
||||
private static final Pattern P_LINE_AMOUNT = Pattern.compile(
|
||||
"([\\u4e00-\\u9fa5A-Za-z0-9()()\\-·.\\*\\s]{2,40}?)\\s+"
|
||||
+ "([0-9,]+\\.[0-9]{2})\\s+"
|
||||
+ "(\\d{1,2}%|免税|不征税|\\*)\\s+"
|
||||
+ "([0-9,]+\\.[0-9]{2})");
|
||||
|
||||
@Override
|
||||
public HrmInvoiceOcrResultVo recognizeByOssId(Long ossId) {
|
||||
SysOssVo oss = sysOssMapper.selectVoById(ossId);
|
||||
if (oss == null) {
|
||||
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())) {
|
||||
fileBytes = IoUtil.readBytes(in);
|
||||
} catch (Exception e) {
|
||||
throw new ServiceException("读取附件失败: " + e.getMessage());
|
||||
}
|
||||
|
||||
try (PDDocument doc = PDDocument.load(new ByteArrayInputStream(fileBytes))) {
|
||||
// 第一步:文本层
|
||||
String text = extractText(doc);
|
||||
if (StringUtils.isNotBlank(text) && looksLikeInvoice(text)) {
|
||||
log.debug("[Invoice] hit text layer");
|
||||
return buildFromText(text);
|
||||
}
|
||||
|
||||
// 第二步:二维码
|
||||
HrmInvoiceOcrResultVo qr = tryDecodeQrFromPdf(doc);
|
||||
if (qr != null) {
|
||||
log.info("[Invoice] hit QR code");
|
||||
return qr;
|
||||
}
|
||||
|
||||
// 第三步:本地 OCR
|
||||
log.info("[Invoice] fallback to local OCR");
|
||||
String ocrText = runTesseract(doc);
|
||||
if (StringUtils.isBlank(ocrText)) {
|
||||
throw new ServiceException("无法识别该 PDF,请上传开票平台下载的正规 PDF 电子发票。");
|
||||
}
|
||||
return buildFromText(ocrText);
|
||||
} catch (ServiceException e) {
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
log.error("[Invoice] 解析失败", e);
|
||||
throw new ServiceException("发票解析失败: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/** 文本层抽取 */
|
||||
private String extractText(PDDocument doc) throws Exception {
|
||||
PDFTextStripper stripper = new PDFTextStripper();
|
||||
stripper.setSortByPosition(true);
|
||||
stripper.setLineSeparator("\n");
|
||||
return stripper.getText(doc);
|
||||
}
|
||||
|
||||
/** 是否长得像发票:要至少出现金额/日期/抬头其中一个关键字段 */
|
||||
private boolean looksLikeInvoice(String text) {
|
||||
return P_TOTAL.matcher(text).find()
|
||||
|| P_DATE.matcher(text).find()
|
||||
|| P_TYPE.matcher(text).find()
|
||||
|| text.contains("发票");
|
||||
}
|
||||
|
||||
/** 第二步:把每页渲染成图,再用 ZXing 扫二维码 */
|
||||
private HrmInvoiceOcrResultVo tryDecodeQrFromPdf(PDDocument doc) {
|
||||
try {
|
||||
PDFRenderer renderer = new PDFRenderer(doc);
|
||||
// 二维码 200dpi 已经够清晰,CPU 也轻
|
||||
int pages = doc.getNumberOfPages();
|
||||
for (int i = 0; i < pages; i++) {
|
||||
BufferedImage img = renderer.renderImageWithDPI(i, 200, ImageType.GRAY);
|
||||
String content = decodeQr(img);
|
||||
if (StringUtils.isNotBlank(content)) {
|
||||
HrmInvoiceOcrResultVo vo = parseInvoiceQr(content);
|
||||
if (vo != null) return vo;
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.debug("[Invoice] QR decode failed: {}", e.getMessage());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/** ZXing 解码一张图,返回二维码文本(无则 null) */
|
||||
private String decodeQr(BufferedImage img) {
|
||||
try {
|
||||
BinaryBitmap bitmap = new BinaryBitmap(
|
||||
new HybridBinarizer(new BufferedImageLuminanceSource(img)));
|
||||
Map<DecodeHintType, Object> hints = new EnumMap<>(DecodeHintType.class);
|
||||
hints.put(DecodeHintType.TRY_HARDER, Boolean.TRUE);
|
||||
hints.put(DecodeHintType.CHARACTER_SET, "UTF-8");
|
||||
Result r = new MultiFormatReader().decode(bitmap, hints);
|
||||
return r != null ? r.getText() : null;
|
||||
} catch (Exception e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 解析增值税发票二维码内容。格式(逗号分隔):
|
||||
* 01,版本号,发票代码,发票号码,金额(不含税),开票日期(YYYYMMDD),校验码后6位,...
|
||||
*/
|
||||
private HrmInvoiceOcrResultVo parseInvoiceQr(String raw) {
|
||||
if (raw == null) return null;
|
||||
String[] parts = raw.split(",");
|
||||
if (parts.length < 7 || !parts[0].startsWith("0")) return null;
|
||||
try {
|
||||
HrmInvoiceOcrResultVo vo = new HrmInvoiceOcrResultVo();
|
||||
// parts[4] 是不含税金额;纸质票二维码无价税合计,先填到 totalAmount 让前端可调
|
||||
BigDecimal amt = parseBigDecimal(parts[4]);
|
||||
vo.setTotalAmount(amt);
|
||||
String d = parts[5];
|
||||
if (d != null && d.length() == 8) {
|
||||
vo.setInvoiceDate(d.substring(0, 4) + "-" + d.substring(4, 6) + "-" + d.substring(6, 8));
|
||||
}
|
||||
vo.setInvoiceType("增值税发票(二维码识别)");
|
||||
List<HrmInvoiceOcrResultVo.Item> items = new ArrayList<>();
|
||||
HrmInvoiceOcrResultVo.Item it = new HrmInvoiceOcrResultVo.Item();
|
||||
it.setItemName("发票款项(金额请核对原票,二维码仅含不含税金额)");
|
||||
it.setAmount(amt);
|
||||
items.add(it);
|
||||
vo.setItems(items);
|
||||
return vo;
|
||||
} catch (Exception e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/** 第三步:Tesseract 本地 OCR,整文本拼接交给 regex 解析 */
|
||||
private String runTesseract(PDDocument doc) {
|
||||
try {
|
||||
File td = new File(tessdataPath);
|
||||
if (!td.isDirectory()) {
|
||||
log.warn("[Invoice] tessdata 目录不存在: {},无法走 OCR 兜底", tessdataPath);
|
||||
throw new ServiceException(
|
||||
"本地 OCR 字库未配置。请在 jar 同级目录建 tessdata/ 并放入 chi_sim.traineddata,"
|
||||
+ "或通过 fad.ocr.tessdata-path 指定路径。");
|
||||
}
|
||||
Tesseract t = new Tesseract();
|
||||
t.setDatapath(tessdataPath);
|
||||
t.setLanguage("chi_sim");
|
||||
t.setPageSegMode(6); // 假设单块文本
|
||||
t.setOcrEngineMode(1); // LSTM only
|
||||
|
||||
PDFRenderer renderer = new PDFRenderer(doc);
|
||||
StringBuilder sb = new StringBuilder();
|
||||
int pages = doc.getNumberOfPages();
|
||||
for (int i = 0; i < pages; i++) {
|
||||
BufferedImage img = renderer.renderImageWithDPI(i, 300, ImageType.GRAY);
|
||||
sb.append(t.doOCR(img)).append('\n');
|
||||
}
|
||||
return sb.toString();
|
||||
} catch (ServiceException e) {
|
||||
throw e;
|
||||
} catch (Throwable e) {
|
||||
log.error("[Invoice] tesseract 失败: {}", e.getMessage());
|
||||
throw new ServiceException(
|
||||
"本地 OCR 失败:" + e.getMessage()
|
||||
+ "。请确认服务器已 apt install tesseract-ocr tesseract-ocr-chi-sim,"
|
||||
+ "且 jar 同级 tessdata/ 下有 chi_sim.traineddata。");
|
||||
}
|
||||
}
|
||||
|
||||
/** 文本 → VO 的统一抽取逻辑 */
|
||||
private HrmInvoiceOcrResultVo buildFromText(String text) {
|
||||
HrmInvoiceOcrResultVo result = new HrmInvoiceOcrResultVo();
|
||||
result.setInvoiceType(firstGroup(P_TYPE, text));
|
||||
result.setInvoiceDate(firstGroup(P_DATE, text));
|
||||
result.setSellerName(cleanSeller(firstGroup(P_SELLER, text)));
|
||||
result.setTotalAmount(parseBigDecimal(firstGroup(P_TOTAL, text)));
|
||||
|
||||
List<HrmInvoiceOcrResultVo.Item> items = parseLineItems(text);
|
||||
if (items.isEmpty() && result.getTotalAmount() != null) {
|
||||
HrmInvoiceOcrResultVo.Item item = new HrmInvoiceOcrResultVo.Item();
|
||||
item.setItemName(StringUtils.defaultIfBlank(result.getSellerName(), "发票款项"));
|
||||
item.setAmount(result.getTotalAmount());
|
||||
items.add(item);
|
||||
}
|
||||
result.setItems(items);
|
||||
return result;
|
||||
}
|
||||
|
||||
private List<HrmInvoiceOcrResultVo.Item> parseLineItems(String text) {
|
||||
List<HrmInvoiceOcrResultVo.Item> items = new ArrayList<>();
|
||||
int begin = indexOfAny(text, "项目名称", "货物或应税劳务", "货物名称");
|
||||
int end = indexOfAny(text, "合\\s*计", "价税合计", "(大写)", "(大写)");
|
||||
String area = (begin >= 0 && end > begin) ? text.substring(begin, end) : text;
|
||||
for (String line : area.split("\\n")) {
|
||||
line = line.trim();
|
||||
if (line.length() < 6) continue;
|
||||
Matcher m = P_LINE_AMOUNT.matcher(line);
|
||||
if (!m.find()) continue;
|
||||
HrmInvoiceOcrResultVo.Item item = new HrmInvoiceOcrResultVo.Item();
|
||||
String name = m.group(1).trim().replaceAll("^\\*[^*]+\\*", "");
|
||||
BigDecimal preTax = parseBigDecimal(m.group(2));
|
||||
String rate = m.group(3);
|
||||
BigDecimal tax = parseBigDecimal(m.group(4));
|
||||
BigDecimal withTax = (preTax != null ? preTax : BigDecimal.ZERO)
|
||||
.add(tax != null ? tax : BigDecimal.ZERO);
|
||||
item.setItemName(name);
|
||||
item.setTaxRate(rate);
|
||||
item.setAmount(withTax);
|
||||
items.add(item);
|
||||
}
|
||||
return items;
|
||||
}
|
||||
|
||||
private static String firstGroup(Pattern p, String s) {
|
||||
if (s == null) return null;
|
||||
Matcher m = p.matcher(s);
|
||||
return m.find() ? m.group(1).trim() : null;
|
||||
}
|
||||
|
||||
private static int indexOfAny(String text, String... patterns) {
|
||||
int min = -1;
|
||||
for (String p : patterns) {
|
||||
Matcher m = Pattern.compile(p).matcher(text);
|
||||
if (m.find()) {
|
||||
int idx = m.start();
|
||||
if (min < 0 || idx < min) min = idx;
|
||||
}
|
||||
}
|
||||
return min;
|
||||
}
|
||||
|
||||
private static String cleanSeller(String s) {
|
||||
if (s == null) return null;
|
||||
s = s.replaceAll("^[::\\s]+", "").trim();
|
||||
String[] tail = s.split("\\s{2,}");
|
||||
return tail.length > 0 ? tail[0].trim() : s;
|
||||
}
|
||||
|
||||
private static BigDecimal parseBigDecimal(String raw) {
|
||||
if (StringUtils.isBlank(raw)) return null;
|
||||
try {
|
||||
return new BigDecimal(raw.replace(",", "").replace("¥", "").replace("¥", "").trim());
|
||||
} catch (Exception e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,11 +8,14 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.hrm.domain.HrmFlowTemplate;
|
||||
import com.ruoyi.hrm.domain.HrmInvoiceItem;
|
||||
import com.ruoyi.hrm.domain.HrmReimburseReq;
|
||||
import com.ruoyi.hrm.domain.bo.HrmFlowStartBo;
|
||||
import com.ruoyi.hrm.domain.bo.HrmInvoiceItemBo;
|
||||
import com.ruoyi.hrm.domain.bo.HrmReimburseReqBo;
|
||||
import com.ruoyi.hrm.domain.vo.HrmReimburseReqVo;
|
||||
import com.ruoyi.hrm.mapper.HrmFlowTemplateMapper;
|
||||
import com.ruoyi.hrm.mapper.HrmInvoiceItemMapper;
|
||||
import com.ruoyi.hrm.mapper.HrmReimburseReqMapper;
|
||||
import com.ruoyi.hrm.service.IHrmFlowInstanceService;
|
||||
import com.ruoyi.hrm.service.IHrmReimburseReqService;
|
||||
@@ -30,10 +33,18 @@ public class HrmReimburseReqServiceImpl implements IHrmReimburseReqService {
|
||||
private final HrmReimburseReqMapper baseMapper;
|
||||
private final HrmFlowTemplateMapper flowTemplateMapper;
|
||||
private final IHrmFlowInstanceService flowInstanceService;
|
||||
private final HrmInvoiceItemMapper invoiceItemMapper;
|
||||
|
||||
@Override
|
||||
public HrmReimburseReqVo queryById(Long bizId) {
|
||||
return baseMapper.selectVoWithProjectById(bizId);
|
||||
HrmReimburseReqVo vo = baseMapper.selectVoWithProjectById(bizId);
|
||||
if (vo != null) {
|
||||
vo.setInvoiceItems(invoiceItemMapper.selectList(Wrappers.<HrmInvoiceItem>lambdaQuery()
|
||||
.eq(HrmInvoiceItem::getBizType, "reimburse")
|
||||
.eq(HrmInvoiceItem::getBizId, bizId)
|
||||
.orderByAsc(HrmInvoiceItem::getSortNo)));
|
||||
}
|
||||
return vo;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -61,6 +72,12 @@ public class HrmReimburseReqServiceImpl implements IHrmReimburseReqService {
|
||||
boolean ok = baseMapper.insert(add) > 0;
|
||||
|
||||
HrmReimburseReqVo bean = BeanUtil.toBean(add, HrmReimburseReqVo.class);
|
||||
|
||||
// 保存发票条目
|
||||
if (ok && bo.getInvoiceItems() != null && !bo.getInvoiceItems().isEmpty()) {
|
||||
saveInvoiceItems("reimburse", add.getBizId(), bo.getInvoiceItems());
|
||||
}
|
||||
|
||||
if (ok && "pending".equalsIgnoreCase(add.getStatus())) {
|
||||
Long startUserId = LoginHelper.getUserId();
|
||||
|
||||
@@ -105,7 +122,11 @@ public class HrmReimburseReqServiceImpl implements IHrmReimburseReqService {
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean updateByBo(HrmReimburseReqBo bo) {
|
||||
HrmReimburseReq update = BeanUtil.toBean(bo, HrmReimburseReq.class);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
boolean updated = baseMapper.updateById(update) > 0;
|
||||
if (updated && bo.getInvoiceItems() != null) {
|
||||
saveInvoiceItems("reimburse", bo.getBizId(), bo.getInvoiceItems());
|
||||
}
|
||||
return updated;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -124,6 +145,25 @@ public class HrmReimburseReqServiceImpl implements IHrmReimburseReqService {
|
||||
return lqw;
|
||||
}
|
||||
|
||||
private void saveInvoiceItems(String bizType, Long bizId, List<HrmInvoiceItemBo> boList) {
|
||||
// 先清除旧数据,再插入新数据(更新场景兼容)
|
||||
invoiceItemMapper.delete(Wrappers.<HrmInvoiceItem>lambdaQuery()
|
||||
.eq(HrmInvoiceItem::getBizType, bizType)
|
||||
.eq(HrmInvoiceItem::getBizId, bizId));
|
||||
for (int i = 0; i < boList.size(); i++) {
|
||||
HrmInvoiceItemBo bo = boList.get(i);
|
||||
HrmInvoiceItem item = new HrmInvoiceItem();
|
||||
item.setBizType(bizType);
|
||||
item.setBizId(bizId);
|
||||
item.setOssId(bo.getOssId());
|
||||
item.setSortNo(bo.getSortNo() != null ? bo.getSortNo() : i);
|
||||
item.setItemName(bo.getItemName());
|
||||
item.setReason(bo.getReason());
|
||||
item.setAmount(bo.getAmount());
|
||||
invoiceItemMapper.insert(item);
|
||||
}
|
||||
}
|
||||
|
||||
private String defaultStatus(String status) {
|
||||
return status == null ? "draft" : status;
|
||||
}
|
||||
|
||||
@@ -121,6 +121,9 @@ public class HrmSealReqServiceImpl implements IHrmSealReqService {
|
||||
return baseMapper.selectVoWithProjectList(bo);
|
||||
}
|
||||
|
||||
/** 用印申请固定审批人:陆永强(信息化部,userId=1858417253738815490) */
|
||||
private static final Long SEAL_FIXED_APPROVER_USER_ID = 1858417253738815490L;
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public HrmSealReqVo insertByBo(HrmSealReqBo bo) {
|
||||
@@ -129,22 +132,18 @@ public class HrmSealReqServiceImpl implements IHrmSealReqService {
|
||||
validEntityBeforeSave(add);
|
||||
boolean ok = baseMapper.insert(add) > 0;
|
||||
|
||||
// 只要传入了 tplId 或 manualAssigneeUserId,就代表需要启动流程
|
||||
Long tplId = bo.getTplId() != null ? bo.getTplId() : bo.getFlowTplId();
|
||||
boolean shouldStartFlow = tplId != null || bo.getManualAssigneeUserId() != null;
|
||||
|
||||
HrmSealReqVo bean = BeanUtil.toBean(add, HrmSealReqVo.class);
|
||||
if (ok && shouldStartFlow) {
|
||||
if (ok) {
|
||||
// 用印申请审批人写死成陆永强,忽略前端传的 tplId / manualAssigneeUserId
|
||||
HrmFlowStartBo start = new HrmFlowStartBo();
|
||||
start.setTplId(tplId);
|
||||
start.setManualAssigneeUserId(bo.getManualAssigneeUserId());
|
||||
start.setTplId(null);
|
||||
start.setManualAssigneeUserId(SEAL_FIXED_APPROVER_USER_ID);
|
||||
start.setBizType("seal");
|
||||
start.setBizId(add.getBizId());
|
||||
start.setStartUserId(LoginHelper.getUserId());
|
||||
start.setContentJson(bo.getContentJson());
|
||||
|
||||
Long instId = flowInstanceService.startInstance(start);
|
||||
// 更新状态为流转中
|
||||
updateStatus(add.getBizId(), "running");
|
||||
bean.setInstId(instId);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.hrm.mapper.HrmEmergencyContactMapper">
|
||||
<resultMap id="BaseResultMap" type="com.ruoyi.hrm.domain.HrmEmergencyContact">
|
||||
<id column="contact_id" property="contactId"/>
|
||||
<result column="user_id" property="userId"/>
|
||||
<result column="dept_id" property="deptId"/>
|
||||
<result column="real_name" property="realName"/>
|
||||
<result column="phone" property="phone"/>
|
||||
<result column="id_card" property="idCard"/>
|
||||
<result column="gender" property="gender"/>
|
||||
<result column="age" property="age"/>
|
||||
<result column="company_name" property="companyName"/>
|
||||
<result column="hire_date" property="hireDate"/>
|
||||
<result column="emergency_contact" property="emergencyContact"/>
|
||||
<result column="relationship" property="relationship"/>
|
||||
<result column="emergency_phone1" property="emergencyPhone1"/>
|
||||
<result column="emergency_phone2" property="emergencyPhone2"/>
|
||||
<result column="emergency_address" property="emergencyAddress"/>
|
||||
<result column="remark" property="remark"/>
|
||||
<result column="create_by" property="createBy"/>
|
||||
<result column="create_time" property="createTime"/>
|
||||
<result column="update_by" property="updateBy"/>
|
||||
<result column="update_time" property="updateTime"/>
|
||||
<result column="del_flag" property="delFlag"/>
|
||||
</resultMap>
|
||||
</mapper>
|
||||
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>
|
||||
@@ -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.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,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.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,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,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,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,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,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,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 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 String status;
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
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 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,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,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,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,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.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("fad_rm_mfg_device")
|
||||
public class RmMfgDevice extends BaseEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId
|
||||
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;
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
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_mfg_stage")
|
||||
public class RmMfgStage extends BaseEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId
|
||||
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;
|
||||
@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.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("fad_rm_procurement_contract")
|
||||
public class RmProcurementContract extends BaseEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId
|
||||
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;
|
||||
@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.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("fad_rm_procurement_progress")
|
||||
public class RmProcurementProgress extends BaseEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId
|
||||
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;
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
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_procurement_quote")
|
||||
public class RmProcurementQuote extends BaseEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId
|
||||
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;
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.ruoyi.rm.domain.entity;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
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.util.Date;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("fad_rm_project")
|
||||
public class RmProject extends BaseEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId
|
||||
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 String status;
|
||||
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_tech_plan_item")
|
||||
public class RmTechPlanItem extends BaseEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId
|
||||
private Long planItemId;
|
||||
private Long projectId;
|
||||
private String itemName;
|
||||
private String status;
|
||||
private String description;
|
||||
private String owner;
|
||||
private String attachmentUrl;
|
||||
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_tech_review_item")
|
||||
public class RmTechReviewItem extends BaseEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId
|
||||
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;
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.ruoyi.rm.domain.vo;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
public class RmBudgetVo implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Excel(name = "预算ID")
|
||||
private Long budgetId;
|
||||
|
||||
@Excel(name = "项目ID")
|
||||
private Long projectId;
|
||||
|
||||
@Excel(name = "科目类别")
|
||||
private String category;
|
||||
|
||||
@Excel(name = "项目名称")
|
||||
private String item;
|
||||
|
||||
@Excel(name = "预算金额")
|
||||
private BigDecimal budgetAmount;
|
||||
|
||||
@Excel(name = "已支出")
|
||||
private BigDecimal spentAmount;
|
||||
|
||||
@Excel(name = "状态")
|
||||
private String status;
|
||||
|
||||
@Excel(name = "归档批次")
|
||||
private String archiveBatch;
|
||||
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.ruoyi.rm.domain.vo;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class RmColorCardVo implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Excel(name = "色卡ID")
|
||||
private Long colorCardId;
|
||||
|
||||
@Excel(name = "项目ID")
|
||||
private Long projectId;
|
||||
|
||||
@Excel(name = "色名")
|
||||
private String colorName;
|
||||
|
||||
@Excel(name = "HEX值")
|
||||
private String hexValue;
|
||||
|
||||
@Excel(name = "标准色号")
|
||||
private String standard;
|
||||
|
||||
@Excel(name = "标准类型")
|
||||
private String standardLabel;
|
||||
|
||||
@Excel(name = "分类")
|
||||
private String category;
|
||||
|
||||
@Excel(name = "用途说明")
|
||||
private String usageDesc;
|
||||
|
||||
@Excel(name = "详细描述")
|
||||
private String description;
|
||||
|
||||
@Excel(name = "排序号")
|
||||
private Integer sortOrder;
|
||||
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.ruoyi.rm.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class RmDrawingDesignVo implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Excel(name = "图纸ID")
|
||||
private Long drawingId;
|
||||
|
||||
@Excel(name = "项目ID")
|
||||
private Long projectId;
|
||||
|
||||
@Excel(name = "图纸名称")
|
||||
private String drawingName;
|
||||
|
||||
@Excel(name = "图号")
|
||||
private String drawingNo;
|
||||
|
||||
@Excel(name = "版本")
|
||||
private String version;
|
||||
|
||||
@Excel(name = "图纸类型")
|
||||
private String drawingType;
|
||||
|
||||
@Excel(name = "制图人")
|
||||
private String drawer;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "开始日期", width = 15)
|
||||
private Date startDate;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "完成日期", width = 15)
|
||||
private Date endDate;
|
||||
|
||||
@Excel(name = "文件路径")
|
||||
private String fileUrl;
|
||||
|
||||
@Excel(name = "状态")
|
||||
private String status;
|
||||
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.ruoyi.rm.domain.vo;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class RmDrawingReviewVo implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Excel(name = "审查ID")
|
||||
private Long reviewId;
|
||||
|
||||
@Excel(name = "项目ID")
|
||||
private Long projectId;
|
||||
|
||||
@Excel(name = "关联图纸ID")
|
||||
private Long drawingId;
|
||||
|
||||
@Excel(name = "图纸名称")
|
||||
private String drawingName;
|
||||
|
||||
@Excel(name = "图号")
|
||||
private String drawingNo;
|
||||
|
||||
@Excel(name = "版本")
|
||||
private String version;
|
||||
|
||||
@Excel(name = "文件路径")
|
||||
private String fileUrl;
|
||||
|
||||
@Excel(name = "状态")
|
||||
private String status;
|
||||
|
||||
@Excel(name = "审核人")
|
||||
private String reviewer;
|
||||
|
||||
@Excel(name = "审核日期")
|
||||
private Date reviewDate;
|
||||
|
||||
@Excel(name = "审核意见")
|
||||
private String reviewOpinion;
|
||||
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.ruoyi.rm.domain.vo;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class RmLayoutFileVo implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Excel(name = "文件ID")
|
||||
private Long layoutFileId;
|
||||
|
||||
@Excel(name = "项目ID")
|
||||
private Long projectId;
|
||||
|
||||
@Excel(name = "文件名")
|
||||
private String fileName;
|
||||
|
||||
@Excel(name = "版本号")
|
||||
private String version;
|
||||
|
||||
@Excel(name = "文件类型")
|
||||
private String fileType;
|
||||
|
||||
@Excel(name = "文件路径")
|
||||
private String fileUrl;
|
||||
|
||||
@Excel(name = "上传日期")
|
||||
private Date uploadDate;
|
||||
|
||||
@Excel(name = "状态")
|
||||
private String status;
|
||||
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package com.ruoyi.rm.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class RmMfgDeviceVo implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Excel(name = "设备ID")
|
||||
private Long deviceId;
|
||||
|
||||
@Excel(name = "项目ID")
|
||||
private Long projectId;
|
||||
|
||||
@Excel(name = "设备名称")
|
||||
private String deviceName;
|
||||
|
||||
@Excel(name = "规格型号")
|
||||
private String spec;
|
||||
|
||||
@Excel(name = "供应商")
|
||||
private String supplierName;
|
||||
|
||||
@Excel(name = "合同编号")
|
||||
private String contractNo;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "下单日期", width = 15)
|
||||
private Date orderDate;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "交货日期", width = 15)
|
||||
private Date deliveryDate;
|
||||
|
||||
@Excel(name = "逾期罚款(元/天)")
|
||||
private BigDecimal penaltyRate;
|
||||
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package com.ruoyi.rm.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class RmMfgStageVo implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Excel(name = "阶段ID")
|
||||
private Long stageId;
|
||||
|
||||
@Excel(name = "设备ID")
|
||||
private Long deviceId;
|
||||
|
||||
@Excel(name = "阶段标识")
|
||||
private String stageKey;
|
||||
|
||||
@Excel(name = "阶段名称")
|
||||
private String stageName;
|
||||
|
||||
@Excel(name = "状态")
|
||||
private String status;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "计划开始", width = 15)
|
||||
private Date planStartDate;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "计划结束", width = 15)
|
||||
private Date planEndDate;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "实际开始", width = 15)
|
||||
private Date actualStart;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "实际结束", width = 15)
|
||||
private Date actualEnd;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "提交日期", width = 15)
|
||||
private Date submittedDate;
|
||||
|
||||
@Excel(name = "制造照片")
|
||||
private String manufacturingPhotos;
|
||||
|
||||
@Excel(name = "制造视频")
|
||||
private String manufacturingVideo;
|
||||
|
||||
@Excel(name = "材质报告")
|
||||
private String materialReport;
|
||||
|
||||
@Excel(name = "精度报告")
|
||||
private String precisionReport;
|
||||
|
||||
@Excel(name = "排序号")
|
||||
private Integer sortOrder;
|
||||
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.ruoyi.rm.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class RmProcurementContractVo implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Excel(name = "合同ID")
|
||||
private Long contractId;
|
||||
|
||||
@Excel(name = "项目ID")
|
||||
private Long projectId;
|
||||
|
||||
@Excel(name = "合同编号")
|
||||
private String contractNo;
|
||||
|
||||
@Excel(name = "合同名称")
|
||||
private String contractName;
|
||||
|
||||
@Excel(name = "供应商")
|
||||
private String supplierName;
|
||||
|
||||
@Excel(name = "合同金额")
|
||||
private BigDecimal totalAmount;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "签订日期", width = 15)
|
||||
private Date signDate;
|
||||
|
||||
@Excel(name = "文件路径")
|
||||
private String fileUrl;
|
||||
|
||||
@Excel(name = "状态")
|
||||
private String status;
|
||||
|
||||
@Excel(name = "合同条款")
|
||||
private String clauses;
|
||||
|
||||
@Excel(name = "违约罚款条款")
|
||||
private String penaltyClause;
|
||||
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.ruoyi.rm.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class RmProcurementProgressVo implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Excel(name = "进度ID")
|
||||
private Long progressId;
|
||||
|
||||
@Excel(name = "项目ID")
|
||||
private Long projectId;
|
||||
|
||||
@Excel(name = "采购项")
|
||||
private String itemName;
|
||||
|
||||
@Excel(name = "供应商")
|
||||
private String supplierName;
|
||||
|
||||
@Excel(name = "合同编号")
|
||||
private String contractNo;
|
||||
|
||||
@Excel(name = "合同金额")
|
||||
private BigDecimal amount;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "下单日期", width = 15)
|
||||
private Date orderDate;
|
||||
|
||||
@Excel(name = "当前阶段")
|
||||
private String currentStage;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "预计到货", width = 15)
|
||||
private Date expectDate;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "实际到货", width = 15)
|
||||
private Date actualDate;
|
||||
|
||||
@Excel(name = "阶段JSON")
|
||||
private String stages;
|
||||
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package com.ruoyi.rm.domain.vo;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
public class RmProcurementQuoteVo implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Excel(name = "报价ID")
|
||||
private Long quoteId;
|
||||
|
||||
@Excel(name = "项目ID")
|
||||
private Long projectId;
|
||||
|
||||
@Excel(name = "供应商")
|
||||
private String supplierName;
|
||||
|
||||
@Excel(name = "设备项")
|
||||
private String itemName;
|
||||
|
||||
@Excel(name = "规格型号")
|
||||
private String spec;
|
||||
|
||||
@Excel(name = "数量")
|
||||
private Integer qty;
|
||||
|
||||
@Excel(name = "单位")
|
||||
private String unit;
|
||||
|
||||
@Excel(name = "单价")
|
||||
private BigDecimal unitPrice;
|
||||
|
||||
@Excel(name = "总价")
|
||||
private BigDecimal totalPrice;
|
||||
|
||||
@Excel(name = "交货期(天)")
|
||||
private Integer deliveryDays;
|
||||
|
||||
@Excel(name = "质保期(月)")
|
||||
private Integer warrantyMonths;
|
||||
|
||||
@Excel(name = "价格评分")
|
||||
private BigDecimal scorePrice;
|
||||
|
||||
@Excel(name = "交货评分")
|
||||
private BigDecimal scoreDelivery;
|
||||
|
||||
@Excel(name = "质保评分")
|
||||
private BigDecimal scoreWarranty;
|
||||
|
||||
@Excel(name = "综合评分")
|
||||
private BigDecimal scoreTotal;
|
||||
|
||||
@Excel(name = "排名")
|
||||
private Integer scoreRank;
|
||||
|
||||
@Excel(name = "状态")
|
||||
private String status;
|
||||
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.ruoyi.rm.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class RmProjectVo implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Excel(name = "项目ID")
|
||||
private Long projectId;
|
||||
|
||||
@Excel(name = "项目名称")
|
||||
private String projectName;
|
||||
|
||||
@Excel(name = "项目编号")
|
||||
private String projectNo;
|
||||
|
||||
@Excel(name = "客户名称")
|
||||
private String clientName;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "开始日期")
|
||||
private Date startDate;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "结束日期")
|
||||
private Date endDate;
|
||||
|
||||
@Excel(name = "项目经理")
|
||||
private String manager;
|
||||
|
||||
@Excel(name = "状态")
|
||||
private String status;
|
||||
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.ruoyi.rm.domain.vo;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class RmTechPlanItemVo implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Excel(name = "方案项ID")
|
||||
private Long planItemId;
|
||||
|
||||
@Excel(name = "项目ID")
|
||||
private Long projectId;
|
||||
|
||||
@Excel(name = "方案项名称")
|
||||
private String itemName;
|
||||
|
||||
@Excel(name = "状态")
|
||||
private String status;
|
||||
|
||||
@Excel(name = "方案描述")
|
||||
private String description;
|
||||
|
||||
@Excel(name = "负责人")
|
||||
private String owner;
|
||||
|
||||
@Excel(name = "附件路径")
|
||||
private String attachmentUrl;
|
||||
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.ruoyi.rm.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class RmTechReviewItemVo implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Excel(name = "审查项ID")
|
||||
private Long reviewItemId;
|
||||
|
||||
@Excel(name = "项目ID")
|
||||
private Long projectId;
|
||||
|
||||
@Excel(name = "专业类型")
|
||||
private String reviewType;
|
||||
|
||||
@Excel(name = "审查项名称")
|
||||
private String itemName;
|
||||
|
||||
@Excel(name = "结论")
|
||||
private String conclusion;
|
||||
|
||||
@Excel(name = "审查人")
|
||||
private String reviewer;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "审查日期", width = 15)
|
||||
private Date reviewDate;
|
||||
|
||||
@Excel(name = "审查意见")
|
||||
private String reviewOpinion;
|
||||
|
||||
@Excel(name = "思维导入")
|
||||
private String thinking;
|
||||
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.ruoyi.rm.mapper;
|
||||
|
||||
import com.ruoyi.common.core.mapper.BaseMapperPlus;
|
||||
import com.ruoyi.rm.domain.entity.RmBudget;
|
||||
import com.ruoyi.rm.domain.vo.RmBudgetVo;
|
||||
|
||||
public interface RmBudgetMapper extends BaseMapperPlus<RmBudgetMapper, RmBudget, RmBudgetVo> {
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.ruoyi.rm.mapper;
|
||||
|
||||
import com.ruoyi.common.core.mapper.BaseMapperPlus;
|
||||
import com.ruoyi.rm.domain.entity.RmColorCard;
|
||||
import com.ruoyi.rm.domain.vo.RmColorCardVo;
|
||||
|
||||
public interface RmColorCardMapper extends BaseMapperPlus<RmColorCardMapper, RmColorCard, RmColorCardVo> {
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.ruoyi.rm.mapper;
|
||||
|
||||
import com.ruoyi.common.core.mapper.BaseMapperPlus;
|
||||
import com.ruoyi.rm.domain.entity.RmDrawingDesign;
|
||||
import com.ruoyi.rm.domain.vo.RmDrawingDesignVo;
|
||||
|
||||
public interface RmDrawingDesignMapper extends BaseMapperPlus<RmDrawingDesignMapper, RmDrawingDesign, RmDrawingDesignVo> {
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.ruoyi.rm.mapper;
|
||||
|
||||
import com.ruoyi.common.core.mapper.BaseMapperPlus;
|
||||
import com.ruoyi.rm.domain.entity.RmDrawingReview;
|
||||
import com.ruoyi.rm.domain.vo.RmDrawingReviewVo;
|
||||
|
||||
public interface RmDrawingReviewMapper extends BaseMapperPlus<RmDrawingReviewMapper, RmDrawingReview, RmDrawingReviewVo> {
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.ruoyi.rm.mapper;
|
||||
|
||||
import com.ruoyi.common.core.mapper.BaseMapperPlus;
|
||||
import com.ruoyi.rm.domain.entity.RmLayoutFile;
|
||||
import com.ruoyi.rm.domain.vo.RmLayoutFileVo;
|
||||
|
||||
public interface RmLayoutFileMapper extends BaseMapperPlus<RmLayoutFileMapper, RmLayoutFile, RmLayoutFileVo> {
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.ruoyi.rm.mapper;
|
||||
|
||||
import com.ruoyi.common.core.mapper.BaseMapperPlus;
|
||||
import com.ruoyi.rm.domain.entity.RmMfgDevice;
|
||||
import com.ruoyi.rm.domain.vo.RmMfgDeviceVo;
|
||||
|
||||
public interface RmMfgDeviceMapper extends BaseMapperPlus<RmMfgDeviceMapper, RmMfgDevice, RmMfgDeviceVo> {
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.ruoyi.rm.mapper;
|
||||
|
||||
import com.ruoyi.common.core.mapper.BaseMapperPlus;
|
||||
import com.ruoyi.rm.domain.entity.RmMfgStage;
|
||||
import com.ruoyi.rm.domain.vo.RmMfgStageVo;
|
||||
|
||||
public interface RmMfgStageMapper extends BaseMapperPlus<RmMfgStageMapper, RmMfgStage, RmMfgStageVo> {
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.ruoyi.rm.mapper;
|
||||
|
||||
import com.ruoyi.common.core.mapper.BaseMapperPlus;
|
||||
import com.ruoyi.rm.domain.entity.RmProcurementContract;
|
||||
import com.ruoyi.rm.domain.vo.RmProcurementContractVo;
|
||||
|
||||
public interface RmProcurementContractMapper extends BaseMapperPlus<RmProcurementContractMapper, RmProcurementContract, RmProcurementContractVo> {
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.ruoyi.rm.mapper;
|
||||
|
||||
import com.ruoyi.common.core.mapper.BaseMapperPlus;
|
||||
import com.ruoyi.rm.domain.entity.RmProcurementProgress;
|
||||
import com.ruoyi.rm.domain.vo.RmProcurementProgressVo;
|
||||
|
||||
public interface RmProcurementProgressMapper extends BaseMapperPlus<RmProcurementProgressMapper, RmProcurementProgress, RmProcurementProgressVo> {
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.ruoyi.rm.mapper;
|
||||
|
||||
import com.ruoyi.common.core.mapper.BaseMapperPlus;
|
||||
import com.ruoyi.rm.domain.entity.RmProcurementQuote;
|
||||
import com.ruoyi.rm.domain.vo.RmProcurementQuoteVo;
|
||||
|
||||
public interface RmProcurementQuoteMapper extends BaseMapperPlus<RmProcurementQuoteMapper, RmProcurementQuote, RmProcurementQuoteVo> {
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.ruoyi.rm.mapper;
|
||||
|
||||
import com.ruoyi.common.core.mapper.BaseMapperPlus;
|
||||
import com.ruoyi.rm.domain.entity.RmProject;
|
||||
import com.ruoyi.rm.domain.vo.RmProjectVo;
|
||||
|
||||
public interface RmProjectMapper extends BaseMapperPlus<RmProjectMapper, RmProject, RmProjectVo> {
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.ruoyi.rm.mapper;
|
||||
|
||||
import com.ruoyi.common.core.mapper.BaseMapperPlus;
|
||||
import com.ruoyi.rm.domain.entity.RmTechPlanItem;
|
||||
import com.ruoyi.rm.domain.vo.RmTechPlanItemVo;
|
||||
|
||||
public interface RmTechPlanItemMapper extends BaseMapperPlus<RmTechPlanItemMapper, RmTechPlanItem, RmTechPlanItemVo> {
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.ruoyi.rm.mapper;
|
||||
|
||||
import com.ruoyi.common.core.mapper.BaseMapperPlus;
|
||||
import com.ruoyi.rm.domain.entity.RmTechReviewItem;
|
||||
import com.ruoyi.rm.domain.vo.RmTechReviewItemVo;
|
||||
|
||||
public interface RmTechReviewItemMapper extends BaseMapperPlus<RmTechReviewItemMapper, RmTechReviewItem, RmTechReviewItemVo> {
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user