Compare commits
177 Commits
577de8eb64
...
0.8.X
| Author | SHA1 | Date | |
|---|---|---|---|
| 491eed3dad | |||
| 66838b6c69 | |||
| c8c2523fe7 | |||
| d0afe5eaaf | |||
| 7374b810c1 | |||
| 041e5aef0e | |||
| 6120e87966 | |||
| 5828dbd133 | |||
| ee49fbdcc0 | |||
| 7f1a89eb61 | |||
| 759bbbed63 | |||
| 5b0cb314e4 | |||
| 2fc4bf4043 | |||
| 2fb5a64124 | |||
| 379aa9d44b | |||
| b4a9a48ae6 | |||
| 41716b3430 | |||
| 585017873c | |||
| 605f7b85a1 | |||
| 192a27afbc | |||
| 768b18c22a | |||
| 3719416cbf | |||
| 791be3e1a5 | |||
| 7b7f4b902e | |||
| c547456108 | |||
| 931fc74ed7 | |||
| e7f1e584eb | |||
| b43b44d044 | |||
| d053dd0319 | |||
| 3b1ce45043 | |||
| 5473fbf28f | |||
| 2874f1727a | |||
| a3a4986cb8 | |||
| f525770094 | |||
| 25beef5517 | |||
| e6b1e31bd1 | |||
| 8c3a3eec28 | |||
| 1510f43aee | |||
| cb8fce435c | |||
| 7bb68483e6 | |||
| 696280bd47 | |||
| bdf01feacb | |||
| 120320c800 | |||
| 3db1651efd | |||
| 9d679954fa | |||
| a2844ec54a | |||
| 91ddc8602a | |||
| 22fd3c4a58 | |||
| ceab5d4be3 | |||
| bf8b69d193 | |||
| 7feaf8021b | |||
| 6328b4ac7a | |||
| 183e6d08d8 | |||
| a037c56122 | |||
| 857daa24af | |||
| 0968dcaded | |||
| cced2ff4aa | |||
| f197462b11 | |||
| 9559e5810e | |||
| 92ad229104 | |||
| ee1cb31321 | |||
| f0de25a3a2 | |||
| 0d40774194 | |||
| 948e62daae | |||
| 48d12fe056 | |||
| 6edc6e1100 | |||
| 12ea9b0b83 | |||
| c149216ebd | |||
| 325a93fd84 | |||
| f0656b57d4 | |||
| 9c7d2dca65 | |||
| 36b1e3da82 | |||
| c83eb79d25 | |||
| e0cf4b46b6 | |||
| 00972112d2 | |||
| 2559dc27cb | |||
| 7a0d7e1b12 | |||
| 1cd2cf2b9a | |||
| 98116fa042 | |||
| d3c6790603 | |||
| c1e3fa5141 | |||
| f319308196 | |||
| 185745b7da | |||
| 7440706e2e | |||
| 0adb29139e | |||
| 2148a068f8 | |||
| e1bb9e5431 | |||
| 8b2039f06a | |||
| 9761faa2d2 | |||
| d5f00a4b0b | |||
| b9fb4b4611 | |||
| 7d76ef0c52 | |||
| ea71a6dd93 | |||
| b9b6ae7e79 | |||
| 20a75aec4b | |||
| 3ad7bf40b5 | |||
| 196e628665 | |||
| 7c61c42eb5 | |||
| 1223b634b7 | |||
| 87913ba0a0 | |||
| eab45a8706 | |||
| a9a7a0889e | |||
| cd2e4016a6 | |||
| 87d72b2a0d | |||
| 4342215c00 | |||
| 7bf7d24f29 | |||
| 4da8d8d297 | |||
| c4eab467ee | |||
| fd50118161 | |||
| cc63aa80b2 | |||
| c95ea7db61 | |||
| f50c240bbe | |||
| 66278e635b | |||
| 74d0ba57e2 | |||
| e00d1357b0 | |||
| b9f87c6cc4 | |||
| 7c9c99bf45 | |||
| fdb13b7261 | |||
| 74a3803290 | |||
| 76497eece7 | |||
| d231d3619a | |||
| 20966157c5 | |||
| 59e58e5206 | |||
| 59ceeed4a4 | |||
| fac59f4346 | |||
| f6a74e58ea | |||
| 857a3948d6 | |||
| 47b3fb24b7 | |||
| 97e0df7ae1 | |||
| 7c87670896 | |||
| cd3cc85c0a | |||
| d70bb77755 | |||
| b00db10a37 | |||
| dbeb99d9e5 | |||
| 1a2fc9852d | |||
| 7aaa59cee1 | |||
| cbebd5b6d6 | |||
| 24a9784035 | |||
| de7ec604dd | |||
| 696f6d9ee0 | |||
| 050dd1a965 | |||
| 724c1dd16f | |||
| 0e85153b3d | |||
| af728f8ea6 | |||
| 7e07b6f970 | |||
| 8a0f5e65bb | |||
| 1947a5c2d5 | |||
| d8498728ee | |||
| 53e948b3e0 | |||
| 3ebc0cb86a | |||
| 8059b0a0bb | |||
| 1792196dc7 | |||
| d8051abf8e | |||
| 5e0cb69bb8 | |||
| 37a69b563b | |||
| 66f0b3fdd7 | |||
| 5e0dc848bb | |||
| a5323aea76 | |||
| cac747d158 | |||
| 705d929d6e | |||
| 29c21fd64f | |||
| 5236500f04 | |||
| 600867f386 | |||
| 8183bae824 | |||
| 37d6830947 | |||
| c71dfe3ff2 | |||
| ff139759d4 | |||
| 5176c80344 | |||
| 31f7a9c0cb | |||
| 9d208770d8 | |||
| 31d8d1ee16 | |||
| b4fbb8dfc8 | |||
| 40ebca2573 | |||
| ec08a360a0 | |||
| 977ea2b021 | |||
| e507887a27 | |||
| 12a887e074 |
@@ -1,9 +0,0 @@
|
||||
---
|
||||
alwaysApply: true
|
||||
scene: git_message
|
||||
---
|
||||
|
||||
使用中文编写提交信息, 提交信息格式为:
|
||||
```
|
||||
<type>(<scope>): <subject>
|
||||
```
|
||||
@@ -129,6 +129,10 @@
|
||||
<artifactId>klp-cost</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.klp</groupId>
|
||||
<artifactId>klp-flow</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
|
||||
@@ -361,6 +361,15 @@ public class SqlServerApiClient {
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
public ExecuteSqlResponse queryExcoilByHotCoilId(String hotCoilId) {
|
||||
return executeSql(
|
||||
"oracle",
|
||||
"select * from JXPLTCM.PLTCM_PDO_EXCOIL where HOT_COILID = :hotCoilId",
|
||||
singletonParam("hotCoilId", hotCoilId)
|
||||
);
|
||||
}
|
||||
|
||||
public ExecuteSqlResponse queryPlanListByHotCoilIdLike(String hotCoilId, int page, int pageSize) {
|
||||
int endRow = page * pageSize;
|
||||
int startRow = endRow - pageSize;
|
||||
|
||||
@@ -122,7 +122,10 @@ public class SqlServerApiBusinessService {
|
||||
* 计划详情:按热卷号查询。
|
||||
*/
|
||||
public PlanDetailView getPlanByHotCoilId(String hotCoilId) {
|
||||
return PlanDetailView.fromExecuteSqlResponse(hotCoilId, client.queryPlanByHotCoilId(hotCoilId));
|
||||
SqlServerApiClient.ExecuteSqlResponse planResponse = client.queryPlanByHotCoilId(hotCoilId);
|
||||
SqlServerApiClient.ExecuteSqlResponse excoilResponse = null;
|
||||
excoilResponse = client.queryExcoilByHotCoilId(hotCoilId);
|
||||
return PlanDetailView.fromExecuteSqlResponse(hotCoilId, planResponse, excoilResponse);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -421,11 +424,13 @@ public class SqlServerApiBusinessService {
|
||||
private final String coilId;
|
||||
private final List<Map<String, Object>> rows;
|
||||
private final Map<String, Object> firstRow;
|
||||
private final List<Map<String, Object>> excoilRows;
|
||||
|
||||
public PlanDetailView(String coilId, List<Map<String, Object>> rows, Map<String, Object> firstRow) {
|
||||
public PlanDetailView(String coilId, List<Map<String, Object>> rows, Map<String, Object> firstRow, List<Map<String, Object>> excoilRows) {
|
||||
this.coilId = coilId;
|
||||
this.rows = rows;
|
||||
this.firstRow = firstRow;
|
||||
this.excoilRows = excoilRows;
|
||||
}
|
||||
|
||||
public String getCoilId() {
|
||||
@@ -440,10 +445,21 @@ public class SqlServerApiBusinessService {
|
||||
return firstRow;
|
||||
}
|
||||
|
||||
public List<Map<String, Object>> getExcoilRows() {
|
||||
return excoilRows;
|
||||
}
|
||||
|
||||
public static PlanDetailView fromExecuteSqlResponse(String coilId, SqlServerApiClient.ExecuteSqlResponse response) {
|
||||
List<Map<String, Object>> rows = asRowList(response);
|
||||
Map<String, Object> firstRow = rows.isEmpty() ? Collections.<String, Object>emptyMap() : rows.get(0);
|
||||
return new PlanDetailView(coilId, rows, firstRow);
|
||||
return new PlanDetailView(coilId, rows, firstRow, Collections.<Map<String, Object>>emptyList());
|
||||
}
|
||||
|
||||
public static PlanDetailView fromExecuteSqlResponse(String coilId, SqlServerApiClient.ExecuteSqlResponse response, SqlServerApiClient.ExecuteSqlResponse excoilResponse) {
|
||||
List<Map<String, Object>> rows = asRowList(response);
|
||||
Map<String, Object> firstRow = rows.isEmpty() ? Collections.<String, Object>emptyMap() : rows.get(0);
|
||||
List<Map<String, Object>> excoilRows = asRowList(excoilResponse);
|
||||
return new PlanDetailView(coilId, rows, firstRow, excoilRows);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -52,6 +52,11 @@ public class ApsPlanSheetBo extends BaseEntity {
|
||||
*/
|
||||
private String planType;
|
||||
|
||||
/**
|
||||
* 排产文件
|
||||
*/
|
||||
private String apsUrl;
|
||||
|
||||
/**
|
||||
* 排产人
|
||||
*/
|
||||
|
||||
@@ -49,6 +49,10 @@ public class ApsPlanSheet extends BaseEntity {
|
||||
* 排产类型
|
||||
*/
|
||||
private String planType;
|
||||
/**
|
||||
* 排产文件
|
||||
*/
|
||||
private String apsUrl;
|
||||
/**
|
||||
* 排产人
|
||||
*/
|
||||
|
||||
@@ -60,6 +60,12 @@ public class ApsPlanSheetVo {
|
||||
@ExcelProperty(value = "排产类型")
|
||||
private String planType;
|
||||
|
||||
/**
|
||||
* 排产文件
|
||||
*/
|
||||
@ExcelProperty(value = "排产文件")
|
||||
private String apsUrl;
|
||||
|
||||
/**
|
||||
* 排产人
|
||||
*/
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
<result property="lineName" column="line_name"/>
|
||||
<result property="planCode" column="plan_code"/>
|
||||
<result property="planType" column="plan_type"/>
|
||||
<result property="apsUrl" column="aps_url"/>
|
||||
<result property="scheduler" column="scheduler"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
@@ -27,6 +28,7 @@
|
||||
s.line_name AS lineName,
|
||||
s.plan_code AS planCode,
|
||||
s.plan_type AS planType,
|
||||
s.aps_url AS apsUrl,
|
||||
s.scheduler AS scheduler,
|
||||
s.remark AS masterRemark,
|
||||
d.remark AS detailRemark,
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
package com.klp.cost.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.*;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.klp.common.annotation.RepeatSubmit;
|
||||
import com.klp.common.annotation.Log;
|
||||
import com.klp.common.core.controller.BaseController;
|
||||
import com.klp.common.core.domain.PageQuery;
|
||||
import com.klp.common.core.domain.R;
|
||||
import com.klp.common.core.validate.AddGroup;
|
||||
import com.klp.common.core.validate.EditGroup;
|
||||
import com.klp.common.enums.BusinessType;
|
||||
import com.klp.common.utils.poi.ExcelUtil;
|
||||
import com.klp.cost.domain.vo.CostProdMetricResultVo;
|
||||
import com.klp.cost.domain.bo.CostProdMetricResultBo;
|
||||
import com.klp.cost.service.ICostProdMetricResultService;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 生产指标计算结果
|
||||
*
|
||||
* @author klp
|
||||
* @date 2026-06-17
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/cost/prodMetricResult")
|
||||
public class CostProdMetricResultController extends BaseController {
|
||||
|
||||
private final ICostProdMetricResultService iCostProdMetricResultService;
|
||||
|
||||
/**
|
||||
* 查询生产指标计算结果列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<CostProdMetricResultVo> list(CostProdMetricResultBo bo, PageQuery pageQuery) {
|
||||
return iCostProdMetricResultService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出生产指标计算结果列表
|
||||
*/
|
||||
@Log(title = "生产指标计算结果", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(CostProdMetricResultBo bo, HttpServletResponse response) {
|
||||
List<CostProdMetricResultVo> list = iCostProdMetricResultService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "生产指标计算结果", CostProdMetricResultVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取生产指标计算结果详细信息
|
||||
*
|
||||
* @param resultId 主键
|
||||
*/
|
||||
@GetMapping("/{resultId}")
|
||||
public R<CostProdMetricResultVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long resultId) {
|
||||
return R.ok(iCostProdMetricResultService.queryById(resultId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增生产指标计算结果
|
||||
*/
|
||||
@Log(title = "生产指标计算结果", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody CostProdMetricResultBo bo) {
|
||||
return toAjax(iCostProdMetricResultService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量保存生产指标计算结果(先删除再插入)
|
||||
*/
|
||||
@Log(title = "生产指标计算结果", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping("/batch")
|
||||
public R<Void> batchSave(@RequestBody CostProdMetricResultBo bo) {
|
||||
return toAjax(iCostProdMetricResultService.batchSaveWithDelete(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改生产指标计算结果
|
||||
*/
|
||||
@Log(title = "生产指标计算结果", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody CostProdMetricResultBo bo) {
|
||||
return toAjax(iCostProdMetricResultService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除生产指标计算结果
|
||||
*
|
||||
* @param resultIds 主键串
|
||||
*/
|
||||
@Log(title = "生产指标计算结果", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{resultIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] resultIds) {
|
||||
return toAjax(iCostProdMetricResultService.deleteWithValidByIds(Arrays.asList(resultIds), true));
|
||||
}
|
||||
}
|
||||
@@ -42,13 +42,21 @@ public class CostProdMetric extends BaseEntity {
|
||||
*/
|
||||
private String metricFormula;
|
||||
/**
|
||||
* 指标计算结果值
|
||||
* 单价
|
||||
*/
|
||||
private BigDecimal metricValue;
|
||||
/**
|
||||
* 是否使用单价 0=否 1=是
|
||||
*/
|
||||
private Integer usePrice;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 标签
|
||||
*/
|
||||
private String tags;
|
||||
/**
|
||||
* 删除标识 0=正常 2=删除
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.klp.cost.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.klp.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
/**
|
||||
* 生产指标计算结果对象 cost_prod_metric_result
|
||||
*
|
||||
* @author klp
|
||||
* @date 2026-06-17
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("cost_prod_metric_result")
|
||||
public class CostProdMetricResult extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId(value = "result_id")
|
||||
private Long resultId;
|
||||
/**
|
||||
* 报表ID(关联生产日报)
|
||||
*/
|
||||
private Long reportId;
|
||||
/**
|
||||
* 指标ID(关联cost_prod_metric)
|
||||
*/
|
||||
private Long metricId;
|
||||
/**
|
||||
* 计算日期
|
||||
*/
|
||||
private Date metricDate;
|
||||
/**
|
||||
* 班组
|
||||
*/
|
||||
private String teamGroup;
|
||||
/**
|
||||
* 计算值
|
||||
*/
|
||||
private BigDecimal calcValue;
|
||||
/**
|
||||
* 标签
|
||||
*/
|
||||
private String tags;
|
||||
/**
|
||||
* 删除标识 0=正常 2=删除
|
||||
*/
|
||||
@TableLogic
|
||||
private Long delFlag;
|
||||
|
||||
}
|
||||
@@ -44,14 +44,23 @@ public class CostProdMetricBo extends BaseEntity {
|
||||
private String metricFormula;
|
||||
|
||||
/**
|
||||
* 指标计算结果值
|
||||
* 单价
|
||||
*/
|
||||
private BigDecimal metricValue;
|
||||
|
||||
/**
|
||||
* 是否使用单价 0=否 1=是
|
||||
*/
|
||||
private Integer usePrice;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 标签
|
||||
*/
|
||||
private String tags;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
package com.klp.cost.domain.bo;
|
||||
|
||||
import com.klp.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
/**
|
||||
* 生产指标计算结果业务对象 cost_prod_metric_result
|
||||
*
|
||||
* @author klp
|
||||
* @date 2026-06-17
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class CostProdMetricResultBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
private Long resultId;
|
||||
|
||||
/**
|
||||
* 报表ID(关联生产日报)
|
||||
*/
|
||||
private Long reportId;
|
||||
|
||||
/**
|
||||
* 指标ID(关联cost_prod_metric)
|
||||
*/
|
||||
private Long metricId;
|
||||
|
||||
/**
|
||||
* 计算日期
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date metricDate;
|
||||
|
||||
/**
|
||||
* 班组
|
||||
*/
|
||||
private String teamGroup;
|
||||
|
||||
/**
|
||||
* 计算值
|
||||
*/
|
||||
private BigDecimal calcValue;
|
||||
|
||||
/**
|
||||
* 标签
|
||||
*/
|
||||
private String tags;
|
||||
|
||||
/**
|
||||
* 要删除的主键ID集合
|
||||
*/
|
||||
private List<Long> resultIds;
|
||||
|
||||
/**
|
||||
* 要批量插入的数据集合
|
||||
*/
|
||||
private List<CostProdMetricResultBo> prodMetricResultList;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.klp.cost.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.klp.common.annotation.ExcelDictFormat;
|
||||
import com.klp.common.convert.ExcelDictConvert;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
/**
|
||||
* 生产指标计算结果视图对象 cost_prod_metric_result
|
||||
*
|
||||
* @author klp
|
||||
* @date 2026-06-17
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class CostProdMetricResultVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@ExcelProperty(value = "主键ID")
|
||||
private Long resultId;
|
||||
|
||||
/**
|
||||
* 报表ID(关联生产日报)
|
||||
*/
|
||||
@ExcelProperty(value = "报表ID", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "关=联生产日报")
|
||||
private Long reportId;
|
||||
|
||||
/**
|
||||
* 指标ID(关联cost_prod_metric)
|
||||
*/
|
||||
@ExcelProperty(value = "指标ID", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "关=联cost_prod_metric")
|
||||
private Long metricId;
|
||||
|
||||
/**
|
||||
* 计算日期
|
||||
*/
|
||||
@ExcelProperty(value = "计算日期")
|
||||
private Date metricDate;
|
||||
|
||||
/**
|
||||
* 班组
|
||||
*/
|
||||
@ExcelProperty(value = "班组")
|
||||
private String teamGroup;
|
||||
|
||||
/**
|
||||
* 计算值
|
||||
*/
|
||||
@ExcelProperty(value = "计算值")
|
||||
private BigDecimal calcValue;
|
||||
|
||||
/**
|
||||
* 标签
|
||||
*/
|
||||
@ExcelProperty(value = "标签")
|
||||
private String tags;
|
||||
|
||||
|
||||
}
|
||||
@@ -52,16 +52,27 @@ public class CostProdMetricVo {
|
||||
private String metricFormula;
|
||||
|
||||
/**
|
||||
* 指标计算结果值
|
||||
* 单价
|
||||
*/
|
||||
@ExcelProperty(value = "指标计算结果值")
|
||||
@ExcelProperty(value = "单价")
|
||||
private BigDecimal metricValue;
|
||||
|
||||
/**
|
||||
* 是否使用单价 0=否 1=是
|
||||
*/
|
||||
@ExcelProperty(value = "是否使用单价")
|
||||
private Integer usePrice;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 标签
|
||||
*/
|
||||
@ExcelProperty(value = "标签")
|
||||
private String tags;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.klp.cost.mapper;
|
||||
|
||||
import com.klp.cost.domain.CostProdMetricResult;
|
||||
import com.klp.cost.domain.vo.CostProdMetricResultVo;
|
||||
import com.klp.common.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 生产指标计算结果Mapper接口
|
||||
*
|
||||
* @author klp
|
||||
* @date 2026-06-17
|
||||
*/
|
||||
public interface CostProdMetricResultMapper extends BaseMapperPlus<CostProdMetricResultMapper, CostProdMetricResult, CostProdMetricResultVo> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.klp.cost.service;
|
||||
|
||||
import com.klp.cost.domain.CostProdMetricResult;
|
||||
import com.klp.cost.domain.vo.CostProdMetricResultVo;
|
||||
import com.klp.cost.domain.bo.CostProdMetricResultBo;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
import com.klp.common.core.domain.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 生产指标计算结果Service接口
|
||||
*
|
||||
* @author klp
|
||||
* @date 2026-06-17
|
||||
*/
|
||||
public interface ICostProdMetricResultService {
|
||||
|
||||
/**
|
||||
* 查询生产指标计算结果
|
||||
*/
|
||||
CostProdMetricResultVo queryById(Long resultId);
|
||||
|
||||
/**
|
||||
* 查询生产指标计算结果列表
|
||||
*/
|
||||
TableDataInfo<CostProdMetricResultVo> queryPageList(CostProdMetricResultBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询生产指标计算结果列表
|
||||
*/
|
||||
List<CostProdMetricResultVo> queryList(CostProdMetricResultBo bo);
|
||||
|
||||
/**
|
||||
* 新增生产指标计算结果
|
||||
*/
|
||||
Boolean insertByBo(CostProdMetricResultBo bo);
|
||||
|
||||
/**
|
||||
* 修改生产指标计算结果
|
||||
*/
|
||||
Boolean updateByBo(CostProdMetricResultBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除生产指标计算结果信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
/**
|
||||
* 批量保存生产指标计算结果(先删除再插入)
|
||||
*/
|
||||
Boolean batchSaveWithDelete(CostProdMetricResultBo bo);
|
||||
}
|
||||
@@ -0,0 +1,135 @@
|
||||
package com.klp.cost.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
import com.klp.common.core.domain.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.klp.common.utils.StringUtils;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import com.klp.cost.domain.bo.CostProdMetricResultBo;
|
||||
import com.klp.cost.domain.vo.CostProdMetricResultVo;
|
||||
import com.klp.cost.domain.CostProdMetricResult;
|
||||
import com.klp.cost.mapper.CostProdMetricResultMapper;
|
||||
import com.klp.cost.service.ICostProdMetricResultService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 生产指标计算结果Service业务层处理
|
||||
*
|
||||
* @author klp
|
||||
* @date 2026-06-17
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class CostProdMetricResultServiceImpl implements ICostProdMetricResultService {
|
||||
|
||||
private final CostProdMetricResultMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询生产指标计算结果
|
||||
*/
|
||||
@Override
|
||||
public CostProdMetricResultVo queryById(Long resultId){
|
||||
return baseMapper.selectVoById(resultId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询生产指标计算结果列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<CostProdMetricResultVo> queryPageList(CostProdMetricResultBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<CostProdMetricResult> lqw = buildQueryWrapper(bo);
|
||||
Page<CostProdMetricResultVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询生产指标计算结果列表
|
||||
*/
|
||||
@Override
|
||||
public List<CostProdMetricResultVo> queryList(CostProdMetricResultBo bo) {
|
||||
LambdaQueryWrapper<CostProdMetricResult> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<CostProdMetricResult> buildQueryWrapper(CostProdMetricResultBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<CostProdMetricResult> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(bo.getReportId() != null, CostProdMetricResult::getReportId, bo.getReportId());
|
||||
lqw.eq(bo.getMetricId() != null, CostProdMetricResult::getMetricId, bo.getMetricId());
|
||||
lqw.eq(bo.getMetricDate() != null, CostProdMetricResult::getMetricDate, bo.getMetricDate());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getTeamGroup()), CostProdMetricResult::getTeamGroup, bo.getTeamGroup());
|
||||
lqw.eq(bo.getCalcValue() != null, CostProdMetricResult::getCalcValue, bo.getCalcValue());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getTags()), CostProdMetricResult::getTags, bo.getTags());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增生产指标计算结果
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(CostProdMetricResultBo bo) {
|
||||
CostProdMetricResult add = BeanUtil.toBean(bo, CostProdMetricResult.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setResultId(add.getResultId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改生产指标计算结果
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(CostProdMetricResultBo bo) {
|
||||
CostProdMetricResult update = BeanUtil.toBean(bo, CostProdMetricResult.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(CostProdMetricResult entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除生产指标计算结果
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量保存(先删除再插入)
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean batchSaveWithDelete(CostProdMetricResultBo bo) {
|
||||
if (CollUtil.isNotEmpty(bo.getProdMetricResultList())) {
|
||||
if (CollUtil.isNotEmpty(bo.getResultIds())) {
|
||||
baseMapper.deleteBatchIds(bo.getResultIds());
|
||||
}
|
||||
List<CostProdMetricResult> list = bo.getProdMetricResultList().stream()
|
||||
.map(item -> BeanUtil.toBean(item, CostProdMetricResult.class))
|
||||
.collect(Collectors.toList());
|
||||
return baseMapper.insertBatch(list);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -66,6 +66,8 @@ public class CostProdMetricServiceImpl implements ICostProdMetricService {
|
||||
lqw.like(StringUtils.isNotBlank(bo.getMetricName()), CostProdMetric::getMetricName, bo.getMetricName());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getMetricFormula()), CostProdMetric::getMetricFormula, bo.getMetricFormula());
|
||||
lqw.eq(bo.getMetricValue() != null, CostProdMetric::getMetricValue, bo.getMetricValue());
|
||||
lqw.eq(bo.getUsePrice() != null, CostProdMetric::getUsePrice, bo.getUsePrice());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getTags()), CostProdMetric::getTags, bo.getTags());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
|
||||
@@ -71,7 +71,10 @@ public class CostProdReportServiceImpl implements ICostProdReportService {
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getLineType()), CostProdReport::getLineType, bo.getLineType());
|
||||
lqw.eq(bo.getInputWeight() != null, CostProdReport::getInputWeight, bo.getInputWeight());
|
||||
lqw.eq(bo.getOutputWeight() != null, CostProdReport::getOutputWeight, bo.getOutputWeight());
|
||||
lqw.apply(bo.getReportDate() != null, "DATE_FORMAT(report_date, '%Y-%m') = {0}", bo.getReportDate());
|
||||
if (bo.getReportDate() != null) {
|
||||
String monthStr = new java.text.SimpleDateFormat("yyyy-MM").format(bo.getReportDate());
|
||||
lqw.apply("DATE_FORMAT(report_date, '%Y-%m') = {0}", monthStr);
|
||||
}
|
||||
return lqw;
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="metricName" column="metric_name"/>
|
||||
<result property="metricFormula" column="metric_formula"/>
|
||||
<result property="metricValue" column="metric_value"/>
|
||||
<result property="usePrice" column="use_price"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="tags" column="tags"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
<?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.klp.cost.mapper.CostProdMetricResultMapper">
|
||||
|
||||
<resultMap type="com.klp.cost.domain.CostProdMetricResult" id="CostProdMetricResultResult">
|
||||
<result property="resultId" column="result_id"/>
|
||||
<result property="reportId" column="report_id"/>
|
||||
<result property="metricId" column="metric_id"/>
|
||||
<result property="metricDate" column="metric_date"/>
|
||||
<result property="teamGroup" column="team_group"/>
|
||||
<result property="calcValue" column="calc_value"/>
|
||||
<result property="tags" column="tags"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -12,4 +12,9 @@ import com.klp.common.core.mapper.BaseMapperPlus;
|
||||
*/
|
||||
public interface CrmCustomerMapper extends BaseMapperPlus<CrmCustomerMapper, CrmCustomer, CrmCustomerVo> {
|
||||
|
||||
/**
|
||||
* 查询当前最大的customer_code,用于自动生成新编码
|
||||
*/
|
||||
String selectMaxCustomerCode();
|
||||
|
||||
}
|
||||
|
||||
@@ -91,6 +91,25 @@ public class CrmCustomerServiceImpl implements ICrmCustomerService {
|
||||
@Override
|
||||
public Boolean insertByBo(CrmCustomerBo bo) {
|
||||
CrmCustomer add = BeanUtil.toBean(bo, CrmCustomer.class);
|
||||
// 自动生成customer_code:查询最大编码并加1
|
||||
if (StringUtils.isBlank(add.getCustomerCode())) {
|
||||
String maxCode = baseMapper.selectMaxCustomerCode();
|
||||
if (StringUtils.isBlank(maxCode)) {
|
||||
add.setCustomerCode("00001");
|
||||
} else {
|
||||
// 提取末尾数字后缀并递增,支持纯数字("00001")和带前缀("KH00001")两种格式
|
||||
java.util.regex.Pattern pattern = java.util.regex.Pattern.compile("^(.*?)(\\d+)$");
|
||||
java.util.regex.Matcher matcher = pattern.matcher(maxCode);
|
||||
if (matcher.matches()) {
|
||||
String prefix = matcher.group(1);
|
||||
String numStr = matcher.group(2);
|
||||
long num = Long.parseLong(numStr) + 1;
|
||||
add.setCustomerCode(prefix + String.format("%0" + numStr.length() + "d", num));
|
||||
} else {
|
||||
add.setCustomerCode(maxCode + "1");
|
||||
}
|
||||
}
|
||||
}
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
|
||||
@@ -250,11 +250,9 @@ public class CrmOrderServiceImpl implements ICrmOrderService {
|
||||
qw.eq("co.del_flag", 0);
|
||||
//排序规则:
|
||||
// 1. 置顶优先 (is_top=1 排在前面)
|
||||
// 2. 状态为1(已生效)的排在前面
|
||||
// 3. 创建时间倒序
|
||||
// 2. 合同号倒序(KLPY+年月日+序号,降序最新在前)
|
||||
qw.orderByDesc("co.is_top")
|
||||
.orderByDesc("CASE WHEN co.status = 1 THEN 1 ELSE 0 END")
|
||||
.orderByDesc("co.create_time");
|
||||
.orderByDesc("co.contract_code");
|
||||
return qw;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,5 +23,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectMaxCustomerCode" resultType="String">
|
||||
SELECT customer_code FROM crm_customer WHERE del_flag = 0 ORDER BY LENGTH(customer_code) DESC, customer_code DESC LIMIT 1
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
19
klp-flow/pom.xml
Normal file
19
klp-flow/pom.xml
Normal file
@@ -0,0 +1,19 @@
|
||||
<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.klp</groupId>
|
||||
<artifactId>klp-oa</artifactId>
|
||||
<version>0.8.3</version>
|
||||
</parent>
|
||||
<artifactId>klp-flow</artifactId>
|
||||
<name>klp-flow</name>
|
||||
<description>流程管理模块</description>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.klp</groupId>
|
||||
<artifactId>klp-common</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -0,0 +1,99 @@
|
||||
package com.klp.flow.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.*;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.klp.common.annotation.RepeatSubmit;
|
||||
import com.klp.common.annotation.Log;
|
||||
import com.klp.common.core.controller.BaseController;
|
||||
import com.klp.common.core.domain.PageQuery;
|
||||
import com.klp.common.core.domain.R;
|
||||
import com.klp.common.core.validate.AddGroup;
|
||||
import com.klp.common.core.validate.EditGroup;
|
||||
import com.klp.common.enums.BusinessType;
|
||||
import com.klp.common.utils.poi.ExcelUtil;
|
||||
import com.klp.flow.domain.vo.TsAcceptCoilRelVo;
|
||||
import com.klp.flow.domain.bo.TsAcceptCoilRelBo;
|
||||
import com.klp.flow.service.ITsAcceptCoilRelService;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 受理单关联钢卷中间
|
||||
*
|
||||
* @author klp
|
||||
* @date 2026-06-18
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/flow/acceptCoilRel")
|
||||
public class TsAcceptCoilRelController extends BaseController {
|
||||
|
||||
private final ITsAcceptCoilRelService iTsAcceptCoilRelService;
|
||||
|
||||
/**
|
||||
* 查询受理单关联钢卷中间列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TsAcceptCoilRelVo> list(TsAcceptCoilRelBo bo, PageQuery pageQuery) {
|
||||
return iTsAcceptCoilRelService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出受理单关联钢卷中间列表
|
||||
*/
|
||||
@Log(title = "受理单关联钢卷中间", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TsAcceptCoilRelBo bo, HttpServletResponse response) {
|
||||
List<TsAcceptCoilRelVo> list = iTsAcceptCoilRelService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "受理单关联钢卷中间", TsAcceptCoilRelVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取受理单关联钢卷中间详细信息
|
||||
*
|
||||
* @param relId 主键
|
||||
*/
|
||||
@GetMapping("/{relId}")
|
||||
public R<TsAcceptCoilRelVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long relId) {
|
||||
return R.ok(iTsAcceptCoilRelService.queryById(relId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增受理单关联钢卷中间
|
||||
*/
|
||||
@Log(title = "受理单关联钢卷中间", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TsAcceptCoilRelBo bo) {
|
||||
return toAjax(iTsAcceptCoilRelService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改受理单关联钢卷中间
|
||||
*/
|
||||
@Log(title = "受理单关联钢卷中间", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TsAcceptCoilRelBo bo) {
|
||||
return toAjax(iTsAcceptCoilRelService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除受理单关联钢卷中间
|
||||
*
|
||||
* @param relIds 主键串
|
||||
*/
|
||||
@Log(title = "受理单关联钢卷中间", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{relIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] relIds) {
|
||||
return toAjax(iTsAcceptCoilRelService.deleteWithValidByIds(Arrays.asList(relIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
package com.klp.flow.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.*;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.klp.common.annotation.RepeatSubmit;
|
||||
import com.klp.common.annotation.Log;
|
||||
import com.klp.common.core.controller.BaseController;
|
||||
import com.klp.common.core.domain.PageQuery;
|
||||
import com.klp.common.core.domain.R;
|
||||
import com.klp.common.core.validate.AddGroup;
|
||||
import com.klp.common.core.validate.EditGroup;
|
||||
import com.klp.common.enums.BusinessType;
|
||||
import com.klp.common.utils.poi.ExcelUtil;
|
||||
import com.klp.flow.domain.vo.TsComplaintAcceptVo;
|
||||
import com.klp.flow.domain.bo.TsComplaintAcceptBo;
|
||||
import com.klp.flow.service.ITsComplaintAcceptService;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 投诉受理单主
|
||||
*
|
||||
* @author klp
|
||||
* @date 2026-06-18
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/flow/complaintAccept")
|
||||
public class TsComplaintAcceptController extends BaseController {
|
||||
|
||||
private final ITsComplaintAcceptService iTsComplaintAcceptService;
|
||||
|
||||
/**
|
||||
* 查询投诉受理单主列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TsComplaintAcceptVo> list(TsComplaintAcceptBo bo, PageQuery pageQuery) {
|
||||
return iTsComplaintAcceptService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出投诉受理单主列表
|
||||
*/
|
||||
@Log(title = "投诉受理单主", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TsComplaintAcceptBo bo, HttpServletResponse response) {
|
||||
List<TsComplaintAcceptVo> list = iTsComplaintAcceptService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "投诉受理单主", TsComplaintAcceptVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取投诉受理单主详细信息
|
||||
*
|
||||
* @param acceptId 主键
|
||||
*/
|
||||
@GetMapping("/{acceptId}")
|
||||
public R<TsComplaintAcceptVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long acceptId) {
|
||||
return R.ok(iTsComplaintAcceptService.queryById(acceptId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增投诉受理单主
|
||||
*/
|
||||
@Log(title = "投诉受理单主", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TsComplaintAcceptBo bo) {
|
||||
return toAjax(iTsComplaintAcceptService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改投诉受理单主
|
||||
*/
|
||||
@Log(title = "投诉受理单主", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TsComplaintAcceptBo bo) {
|
||||
return toAjax(iTsComplaintAcceptService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除投诉受理单主
|
||||
*
|
||||
* @param acceptIds 主键串
|
||||
*/
|
||||
@Log(title = "投诉受理单主", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{acceptIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] acceptIds) {
|
||||
return toAjax(iTsComplaintAcceptService.deleteWithValidByIds(Arrays.asList(acceptIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
package com.klp.flow.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.*;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.klp.common.annotation.RepeatSubmit;
|
||||
import com.klp.common.annotation.Log;
|
||||
import com.klp.common.core.controller.BaseController;
|
||||
import com.klp.common.core.domain.PageQuery;
|
||||
import com.klp.common.core.domain.R;
|
||||
import com.klp.common.core.validate.AddGroup;
|
||||
import com.klp.common.core.validate.EditGroup;
|
||||
import com.klp.common.enums.BusinessType;
|
||||
import com.klp.common.utils.poi.ExcelUtil;
|
||||
import com.klp.flow.domain.vo.TsComplaintTaskVo;
|
||||
import com.klp.flow.domain.bo.TsComplaintTaskBo;
|
||||
import com.klp.flow.service.ITsComplaintTaskService;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 各部门投诉代办任务&意见
|
||||
*
|
||||
* @author klp
|
||||
* @date 2026-06-18
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/flow/complaintTask")
|
||||
public class TsComplaintTaskController extends BaseController {
|
||||
|
||||
private final ITsComplaintTaskService iTsComplaintTaskService;
|
||||
|
||||
/**
|
||||
* 查询各部门投诉代办任务&意见列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TsComplaintTaskVo> list(TsComplaintTaskBo bo, PageQuery pageQuery) {
|
||||
return iTsComplaintTaskService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出各部门投诉代办任务&意见列表
|
||||
*/
|
||||
@Log(title = "各部门投诉代办任务&意见", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TsComplaintTaskBo bo, HttpServletResponse response) {
|
||||
List<TsComplaintTaskVo> list = iTsComplaintTaskService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "各部门投诉代办任务&意见", TsComplaintTaskVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取各部门投诉代办任务&意见详细信息
|
||||
*
|
||||
* @param taskId 主键
|
||||
*/
|
||||
@GetMapping("/{taskId}")
|
||||
public R<TsComplaintTaskVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long taskId) {
|
||||
return R.ok(iTsComplaintTaskService.queryById(taskId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增各部门投诉代办任务&意见
|
||||
*/
|
||||
@Log(title = "各部门投诉代办任务&意见", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TsComplaintTaskBo bo) {
|
||||
return toAjax(iTsComplaintTaskService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改各部门投诉代办任务&意见
|
||||
*/
|
||||
@Log(title = "各部门投诉代办任务&意见", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TsComplaintTaskBo bo) {
|
||||
return toAjax(iTsComplaintTaskService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除各部门投诉代办任务&意见
|
||||
*
|
||||
* @param taskIds 主键串
|
||||
*/
|
||||
@Log(title = "各部门投诉代办任务&意见", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{taskIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] taskIds) {
|
||||
return toAjax(iTsComplaintTaskService.deleteWithValidByIds(Arrays.asList(taskIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
package com.klp.flow.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.*;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.klp.common.annotation.RepeatSubmit;
|
||||
import com.klp.common.annotation.Log;
|
||||
import com.klp.common.core.controller.BaseController;
|
||||
import com.klp.common.core.domain.PageQuery;
|
||||
import com.klp.common.core.domain.R;
|
||||
import com.klp.common.core.validate.AddGroup;
|
||||
import com.klp.common.core.validate.EditGroup;
|
||||
import com.klp.common.enums.BusinessType;
|
||||
import com.klp.common.utils.poi.ExcelUtil;
|
||||
import com.klp.flow.domain.vo.TsPlanExecuteRelVo;
|
||||
import com.klp.flow.domain.bo.TsPlanExecuteRelBo;
|
||||
import com.klp.flow.service.ITsPlanExecuteRelService;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 最终方案下发部门及执行反馈
|
||||
*
|
||||
* @author klp
|
||||
* @date 2026-06-18
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/flow/planExecuteRel")
|
||||
public class TsPlanExecuteRelController extends BaseController {
|
||||
|
||||
private final ITsPlanExecuteRelService iTsPlanExecuteRelService;
|
||||
|
||||
/**
|
||||
* 查询最终方案下发部门及执行反馈列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TsPlanExecuteRelVo> list(TsPlanExecuteRelBo bo, PageQuery pageQuery) {
|
||||
return iTsPlanExecuteRelService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出最终方案下发部门及执行反馈列表
|
||||
*/
|
||||
@Log(title = "最终方案下发部门及执行反馈", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TsPlanExecuteRelBo bo, HttpServletResponse response) {
|
||||
List<TsPlanExecuteRelVo> list = iTsPlanExecuteRelService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "最终方案下发部门及执行反馈", TsPlanExecuteRelVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取最终方案下发部门及执行反馈详细信息
|
||||
*
|
||||
* @param relId 主键
|
||||
*/
|
||||
@GetMapping("/{relId}")
|
||||
public R<TsPlanExecuteRelVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long relId) {
|
||||
return R.ok(iTsPlanExecuteRelService.queryById(relId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增最终方案下发部门及执行反馈
|
||||
*/
|
||||
@Log(title = "最终方案下发部门及执行反馈", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TsPlanExecuteRelBo bo) {
|
||||
return toAjax(iTsPlanExecuteRelService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改最终方案下发部门及执行反馈
|
||||
*/
|
||||
@Log(title = "最终方案下发部门及执行反馈", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TsPlanExecuteRelBo bo) {
|
||||
return toAjax(iTsPlanExecuteRelService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除最终方案下发部门及执行反馈
|
||||
*
|
||||
* @param relIds 主键串
|
||||
*/
|
||||
@Log(title = "最终方案下发部门及执行反馈", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{relIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] relIds) {
|
||||
return toAjax(iTsPlanExecuteRelService.deleteWithValidByIds(Arrays.asList(relIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.klp.flow.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.klp.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
||||
/**
|
||||
* 受理单关联钢卷中间对象 ts_accept_coil_rel
|
||||
*
|
||||
* @author klp
|
||||
* @date 2026-06-18
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("ts_accept_coil_rel")
|
||||
public class TsAcceptCoilRel extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableId(value = "rel_id")
|
||||
private Long relId;
|
||||
/**
|
||||
* 投诉受理单ID
|
||||
*/
|
||||
private Long acceptId;
|
||||
/**
|
||||
* 钢卷ID
|
||||
*/
|
||||
private Long coilId;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 删除标识 0=正常 2=删除
|
||||
*/
|
||||
@TableLogic
|
||||
private Long delFlag;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
package com.klp.flow.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.klp.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
/**
|
||||
* 投诉受理单主对象 ts_complaint_accept
|
||||
*
|
||||
* @author klp
|
||||
* @date 2026-06-18
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("ts_complaint_accept")
|
||||
public class TsComplaintAccept extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
* 受理单主键
|
||||
*/
|
||||
@TableId(value = "accept_id")
|
||||
private Long acceptId;
|
||||
/**
|
||||
* 投诉编号 TS-2026-001
|
||||
*/
|
||||
private String complaintNo;
|
||||
/**
|
||||
* 投诉日期
|
||||
*/
|
||||
private Date complaintDate;
|
||||
/**
|
||||
* 投诉情况描述
|
||||
*/
|
||||
private String complaintContent;
|
||||
/**
|
||||
* 客户诉求
|
||||
*/
|
||||
private String customerDemand;
|
||||
/**
|
||||
* 客户照片凭证等
|
||||
*/
|
||||
private String file;
|
||||
/**
|
||||
* 审核状态 0待审核 1已通过 2未通过
|
||||
*/
|
||||
private Long auditStatus;
|
||||
/**
|
||||
* 审核意见
|
||||
*/
|
||||
private String auditOpinion;
|
||||
/**
|
||||
* 审核人ID
|
||||
*/
|
||||
private Long auditUserId;
|
||||
/**
|
||||
* 审核时间
|
||||
*/
|
||||
private Date auditTime;
|
||||
/**
|
||||
* 流程阶段:
|
||||
1=待审核 2=部门意见填写中 3=待总负责人汇总方案 4=方案下发执行反馈中 5=全部办结
|
||||
*/
|
||||
private Long flowStatus;
|
||||
/**
|
||||
* 总负责人ID
|
||||
*/
|
||||
private Long principalUserId;
|
||||
/**
|
||||
* 总负责人整合后的完整处理方案
|
||||
*/
|
||||
private String planContent;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 删除标识 0=正常 2=删除
|
||||
*/
|
||||
@TableLogic
|
||||
private Long delFlag;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.klp.flow.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.klp.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
/**
|
||||
* 各部门投诉代办任务&意见对象 ts_complaint_task
|
||||
*
|
||||
* @author klp
|
||||
* @date 2026-06-18
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("ts_complaint_task")
|
||||
public class TsComplaintTask extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
* 代办任务ID
|
||||
*/
|
||||
@TableId(value = "task_id")
|
||||
private Long taskId;
|
||||
/**
|
||||
* 关联投诉受理单ID
|
||||
*/
|
||||
private Long acceptId;
|
||||
/**
|
||||
* 负责部门ID(销售/质量/生产)
|
||||
*/
|
||||
private Long deptId;
|
||||
/**
|
||||
* 任务状态 0待填写意见 1已完成填写
|
||||
*/
|
||||
private Long taskStatus;
|
||||
/**
|
||||
* 意见单号
|
||||
*/
|
||||
private String fillNo;
|
||||
/**
|
||||
* 部门处理意见
|
||||
*/
|
||||
private String deptOpinion;
|
||||
/**
|
||||
* 填写意见的部门员工ID
|
||||
*/
|
||||
private Long fillUserId;
|
||||
/**
|
||||
* 意见填写时间
|
||||
*/
|
||||
private Date fillTime;
|
||||
/**
|
||||
* 意见文件
|
||||
*/
|
||||
private String fillFile;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 删除标识 0=正常 2=删除
|
||||
*/
|
||||
@TableLogic
|
||||
private Long delFlag;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.klp.flow.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.klp.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
/**
|
||||
* 最终方案下发部门及执行反馈对象 ts_plan_execute_rel
|
||||
*
|
||||
* @author klp
|
||||
* @date 2026-06-18
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("ts_plan_execute_rel")
|
||||
public class TsPlanExecuteRel extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableId(value = "rel_id")
|
||||
private Long relId;
|
||||
/**
|
||||
* 关联最终方案ID
|
||||
*/
|
||||
private Long acceptId;
|
||||
/**
|
||||
* 被下发执行的部门ID
|
||||
*/
|
||||
private Long deptId;
|
||||
/**
|
||||
* 执行状态 0待执行反馈 1已反馈完成
|
||||
*/
|
||||
private Long executeStatus;
|
||||
/**
|
||||
* 部门执行结果反馈
|
||||
*/
|
||||
private String executeResult;
|
||||
/**
|
||||
* 反馈单号
|
||||
*/
|
||||
private String feedbackNo;
|
||||
/**
|
||||
* 反馈人
|
||||
*/
|
||||
private Long feedbackUserId;
|
||||
/**
|
||||
* 反馈时间
|
||||
*/
|
||||
private Date feedbackTime;
|
||||
/**
|
||||
* 反馈文件
|
||||
*/
|
||||
private String feedbackFile;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 删除标识 0=正常 2=删除
|
||||
*/
|
||||
@TableLogic
|
||||
private Long delFlag;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.klp.flow.domain.bo;
|
||||
|
||||
import com.klp.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
|
||||
/**
|
||||
* 受理单关联钢卷中间业务对象 ts_accept_coil_rel
|
||||
*
|
||||
* @author klp
|
||||
* @date 2026-06-18
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class TsAcceptCoilRelBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Long relId;
|
||||
|
||||
/**
|
||||
* 投诉受理单ID
|
||||
*/
|
||||
private Long acceptId;
|
||||
|
||||
/**
|
||||
* 钢卷ID
|
||||
*/
|
||||
private Long coilId;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
package com.klp.flow.domain.bo;
|
||||
|
||||
import com.klp.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
/**
|
||||
* 投诉受理单主业务对象 ts_complaint_accept
|
||||
*
|
||||
* @author klp
|
||||
* @date 2026-06-18
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class TsComplaintAcceptBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 受理单主键
|
||||
*/
|
||||
private Long acceptId;
|
||||
|
||||
/**
|
||||
* 投诉编号 TS-2026-001
|
||||
*/
|
||||
private String complaintNo;
|
||||
|
||||
/**
|
||||
* 投诉日期
|
||||
*/
|
||||
private Date complaintDate;
|
||||
|
||||
/**
|
||||
* 投诉情况描述
|
||||
*/
|
||||
private String complaintContent;
|
||||
|
||||
/**
|
||||
* 客户诉求
|
||||
*/
|
||||
private String customerDemand;
|
||||
|
||||
/**
|
||||
* 客户照片凭证等
|
||||
*/
|
||||
private String file;
|
||||
|
||||
/**
|
||||
* 审核状态 0待审核 1已通过 2未通过
|
||||
*/
|
||||
private Long auditStatus;
|
||||
|
||||
/**
|
||||
* 审核意见
|
||||
*/
|
||||
private String auditOpinion;
|
||||
|
||||
/**
|
||||
* 审核人ID
|
||||
*/
|
||||
private Long auditUserId;
|
||||
|
||||
/**
|
||||
* 审核时间
|
||||
*/
|
||||
private Date auditTime;
|
||||
|
||||
/**
|
||||
* 流程阶段:
|
||||
1=待审核 2=部门意见填写中 3=待总负责人汇总方案 4=方案下发执行反馈中 5=全部办结
|
||||
*/
|
||||
private Long flowStatus;
|
||||
|
||||
/**
|
||||
* 总负责人ID
|
||||
*/
|
||||
private Long principalUserId;
|
||||
|
||||
/**
|
||||
* 总负责人整合后的完整处理方案
|
||||
*/
|
||||
private String planContent;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package com.klp.flow.domain.bo;
|
||||
|
||||
import com.klp.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
/**
|
||||
* 各部门投诉代办任务&意见业务对象 ts_complaint_task
|
||||
*
|
||||
* @author klp
|
||||
* @date 2026-06-18
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class TsComplaintTaskBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 代办任务ID
|
||||
*/
|
||||
private Long taskId;
|
||||
|
||||
/**
|
||||
* 关联投诉受理单ID
|
||||
*/
|
||||
private Long acceptId;
|
||||
|
||||
/**
|
||||
* 负责部门ID(销售/质量/生产)
|
||||
*/
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 任务状态 0待填写意见 1已完成填写
|
||||
*/
|
||||
private Long taskStatus;
|
||||
|
||||
/**
|
||||
* 意见单号
|
||||
*/
|
||||
private String fillNo;
|
||||
|
||||
/**
|
||||
* 部门处理意见
|
||||
*/
|
||||
private String deptOpinion;
|
||||
|
||||
/**
|
||||
* 填写意见的部门员工ID
|
||||
*/
|
||||
private Long fillUserId;
|
||||
|
||||
/**
|
||||
* 意见填写时间
|
||||
*/
|
||||
private Date fillTime;
|
||||
|
||||
/**
|
||||
* 意见文件
|
||||
*/
|
||||
private String fillFile;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package com.klp.flow.domain.bo;
|
||||
|
||||
import com.klp.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
/**
|
||||
* 最终方案下发部门及执行反馈业务对象 ts_plan_execute_rel
|
||||
*
|
||||
* @author klp
|
||||
* @date 2026-06-18
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class TsPlanExecuteRelBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Long relId;
|
||||
|
||||
/**
|
||||
* 关联最终方案ID
|
||||
*/
|
||||
private Long acceptId;
|
||||
|
||||
/**
|
||||
* 被下发执行的部门ID
|
||||
*/
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 执行状态 0待执行反馈 1已反馈完成
|
||||
*/
|
||||
private Long executeStatus;
|
||||
|
||||
/**
|
||||
* 部门执行结果反馈
|
||||
*/
|
||||
private String executeResult;
|
||||
|
||||
/**
|
||||
* 反馈单号
|
||||
*/
|
||||
private String feedbackNo;
|
||||
|
||||
/**
|
||||
* 反馈人
|
||||
*/
|
||||
private Long feedbackUserId;
|
||||
|
||||
/**
|
||||
* 反馈时间
|
||||
*/
|
||||
private Date feedbackTime;
|
||||
|
||||
/**
|
||||
* 反馈文件
|
||||
*/
|
||||
private String feedbackFile;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.klp.flow.domain.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.klp.common.annotation.ExcelDictFormat;
|
||||
import com.klp.common.convert.ExcelDictConvert;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
/**
|
||||
* 受理单关联钢卷中间视图对象 ts_accept_coil_rel
|
||||
*
|
||||
* @author klp
|
||||
* @date 2026-06-18
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class TsAcceptCoilRelVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ExcelProperty(value = "")
|
||||
private Long relId;
|
||||
|
||||
/**
|
||||
* 投诉受理单ID
|
||||
*/
|
||||
@ExcelProperty(value = "投诉受理单ID")
|
||||
private Long acceptId;
|
||||
|
||||
/**
|
||||
* 钢卷ID
|
||||
*/
|
||||
@ExcelProperty(value = "钢卷ID")
|
||||
private Long coilId;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
package com.klp.flow.domain.vo;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.klp.common.annotation.ExcelDictFormat;
|
||||
import com.klp.common.convert.ExcelDictConvert;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
/**
|
||||
* 投诉受理单主视图对象 ts_complaint_accept
|
||||
*
|
||||
* @author klp
|
||||
* @date 2026-06-18
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class TsComplaintAcceptVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 受理单主键
|
||||
*/
|
||||
@ExcelProperty(value = "受理单主键")
|
||||
private Long acceptId;
|
||||
|
||||
/**
|
||||
* 投诉编号 TS-2026-001
|
||||
*/
|
||||
@ExcelProperty(value = "投诉编号 TS-2026-001")
|
||||
private String complaintNo;
|
||||
|
||||
/**
|
||||
* 投诉日期
|
||||
*/
|
||||
@ExcelProperty(value = "投诉日期")
|
||||
private Date complaintDate;
|
||||
|
||||
/**
|
||||
* 投诉情况描述
|
||||
*/
|
||||
@ExcelProperty(value = "投诉情况描述")
|
||||
private String complaintContent;
|
||||
|
||||
/**
|
||||
* 客户诉求
|
||||
*/
|
||||
@ExcelProperty(value = "客户诉求")
|
||||
private String customerDemand;
|
||||
|
||||
/**
|
||||
* 客户照片凭证等
|
||||
*/
|
||||
@ExcelProperty(value = "客户照片凭证等")
|
||||
private String file;
|
||||
|
||||
/**
|
||||
* 审核状态 0待审核 1已通过 2未通过
|
||||
*/
|
||||
@ExcelProperty(value = "审核状态 0待审核 1已通过 2未通过")
|
||||
private Long auditStatus;
|
||||
|
||||
/**
|
||||
* 审核意见
|
||||
*/
|
||||
@ExcelProperty(value = "审核意见")
|
||||
private String auditOpinion;
|
||||
|
||||
/**
|
||||
* 审核人ID
|
||||
*/
|
||||
@ExcelProperty(value = "审核人ID")
|
||||
private Long auditUserId;
|
||||
|
||||
/**
|
||||
* 审核时间
|
||||
*/
|
||||
@ExcelProperty(value = "审核时间")
|
||||
private Date auditTime;
|
||||
|
||||
/**
|
||||
* 流程阶段:
|
||||
1=待审核 2=部门意见填写中 3=待总负责人汇总方案 4=方案下发执行反馈中 5=全部办结
|
||||
*/
|
||||
@ExcelProperty(value = "流程阶段")
|
||||
private Long flowStatus;
|
||||
|
||||
/**
|
||||
* 总负责人ID
|
||||
*/
|
||||
@ExcelProperty(value = "总负责人ID")
|
||||
private Long principalUserId;
|
||||
|
||||
/**
|
||||
* 总负责人整合后的完整处理方案
|
||||
*/
|
||||
@ExcelProperty(value = "总负责人整合后的完整处理方案")
|
||||
private String planContent;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
package com.klp.flow.domain.vo;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.klp.common.annotation.ExcelDictFormat;
|
||||
import com.klp.common.convert.ExcelDictConvert;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
/**
|
||||
* 各部门投诉代办任务&意见视图对象 ts_complaint_task
|
||||
*
|
||||
* @author klp
|
||||
* @date 2026-06-18
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class TsComplaintTaskVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 代办任务ID
|
||||
*/
|
||||
@ExcelProperty(value = "代办任务ID")
|
||||
private Long taskId;
|
||||
|
||||
/**
|
||||
* 关联投诉受理单ID
|
||||
*/
|
||||
@ExcelProperty(value = "关联投诉受理单ID")
|
||||
private Long acceptId;
|
||||
|
||||
/**
|
||||
* 负责部门ID(销售/质量/生产)
|
||||
*/
|
||||
@ExcelProperty(value = "负责部门ID", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "销=售/质量/生产")
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 任务状态 0待填写意见 1已完成填写
|
||||
*/
|
||||
@ExcelProperty(value = "任务状态 0待填写意见 1已完成填写")
|
||||
private Long taskStatus;
|
||||
|
||||
/**
|
||||
* 意见单号
|
||||
*/
|
||||
@ExcelProperty(value = "意见单号")
|
||||
private String fillNo;
|
||||
|
||||
/**
|
||||
* 部门处理意见
|
||||
*/
|
||||
@ExcelProperty(value = "部门处理意见")
|
||||
private String deptOpinion;
|
||||
|
||||
/**
|
||||
* 填写意见的部门员工ID
|
||||
*/
|
||||
@ExcelProperty(value = "填写意见的部门员工ID")
|
||||
private Long fillUserId;
|
||||
|
||||
/**
|
||||
* 意见填写时间
|
||||
*/
|
||||
@ExcelProperty(value = "意见填写时间")
|
||||
private Date fillTime;
|
||||
|
||||
/**
|
||||
* 意见文件
|
||||
*/
|
||||
@ExcelProperty(value = "意见文件")
|
||||
private String fillFile;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
package com.klp.flow.domain.vo;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.klp.common.annotation.ExcelDictFormat;
|
||||
import com.klp.common.convert.ExcelDictConvert;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
/**
|
||||
* 最终方案下发部门及执行反馈视图对象 ts_plan_execute_rel
|
||||
*
|
||||
* @author klp
|
||||
* @date 2026-06-18
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class TsPlanExecuteRelVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ExcelProperty(value = "")
|
||||
private Long relId;
|
||||
|
||||
/**
|
||||
* 关联最终方案ID
|
||||
*/
|
||||
@ExcelProperty(value = "关联最终方案ID")
|
||||
private Long acceptId;
|
||||
|
||||
/**
|
||||
* 被下发执行的部门ID
|
||||
*/
|
||||
@ExcelProperty(value = "被下发执行的部门ID")
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 执行状态 0待执行反馈 1已反馈完成
|
||||
*/
|
||||
@ExcelProperty(value = "执行状态 0待执行反馈 1已反馈完成")
|
||||
private Long executeStatus;
|
||||
|
||||
/**
|
||||
* 部门执行结果反馈
|
||||
*/
|
||||
@ExcelProperty(value = "部门执行结果反馈")
|
||||
private String executeResult;
|
||||
|
||||
/**
|
||||
* 反馈单号
|
||||
*/
|
||||
@ExcelProperty(value = "反馈单号")
|
||||
private String feedbackNo;
|
||||
|
||||
/**
|
||||
* 反馈人
|
||||
*/
|
||||
@ExcelProperty(value = "反馈人")
|
||||
private Long feedbackUserId;
|
||||
|
||||
/**
|
||||
* 反馈时间
|
||||
*/
|
||||
@ExcelProperty(value = "反馈时间")
|
||||
private Date feedbackTime;
|
||||
|
||||
/**
|
||||
* 反馈文件
|
||||
*/
|
||||
@ExcelProperty(value = "反馈文件")
|
||||
private String feedbackFile;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.klp.flow.mapper;
|
||||
|
||||
import com.klp.flow.domain.TsAcceptCoilRel;
|
||||
import com.klp.flow.domain.vo.TsAcceptCoilRelVo;
|
||||
import com.klp.common.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 受理单关联钢卷中间Mapper接口
|
||||
*
|
||||
* @author klp
|
||||
* @date 2026-06-18
|
||||
*/
|
||||
public interface TsAcceptCoilRelMapper extends BaseMapperPlus<TsAcceptCoilRelMapper, TsAcceptCoilRel, TsAcceptCoilRelVo> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.klp.flow.mapper;
|
||||
|
||||
import com.klp.flow.domain.TsComplaintAccept;
|
||||
import com.klp.flow.domain.vo.TsComplaintAcceptVo;
|
||||
import com.klp.common.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 投诉受理单主Mapper接口
|
||||
*
|
||||
* @author klp
|
||||
* @date 2026-06-18
|
||||
*/
|
||||
public interface TsComplaintAcceptMapper extends BaseMapperPlus<TsComplaintAcceptMapper, TsComplaintAccept, TsComplaintAcceptVo> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.klp.flow.mapper;
|
||||
|
||||
import com.klp.flow.domain.TsComplaintTask;
|
||||
import com.klp.flow.domain.vo.TsComplaintTaskVo;
|
||||
import com.klp.common.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 各部门投诉代办任务&意见Mapper接口
|
||||
*
|
||||
* @author klp
|
||||
* @date 2026-06-18
|
||||
*/
|
||||
public interface TsComplaintTaskMapper extends BaseMapperPlus<TsComplaintTaskMapper, TsComplaintTask, TsComplaintTaskVo> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.klp.flow.mapper;
|
||||
|
||||
import com.klp.flow.domain.TsPlanExecuteRel;
|
||||
import com.klp.flow.domain.vo.TsPlanExecuteRelVo;
|
||||
import com.klp.common.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 最终方案下发部门及执行反馈Mapper接口
|
||||
*
|
||||
* @author klp
|
||||
* @date 2026-06-18
|
||||
*/
|
||||
public interface TsPlanExecuteRelMapper extends BaseMapperPlus<TsPlanExecuteRelMapper, TsPlanExecuteRel, TsPlanExecuteRelVo> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.klp.flow.service;
|
||||
|
||||
import com.klp.flow.domain.TsAcceptCoilRel;
|
||||
import com.klp.flow.domain.vo.TsAcceptCoilRelVo;
|
||||
import com.klp.flow.domain.bo.TsAcceptCoilRelBo;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
import com.klp.common.core.domain.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 受理单关联钢卷中间Service接口
|
||||
*
|
||||
* @author klp
|
||||
* @date 2026-06-18
|
||||
*/
|
||||
public interface ITsAcceptCoilRelService {
|
||||
|
||||
/**
|
||||
* 查询受理单关联钢卷中间
|
||||
*/
|
||||
TsAcceptCoilRelVo queryById(Long relId);
|
||||
|
||||
/**
|
||||
* 查询受理单关联钢卷中间列表
|
||||
*/
|
||||
TableDataInfo<TsAcceptCoilRelVo> queryPageList(TsAcceptCoilRelBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询受理单关联钢卷中间列表
|
||||
*/
|
||||
List<TsAcceptCoilRelVo> queryList(TsAcceptCoilRelBo bo);
|
||||
|
||||
/**
|
||||
* 新增受理单关联钢卷中间
|
||||
*/
|
||||
Boolean insertByBo(TsAcceptCoilRelBo bo);
|
||||
|
||||
/**
|
||||
* 修改受理单关联钢卷中间
|
||||
*/
|
||||
Boolean updateByBo(TsAcceptCoilRelBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除受理单关联钢卷中间信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.klp.flow.service;
|
||||
|
||||
import com.klp.flow.domain.TsComplaintAccept;
|
||||
import com.klp.flow.domain.vo.TsComplaintAcceptVo;
|
||||
import com.klp.flow.domain.bo.TsComplaintAcceptBo;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
import com.klp.common.core.domain.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 投诉受理单主Service接口
|
||||
*
|
||||
* @author klp
|
||||
* @date 2026-06-18
|
||||
*/
|
||||
public interface ITsComplaintAcceptService {
|
||||
|
||||
/**
|
||||
* 查询投诉受理单主
|
||||
*/
|
||||
TsComplaintAcceptVo queryById(Long acceptId);
|
||||
|
||||
/**
|
||||
* 查询投诉受理单主列表
|
||||
*/
|
||||
TableDataInfo<TsComplaintAcceptVo> queryPageList(TsComplaintAcceptBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询投诉受理单主列表
|
||||
*/
|
||||
List<TsComplaintAcceptVo> queryList(TsComplaintAcceptBo bo);
|
||||
|
||||
/**
|
||||
* 新增投诉受理单主
|
||||
*/
|
||||
Boolean insertByBo(TsComplaintAcceptBo bo);
|
||||
|
||||
/**
|
||||
* 修改投诉受理单主
|
||||
*/
|
||||
Boolean updateByBo(TsComplaintAcceptBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除投诉受理单主信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.klp.flow.service;
|
||||
|
||||
import com.klp.flow.domain.TsComplaintTask;
|
||||
import com.klp.flow.domain.vo.TsComplaintTaskVo;
|
||||
import com.klp.flow.domain.bo.TsComplaintTaskBo;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
import com.klp.common.core.domain.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 各部门投诉代办任务&意见Service接口
|
||||
*
|
||||
* @author klp
|
||||
* @date 2026-06-18
|
||||
*/
|
||||
public interface ITsComplaintTaskService {
|
||||
|
||||
/**
|
||||
* 查询各部门投诉代办任务&意见
|
||||
*/
|
||||
TsComplaintTaskVo queryById(Long taskId);
|
||||
|
||||
/**
|
||||
* 查询各部门投诉代办任务&意见列表
|
||||
*/
|
||||
TableDataInfo<TsComplaintTaskVo> queryPageList(TsComplaintTaskBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询各部门投诉代办任务&意见列表
|
||||
*/
|
||||
List<TsComplaintTaskVo> queryList(TsComplaintTaskBo bo);
|
||||
|
||||
/**
|
||||
* 新增各部门投诉代办任务&意见
|
||||
*/
|
||||
Boolean insertByBo(TsComplaintTaskBo bo);
|
||||
|
||||
/**
|
||||
* 修改各部门投诉代办任务&意见
|
||||
*/
|
||||
Boolean updateByBo(TsComplaintTaskBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除各部门投诉代办任务&意见信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.klp.flow.service;
|
||||
|
||||
import com.klp.flow.domain.TsPlanExecuteRel;
|
||||
import com.klp.flow.domain.vo.TsPlanExecuteRelVo;
|
||||
import com.klp.flow.domain.bo.TsPlanExecuteRelBo;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
import com.klp.common.core.domain.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 最终方案下发部门及执行反馈Service接口
|
||||
*
|
||||
* @author klp
|
||||
* @date 2026-06-18
|
||||
*/
|
||||
public interface ITsPlanExecuteRelService {
|
||||
|
||||
/**
|
||||
* 查询最终方案下发部门及执行反馈
|
||||
*/
|
||||
TsPlanExecuteRelVo queryById(Long relId);
|
||||
|
||||
/**
|
||||
* 查询最终方案下发部门及执行反馈列表
|
||||
*/
|
||||
TableDataInfo<TsPlanExecuteRelVo> queryPageList(TsPlanExecuteRelBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询最终方案下发部门及执行反馈列表
|
||||
*/
|
||||
List<TsPlanExecuteRelVo> queryList(TsPlanExecuteRelBo bo);
|
||||
|
||||
/**
|
||||
* 新增最终方案下发部门及执行反馈
|
||||
*/
|
||||
Boolean insertByBo(TsPlanExecuteRelBo bo);
|
||||
|
||||
/**
|
||||
* 修改最终方案下发部门及执行反馈
|
||||
*/
|
||||
Boolean updateByBo(TsPlanExecuteRelBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除最终方案下发部门及执行反馈信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
package com.klp.flow.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
import com.klp.common.core.domain.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.klp.flow.domain.bo.TsAcceptCoilRelBo;
|
||||
import com.klp.flow.domain.vo.TsAcceptCoilRelVo;
|
||||
import com.klp.flow.domain.TsAcceptCoilRel;
|
||||
import com.klp.flow.mapper.TsAcceptCoilRelMapper;
|
||||
import com.klp.flow.service.ITsAcceptCoilRelService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 受理单关联钢卷中间Service业务层处理
|
||||
*
|
||||
* @author klp
|
||||
* @date 2026-06-18
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class TsAcceptCoilRelServiceImpl implements ITsAcceptCoilRelService {
|
||||
|
||||
private final TsAcceptCoilRelMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询受理单关联钢卷中间
|
||||
*/
|
||||
@Override
|
||||
public TsAcceptCoilRelVo queryById(Long relId){
|
||||
return baseMapper.selectVoById(relId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询受理单关联钢卷中间列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<TsAcceptCoilRelVo> queryPageList(TsAcceptCoilRelBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<TsAcceptCoilRel> lqw = buildQueryWrapper(bo);
|
||||
Page<TsAcceptCoilRelVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询受理单关联钢卷中间列表
|
||||
*/
|
||||
@Override
|
||||
public List<TsAcceptCoilRelVo> queryList(TsAcceptCoilRelBo bo) {
|
||||
LambdaQueryWrapper<TsAcceptCoilRel> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<TsAcceptCoilRel> buildQueryWrapper(TsAcceptCoilRelBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<TsAcceptCoilRel> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(bo.getAcceptId() != null, TsAcceptCoilRel::getAcceptId, bo.getAcceptId());
|
||||
lqw.eq(bo.getCoilId() != null, TsAcceptCoilRel::getCoilId, bo.getCoilId());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增受理单关联钢卷中间
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(TsAcceptCoilRelBo bo) {
|
||||
TsAcceptCoilRel add = BeanUtil.toBean(bo, TsAcceptCoilRel.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setRelId(add.getRelId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改受理单关联钢卷中间
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(TsAcceptCoilRelBo bo) {
|
||||
TsAcceptCoilRel update = BeanUtil.toBean(bo, TsAcceptCoilRel.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(TsAcceptCoilRel entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除受理单关联钢卷中间
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
package com.klp.flow.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
import com.klp.common.core.domain.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.klp.common.utils.StringUtils;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.klp.flow.domain.bo.TsComplaintAcceptBo;
|
||||
import com.klp.flow.domain.vo.TsComplaintAcceptVo;
|
||||
import com.klp.flow.domain.TsComplaintAccept;
|
||||
import com.klp.flow.mapper.TsComplaintAcceptMapper;
|
||||
import com.klp.flow.service.ITsComplaintAcceptService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 投诉受理单主Service业务层处理
|
||||
*
|
||||
* @author klp
|
||||
* @date 2026-06-18
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class TsComplaintAcceptServiceImpl implements ITsComplaintAcceptService {
|
||||
|
||||
private final TsComplaintAcceptMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询投诉受理单主
|
||||
*/
|
||||
@Override
|
||||
public TsComplaintAcceptVo queryById(Long acceptId){
|
||||
return baseMapper.selectVoById(acceptId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询投诉受理单主列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<TsComplaintAcceptVo> queryPageList(TsComplaintAcceptBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<TsComplaintAccept> lqw = buildQueryWrapper(bo);
|
||||
Page<TsComplaintAcceptVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询投诉受理单主列表
|
||||
*/
|
||||
@Override
|
||||
public List<TsComplaintAcceptVo> queryList(TsComplaintAcceptBo bo) {
|
||||
LambdaQueryWrapper<TsComplaintAccept> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<TsComplaintAccept> buildQueryWrapper(TsComplaintAcceptBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<TsComplaintAccept> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getComplaintNo()), TsComplaintAccept::getComplaintNo, bo.getComplaintNo());
|
||||
lqw.eq(bo.getComplaintDate() != null, TsComplaintAccept::getComplaintDate, bo.getComplaintDate());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getComplaintContent()), TsComplaintAccept::getComplaintContent, bo.getComplaintContent());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getCustomerDemand()), TsComplaintAccept::getCustomerDemand, bo.getCustomerDemand());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getFile()), TsComplaintAccept::getFile, bo.getFile());
|
||||
lqw.eq(bo.getAuditStatus() != null, TsComplaintAccept::getAuditStatus, bo.getAuditStatus());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getAuditOpinion()), TsComplaintAccept::getAuditOpinion, bo.getAuditOpinion());
|
||||
lqw.eq(bo.getAuditUserId() != null, TsComplaintAccept::getAuditUserId, bo.getAuditUserId());
|
||||
lqw.eq(bo.getAuditTime() != null, TsComplaintAccept::getAuditTime, bo.getAuditTime());
|
||||
lqw.eq(bo.getFlowStatus() != null, TsComplaintAccept::getFlowStatus, bo.getFlowStatus());
|
||||
lqw.eq(bo.getPrincipalUserId() != null, TsComplaintAccept::getPrincipalUserId, bo.getPrincipalUserId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getPlanContent()), TsComplaintAccept::getPlanContent, bo.getPlanContent());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增投诉受理单主
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(TsComplaintAcceptBo bo) {
|
||||
TsComplaintAccept add = BeanUtil.toBean(bo, TsComplaintAccept.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setAcceptId(add.getAcceptId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改投诉受理单主
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(TsComplaintAcceptBo bo) {
|
||||
TsComplaintAccept update = BeanUtil.toBean(bo, TsComplaintAccept.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(TsComplaintAccept entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除投诉受理单主
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
package com.klp.flow.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
import com.klp.common.core.domain.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.klp.common.utils.StringUtils;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.klp.flow.domain.bo.TsComplaintTaskBo;
|
||||
import com.klp.flow.domain.vo.TsComplaintTaskVo;
|
||||
import com.klp.flow.domain.TsComplaintTask;
|
||||
import com.klp.flow.mapper.TsComplaintTaskMapper;
|
||||
import com.klp.flow.service.ITsComplaintTaskService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 各部门投诉代办任务&意见Service业务层处理
|
||||
*
|
||||
* @author klp
|
||||
* @date 2026-06-18
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class TsComplaintTaskServiceImpl implements ITsComplaintTaskService {
|
||||
|
||||
private final TsComplaintTaskMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询各部门投诉代办任务&意见
|
||||
*/
|
||||
@Override
|
||||
public TsComplaintTaskVo queryById(Long taskId){
|
||||
return baseMapper.selectVoById(taskId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询各部门投诉代办任务&意见列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<TsComplaintTaskVo> queryPageList(TsComplaintTaskBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<TsComplaintTask> lqw = buildQueryWrapper(bo);
|
||||
Page<TsComplaintTaskVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询各部门投诉代办任务&意见列表
|
||||
*/
|
||||
@Override
|
||||
public List<TsComplaintTaskVo> queryList(TsComplaintTaskBo bo) {
|
||||
LambdaQueryWrapper<TsComplaintTask> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<TsComplaintTask> buildQueryWrapper(TsComplaintTaskBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<TsComplaintTask> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(bo.getAcceptId() != null, TsComplaintTask::getAcceptId, bo.getAcceptId());
|
||||
lqw.eq(bo.getDeptId() != null, TsComplaintTask::getDeptId, bo.getDeptId());
|
||||
lqw.eq(bo.getTaskStatus() != null, TsComplaintTask::getTaskStatus, bo.getTaskStatus());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getFillNo()), TsComplaintTask::getFillNo, bo.getFillNo());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getDeptOpinion()), TsComplaintTask::getDeptOpinion, bo.getDeptOpinion());
|
||||
lqw.eq(bo.getFillUserId() != null, TsComplaintTask::getFillUserId, bo.getFillUserId());
|
||||
lqw.eq(bo.getFillTime() != null, TsComplaintTask::getFillTime, bo.getFillTime());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getFillFile()), TsComplaintTask::getFillFile, bo.getFillFile());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增各部门投诉代办任务&意见
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(TsComplaintTaskBo bo) {
|
||||
TsComplaintTask add = BeanUtil.toBean(bo, TsComplaintTask.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setTaskId(add.getTaskId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改各部门投诉代办任务&意见
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(TsComplaintTaskBo bo) {
|
||||
TsComplaintTask update = BeanUtil.toBean(bo, TsComplaintTask.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(TsComplaintTask entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除各部门投诉代办任务&意见
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
package com.klp.flow.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
import com.klp.common.core.domain.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.klp.common.utils.StringUtils;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.klp.flow.domain.bo.TsPlanExecuteRelBo;
|
||||
import com.klp.flow.domain.vo.TsPlanExecuteRelVo;
|
||||
import com.klp.flow.domain.TsPlanExecuteRel;
|
||||
import com.klp.flow.mapper.TsPlanExecuteRelMapper;
|
||||
import com.klp.flow.service.ITsPlanExecuteRelService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 最终方案下发部门及执行反馈Service业务层处理
|
||||
*
|
||||
* @author klp
|
||||
* @date 2026-06-18
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class TsPlanExecuteRelServiceImpl implements ITsPlanExecuteRelService {
|
||||
|
||||
private final TsPlanExecuteRelMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询最终方案下发部门及执行反馈
|
||||
*/
|
||||
@Override
|
||||
public TsPlanExecuteRelVo queryById(Long relId){
|
||||
return baseMapper.selectVoById(relId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询最终方案下发部门及执行反馈列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<TsPlanExecuteRelVo> queryPageList(TsPlanExecuteRelBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<TsPlanExecuteRel> lqw = buildQueryWrapper(bo);
|
||||
Page<TsPlanExecuteRelVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询最终方案下发部门及执行反馈列表
|
||||
*/
|
||||
@Override
|
||||
public List<TsPlanExecuteRelVo> queryList(TsPlanExecuteRelBo bo) {
|
||||
LambdaQueryWrapper<TsPlanExecuteRel> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<TsPlanExecuteRel> buildQueryWrapper(TsPlanExecuteRelBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<TsPlanExecuteRel> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(bo.getAcceptId() != null, TsPlanExecuteRel::getAcceptId, bo.getAcceptId());
|
||||
lqw.eq(bo.getDeptId() != null, TsPlanExecuteRel::getDeptId, bo.getDeptId());
|
||||
lqw.eq(bo.getExecuteStatus() != null, TsPlanExecuteRel::getExecuteStatus, bo.getExecuteStatus());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getExecuteResult()), TsPlanExecuteRel::getExecuteResult, bo.getExecuteResult());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getFeedbackNo()), TsPlanExecuteRel::getFeedbackNo, bo.getFeedbackNo());
|
||||
lqw.eq(bo.getFeedbackUserId() != null, TsPlanExecuteRel::getFeedbackUserId, bo.getFeedbackUserId());
|
||||
lqw.eq(bo.getFeedbackTime() != null, TsPlanExecuteRel::getFeedbackTime, bo.getFeedbackTime());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getFeedbackFile()), TsPlanExecuteRel::getFeedbackFile, bo.getFeedbackFile());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增最终方案下发部门及执行反馈
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(TsPlanExecuteRelBo bo) {
|
||||
TsPlanExecuteRel add = BeanUtil.toBean(bo, TsPlanExecuteRel.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setRelId(add.getRelId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改最终方案下发部门及执行反馈
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(TsPlanExecuteRelBo bo) {
|
||||
TsPlanExecuteRel update = BeanUtil.toBean(bo, TsPlanExecuteRel.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(TsPlanExecuteRel entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除最终方案下发部门及执行反馈
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<?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.klp.flow.mapper.TsAcceptCoilRelMapper">
|
||||
|
||||
<resultMap type="com.klp.flow.domain.TsAcceptCoilRel" id="TsAcceptCoilRelResult">
|
||||
<result property="relId" column="rel_id"/>
|
||||
<result property="acceptId" column="accept_id"/>
|
||||
<result property="coilId" column="coil_id"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,30 @@
|
||||
<?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.klp.flow.mapper.TsComplaintAcceptMapper">
|
||||
|
||||
<resultMap type="com.klp.flow.domain.TsComplaintAccept" id="TsComplaintAcceptResult">
|
||||
<result property="acceptId" column="accept_id"/>
|
||||
<result property="complaintNo" column="complaint_no"/>
|
||||
<result property="complaintDate" column="complaint_date"/>
|
||||
<result property="complaintContent" column="complaint_content"/>
|
||||
<result property="customerDemand" column="customer_demand"/>
|
||||
<result property="file" column="file"/>
|
||||
<result property="auditStatus" column="audit_status"/>
|
||||
<result property="auditOpinion" column="audit_opinion"/>
|
||||
<result property="auditUserId" column="audit_user_id"/>
|
||||
<result property="auditTime" column="audit_time"/>
|
||||
<result property="flowStatus" column="flow_status"/>
|
||||
<result property="principalUserId" column="principal_user_id"/>
|
||||
<result property="planContent" column="plan_content"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,26 @@
|
||||
<?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.klp.flow.mapper.TsComplaintTaskMapper">
|
||||
|
||||
<resultMap type="com.klp.flow.domain.TsComplaintTask" id="TsComplaintTaskResult">
|
||||
<result property="taskId" column="task_id"/>
|
||||
<result property="acceptId" column="accept_id"/>
|
||||
<result property="deptId" column="dept_id"/>
|
||||
<result property="taskStatus" column="task_status"/>
|
||||
<result property="fillNo" column="fill_no"/>
|
||||
<result property="deptOpinion" column="dept_opinion"/>
|
||||
<result property="fillUserId" column="fill_user_id"/>
|
||||
<result property="fillTime" column="fill_time"/>
|
||||
<result property="fillFile" column="fill_file"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,26 @@
|
||||
<?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.klp.flow.mapper.TsPlanExecuteRelMapper">
|
||||
|
||||
<resultMap type="com.klp.flow.domain.TsPlanExecuteRel" id="TsPlanExecuteRelResult">
|
||||
<result property="relId" column="rel_id"/>
|
||||
<result property="acceptId" column="accept_id"/>
|
||||
<result property="deptId" column="dept_id"/>
|
||||
<result property="executeStatus" column="execute_status"/>
|
||||
<result property="executeResult" column="execute_result"/>
|
||||
<result property="feedbackNo" column="feedback_no"/>
|
||||
<result property="feedbackUserId" column="feedback_user_id"/>
|
||||
<result property="feedbackTime" column="feedback_time"/>
|
||||
<result property="feedbackFile" column="feedback_file"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -70,6 +70,10 @@ public class QcCertificate extends BaseEntity {
|
||||
* 质保证明说明(注释)
|
||||
*/
|
||||
private String note;
|
||||
/**
|
||||
* 证书类型(如:出厂合格证、检测报告、质保书等)
|
||||
*/
|
||||
private String certificateType;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
|
||||
@@ -82,6 +82,11 @@ public class QcCertificateBo extends BaseEntity {
|
||||
*/
|
||||
private String note;
|
||||
|
||||
/**
|
||||
* 证书类型(如:出厂合格证、检测报告、质保书等)
|
||||
*/
|
||||
private String certificateType;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
|
||||
@@ -100,5 +100,11 @@ public class QcCertificateVo {
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 证书类型(如:出厂合格证、检测报告、质保书等)
|
||||
*/
|
||||
@ExcelProperty(value = "证书类型")
|
||||
private String certificateType;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -75,6 +75,7 @@ public class QcCertificateServiceImpl implements IQcCertificateService {
|
||||
lqw.le(bo.getApproveTimeEnd() != null, QcCertificate::getApproveTime, bo.getApproveTimeEnd());
|
||||
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getNote()), QcCertificate::getNote, bo.getNote());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getCertificateType()), QcCertificate::getCertificateType, bo.getCertificateType());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
|
||||
@@ -26,6 +26,9 @@ public class MesRollInfo extends BaseEntity {
|
||||
/** 产线ID */
|
||||
private Long lineId;
|
||||
|
||||
/** 机架 */
|
||||
private String frame;
|
||||
|
||||
/** 轧辊编号 */
|
||||
private String rollNo;
|
||||
|
||||
|
||||
@@ -25,6 +25,9 @@ public class MesRollInfoBo extends BaseEntity {
|
||||
/** 产线ID(查询过滤 / 新增归属) */
|
||||
private Long lineId;
|
||||
|
||||
/** 机架 */
|
||||
private String frame;
|
||||
|
||||
@NotBlank(message = "轧辊编号不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
private String rollNo;
|
||||
|
||||
|
||||
@@ -25,6 +25,9 @@ public class MesRollInfoVo {
|
||||
@ExcelProperty("产线名称")
|
||||
private String lineName;
|
||||
|
||||
@ExcelProperty("机架")
|
||||
private String frame;
|
||||
|
||||
@ExcelProperty("轧辊编号")
|
||||
private String rollNo;
|
||||
|
||||
|
||||
@@ -77,6 +77,7 @@ public class MesRollInfoServiceImpl implements IMesRollInfoService {
|
||||
lqw.like(StringUtils.isNotBlank(bo.getRollNo()), MesRollInfo::getRollNo, bo.getRollNo());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getRollType()), MesRollInfo::getRollType, bo.getRollType());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getStatus()), MesRollInfo::getStatus, bo.getStatus());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getFrame()), MesRollInfo::getFrame, bo.getFrame());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getManufacturer()), MesRollInfo::getManufacturer, bo.getManufacturer());
|
||||
lqw.orderByAsc(MesRollInfo::getRollType, MesRollInfo::getRollId);
|
||||
return lqw;
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
<result property="approveTime" column="approve_time"/>
|
||||
<result property="note" column="note"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="certificateType" column="certificate_type"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
"@vue-office/excel": "^1.7.14",
|
||||
"@vue/composition-api": "^1.7.2",
|
||||
"axios": "0.24.0",
|
||||
"beautiful-mermaid": "^1.1.3",
|
||||
"bpmn-js-token-simulation": "0.10.0",
|
||||
"clipboard": "2.0.8",
|
||||
"core-js": "3.25.3",
|
||||
|
||||
430
klp-ui/public/冷轧厂业务流程泳道图(1).html
Normal file
430
klp-ui/public/冷轧厂业务流程泳道图(1).html
Normal file
@@ -0,0 +1,430 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>冷轧厂业务流程泳道图</title>
|
||||
<style>
|
||||
*{margin:0;padding:0;box-sizing:border-box}
|
||||
body{font-family:"Microsoft YaHei","SimHei",sans-serif;background:#f0f4f8;color:#1e293b;overflow-x:hidden}
|
||||
.header{background:linear-gradient(135deg,#0f2b47 0%,#1a4a7a 50%,#2c6fad 100%);color:#fff;padding:14px 28px;display:flex;align-items:center;gap:16px;box-shadow:0 3px 16px rgba(0,0,0,.2)}
|
||||
.header h1{font-size:20px;letter-spacing:2px;font-weight:700}
|
||||
.header .tag{background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.2);border-radius:12px;padding:3px 14px;font-size:11.5px}
|
||||
.tabs-wrap{background:#dde3ec;padding:8px 16px 0;position:sticky;top:0;z-index:200;box-shadow:0 2px 6px rgba(0,0,0,.05)}
|
||||
.tabs{display:flex;gap:3px;overflow-x:auto;padding-bottom:0}
|
||||
.tabs::-webkit-scrollbar{height:0}
|
||||
.tab{flex-shrink:0;padding:9px 16px;font-size:12px;border:none;background:transparent;cursor:pointer;border-radius:7px 7px 0 0;color:#5a6a7a;font-weight:500;transition:all .2s;white-space:nowrap}
|
||||
.tab:hover{background:rgba(255,255,255,.5)}
|
||||
.tab.on{background:#fff;color:#0f2b47;font-weight:700;box-shadow:0 -1px 4px rgba(0,0,0,.05)}
|
||||
.tab .tn{display:inline-block;background:#3b6ea5;color:#fff;border-radius:50%;width:17px;height:17px;line-height:17px;font-size:9.5px;text-align:center;margin-right:4px}
|
||||
.tab.on .tn{background:#1a4a7a}
|
||||
.panel{display:none;padding:18px 20px 36px}
|
||||
.panel.on{display:block}
|
||||
|
||||
/* ========== 公司架构图 ========== */
|
||||
.org-outer{background:#fff;border-radius:10px;box-shadow:0 3px 16px rgba(0,0,0,.06);overflow-x:auto;padding:24px 16px 32px;position:relative}
|
||||
.org-row{display:flex;justify-content:center;gap:10px;flex-wrap:wrap;position:relative;margin-bottom:2px}
|
||||
.org-node{text-align:center;padding:8px 16px;border-radius:9px;font-weight:700;cursor:pointer;transition:all .2s;position:relative;z-index:2;white-space:nowrap}
|
||||
.org-node:hover{transform:translateY(-2px);box-shadow:0 6px 20px rgba(0,0,0,.15)}
|
||||
.org-node.lv0{background:linear-gradient(135deg,#0f2b47,#1a4a7a);color:#fff;font-size:15px;padding:13px 28px;min-width:220px}
|
||||
.org-node.lv1{background:linear-gradient(135deg,#1e3a5f,#2563eb);color:#fff;font-size:13px;padding:9px 20px;min-width:160px}
|
||||
.org-node.lv2{background:linear-gradient(135deg,#1d4ed8,#3b82f6);color:#fff;font-size:12px;padding:8px 14px;min-width:155px}
|
||||
.org-node.lv3{background:#dbeafe;border:1.5px solid #60a5fa;color:#1e40af;font-size:11.5px;padding:6px 11px;min-width:120px;font-weight:600}
|
||||
.org-node .nd-sub{font-size:9.5px;font-weight:400;opacity:.7;display:block;margin-top:2px}
|
||||
.org-vline{width:2px;height:16px;background:#93c5fd;margin:0 auto}
|
||||
.org-tip{text-align:center;font-size:11px;color:#94a3b8;margin-top:10px}
|
||||
|
||||
/* ========== 岗位职责 ========== */
|
||||
.resp-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(370px,1fr));gap:16px}
|
||||
.resp-card{background:#fff;border-radius:10px;box-shadow:0 2px 12px rgba(0,0,0,.05);overflow:hidden;transition:all .2s}
|
||||
.resp-card:hover{box-shadow:0 4px 20px rgba(0,0,0,.1)}
|
||||
.resp-hd{padding:14px 18px;cursor:pointer;display:flex;align-items:center;gap:12px;user-select:none;transition:background .2s}
|
||||
.resp-hd:hover{background:#f0f5ff}
|
||||
.resp-icon{width:42px;height:42px;border-radius:10px;display:flex;align-items:center;justify-content:center;font-size:18px;flex-shrink:0}
|
||||
.resp-title{font-size:14px;font-weight:700;color:#1e293b}
|
||||
.resp-sub{font-size:11px;color:#64748b;margin-top:2px}
|
||||
.resp-arrow{margin-left:auto;font-size:12px;color:#94a3b8;transition:transform .3s}
|
||||
.resp-card.open .resp-arrow{transform:rotate(90deg)}
|
||||
.resp-bd{display:none;padding:0 18px 16px;border-top:1px solid #f1f5f9}
|
||||
.resp-card.open .resp-bd{display:block}
|
||||
.resp-item{padding:8px 0;border-bottom:1px solid #f8fafc;display:flex;gap:8px;font-size:12.5px;line-height:1.6}
|
||||
.resp-item:last-child{border-bottom:none}
|
||||
.resp-bullet{color:#3b82f6;font-weight:700;flex-shrink:0;margin-top:1px}
|
||||
.resp-tag{display:inline-block;font-size:10px;padding:2px 8px;border-radius:4px;margin-left:8px;font-weight:500}
|
||||
.resp-tag.core{background:#dbeafe;color:#1e40af}
|
||||
.resp-tag.support{background:#dcfce7;color:#166534}
|
||||
.resp-tag.check{background:#fef3c7;color:#92400e}
|
||||
|
||||
/* SVG连线动画 */
|
||||
.sw-svg path{transition:opacity .3s}
|
||||
.sw-svg path.line-walk{opacity:.85!important;stroke-width:2.8!important}
|
||||
.sw-svg path.line-walk-done{opacity:.5!important}
|
||||
.sw-svg path.line-dimmed{opacity:.08!important}
|
||||
|
||||
.footer{text-align:center;padding:18px;color:#94a3b8;font-size:10.5px}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- <div class="header">
|
||||
<h1>⚙️ 冷轧厂业务流程泳道图</h1>
|
||||
<span class="tag">架构 · 岗位 · 10 条流程 · 步进回放</span>
|
||||
</div> -->
|
||||
<div class="tabs-wrap"><div class="tabs" id="tabs"></div></div>
|
||||
<div id="panels"></div>
|
||||
<!-- <div class="footer">冷轧厂业务流程泳道图 · 冶金自动化工程</div> -->
|
||||
|
||||
<script>
|
||||
// ═══════════════════════════════════
|
||||
// 数据定义
|
||||
// ═══════════════════════════════════
|
||||
|
||||
const ORG_TREE = {
|
||||
name:"股东大会 / 董事会", lv:0, sub:"最高决策层",
|
||||
children:[
|
||||
{name:"监事会", lv:1, sub:"监督审计", children:[]},
|
||||
{name:"总经理", lv:1, sub:"全面经营管理", children:[
|
||||
{name:"副总经理(生产/设备)", lv:2, sub:"生产运营+设备保障", children:[
|
||||
{name:"生产部", lv:3, sub:"计划·调度·酸轧·连退·精整"},
|
||||
{name:"设备部", lv:3, sub:"机械·电气·液压·点检"},
|
||||
{name:"安全环保部", lv:3, sub:"安监·环保·培训"},
|
||||
{name:"工厂/分厂厂长", lv:3, sub:"酸轧·连退·镀锌等车间"}
|
||||
]},
|
||||
{name:"副总经理(技术/质量)", lv:2, sub:"技术+质量管控", children:[
|
||||
{name:"技术中心/研发部", lv:3, sub:"工艺标准·新产品开发"},
|
||||
{name:"质量检验部", lv:3, sub:"来料检·过程检·成品检·实验室"},
|
||||
{name:"理化检测中心", lv:3, sub:"力学·化学·金相分析"}
|
||||
]},
|
||||
{name:"副总经理(营销/供应链)", lv:2, sub:"销售+采购+物流", children:[
|
||||
{name:"销售部", lv:3, sub:"国内·海外·大客户"},
|
||||
{name:"采购部", lv:3, sub:"热轧卷·辅料·备件"},
|
||||
{name:"物流仓储部", lv:3, sub:"原料库·成品库·运输调度"},
|
||||
{name:"市场部", lv:3, sub:"市场分析·行业研究"}
|
||||
]},
|
||||
{name:"总工程师", lv:2, sub:"技术总负责", children:[
|
||||
{name:"工艺技术科", lv:3, sub:"工艺规程·技术攻关"},
|
||||
{name:"自动化信息科", lv:3, sub:"L2/MES·信息化"}
|
||||
]},
|
||||
{name:"财务总监", lv:2, sub:"资金+成本管控", children:[
|
||||
{name:"财务部", lv:3, sub:"成本·预算·资金·税务"}
|
||||
]},
|
||||
{name:"职能支撑部门", lv:2, sub:"行政+IT+管理", children:[
|
||||
{name:"综合管理部/办公室", lv:3, sub:"行政·人资·法务"},
|
||||
{name:"企管部/运营改善部", lv:3, sub:"KPI·流程优化"},
|
||||
{name:"IT信息化部", lv:3, sub:"ERP·网络·信息安全"}
|
||||
]}
|
||||
]}
|
||||
]
|
||||
};
|
||||
|
||||
const JOBS = [
|
||||
{name:"生产部",icon:"🏭",color:"#3b82f6",bg:"#dbeafe",lead:"副总经理(生产/设备)",
|
||||
duties:[
|
||||
{t:"主生产计划编制与下达",d:"根据销售订单、产能、原料到货编制月/周主生产计划,分解至各产线",tag:"core"},
|
||||
{t:"车间日/班次排产",d:"编制各车间日计划、班次排产表,协调产线切换与规格衔接",tag:"core"},
|
||||
{t:"生产调度与异常协调",d:"实时监控产线运行状态,处理停机、改规、换辊等生产异常",tag:"core"},
|
||||
{t:"订单进度跟踪与反馈",d:"跟踪订单从排产到完工全流程,向销售部反馈进度",tag:"core"},
|
||||
{t:"产能平衡与瓶颈分析",d:"分析各产线产能利用率,识别瓶颈并提出改善建议",tag:"support"},
|
||||
{t:"原料需求提报",d:"根据排产计划向采购部提报原料需求计划",tag:"support"}
|
||||
]},
|
||||
{name:"设备部",icon:"🔧",color:"#059669",bg:"#d1fae5",lead:"副总经理(生产/设备)",
|
||||
duties:[
|
||||
{t:"设备日常/专业点检",d:"执行日常点检、专业点检,记录设备状态数据",tag:"core"},
|
||||
{t:"维修计划编制与实施",d:"编制定修/年修计划,组织实施维修作业",tag:"core"},
|
||||
{t:"故障应急响应",d:"处理突发设备故障,组织抢修恢复生产",tag:"core"},
|
||||
{t:"备件需求提报与管理",d:"提报备件采购需求,管理备件库存与台账",tag:"support"},
|
||||
{t:"设备技术改造方案",d:"提出设备技改需求,配合总工程师评审方案",tag:"support"},
|
||||
{t:"维修后验收与归档",d:"组织维修后设备验收,更新设备档案",tag:"check"}
|
||||
]},
|
||||
{name:"技术中心/研发部",icon:"🔬",color:"#7c3aed",bg:"#ede9fe",lead:"副总经理(技术/质量)",
|
||||
duties:[
|
||||
{t:"工艺标准/工艺卡制定",d:"制定各钢种、各产线工艺标准,编制工艺卡",tag:"core"},
|
||||
{t:"新产品/新工艺开发",d:"研发新产品、新工艺路线,组织试制与验证",tag:"core"},
|
||||
{t:"工艺参数下发与交底",d:"向车间下发工艺参数(MES/纸质),组织新工艺交底",tag:"core"},
|
||||
{t:"工艺异常分析与处置",d:"分析工艺异常原因,制定处置方案",tag:"core"},
|
||||
{t:"工艺变更管理",d:"评审并管理工艺变更,确保变更受控可追溯",tag:"check"},
|
||||
{t:"封锁品评审",d:"参与封锁品/待判品技术评审,给出处置建议",tag:"check"}
|
||||
]},
|
||||
{name:"质量检验部",icon:"✅",color:"#dc2626",bg:"#fee2e2",lead:"副总经理(技术/质量)",
|
||||
duties:[
|
||||
{t:"来料取样与检测",d:"对进厂原料/辅料取样检验,出具检验报告",tag:"core"},
|
||||
{t:"来料合格/不合格判定",d:"依据标准判定来料是否合格,通知采购和仓储",tag:"core"},
|
||||
{t:"过程检验",d:"按产线执行过程检验(酸洗、轧制、退火、镀锌等)",tag:"core"},
|
||||
{t:"成品检验与判定",d:"对成品进行力学/表面/尺寸检验,做出合格/不合格判定",tag:"core"},
|
||||
{t:"合格品放行",d:"确认成品检验合格后签发放行单,通知仓储发货",tag:"core"},
|
||||
{t:"封锁品/待判品管理",d:"管理封锁品标识与隔离,组织技术中心评审",tag:"check"},
|
||||
{t:"质量异议现场确认",d:"参与客户质量异议的实物确认与复检",tag:"check"}
|
||||
]},
|
||||
{name:"理化检测中心",icon:"🧪",color:"#b45309",bg:"#fef3c7",lead:"副总经理(技术/质量)",
|
||||
duties:[
|
||||
{t:"力学性能检测",d:"拉伸、硬度、冲击等力学性能测试",tag:"core"},
|
||||
{t:"化学成分分析",d:"直读光谱、碳硫分析、化学成分测定",tag:"core"},
|
||||
{t:"金相组织检验",d:"金相制样、显微组织观察与评级",tag:"core"},
|
||||
{t:"镀层/涂层检测",d:"镀锌量、涂层厚度、附着力检测",tag:"core"},
|
||||
{t:"检测报告出具",d:"出具标准检测报告,支持质量判定",tag:"support"}
|
||||
]},
|
||||
{name:"销售部",icon:"📊",color:"#2563eb",bg:"#dbeafe",lead:"副总经理(营销/供应链)",
|
||||
duties:[
|
||||
{t:"合同评审与签订",d:"组织合同交期/技术/产能评审,签订销售合同",tag:"core"},
|
||||
{t:"下达销售订单",d:"先交技术中心确认工艺可行性,再下达生产部排产",tag:"core"},
|
||||
{t:"发货计划编制与跟踪",d:"编制发货计划,跟踪发货确认与签收",tag:"core"},
|
||||
{t:"质量异议接收与处理",d:"接收客户质量异议,协调技术/质检处理",tag:"core"},
|
||||
{t:"客户关系维护与回访",d:"维护大客户关系,异议关闭后组织回访",tag:"support"},
|
||||
{t:"市场信息反馈",d:"收集市场需求、价格走势信息,反馈至生产/技术",tag:"support"}
|
||||
]},
|
||||
{name:"采购部",icon:"📦",color:"#ca8a04",bg:"#fef9c3",lead:"副总经理(营销/供应链)",
|
||||
duties:[
|
||||
{t:"采购计划编制",d:"根据生产部/设备部需求编制原料/辅料/备件采购计划",tag:"core"},
|
||||
{t:"采购订单下达与跟踪",d:"下达采购订单,跟踪交期与物流",tag:"core"},
|
||||
{t:"到货通知与协调",d:"到货前通知物流仓储部准备接收",tag:"core"},
|
||||
{t:"不合格品退货处理",d:"质量检验部判定不合格后协调退货",tag:"check"},
|
||||
{t:"质量索赔",d:"对不合格来料向供应商发起质量索赔",tag:"check"},
|
||||
{t:"供应商管理",d:"供应商资质评审、绩效评价、目录维护",tag:"support"}
|
||||
]},
|
||||
{name:"物流仓储部",icon:"🚛",color:"#0d9488",bg:"#ccfbf1",lead:"副总经理(营销/供应链)",
|
||||
duties:[
|
||||
{t:"原料入库与投料管理",d:"原料验收入库,按生产计划投料至各车间",tag:"core"},
|
||||
{t:"成品入库与出库",d:"成品验收入库,按发货计划备货出库",tag:"core"},
|
||||
{t:"到货接收与暂存",d:"到货暂存待检区,通知质检检验",tag:"core"},
|
||||
{t:"发货/运输调度",d:"组织发货装车,调度运输",tag:"core"},
|
||||
{t:"日常出入库记录",d:"记录每日出入库明细,维护库存台账",tag:"support"},
|
||||
{t:"库存盘点与差异处理",d:"配合财务部进行定期盘点,处理账实差异",tag:"check"},
|
||||
{t:"呆滞/封锁品报告",d:"定期报告呆滞品与封锁品,通知质检/财务",tag:"check"}
|
||||
]},
|
||||
{name:"安全环保部",icon:"🛡️",color:"#dc2626",bg:"#fee2e2",lead:"副总经理(生产/设备)",
|
||||
duties:[
|
||||
{t:"安全/环保培训",d:"组织全员安全培训、特种作业培训、环保培训",tag:"core"},
|
||||
{t:"日常安全检查",d:"执行日常安全巡查,发现隐患并督促整改",tag:"core"},
|
||||
{t:"环保监测",d:"监测废水、废气排放,确保达标",tag:"core"},
|
||||
{t:"事故报告与调查",d:"安全事故报告、调查与处理",tag:"core"},
|
||||
{t:"隐患整改跟踪",d:"跟踪车间隐患整改进度,闭环管理",tag:"check"},
|
||||
{t:"外部检查对接",d:"对接政府安监/环保检查",tag:"support"}
|
||||
]},
|
||||
{name:"总工程师",icon:"🏗️",color:"#7c3aed",bg:"#ede9fe",lead:"总经理",
|
||||
duties:[
|
||||
{t:"技改方案评审",d:"评审技术改造方案的技术可行性",tag:"core"},
|
||||
{t:"定修/年修计划审批",d:"审批定修/年修计划的技术方案",tag:"core"},
|
||||
{t:"重大工艺变更审批",d:"审批重大工艺变更方案",tag:"core"},
|
||||
{t:"项目实施协调",d:"协调技改项目实施中的停机窗口",tag:"core"},
|
||||
{t:"验收与移交",d:"组织技改项目验收与设备移交",tag:"check"},
|
||||
{t:"资料归档管理",d:"督促技改资料归档至综合管理部",tag:"support"}
|
||||
]},
|
||||
{name:"财务部",icon:"💰",color:"#059669",bg:"#d1fae5",lead:"财务总监",
|
||||
duties:[
|
||||
{t:"成本核算与分析",d:"各产线/产品成本核算,差异分析",tag:"core"},
|
||||
{t:"预算编制与管控",d:"年度/月度预算编制,预算执行监控",tag:"core"},
|
||||
{t:"开票与结算",d:"销售开票、采购付款结算",tag:"core"},
|
||||
{t:"应收账款跟踪",d:"跟踪应收账款回收,预警逾期",tag:"core"},
|
||||
{t:"定期盘点组织",d:"组织月/季/年度库存盘点",tag:"check"},
|
||||
{t:"盘点差异处理",d:"盘点差异审核与账务调整",tag:"check"}
|
||||
]},
|
||||
{name:"综合管理部/办公室",icon:"📋",color:"#64748b",bg:"#f1f5f9",lead:"总经理",
|
||||
duties:[
|
||||
{t:"行政管理",d:"公司行政事务、会议组织、文件管理",tag:"core"},
|
||||
{t:"人力资源管理",d:"招聘、培训、薪酬、绩效考核",tag:"core"},
|
||||
{t:"法务管理",d:"合同审查、法律风险防控",tag:"core"},
|
||||
{t:"事故调查配合",d:"配合安全环保部事故调查的行政工作",tag:"support"},
|
||||
{t:"资料归档接收",d:"接收技改/项目归档资料",tag:"support"}
|
||||
]},
|
||||
{name:"IT信息化部",icon:"💻",color:"#2563eb",bg:"#dbeafe",lead:"总经理",
|
||||
duties:[
|
||||
{t:"MES/L2系统运维",d:"维护MES、L2系统稳定运行,故障响应",tag:"core"},
|
||||
{t:"ERP系统管理",d:"ERP系统配置、数据维护、用户权限管理",tag:"core"},
|
||||
{t:"网络与信息安全",d:"网络基础设施运维,信息安全防护",tag:"core"},
|
||||
{t:"系统开发与集成",d:"新系统开发、系统集成、报表定制",tag:"support"},
|
||||
{t:"数据备份与容灾",d:"数据库备份、容灾方案实施",tag:"support"}
|
||||
]},
|
||||
{name:"各车间",icon:"⚙️",color:"#475569",bg:"#f1f5f9",lead:"工厂/分厂厂长",
|
||||
duties:[
|
||||
{t:"产线生产执行",d:"按排产计划执行生产作业,确保产量/质量达标",tag:"core"},
|
||||
{t:"工艺纪律执行",d:"严格执行工艺参数,接受技术中心抽查",tag:"core"},
|
||||
{t:"设备日常点检",d:"执行设备日常点检,上报隐患与故障",tag:"core"},
|
||||
{t:"过程质量自检",d:"执行生产过程自检,配合质量检验部过程检",tag:"check"},
|
||||
{t:"完工入库操作",d:"成品完工后办理入库/转库手续",tag:"support"},
|
||||
{t:"安全与5S管理",d:"执行安全操作规程,保持5S现场",tag:"check"}
|
||||
]}
|
||||
];
|
||||
// ═══════════════════════════════════
|
||||
// Tab 0: 公司架构图
|
||||
// ═══════════════════════════════════
|
||||
(function(){
|
||||
const tb = document.createElement('button');
|
||||
tb.className = 'tab on';
|
||||
tb.innerHTML = '<span class="tn">🏢</span>公司架构';
|
||||
document.getElementById('tabs').appendChild(tb);
|
||||
|
||||
const pn = document.createElement('div');
|
||||
pn.className = 'panel on';
|
||||
pn.id = 'org';
|
||||
|
||||
let h = '<div class="org-outer" id="org-outer">';
|
||||
h += '<div class="org-row" id="org-r0" style="margin-bottom:10px">';
|
||||
h += '<div class="org-node lv0" data-name="股东大会/董事会">股东大会 / 董事会<span class="nd-sub">最高决策层</span></div>';
|
||||
h += '</div>';
|
||||
|
||||
const gmNode = ORG_TREE.children[1];
|
||||
h += '<div class="org-row" id="org-r1" style="gap:40px;margin-bottom:10px">';
|
||||
h += '<div class="org-branch"><div class="org-node lv1" data-name="监事会">监事会<span class="nd-sub">监督审计</span></div></div>';
|
||||
h += '<div class="org-branch"><div class="org-node lv1" id="org-gm" data-name="总经理">总经理<span class="nd-sub">全面经营管理</span></div></div>';
|
||||
h += '</div>';
|
||||
|
||||
h += '<div class="org-row" id="org-r2" style="gap:12px 6px;margin-bottom:10px">';
|
||||
gmNode.children.forEach((vp,vi) => {
|
||||
h += '<div class="org-branch" id="org-vp-'+vi+'">';
|
||||
h += '<div class="org-node lv2" data-name="'+vp.name+'">'+vp.name+'<span class="nd-sub">'+vp.sub+'</span></div>';
|
||||
if(vp.children && vp.children.length){
|
||||
h += '<div class="org-vline"></div>';
|
||||
h += '<div style="display:flex;gap:5px;flex-wrap:wrap;justify-content:center">';
|
||||
vp.children.forEach(dp => {
|
||||
h += '<div class="org-node lv3" data-name="'+dp.name+'">'+dp.name+'<span class="nd-sub">'+dp.sub+'</span></div>';
|
||||
});
|
||||
h += '</div>';
|
||||
}
|
||||
h += '</div>';
|
||||
});
|
||||
h += '</div></div>';
|
||||
h += '<p class="org-tip">💡 点击节点可跳转至岗位职责</p>';
|
||||
|
||||
pn.innerHTML = h;
|
||||
pn.addEventListener('click', function(e){
|
||||
const node = e.target.closest('.org-node');
|
||||
if(node && node.dataset.name) jumpToJob(node.dataset.name);
|
||||
});
|
||||
document.getElementById('panels').appendChild(pn);
|
||||
|
||||
tb.onclick = () => {
|
||||
document.querySelectorAll('.tab').forEach(x => x.classList.remove('on'));
|
||||
document.querySelectorAll('.panel').forEach(x => x.classList.remove('on'));
|
||||
tb.classList.add('on');
|
||||
pn.classList.add('on');
|
||||
setTimeout(drawOrgLines, 100);
|
||||
};
|
||||
})();
|
||||
|
||||
function jumpToJob(name){
|
||||
const tabs = document.querySelectorAll('.tab');
|
||||
if(tabs[1]) tabs[1].click();
|
||||
setTimeout(() => {
|
||||
const cards = document.querySelectorAll('.resp-card');
|
||||
cards.forEach(c => {
|
||||
if(c.dataset.name === name && !c.classList.contains('open')){
|
||||
c.querySelector('.resp-hd').click();
|
||||
}
|
||||
});
|
||||
const target = [...cards].find(c => c.dataset.name === name);
|
||||
if(target) target.scrollIntoView({behavior:'smooth',block:'center'});
|
||||
}, 280);
|
||||
}
|
||||
|
||||
function drawOrgLines(){
|
||||
const outer = document.getElementById('org-outer');
|
||||
if(!outer) return;
|
||||
let svg = document.getElementById('org-svg');
|
||||
if(svg) svg.remove();
|
||||
|
||||
const w = outer.scrollWidth, h = outer.scrollHeight;
|
||||
svg = document.createElementNS('http://www.w3.org/2000/svg','svg');
|
||||
svg.id = 'org-svg';
|
||||
svg.setAttribute('width', w);
|
||||
svg.setAttribute('height', h);
|
||||
svg.setAttribute('viewBox','0 0 '+w+' '+h);
|
||||
svg.style.cssText = 'position:absolute;top:0;left:0;pointer-events:none;overflow:visible;z-index:1';
|
||||
outer.appendChild(svg);
|
||||
|
||||
const or = outer.getBoundingClientRect();
|
||||
function pos(el){
|
||||
const r = el.getBoundingClientRect();
|
||||
return {cx:r.left-or.left+r.width/2, cy:r.top-or.top+r.height/2, l:r.left-or.left, t:r.top-or.top, R:r.left-or.left+r.width, b:r.top-or.top+r.height};
|
||||
}
|
||||
function mkCurve(x1,y1,x2,y2,color){
|
||||
const dy = Math.abs(y2-y1)*0.35;
|
||||
const path = document.createElementNS('http://www.w3.org/2000/svg','path');
|
||||
path.setAttribute('d','M'+x1+' '+y1+' C'+x1+' '+(y1<y2?y1+dy:y1-dy)+' '+x2+' '+(y2>dy?y2-dy:y2+dy)+' '+x2+' '+y2);
|
||||
path.setAttribute('fill','none');
|
||||
path.setAttribute('stroke',color||'#93c5fd');
|
||||
path.setAttribute('stroke-width','2');
|
||||
svg.appendChild(path);
|
||||
}
|
||||
|
||||
const r0n = document.querySelector('#org-r0 .org-node');
|
||||
const r1ns = document.querySelectorAll('#org-r1 .org-node');
|
||||
if(r0n && r1ns.length>=2){
|
||||
const p0 = pos(r0n);
|
||||
r1ns.forEach(n => { const p1=pos(n); mkCurve(p0.cx,p0.b,p1.cx,p1.t,'#93c5fd'); });
|
||||
}
|
||||
const gm = document.getElementById('org-gm');
|
||||
const vpBranches = document.querySelectorAll('#org-r2 > .org-branch');
|
||||
if(gm && vpBranches.length){
|
||||
const pGm = pos(gm);
|
||||
vpBranches.forEach(br => {
|
||||
const vpn = br.querySelector(':scope > .org-node');
|
||||
if(!vpn) return;
|
||||
const pVp = pos(vpn);
|
||||
mkCurve(pGm.cx,pGm.b,pVp.cx,pVp.t,'#93c5fd');
|
||||
});
|
||||
}
|
||||
vpBranches.forEach(br => {
|
||||
const vpn = br.querySelector(':scope > .org-node');
|
||||
if(!vpn) return;
|
||||
const pVp = pos(vpn);
|
||||
const depts = br.querySelectorAll(':scope > div:last-child .org-node');
|
||||
depts.forEach(dn => { const pD=pos(dn); mkCurve(pVp.cx,pVp.b,pD.cx,pD.t,'#93c5fd'); });
|
||||
});
|
||||
}
|
||||
|
||||
// ═══════════════════════════════════
|
||||
// Tab 1: 岗位职责
|
||||
// ═══════════════════════════════════
|
||||
(function(){
|
||||
const tb = document.createElement('button');
|
||||
tb.className = 'tab';
|
||||
tb.innerHTML = '<span class="tn">👤</span>岗位职责';
|
||||
document.getElementById('tabs').appendChild(tb);
|
||||
|
||||
const pn = document.createElement('div');
|
||||
pn.className = 'panel';
|
||||
pn.id = 'jobs';
|
||||
|
||||
let h = '<div class="resp-grid">';
|
||||
JOBS.forEach(j => {
|
||||
h += '<div class="resp-card" data-name="'+j.name+'">';
|
||||
h += '<div class="resp-hd" onclick="this.parentElement.classList.toggle(\'open\')">';
|
||||
h += '<div class="resp-icon" style="background:'+j.bg+';color:'+j.color+'">'+j.icon+'</div>';
|
||||
h += '<div><div class="resp-title">'+j.name+'</div><div class="resp-sub">上级:'+j.lead+'</div></div>';
|
||||
h += '<div class="resp-arrow">▶</div>';
|
||||
h += '</div>';
|
||||
h += '<div class="resp-bd">';
|
||||
j.duties.forEach(d => {
|
||||
const tc = d.tag==='core'?'core':(d.tag==='check'?'check':'support');
|
||||
const tl = d.tag==='core'?'核心':(d.tag==='check'?'验收':'支撑');
|
||||
h += '<div class="resp-item"><span class="resp-bullet">•</span><div><b>'+d.t+'</b><span class="resp-tag '+tc+'">'+tl+'</span><br><span style="color:#64748b;font-size:11.5px">'+d.d+'</span></div></div>';
|
||||
});
|
||||
h += '</div></div>';
|
||||
});
|
||||
h += '</div>';
|
||||
pn.innerHTML = h;
|
||||
document.getElementById('panels').appendChild(pn);
|
||||
|
||||
tb.onclick = () => {
|
||||
document.querySelectorAll('.tab').forEach(x => x.classList.remove('on'));
|
||||
document.querySelectorAll('.panel').forEach(x => x.classList.remove('on'));
|
||||
tb.classList.add('on');
|
||||
pn.classList.add('on');
|
||||
};
|
||||
})();
|
||||
|
||||
// ═══════════════════════════════════
|
||||
// 初始化
|
||||
// ═══════════════════════════════════
|
||||
window.addEventListener('load', () => {
|
||||
setTimeout(() => drawOrgLines(), 350);
|
||||
});
|
||||
window.addEventListener('resize', () => {
|
||||
const ap = document.querySelector('.panel.on');
|
||||
if(!ap) return;
|
||||
if(ap.id === 'org') drawOrgLines();
|
||||
else if(ap.id !== 'jobs') drawLines(ap.id);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
19
klp-ui/src/api/cost/coil.js
Normal file
19
klp-ui/src/api/cost/coil.js
Normal file
@@ -0,0 +1,19 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
const BASE = '/wms/materialCoil'
|
||||
|
||||
export function getCoilHoardingStats(data) {
|
||||
return request({
|
||||
url: BASE + '/hoardingStatistics',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function listCoilHoardingDetail(query) {
|
||||
return request({
|
||||
url: BASE + '/listWithQrcode',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
53
klp-ui/src/api/cost/prodMetricResult.js
Normal file
53
klp-ui/src/api/cost/prodMetricResult.js
Normal file
@@ -0,0 +1,53 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询生产指标计算结果列表
|
||||
export function listProdMetricResult(query) {
|
||||
return request({
|
||||
url: '/cost/prodMetricResult/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询生产指标计算结果详细
|
||||
export function getProdMetricResult(resultId) {
|
||||
return request({
|
||||
url: '/cost/prodMetricResult/' + resultId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增生产指标计算结果
|
||||
export function addProdMetricResult(data) {
|
||||
return request({
|
||||
url: '/cost/prodMetricResult',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改生产指标计算结果
|
||||
export function updateProdMetricResult(data) {
|
||||
return request({
|
||||
url: '/cost/prodMetricResult',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除生产指标计算结果
|
||||
export function delProdMetricResult(resultId) {
|
||||
return request({
|
||||
url: '/cost/prodMetricResult/' + resultId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 批量保存计算结果(先删后插)
|
||||
export function batchSaveProdMetricResult(data) {
|
||||
return request({
|
||||
url: '/cost/prodMetricResult/batch',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询检验委托单表列表
|
||||
export function listInspectionCommission(query) {
|
||||
return request({
|
||||
url: '/is/inspectionCommission/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询检验委托单表详细
|
||||
export function getInspectionCommission(commissionId) {
|
||||
return request({
|
||||
url: '/is/inspectionCommission/' + commissionId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增检验委托单表
|
||||
export function addInspectionCommission(data) {
|
||||
return request({
|
||||
url: '/is/inspectionCommission',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改检验委托单表
|
||||
export function updateInspectionCommission(data) {
|
||||
return request({
|
||||
url: '/is/inspectionCommission',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除检验委托单表
|
||||
export function delInspectionCommission(commissionId) {
|
||||
return request({
|
||||
url: '/is/inspectionCommission/' + commissionId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询检验任务表列表
|
||||
export function listInspectionTask(query) {
|
||||
return request({
|
||||
url: '/is/inspectionTask/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询检验任务表详细
|
||||
export function getInspectionTask(taskId) {
|
||||
return request({
|
||||
url: '/is/inspectionTask/' + taskId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增检验任务表
|
||||
export function addInspectionTask(data) {
|
||||
return request({
|
||||
url: '/is/inspectionTask',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改检验任务表
|
||||
export function updateInspectionTask(data) {
|
||||
return request({
|
||||
url: '/is/inspectionTask',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除检验任务表
|
||||
export function delInspectionTask(taskId) {
|
||||
return request({
|
||||
url: '/is/inspectionTask/' + taskId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询样品库存表列表
|
||||
export function listSampleInventory(query) {
|
||||
return request({
|
||||
url: '/is/sampleInventory/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询样品库存表详细
|
||||
export function getSampleInventory(sampleId) {
|
||||
return request({
|
||||
url: '/is/sampleInventory/' + sampleId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增样品库存表
|
||||
export function addSampleInventory(data) {
|
||||
return request({
|
||||
url: '/is/sampleInventory',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改样品库存表
|
||||
export function updateSampleInventory(data) {
|
||||
return request({
|
||||
url: '/is/sampleInventory',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除样品库存表
|
||||
export function delSampleInventory(sampleId) {
|
||||
return request({
|
||||
url: '/is/sampleInventory/' + sampleId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
44
klp-ui/src/api/mes/qc/inspectionDetail.js
Normal file
44
klp-ui/src/api/mes/qc/inspectionDetail.js
Normal file
@@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询检验项目明细列表
|
||||
export function listInspectionDetail(query) {
|
||||
return request({
|
||||
url: '/wms/inspectionDetail/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询检验项目明细详细
|
||||
export function getInspectionDetail(detailId) {
|
||||
return request({
|
||||
url: '/wms/inspectionDetail/' + detailId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增检验项目明细
|
||||
export function addInspectionDetail(data) {
|
||||
return request({
|
||||
url: '/wms/inspectionDetail',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改检验项目明细
|
||||
export function updateInspectionDetail(data) {
|
||||
return request({
|
||||
url: '/wms/inspectionDetail',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除检验项目明细
|
||||
export function delInspectionDetail(detailId) {
|
||||
return request({
|
||||
url: '/wms/inspectionDetail/' + detailId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
44
klp-ui/src/api/mes/qc/inspectionMain.js
Normal file
44
klp-ui/src/api/mes/qc/inspectionMain.js
Normal file
@@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询检验主列表
|
||||
export function listInspectionMain(query) {
|
||||
return request({
|
||||
url: '/wms/inspectionMain/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询检验主详细
|
||||
export function getInspectionMain(mainId) {
|
||||
return request({
|
||||
url: '/wms/inspectionMain/' + mainId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增检验主
|
||||
export function addInspectionMain(data) {
|
||||
return request({
|
||||
url: '/wms/inspectionMain',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改检验主
|
||||
export function updateInspectionMain(data) {
|
||||
return request({
|
||||
url: '/wms/inspectionMain',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除检验主
|
||||
export function delInspectionMain(mainId) {
|
||||
return request({
|
||||
url: '/wms/inspectionMain/' + mainId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
44
klp-ui/src/api/mes/qc/inspectionTensile.js
Normal file
44
klp-ui/src/api/mes/qc/inspectionTensile.js
Normal file
@@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询金属材料室温拉伸试验主记录列表
|
||||
export function listInspectionTensile(query) {
|
||||
return request({
|
||||
url: '/wms/inspectionTensile/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询金属材料室温拉伸试验主记录详细
|
||||
export function getInspectionTensile(testId) {
|
||||
return request({
|
||||
url: '/wms/inspectionTensile/' + testId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增金属材料室温拉伸试验主记录
|
||||
export function addInspectionTensile(data) {
|
||||
return request({
|
||||
url: '/wms/inspectionTensile',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改金属材料室温拉伸试验主记录
|
||||
export function updateInspectionTensile(data) {
|
||||
return request({
|
||||
url: '/wms/inspectionTensile',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除金属材料室温拉伸试验主记录
|
||||
export function delInspectionTensile(testId) {
|
||||
return request({
|
||||
url: '/wms/inspectionTensile/' + testId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
44
klp-ui/src/api/mes/qc/inspectionTensileDetail.js
Normal file
44
klp-ui/src/api/mes/qc/inspectionTensileDetail.js
Normal file
@@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询金属材料室温拉伸试验样品明细列表
|
||||
export function listInspectionTensileDetail(query) {
|
||||
return request({
|
||||
url: '/wms/inspectionTensileDetail/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询金属材料室温拉伸试验样品明细详细
|
||||
export function getInspectionTensileDetail(detailId) {
|
||||
return request({
|
||||
url: '/wms/inspectionTensileDetail/' + detailId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增金属材料室温拉伸试验样品明细
|
||||
export function addInspectionTensileDetail(data) {
|
||||
return request({
|
||||
url: '/wms/inspectionTensileDetail',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改金属材料室温拉伸试验样品明细
|
||||
export function updateInspectionTensileDetail(data) {
|
||||
return request({
|
||||
url: '/wms/inspectionTensileDetail',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除金属材料室温拉伸试验样品明细
|
||||
export function delInspectionTensileDetail(detailId) {
|
||||
return request({
|
||||
url: '/wms/inspectionTensileDetail/' + detailId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
@@ -38,8 +38,9 @@ export function updateAttendanceSchedule(data) {
|
||||
// 删除排班记录(支持批量删除,传递csv格式字符串如:1,2,3)
|
||||
export function delAttendanceSchedule(ids) {
|
||||
return request({
|
||||
url: '/wms/attendanceSchedule/' + ids,
|
||||
method: 'delete'
|
||||
url: '/wms/attendanceSchedule/remove',
|
||||
method: 'delete',
|
||||
data: ids,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
44
klp-ui/src/api/wms/attendanceTemplate.js
Normal file
44
klp-ui/src/api/wms/attendanceTemplate.js
Normal file
@@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询排班模板列表
|
||||
export function listAttendanceTemplate(query) {
|
||||
return request({
|
||||
url: '/wms/attendanceTemplate/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询排班模板详细
|
||||
export function getAttendanceTemplate(templateId) {
|
||||
return request({
|
||||
url: '/wms/attendanceTemplate/' + templateId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增排班模板
|
||||
export function addAttendanceTemplate(data) {
|
||||
return request({
|
||||
url: '/wms/attendanceTemplate',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改排班模板
|
||||
export function updateAttendanceTemplate(data) {
|
||||
return request({
|
||||
url: '/wms/attendanceTemplate',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除排班模板
|
||||
export function delAttendanceTemplate(templateId) {
|
||||
return request({
|
||||
url: '/wms/attendanceTemplate/' + templateId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
@@ -35,27 +35,42 @@ export function getMaterialCoil(CoilMaterialId) {
|
||||
}
|
||||
|
||||
export function addMaterialCoil(data) {
|
||||
// 对data进行预处理,将currentCoilNo去除首位的空格
|
||||
const payload = {
|
||||
...data,
|
||||
currentCoilNo: data.currentCoilNo.trim(),
|
||||
}
|
||||
return request({
|
||||
url: '/wms/materialCoil',
|
||||
method: 'post',
|
||||
data: data
|
||||
data: payload
|
||||
})
|
||||
}
|
||||
|
||||
export function updateMaterialCoil(data) {
|
||||
// 对data进行预处理,将currentCoilNo去除首位的空格
|
||||
const payload = {
|
||||
...data,
|
||||
currentCoilNo: data.currentCoilNo.trim(),
|
||||
}
|
||||
return request({
|
||||
url: '/wms/materialCoil',
|
||||
method: 'put',
|
||||
data: data
|
||||
data: payload
|
||||
})
|
||||
}
|
||||
|
||||
// 简单更新钢卷物料表
|
||||
export function updateMaterialCoilSimple(data) {
|
||||
// 对data进行预处理,将currentCoilNo去除首位的空格
|
||||
const payload = {
|
||||
...data,
|
||||
currentCoilNo: data.currentCoilNo.trim(),
|
||||
}
|
||||
return request({
|
||||
url: '/wms/materialCoil/update',
|
||||
method: 'put',
|
||||
data: data
|
||||
data: payload
|
||||
})
|
||||
}
|
||||
|
||||
@@ -107,19 +122,32 @@ export function getMaterialCoilDistributionByActualWarehouse(query) {
|
||||
|
||||
// 钢卷分卷
|
||||
export function splitMaterialCoil(data) {
|
||||
const payload = {
|
||||
...data,
|
||||
// currentCoilNo: data.currentCoilNo.trim(),
|
||||
newCoils: data.newCoils?.map(item => ({
|
||||
...item,
|
||||
currentCoilNo: item.currentCoilNo?.trim(),
|
||||
})),
|
||||
}
|
||||
return request({
|
||||
url: '/wms/materialCoil',
|
||||
method: 'put',
|
||||
data: data
|
||||
data: payload
|
||||
})
|
||||
}
|
||||
|
||||
// 钢卷合卷
|
||||
export function mergeMaterialCoil(data) {
|
||||
// 对data进行预处理,将currentCoilNo去除首位的空格
|
||||
const payload = {
|
||||
...data,
|
||||
currentCoilNo: data.currentCoilNo.trim(),
|
||||
}
|
||||
return request({
|
||||
url: '/wms/materialCoil/merge',
|
||||
method: 'post',
|
||||
data: data
|
||||
data: payload
|
||||
})
|
||||
}
|
||||
|
||||
@@ -283,10 +311,15 @@ export function startSpecialSplit(coilId, actionType) {
|
||||
* 创建一个分条
|
||||
*/
|
||||
export function createSpecialChild(parentCoilId, pendingActionId, data) {
|
||||
// 对data进行预处理,将currentCoilNo去除首位的空格
|
||||
const payload = {
|
||||
...data,
|
||||
currentCoilNo: data.currentCoilNo.trim(),
|
||||
}
|
||||
return request({
|
||||
url: '/wms/materialCoil/specialSplit/createChild',
|
||||
method: 'post',
|
||||
data: data,
|
||||
data: payload,
|
||||
params: {
|
||||
parentCoilId,
|
||||
pendingActionId
|
||||
@@ -496,4 +529,21 @@ export function getExportColumns() {
|
||||
url: '/wms/materialCoil/exportColumns',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
export function listForPeriodComparison(data) {
|
||||
return request({
|
||||
url: '/wms/materialCoil/listForPeriodComparison',
|
||||
method: 'post',
|
||||
timeout: 600000,
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 钢卷加工链追溯查询(双向:向上到根节点,向下到所有后代)
|
||||
export function getCoilChain(coilId) {
|
||||
return request({
|
||||
url: '/wms/materialCoil/chain/all/' + coilId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
62
klp-ui/src/api/wms/materialWarning.js
Normal file
62
klp-ui/src/api/wms/materialWarning.js
Normal file
@@ -0,0 +1,62 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询钢卷通用维度告警(长度/厚度/宽度)列表
|
||||
export function listMaterialWarning(query) {
|
||||
return request({
|
||||
url: '/wms/materialWarning/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询钢卷通用维度告警(长度/厚度/宽度)详细
|
||||
export function getMaterialWarning(warningId) {
|
||||
return request({
|
||||
url: '/wms/materialWarning/' + warningId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增钢卷通用维度告警(长度/厚度/宽度)
|
||||
export function addMaterialWarning(data) {
|
||||
return request({
|
||||
url: '/wms/materialWarning',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改钢卷通用维度告警(长度/厚度/宽度)
|
||||
export function updateMaterialWarning(data) {
|
||||
return request({
|
||||
url: '/wms/materialWarning',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 批量处理钢卷通用维度告警(长度/厚度/宽度)
|
||||
export function batchHandleMaterial(data) {
|
||||
return request({
|
||||
url: '/wms/materialWarning/batchHandle',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 批量处理历史告警(标记今天以前的所有记录为指定状态)
|
||||
export function batchHandleHistory(data) {
|
||||
return request({
|
||||
url: '/wms/materialWarning/batchHandleHistory',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除钢卷通用维度告警(长度/厚度/宽度)
|
||||
export function delMaterialWarning(warningId) {
|
||||
return request({
|
||||
url: '/wms/materialWarning/' + warningId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
44
klp-ui/src/api/wms/post.js
Normal file
44
klp-ui/src/api/wms/post.js
Normal file
@@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询岗位列表
|
||||
export function listPost(query) {
|
||||
return request({
|
||||
url: '/wms/post/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询岗位详细
|
||||
export function getPost(postId) {
|
||||
return request({
|
||||
url: '/wms/post/' + postId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增岗位
|
||||
export function addPost(data) {
|
||||
return request({
|
||||
url: '/wms/post',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改岗位
|
||||
export function updatePost(data) {
|
||||
return request({
|
||||
url: '/wms/post',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除岗位
|
||||
export function delPost(postId) {
|
||||
return request({
|
||||
url: '/wms/post/' + postId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
44
klp-ui/src/api/wms/postDuty.js
Normal file
44
klp-ui/src/api/wms/postDuty.js
Normal file
@@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询岗位职责列表
|
||||
export function listPostDuty(query) {
|
||||
return request({
|
||||
url: '/wms/postDuty/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询岗位职责详细
|
||||
export function getPostDuty(dutyId) {
|
||||
return request({
|
||||
url: '/wms/postDuty/' + dutyId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增岗位职责
|
||||
export function addPostDuty(data) {
|
||||
return request({
|
||||
url: '/wms/postDuty',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改岗位职责
|
||||
export function updatePostDuty(data) {
|
||||
return request({
|
||||
url: '/wms/postDuty',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除岗位职责
|
||||
export function delPostDuty(dutyId) {
|
||||
return request({
|
||||
url: '/wms/postDuty/' + dutyId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
BIN
klp-ui/src/assets/fonts/alimama/AlimamaShuHeiTi-Bold.otf
Normal file
BIN
klp-ui/src/assets/fonts/alimama/AlimamaShuHeiTi-Bold.otf
Normal file
Binary file not shown.
BIN
klp-ui/src/assets/fonts/alimama/AlimamaShuHeiTi-Bold.ttf
Normal file
BIN
klp-ui/src/assets/fonts/alimama/AlimamaShuHeiTi-Bold.ttf
Normal file
Binary file not shown.
BIN
klp-ui/src/assets/fonts/alimama/AlimamaShuHeiTi-Bold.woff
Normal file
BIN
klp-ui/src/assets/fonts/alimama/AlimamaShuHeiTi-Bold.woff
Normal file
Binary file not shown.
BIN
klp-ui/src/assets/fonts/alimama/AlimamaShuHeiTi-Bold.woff2
Normal file
BIN
klp-ui/src/assets/fonts/alimama/AlimamaShuHeiTi-Bold.woff2
Normal file
Binary file not shown.
19
klp-ui/src/assets/fonts/alimama/INSTRUCTION.txt
Normal file
19
klp-ui/src/assets/fonts/alimama/INSTRUCTION.txt
Normal file
@@ -0,0 +1,19 @@
|
||||
A. 在哪里可以下载阿里妈妈数黑体?
|
||||
渠道一:https://www.iconfont.cn/fonts/detail?cnid=a9fXc2HD9n7s
|
||||
渠道二:fonts.alibabagroup.com
|
||||
|
||||
|
||||
B. 阿里阿里妈妈数黑体简介
|
||||
基本信息:阿里妈妈数黑体为中文简体字库,收纳的中文字符包括但不限于GB2312,共计6767个汉字;英文大小写共52个;常用标点符号共206个,总计7025个字符。
|
||||
|
||||
设计说明:阿里妈妈数黑体字型饱满、体态中正,布白极具现代韵律,落笔厚实而简练;字里行间流露出先锋、前卫和时尚的视觉感受。适用于电商、广告、品牌形象、推广物料等场景。
|
||||
|
||||
C. 使用反馈、商业合作等问题,请email:
|
||||
alimama-font@list.alibaba-inc.com
|
||||
——
|
||||
重要!安装前请先阅读此文档
|
||||
请先按照下面流程安装文件夹里的字体包。
|
||||
|
||||
1. 打开字体文件夹,根据不同系统需要选择OTF或TTF版本
|
||||
|
||||
2. 字体所包含只有一个字重(双击安装)。
|
||||
15
klp-ui/src/assets/fonts/alimama/LICENSE.txt
Normal file
15
klp-ui/src/assets/fonts/alimama/LICENSE.txt
Normal file
@@ -0,0 +1,15 @@
|
||||
阿里妈妈数黑体法律声明
|
||||
|
||||
1. 阿里妈妈数黑体字体及包含该字体的字库软件,合称“阿里妈妈数黑体”。
|
||||
|
||||
2. 阿里妈妈数黑体的知识产权和相关权益归属于淘宝(中国)软件有限公司(以下简称“阿里妈妈”),受《中华人民共和国著作权法》及其他适用法律法规、国际公约、条约的保护。
|
||||
|
||||
3. 阿里妈妈授权个人、企业等用户在遵守本声明相关条款的前提下,可以下载、安装和使用上述阿里妈妈字体,该授权是免费的普通许可,用户可基于合法目的用于商业用途或非商业用途,但不得以任何违反本声明第4条及法律法规、政策、规章或公序良俗的方式使用。
|
||||
|
||||
4. 除本法律声明中明确授权之外,阿里妈妈未授予用户关于阿里妈妈数黑体的其他权利。未经阿里妈妈授权,任何人不得:1)对阿里妈妈数黑体进行仿制、转换、翻译、反编译、反向工程、拆分、破解或以其他方式试图从该字库软件获取源代码;2)删除、覆盖或修改阿里妈妈数黑体法律声明的全部或部分内容;3)将阿里妈妈数黑体进行单独定价出售、出租、出借、转让、转授权、或采取其他未经阿里妈妈授权的行为;4) 发布任何使外界误认其与阿里妈妈或其关联公司存在合作、赞助或背书等商业关联的不实信息。
|
||||
|
||||
5. 阿里妈妈授予用户的上述授权不附带任何明示或暗示的保证,不对任何人因从非阿里妈妈官方渠道或指定渠道下载、安装或使用阿里妈妈数黑体而引发的任何直接或间接损失承担责任。
|
||||
|
||||
6. 本声明的解释、履行与争议解决适用中华人民共和国的法律。用户与阿里妈妈就阿里妈妈数黑体的使用若发生争议,双方应友好协商,若协商不成,任一方有权向浙江省杭州市有管辖权的人民法院提起诉讼。
|
||||
|
||||
反馈与咨询联系方:alimama-font@list.alibaba-inc.com
|
||||
@@ -93,6 +93,7 @@
|
||||
// 明确默认状态样式(关键修复)
|
||||
background: transparent !important;
|
||||
box-shadow: none !important;
|
||||
position: relative;
|
||||
|
||||
overflow: hidden !important;
|
||||
text-overflow: ellipsis !important;
|
||||
@@ -303,4 +304,18 @@
|
||||
|
||||
#app .sidebar-container .nest-menu .el-submenu .el-submenu__title {
|
||||
margin: 0 4px;
|
||||
}
|
||||
}
|
||||
|
||||
// 子菜单标识图标
|
||||
.submenu-indicator {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
opacity: 0.5;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
// 叶子页面无标识
|
||||
@@ -1,11 +1,28 @@
|
||||
<template>
|
||||
<div class="template-manager">
|
||||
<div class="left-panel">
|
||||
<div class="custom-tabs">
|
||||
<div
|
||||
:class="['custom-tab', { active: activeTab === 'shared' }]"
|
||||
@click="switchTab('shared')"
|
||||
>共享模板</div>
|
||||
<div
|
||||
:class="['custom-tab', { active: activeTab === 'personal' }]"
|
||||
@click="switchTab('personal')"
|
||||
>自用模板</div>
|
||||
</div>
|
||||
<div class="panel-header">
|
||||
<span class="panel-title">模板列表</span>
|
||||
<el-button icon="el-icon-plus" size="mini" type="primary" @click="addTemplate">新增</el-button>
|
||||
<div class="panel-header-actions">
|
||||
<el-button icon="el-icon-plus" size="mini" type="primary" @click="addTemplate">新增</el-button>
|
||||
<el-button icon="el-icon-download" size="mini" type="success" @click="exportCsv" :disabled="!currentTemplate.id">导出</el-button>
|
||||
<el-button icon="el-icon-upload2" size="mini" type="info" @click="importCsv">导入</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="template-list">
|
||||
<div class="shared-toolbar" v-show="activeTab === 'shared'">
|
||||
<el-input v-model="sharedQueryParams.templateName" placeholder="搜索模板名称" size="small" clearable prefix-icon="el-icon-search" @input="handleSearchTemplate" style="width: 200px;" />
|
||||
</div>
|
||||
<div class="template-list" v-loading="templateLoading">
|
||||
<div
|
||||
v-for="template in templateList"
|
||||
:key="template.id"
|
||||
@@ -25,7 +42,18 @@
|
||||
<el-empty description="暂无模板" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="shared-pagination" v-show="activeTab === 'shared'">
|
||||
<el-pagination
|
||||
background
|
||||
layout="prev, pager, next"
|
||||
:current-page="sharedQueryParams.pageNum"
|
||||
:page-size="sharedQueryParams.pageSize"
|
||||
:total="sharedTotal"
|
||||
@current-change="handleSharedPageChange"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<input type="file" ref="csvInput" accept=".csv" style="display:none" @change="handleCsvImport" />
|
||||
<div class="right-panel">
|
||||
<div class="panel-header">
|
||||
<span class="panel-title">员工配置</span>
|
||||
@@ -62,6 +90,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listAttendanceTemplate, addAttendanceTemplate, updateAttendanceTemplate, delAttendanceTemplate } from '@/api/wms/attendanceTemplate'
|
||||
|
||||
export default {
|
||||
name: 'AttendanceTemplateManager',
|
||||
props: {
|
||||
@@ -72,7 +102,16 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
templateList: [],
|
||||
activeTab: 'shared',
|
||||
sharedTemplateList: [],
|
||||
sharedTemplateLoading: false,
|
||||
sharedQueryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
templateName: ''
|
||||
},
|
||||
sharedTotal: 0,
|
||||
personalTemplateList: [],
|
||||
currentTemplate: {
|
||||
id: '',
|
||||
name: '',
|
||||
@@ -83,22 +122,202 @@ export default {
|
||||
selectedEmployeeIds: [],
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
templateList() {
|
||||
return this.activeTab === 'shared' ? this.sharedTemplateList : this.personalTemplateList
|
||||
},
|
||||
templateLoading() {
|
||||
return this.activeTab === 'shared' ? this.sharedTemplateLoading : false
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.loadTemplates()
|
||||
},
|
||||
methods: {
|
||||
loadTemplates() {
|
||||
try {
|
||||
const templates = localStorage.getItem('attendanceTemplates')
|
||||
this.templateList = templates ? JSON.parse(templates) : []
|
||||
} catch (e) {
|
||||
this.templateList = []
|
||||
if (this.activeTab === 'shared') {
|
||||
this.sharedTemplateLoading = true
|
||||
const query = {
|
||||
pageNum: this.sharedQueryParams.pageNum,
|
||||
pageSize: this.sharedQueryParams.pageSize
|
||||
}
|
||||
if (this.sharedQueryParams.templateName) {
|
||||
query.templateName = this.sharedQueryParams.templateName
|
||||
}
|
||||
listAttendanceTemplate(query).then(res => {
|
||||
this.sharedTemplateList = (res.rows || []).map(row => ({
|
||||
id: row.templateId,
|
||||
name: row.templateName,
|
||||
employeeIds: this.parseTemplateContent(row.templateContent),
|
||||
employeeCount: this.parseTemplateContent(row.templateContent).length,
|
||||
createTime: row.createTime
|
||||
}))
|
||||
this.sharedTotal = res.total || 0
|
||||
}).finally(() => {
|
||||
this.sharedTemplateLoading = false
|
||||
})
|
||||
} else {
|
||||
try {
|
||||
const templates = localStorage.getItem('attendanceTemplates')
|
||||
this.personalTemplateList = templates ? JSON.parse(templates) : []
|
||||
} catch (e) {
|
||||
this.personalTemplateList = []
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
saveTemplates() {
|
||||
localStorage.setItem('attendanceTemplates', JSON.stringify(this.templateList))
|
||||
this.$emit('update')
|
||||
parseTemplateContent(content) {
|
||||
if (!content) return []
|
||||
try {
|
||||
const parsed = JSON.parse(content)
|
||||
return Array.isArray(parsed) ? parsed : []
|
||||
} catch (e) {
|
||||
return content.split(',').filter(Boolean)
|
||||
}
|
||||
},
|
||||
|
||||
buildTemplateContent(employeeIds) {
|
||||
return JSON.stringify(employeeIds)
|
||||
},
|
||||
|
||||
handleSearchTemplate() {
|
||||
this.sharedQueryParams.pageNum = 1
|
||||
this.loadTemplates()
|
||||
},
|
||||
|
||||
handleSharedPageChange(pageNum) {
|
||||
this.sharedQueryParams.pageNum = pageNum
|
||||
this.loadTemplates()
|
||||
},
|
||||
|
||||
switchTab(tab) {
|
||||
if (this.activeTab === tab) return
|
||||
this.activeTab = tab
|
||||
this.loadTemplates()
|
||||
this.resetForm()
|
||||
},
|
||||
|
||||
savePersonalTemplates() {
|
||||
localStorage.setItem('attendanceTemplates', JSON.stringify(this.personalTemplateList))
|
||||
},
|
||||
|
||||
exportCsv() {
|
||||
if (!this.currentTemplate.id || !this.currentTemplate.employeeIds.length) {
|
||||
this.$message.warning('当前模板没有员工可导出')
|
||||
return
|
||||
}
|
||||
const empMap = {}
|
||||
this.employeeList.forEach(emp => {
|
||||
empMap[emp.key] = emp.label
|
||||
})
|
||||
let csvContent = '\uFEFF员工ID,员工姓名\n'
|
||||
this.currentTemplate.employeeIds.forEach(id => {
|
||||
const name = empMap[id] || id
|
||||
csvContent += `${id},${name}\n`
|
||||
})
|
||||
const blob = new Blob([csvContent], { type: 'text/csv;charset=utf-8;' })
|
||||
const link = document.createElement('a')
|
||||
const url = URL.createObjectURL(blob)
|
||||
link.setAttribute('href', url)
|
||||
link.setAttribute('download', `${this.currentTemplate.name}.csv`)
|
||||
link.style.visibility = 'hidden'
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
document.body.removeChild(link)
|
||||
},
|
||||
|
||||
importCsv() {
|
||||
this.$refs.csvInput.click()
|
||||
},
|
||||
|
||||
handleCsvImport(event) {
|
||||
const file = event.target.files[0]
|
||||
if (!file) return
|
||||
|
||||
const reader = new FileReader()
|
||||
reader.onload = async (e) => {
|
||||
const content = e.target.result
|
||||
const lines = content.split('\n').filter(line => line.trim())
|
||||
if (lines.length === 0) {
|
||||
this.$message.warning('CSV文件内容为空')
|
||||
event.target.value = ''
|
||||
return
|
||||
}
|
||||
const header = lines[0].trim()
|
||||
if (header !== '员工ID,员工姓名' && header !== '员工ID\t员工姓名') {
|
||||
this.$message.warning('CSV文件格式不正确,表头应为"员工ID,员工姓名"')
|
||||
event.target.value = ''
|
||||
return
|
||||
}
|
||||
|
||||
const empKeySet = new Set()
|
||||
const empLabelMap = {}
|
||||
this.employeeList.forEach(emp => {
|
||||
empKeySet.add(String(emp.key))
|
||||
empLabelMap[emp.label] = emp.key
|
||||
})
|
||||
|
||||
const matchedIds = []
|
||||
const notFoundNames = []
|
||||
const lines_data = lines.slice(1)
|
||||
for (const line of lines_data) {
|
||||
const trimmed = line.trim()
|
||||
if (!trimmed) continue
|
||||
const parts = trimmed.includes('\t') ? trimmed.split('\t') : trimmed.split(',')
|
||||
const key = parts[0] ? parts[0].trim() : ''
|
||||
const label = parts.length > 1 ? parts.slice(1).join(',').trim() : key
|
||||
|
||||
if (key && empKeySet.has(String(key))) {
|
||||
matchedIds.push(key)
|
||||
} else if (label && empLabelMap[label] !== undefined) {
|
||||
matchedIds.push(empLabelMap[label])
|
||||
} else {
|
||||
notFoundNames.push(label || key)
|
||||
}
|
||||
}
|
||||
|
||||
if (matchedIds.length === 0) {
|
||||
this.$message.warning('CSV文件中没有匹配到任何员工')
|
||||
event.target.value = ''
|
||||
return
|
||||
}
|
||||
|
||||
const templateName = file.name.replace(/\.csv$/i, '')
|
||||
|
||||
if (this.activeTab === 'shared') {
|
||||
await addAttendanceTemplate({
|
||||
templateName: templateName,
|
||||
templateContent: this.buildTemplateContent(matchedIds)
|
||||
})
|
||||
this.loadTemplates()
|
||||
const newTemplate = this.sharedTemplateList.find(t => t.name === templateName)
|
||||
if (newTemplate) {
|
||||
this.currentTemplate = JSON.parse(JSON.stringify(newTemplate))
|
||||
this.selectedEmployeeIds = [...newTemplate.employeeIds]
|
||||
}
|
||||
} else {
|
||||
const templateData = {
|
||||
id: Date.now().toString(),
|
||||
name: templateName,
|
||||
employeeIds: matchedIds,
|
||||
employeeCount: matchedIds.length,
|
||||
createTime: new Date().toLocaleString('zh-CN')
|
||||
}
|
||||
this.personalTemplateList.push(templateData)
|
||||
this.savePersonalTemplates()
|
||||
this.currentTemplate = JSON.parse(JSON.stringify(templateData))
|
||||
this.selectedEmployeeIds = [...matchedIds]
|
||||
}
|
||||
this.$emit('update')
|
||||
|
||||
if (notFoundNames.length > 0) {
|
||||
this.$message.warning(`成功导入${matchedIds.length}名员工,${notFoundNames.length}名未匹配:${notFoundNames.join('、')}`)
|
||||
} else {
|
||||
this.$message.success(`成功导入${matchedIds.length}名员工`)
|
||||
}
|
||||
}
|
||||
reader.readAsText(file, 'UTF-8')
|
||||
event.target.value = ''
|
||||
},
|
||||
|
||||
addTemplate() {
|
||||
@@ -118,20 +337,29 @@ export default {
|
||||
},
|
||||
|
||||
deleteTemplate(template) {
|
||||
this.$confirm('确定删除?', '提示', {
|
||||
const confirmMsg = this.activeTab === 'shared'
|
||||
? '删除后该模板所有人都无法使用,确定删除?'
|
||||
: '确定删除?'
|
||||
this.$confirm(confirmMsg, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
const index = this.templateList.findIndex(t => t.id === template.id)
|
||||
if (index > -1) {
|
||||
this.templateList.splice(index, 1)
|
||||
this.saveTemplates()
|
||||
this.$message.success('删除成功')
|
||||
if (this.currentTemplate.id === template.id) {
|
||||
this.resetForm()
|
||||
}).then(async () => {
|
||||
if (this.activeTab === 'shared') {
|
||||
await delAttendanceTemplate(template.id)
|
||||
} else {
|
||||
const index = this.personalTemplateList.findIndex(t => t.id === template.id)
|
||||
if (index > -1) {
|
||||
this.personalTemplateList.splice(index, 1)
|
||||
this.savePersonalTemplates()
|
||||
}
|
||||
}
|
||||
this.$message.success('删除成功')
|
||||
if (this.currentTemplate.id === template.id) {
|
||||
this.resetForm()
|
||||
}
|
||||
this.loadTemplates()
|
||||
this.$emit('update')
|
||||
}).catch(() => {
|
||||
this.$message.info('已取消')
|
||||
})
|
||||
@@ -142,32 +370,52 @@ export default {
|
||||
this.selectedEmployeeIds = [...template.employeeIds]
|
||||
},
|
||||
|
||||
saveTemplate() {
|
||||
async saveTemplate() {
|
||||
if (!this.currentTemplate.name.trim()) {
|
||||
this.$message.warning('请输入模板名称')
|
||||
return
|
||||
}
|
||||
|
||||
const templateData = {
|
||||
id: this.currentTemplate.id || Date.now().toString(),
|
||||
name: this.currentTemplate.name.trim(),
|
||||
employeeIds: [...this.selectedEmployeeIds],
|
||||
employeeCount: this.selectedEmployeeIds.length,
|
||||
createTime: this.currentTemplate.id ? this.currentTemplate.createTime : new Date().toLocaleString('zh-CN')
|
||||
}
|
||||
|
||||
if (this.currentTemplate.id) {
|
||||
const index = this.templateList.findIndex(t => t.id === this.currentTemplate.id)
|
||||
if (index > -1) {
|
||||
this.templateList[index] = templateData
|
||||
if (this.activeTab === 'shared') {
|
||||
const apiData = {
|
||||
templateName: this.currentTemplate.name.trim(),
|
||||
templateContent: this.buildTemplateContent(this.selectedEmployeeIds)
|
||||
}
|
||||
this.$message.success('修改成功')
|
||||
} else {
|
||||
this.templateList.push(templateData)
|
||||
this.$message.success('新增成功')
|
||||
}
|
||||
|
||||
this.saveTemplates()
|
||||
if (this.currentTemplate.id) {
|
||||
apiData.templateId = this.currentTemplate.id
|
||||
await updateAttendanceTemplate(apiData)
|
||||
this.$message.success('修改成功')
|
||||
} else {
|
||||
await addAttendanceTemplate(apiData)
|
||||
this.$message.success('新增成功')
|
||||
}
|
||||
|
||||
this.loadTemplates()
|
||||
this.$emit('update')
|
||||
} else {
|
||||
const templateData = {
|
||||
id: this.currentTemplate.id || Date.now().toString(),
|
||||
name: this.currentTemplate.name.trim(),
|
||||
employeeIds: [...this.selectedEmployeeIds],
|
||||
employeeCount: this.selectedEmployeeIds.length,
|
||||
createTime: this.currentTemplate.id ? this.currentTemplate.createTime : new Date().toLocaleString('zh-CN')
|
||||
}
|
||||
|
||||
if (this.currentTemplate.id) {
|
||||
const index = this.personalTemplateList.findIndex(t => t.id === this.currentTemplate.id)
|
||||
if (index > -1) {
|
||||
this.personalTemplateList[index] = templateData
|
||||
}
|
||||
this.$message.success('修改成功')
|
||||
} else {
|
||||
this.personalTemplateList.push(templateData)
|
||||
this.$message.success('新增成功')
|
||||
}
|
||||
|
||||
this.savePersonalTemplates()
|
||||
this.$emit('update')
|
||||
}
|
||||
},
|
||||
|
||||
resetForm() {
|
||||
@@ -220,6 +468,21 @@ export default {
|
||||
color: #303133;
|
||||
}
|
||||
|
||||
.panel-header-actions {
|
||||
display: flex;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.shared-toolbar {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.shared-pagination {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding: 10px 0 4px;
|
||||
}
|
||||
|
||||
.template-list {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
@@ -315,4 +578,31 @@ export default {
|
||||
padding-top: 10px;
|
||||
border-top: 1px solid #e4e7ed;
|
||||
}
|
||||
|
||||
.custom-tabs {
|
||||
display: flex;
|
||||
border-bottom: 1px solid #e4e7ed;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.custom-tab {
|
||||
padding: 6px 14px;
|
||||
font-size: 13px;
|
||||
color: #909399;
|
||||
cursor: pointer;
|
||||
border-bottom: 2px solid transparent;
|
||||
margin-bottom: -1px;
|
||||
transition: color 0.2s, border-color 0.2s;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.custom-tab:hover {
|
||||
color: #606266;
|
||||
}
|
||||
|
||||
.custom-tab.active {
|
||||
color: #1890ff;
|
||||
border-bottom-color: #1890ff;
|
||||
font-weight: 500;
|
||||
}
|
||||
</style>
|
||||
@@ -201,9 +201,9 @@ export const optionalColumns = [
|
||||
{ label: '表面处理', value: 'surfaceTreatmentDesc' },
|
||||
{ label: '镀层质量', value: 'zincLayer' },
|
||||
{ label: '实测长度', value: 'actualLength' },
|
||||
{ label: '理论长度', value: 'theoreticalLength' },
|
||||
{ label: '推论长度', value: 'theoreticalLength' },
|
||||
{ label: '实测厚度', value: 'actualThickness' },
|
||||
{ label: '理论厚度', value: 'theoreticalThickness' },
|
||||
{ label: '推论厚度', value: 'theoreticalThickness' },
|
||||
{ label: '实测宽度', value: 'actualWidth' },
|
||||
{ label: '毛重', value: 'grossWeight' },
|
||||
{ label: '净重', value: 'netWeight' },
|
||||
|
||||
563
klp-ui/src/components/CombinedImport/index.vue
Normal file
563
klp-ui/src/components/CombinedImport/index.vue
Normal file
@@ -0,0 +1,563 @@
|
||||
<template>
|
||||
<el-dialog title="综合导入" :visible.sync="dialogVisible" width="1200px" top="3vh" append-to-body @close="handleClose">
|
||||
<div class="import-container">
|
||||
<div class="import-steps">
|
||||
<div class="step" :class="{ active: true, done: importStatus !== 'idle' && importStatus !== 'validated' }">
|
||||
<div class="step-badge">1</div>
|
||||
<div class="step-label">下载模板</div>
|
||||
</div>
|
||||
<div class="step-connector" :class="{ done: importStatus !== 'idle' }" />
|
||||
<div class="step" :class="{ active: importStatus === 'validated' || importStatus === 'processing' || importStatus === 'finished', done: importStatus !== 'idle' && importStatus !== 'validated' }">
|
||||
<div class="step-badge">2</div>
|
||||
<div class="step-label">上传文件</div>
|
||||
</div>
|
||||
<div class="step-connector" :class="{ done: importStatus === 'processing' || importStatus === 'finished' }" />
|
||||
<div class="step" :class="{ active: importStatus === 'validated' || importStatus === 'processing' || importStatus === 'finished', done: importStatus === 'processing' || importStatus === 'finished' }">
|
||||
<div class="step-badge">3</div>
|
||||
<div class="step-label">校验数据</div>
|
||||
</div>
|
||||
<div class="step-connector" :class="{ done: importStatus === 'processing' || importStatus === 'finished' }" />
|
||||
<div class="step" :class="{ active: importStatus === 'processing' || importStatus === 'finished', done: importStatus === 'finished' }">
|
||||
<div class="step-badge step-badge-success">4</div>
|
||||
<div class="step-label">批量导入</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="import-toolbar">
|
||||
<div class="toolbar-left">
|
||||
<el-upload ref="importUpload" action="" :auto-upload="false" :show-file-list="false"
|
||||
:on-change="handleFileChange" accept=".xlsx,.xls"
|
||||
:disabled="importStatus !== 'idle' && importStatus !== 'validated'">
|
||||
<el-button :type="importFile ? 'default' : 'primary'" :icon="importFile ? 'el-icon-document' : 'el-icon-upload2'">
|
||||
{{ importFile ? importFile.name : '选择Excel文件' }}
|
||||
</el-button>
|
||||
</el-upload>
|
||||
<el-button type="success" plain icon="el-icon-check" @click="handleValidate"
|
||||
:disabled="!importFile || validateLoading || importStatus !== 'idle'" :loading="validateLoading">校验数据</el-button>
|
||||
</div>
|
||||
<div class="toolbar-right">
|
||||
<el-button v-if="importStatus === 'validated'" type="primary" icon="el-icon-upload-success" @click="startImport" :loading="importLoading">开始导入</el-button>
|
||||
<el-button plain icon="el-icon-download" @click="downloadTemplate">下载模板</el-button>
|
||||
<el-button plain icon="el-icon-refresh" @click="resetImport">重置</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="importTableData.length > 0" class="data-preview">
|
||||
<el-tabs v-model="activeTab" type="card">
|
||||
<el-tab-pane label="化学成分" name="chem">
|
||||
<el-table ref="chemTable" :data="chemPreviewData" border size="small" max-height="300" stripe>
|
||||
<el-table-column label="#" width="48" type="index" align="center" />
|
||||
<el-table-column prop="coilNo" label="入场钢卷号" width="140" />
|
||||
<el-table-column prop="supplierCoilNo" label="厂家卷号" width="120" />
|
||||
<el-table-column prop="c" label="C(%)" width="70" align="center" />
|
||||
<el-table-column prop="si" label="Si(%)" width="70" align="center" />
|
||||
<el-table-column prop="mn" label="Mn(%)" width="70" align="center" />
|
||||
<el-table-column prop="p" label="P(%)" width="70" align="center" />
|
||||
<el-table-column prop="s" label="S(%)" width="70" align="center" />
|
||||
<el-table-column prop="als" label="Als(%)" width="70" align="center" />
|
||||
<el-table-column prop="al" label="Al(%)" width="70" align="center" />
|
||||
<el-table-column prop="ti" label="Ti(%)" width="70" align="center" />
|
||||
<el-table-column prop="cr" label="Cr(%)" width="70" align="center" />
|
||||
<el-table-column prop="ni" label="Ni(%)" width="70" align="center" />
|
||||
<el-table-column prop="cu" label="Cu(%)" width="70" align="center" />
|
||||
<el-table-column prop="n" label="N(%)" width="70" align="center" />
|
||||
<el-table-column prop="fe" label="Fe(%)" width="70" align="center" />
|
||||
<el-table-column prop="b" label="B(%)" width="70" align="center" />
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="物理性能" name="phys">
|
||||
<el-table ref="physTable" :data="physPreviewData" border size="small" max-height="300" stripe>
|
||||
<el-table-column label="#" width="48" type="index" align="center" />
|
||||
<el-table-column prop="coilNo" label="入场钢卷号" width="140" />
|
||||
<el-table-column prop="supplierCoilNo" label="厂家卷号" width="120" />
|
||||
<el-table-column prop="yieldStrength" label="屈服强度(MPa)" width="110" align="center" />
|
||||
<el-table-column prop="tensileStrength" label="抗拉强度(MPa)" width="110" align="center" />
|
||||
<el-table-column prop="elongation" label="伸长率(%)" width="80" align="center" />
|
||||
<el-table-column prop="plasticExtensionStrength" label="规定塑性延伸强度(MPa)" width="120" align="center" />
|
||||
<el-table-column prop="hardness" label="硬度(HRB)" width="80" align="center" />
|
||||
<el-table-column prop="coatingMass" label="镀层重量(g/m²)" width="100" align="center" />
|
||||
<el-table-column prop="bendingTest" label="弯曲试验" width="80" align="center" />
|
||||
<el-table-column prop="surfaceQuality" label="表面质量" width="80" align="center" />
|
||||
<el-table-column prop="surfaceStructure" label="表面结构" width="80" align="center" />
|
||||
<el-table-column prop="coatingSurfaceStructure" label="镀层表面结构" width="90" align="center" />
|
||||
<el-table-column prop="edgeStatus" label="边缘状态" width="80" align="center" />
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
|
||||
<div v-if="importStatus === 'processing'" class="import-progress">
|
||||
<div class="progress-header">
|
||||
<i class="el-icon-loading" />
|
||||
<span>正在批量导入数据,请稍候...</span>
|
||||
</div>
|
||||
<el-progress :percentage="importProgress" :stroke-width="8" />
|
||||
<div style="margin-top: 8px; font-size: 12px; color: #606266;">
|
||||
化学成分: {{ chemImportedCount }} / {{ chemTotalCount }} 物理性能: {{ physImportedCount }} / {{ physTotalCount }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="importStatus === 'finished'" class="result-panel result-success">
|
||||
<div class="result-icon"><i class="el-icon-circle-check" /></div>
|
||||
<div class="result-body">
|
||||
<div class="result-title">导入完成</div>
|
||||
<div class="result-desc">
|
||||
共成功导入 <b>{{ chemImportedCount }}</b> 条化学成分数据,<b>{{ physImportedCount }}</b> 条物理性能数据
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="importStatus === 'error'" class="result-panel result-error">
|
||||
<div class="result-icon"><i class="el-icon-circle-close" /></div>
|
||||
<div class="result-body">
|
||||
<div class="result-title">导入失败</div>
|
||||
<div class="result-desc">{{ importErrorMsg }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<el-dialog title="选择对应入场卷号" :visible.sync="ambiguousVisible" width="600px" append-to-body :close-on-click-modal="false">
|
||||
<div style="font-size: 12px; color: #909399; margin-bottom: 12px;">
|
||||
厂家卷号匹配到多条入场卷号,请为每行选择对应记录
|
||||
</div>
|
||||
<el-table :data="ambiguousRows" border size="small" max-height="350">
|
||||
<el-table-column label="厂家卷号" prop="supplierCoilNo" width="140" />
|
||||
<el-table-column label="选择入场卷号" min-width="280">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="scope.row.selected" placeholder="请选择入场卷号" size="small" style="width: 100%;">
|
||||
<el-option
|
||||
v-for="opt in scope.row.options"
|
||||
:key="opt"
|
||||
:label="opt"
|
||||
:value="opt"
|
||||
/>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="confirmAmbiguous">确 定</el-button>
|
||||
<el-button @click="ambiguousVisible = false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as XLSX from 'xlsx';
|
||||
import { batchAddChemicalItem } from "@/api/mes/qc/chemicalItem";
|
||||
import { batchAddPhysicalItem } from "@/api/mes/qc/physicalItem";
|
||||
import { listMaterialCoil } from "@/api/wms/coil";
|
||||
|
||||
const TEMPLATE_HEADERS = [
|
||||
'入场钢卷号', '厂家卷号',
|
||||
'C(%)', 'Si(%)', 'Mn(%)', 'P(%)', 'S(%)', 'Als(%)', 'Al(%)', 'Ti(%)', 'Cr(%)', 'Ni(%)', 'Cu(%)', 'N(%)', 'Fe(%)', 'B(%)',
|
||||
'屈服强度(MPa)', '抗拉强度(MPa)', '伸长率(%)', '规定塑性延伸强度(MPa)', '硬度(HRB)', '镀层重量(g/m²)',
|
||||
'弯曲试验', '表面质量', '表面结构', '镀层表面结构', '边缘状态'
|
||||
];
|
||||
|
||||
const HEADER_MAP = {
|
||||
'入场钢卷号': 'coilNo',
|
||||
'厂家卷号': 'supplierCoilNo',
|
||||
'C(%)': 'c', 'Si(%)': 'si', 'Mn(%)': 'mn', 'P(%)': 'p', 'S(%)': 's',
|
||||
'Als(%)': 'als', 'Al(%)': 'al', 'Ti(%)': 'ti', 'Cr(%)': 'cr', 'Ni(%)': 'ni',
|
||||
'Cu(%)': 'cu', 'N(%)': 'n', 'Fe(%)': 'fe', 'B(%)': 'b',
|
||||
'屈服强度(MPa)': 'yieldStrength', '抗拉强度(MPa)': 'tensileStrength', '伸长率(%)': 'elongation',
|
||||
'规定塑性延伸强度(MPa)': 'plasticExtensionStrength', '硬度(HRB)': 'hardness',
|
||||
'镀层重量(g/m²)': 'coatingMass', '弯曲试验': 'bendingTest', '表面质量': 'surfaceQuality',
|
||||
'表面结构': 'surfaceStructure', '镀层表面结构': 'coatingSurfaceStructure', '边缘状态': 'edgeStatus'
|
||||
};
|
||||
|
||||
const CHEM_FIELDS = ['c', 'si', 'mn', 'p', 's', 'als', 'al', 'ti', 'cr', 'ni', 'cu', 'n', 'fe', 'b'];
|
||||
const PHYS_FIELDS = ['yieldStrength', 'tensileStrength', 'elongation', 'plasticExtensionStrength', 'hardness', 'coatingMass', 'bendingTest', 'surfaceQuality', 'surfaceStructure', 'coatingSurfaceStructure', 'edgeStatus'];
|
||||
|
||||
export default {
|
||||
name: "CombinedImport",
|
||||
props: {
|
||||
visible: { type: Boolean, default: false }
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
importFile: null,
|
||||
importRawData: [],
|
||||
importTableData: [],
|
||||
importErrorList: [],
|
||||
importProgress: 0,
|
||||
importStatus: 'idle',
|
||||
importErrorMsg: '',
|
||||
validateLoading: false,
|
||||
importLoading: false,
|
||||
ambiguousVisible: false,
|
||||
ambiguousRows: [],
|
||||
activeTab: 'chem',
|
||||
chemImportedCount: 0,
|
||||
physImportedCount: 0,
|
||||
chemTotalCount: 0,
|
||||
physTotalCount: 0
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
dialogVisible: {
|
||||
get() { return this.visible; },
|
||||
set(val) { this.$emit('update:visible', val); }
|
||||
},
|
||||
chemPreviewData() {
|
||||
return this.importTableData.map(row => {
|
||||
const item = { coilNo: row.coilNo, supplierCoilNo: row.supplierCoilNo };
|
||||
CHEM_FIELDS.forEach(f => { item[f] = row[f] || ''; });
|
||||
return item;
|
||||
});
|
||||
},
|
||||
physPreviewData() {
|
||||
return this.importTableData.map(row => {
|
||||
const item = { coilNo: row.coilNo, supplierCoilNo: row.supplierCoilNo };
|
||||
PHYS_FIELDS.forEach(f => { item[f] = row[f] || ''; });
|
||||
return item;
|
||||
});
|
||||
},
|
||||
hasChemData() {
|
||||
return this.importTableData.some(row => CHEM_FIELDS.some(f => row[f]));
|
||||
},
|
||||
hasPhysData() {
|
||||
return this.importTableData.some(row => PHYS_FIELDS.some(f => row[f]));
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleClose() {
|
||||
this.resetImport();
|
||||
this.$emit('close');
|
||||
},
|
||||
handleFileChange(file) {
|
||||
if (this.validateLoading || this.importLoading) return;
|
||||
this.importFile = file.raw;
|
||||
this.importErrorList = [];
|
||||
this.importStatus = 'idle';
|
||||
this.readExcel();
|
||||
},
|
||||
async readExcel() {
|
||||
if (!this.importFile) return;
|
||||
try {
|
||||
const reader = new FileReader();
|
||||
reader.readAsArrayBuffer(this.importFile);
|
||||
reader.onload = async (e) => {
|
||||
try {
|
||||
const data = new Uint8Array(e.target.result);
|
||||
const wb = XLSX.read(data, { type: 'array' });
|
||||
const ws = wb.Sheets[wb.SheetNames[0]];
|
||||
const json = XLSX.utils.sheet_to_json(ws, { header: 1 });
|
||||
this.validateHeaders(json[0]);
|
||||
this.importRawData = json.slice(1).filter(r => r.some(c => c != null && c !== ''));
|
||||
this.formatExcel();
|
||||
this.$message.success(`成功解析Excel,共读取到 ${this.importRawData.length} 条数据`);
|
||||
} catch (err) { this.handleError('解析Excel失败:' + err.message); }
|
||||
};
|
||||
} catch (err) { this.handleError('读取文件失败:' + err.message); }
|
||||
},
|
||||
validateHeaders(headers) {
|
||||
this.importErrorList = [];
|
||||
if (!headers || headers.length < TEMPLATE_HEADERS.length) {
|
||||
this.importErrorList.push({ rowNum: 1, errorMsg: `表头数量不匹配,要求至少${TEMPLATE_HEADERS.length}列` });
|
||||
return;
|
||||
}
|
||||
TEMPLATE_HEADERS.forEach((h, i) => {
|
||||
if (headers[i] !== h) this.importErrorList.push({ rowNum: 1, errorMsg: `第${i + 1}列表头错误,要求:"${h}",实际:"${headers[i] || ''}"` });
|
||||
});
|
||||
if (this.importErrorList.length > 0) this.$message.error('Excel表头格式不符合要求,请检查!');
|
||||
},
|
||||
formatExcel() {
|
||||
this.importTableData = [];
|
||||
if (!this.importRawData.length) return;
|
||||
this.importRawData.forEach((row, i) => {
|
||||
const obj = {};
|
||||
TEMPLATE_HEADERS.forEach((h, j) => { obj[HEADER_MAP[h]] = row[j] != null ? String(row[j]).trim() : ''; });
|
||||
obj.rowNum = i + 2;
|
||||
obj._status = 'pending';
|
||||
this.importTableData.push(obj);
|
||||
});
|
||||
},
|
||||
async handleValidate() {
|
||||
if (!this.importFile || !this.importRawData.length) { this.$message.warning('暂无数据可校验'); return; }
|
||||
this.validateLoading = true;
|
||||
this.importErrorList = [];
|
||||
this.ambiguousRows = [];
|
||||
const dataRows = this.importRawData;
|
||||
for (let i = 0; i < dataRows.length; i++) {
|
||||
const rowNum = i + 2;
|
||||
let coilNo = '', supplierCoilNo = '';
|
||||
TEMPLATE_HEADERS.forEach((h, j) => {
|
||||
if (HEADER_MAP[h] === 'coilNo') coilNo = dataRows[i][j];
|
||||
if (HEADER_MAP[h] === 'supplierCoilNo') supplierCoilNo = dataRows[i][j];
|
||||
});
|
||||
coilNo = String(coilNo || '').trim();
|
||||
supplierCoilNo = String(supplierCoilNo || '').trim();
|
||||
if (!coilNo && !supplierCoilNo) {
|
||||
this.importErrorList.push({ rowNum, errorMsg: '入场钢卷号和厂家卷号不能同时为空' });
|
||||
}
|
||||
}
|
||||
if (this.importErrorList.length === 0) {
|
||||
this.importTableData.forEach((row, idx) => {
|
||||
const cn = (row.coilNo || '').trim();
|
||||
const sn = (row.supplierCoilNo || '').trim();
|
||||
row._sno = sn;
|
||||
row._idx = idx;
|
||||
row._fillCoilNo = cn;
|
||||
if (sn && !cn) row._needMatch = true;
|
||||
});
|
||||
const needMatchRows = this.importTableData.filter(r => r._needMatch);
|
||||
if (needMatchRows.length > 0) {
|
||||
const uniqueSnos = [...new Set(needMatchRows.map(r => r._sno))];
|
||||
const multiMap = {};
|
||||
try {
|
||||
const results = await Promise.all(
|
||||
uniqueSnos.map(sno => listMaterialCoil({ supplierCoilNo: sno, pageNum: 1, pageSize: 50 }))
|
||||
);
|
||||
uniqueSnos.forEach((sno, idx) => {
|
||||
const rows = (results[idx] && results[idx].rows) || [];
|
||||
const enterNos = [...new Set(rows.map(r => r.enterCoilNo).filter(Boolean))];
|
||||
multiMap[sno] = enterNos;
|
||||
});
|
||||
} catch (err) {
|
||||
this.validateLoading = false;
|
||||
this.handleError('厂家卷号匹配失败:' + err.message);
|
||||
return;
|
||||
}
|
||||
const ambiguousList = [];
|
||||
needMatchRows.forEach(row => {
|
||||
const candidates = multiMap[row._sno] || [];
|
||||
if (candidates.length === 0) {
|
||||
this.importErrorList.push({ rowNum: (row.rowNum || (row._idx + 2)), errorMsg: `厂家卷号"${row._sno}"未匹配到入场卷号` });
|
||||
} else if (candidates.length === 1) {
|
||||
row.coilNo = candidates[0];
|
||||
} else {
|
||||
ambiguousList.push({
|
||||
_idx: row._idx,
|
||||
supplierCoilNo: row._sno,
|
||||
options: candidates,
|
||||
selected: null
|
||||
});
|
||||
}
|
||||
});
|
||||
if (ambiguousList.length > 0) {
|
||||
this.ambiguousRows = ambiguousList;
|
||||
this.validateLoading = false;
|
||||
this.ambiguousVisible = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
this.finishValidation();
|
||||
},
|
||||
confirmAmbiguous() {
|
||||
const unselected = this.ambiguousRows.filter(r => !r.selected);
|
||||
if (unselected.length > 0) {
|
||||
this.$message.warning('请为所有行选择入场卷号');
|
||||
return;
|
||||
}
|
||||
this.ambiguousRows.forEach(item => {
|
||||
this.importTableData[item._idx].coilNo = item.selected;
|
||||
});
|
||||
this.ambiguousVisible = false;
|
||||
this.validateLoading = true;
|
||||
this.finishValidation();
|
||||
},
|
||||
finishValidation() {
|
||||
if (this.importErrorList.length > 0) {
|
||||
this.$message.error(`数据校验失败,共发现${this.importErrorList.length}条错误`);
|
||||
} else {
|
||||
this.importTableData.forEach(row => { row._status = 'valid'; });
|
||||
const hasChem = this.importTableData.some(r => CHEM_FIELDS.some(f => r[f]));
|
||||
const hasPhys = this.importTableData.some(r => PHYS_FIELDS.some(f => r[f]));
|
||||
if (!hasChem && !hasPhys) {
|
||||
this.$message.warning('Excel中没有填写任何化学成分或物理性能数据');
|
||||
} else {
|
||||
this.$message.success('数据校验通过');
|
||||
this.importStatus = 'validated';
|
||||
}
|
||||
}
|
||||
this.validateLoading = false;
|
||||
},
|
||||
async startImport() {
|
||||
const rows = this.importTableData.filter(r => r._status === 'valid');
|
||||
if (!rows.length) { this.$message.warning('没有可导入的数据'); return; }
|
||||
|
||||
const chemRows = rows.filter(r => CHEM_FIELDS.some(f => r[f]));
|
||||
const physRows = rows.filter(r => PHYS_FIELDS.some(f => r[f]));
|
||||
|
||||
if (!chemRows.length && !physRows.length) {
|
||||
this.$message.warning('没有可导入的数据');
|
||||
return;
|
||||
}
|
||||
|
||||
let confirmMsg = '确认导入以下数据?';
|
||||
if (chemRows.length) confirmMsg += ` 化学成分${chemRows.length}条`;
|
||||
if (physRows.length) confirmMsg += ` 物理性能${physRows.length}条`;
|
||||
const ok = await this.$confirm(confirmMsg, '导入确认', { confirmButtonText: '确认导入', cancelButtonText: '取消', type: 'warning' }).catch(() => false);
|
||||
if (!ok) return;
|
||||
|
||||
this.importLoading = true;
|
||||
this.importStatus = 'processing';
|
||||
this.importProgress = 0;
|
||||
this.chemTotalCount = chemRows.length;
|
||||
this.physTotalCount = physRows.length;
|
||||
this.chemImportedCount = 0;
|
||||
this.physImportedCount = 0;
|
||||
this.importErrorMsg = '';
|
||||
|
||||
try {
|
||||
const promises = [];
|
||||
if (chemRows.length) {
|
||||
const chemPayload = chemRows.map(row => {
|
||||
const item = { coilId: null, coilNo: row.coilNo };
|
||||
CHEM_FIELDS.forEach(f => { if (row[f]) item[f] = row[f]; });
|
||||
return item;
|
||||
});
|
||||
promises.push(
|
||||
batchAddChemicalItem(chemPayload).then(res => {
|
||||
if (res.code !== 200) throw new Error(res.msg || '化学成分批量导入失败');
|
||||
this.chemImportedCount = chemPayload.length;
|
||||
this.importProgress = 50;
|
||||
})
|
||||
);
|
||||
}
|
||||
if (physRows.length) {
|
||||
const physPayload = physRows.map(row => {
|
||||
const item = { coilId: null, coilNo: row.coilNo };
|
||||
PHYS_FIELDS.forEach(f => { if (row[f]) item[f] = row[f]; });
|
||||
return item;
|
||||
});
|
||||
promises.push(
|
||||
batchAddPhysicalItem(physPayload).then(res => {
|
||||
if (res.code !== 200) throw new Error(res.msg || '物理性能批量导入失败');
|
||||
this.physImportedCount = physPayload.length;
|
||||
this.importProgress = 100;
|
||||
})
|
||||
);
|
||||
}
|
||||
await Promise.all(promises);
|
||||
this.importStatus = 'finished';
|
||||
this.importProgress = 100;
|
||||
this.$message.success(`导入完成!化学成分${this.chemImportedCount}条,物理性能${this.physImportedCount}条`);
|
||||
this.$emit('success');
|
||||
} catch (err) {
|
||||
this.handleError(err.message);
|
||||
} finally {
|
||||
this.importLoading = false;
|
||||
}
|
||||
},
|
||||
resetImport() {
|
||||
if (this.validateLoading || this.importLoading || this.importStatus === 'processing') { this.$message.warning('当前有操作正在进行中'); return; }
|
||||
this.importFile = null;
|
||||
this.importRawData = [];
|
||||
this.importTableData = [];
|
||||
this.importErrorList = [];
|
||||
this.importProgress = 0;
|
||||
this.importStatus = 'idle';
|
||||
this.importErrorMsg = '';
|
||||
this.chemImportedCount = 0;
|
||||
this.physImportedCount = 0;
|
||||
this.chemTotalCount = 0;
|
||||
this.physTotalCount = 0;
|
||||
this.activeTab = 'chem';
|
||||
this.$refs.importUpload?.clearFiles();
|
||||
},
|
||||
downloadTemplate() {
|
||||
const sampleRow = [
|
||||
'示例卷号', '示例厂家卷号',
|
||||
'0.05', '0.02', '0.30', '0.015', '0.008', '0.040', '0.04', '0.05', '0.03', '0.02', '0.03', '0.005', '98', '0.001',
|
||||
'300', '420', '35', '260', '85', '275', '合格', '良好', '光面', '无锌花', '良好'
|
||||
];
|
||||
const wb = XLSX.utils.book_new();
|
||||
const ws = XLSX.utils.aoa_to_sheet([TEMPLATE_HEADERS, sampleRow]);
|
||||
ws['!cols'] = [
|
||||
{ wch: 16 }, { wch: 16 },
|
||||
{ wch: 8 }, { wch: 8 }, { wch: 8 }, { wch: 8 }, { wch: 8 }, { wch: 8 }, { wch: 8 }, { wch: 8 }, { wch: 8 }, { wch: 8 }, { wch: 8 }, { wch: 8 }, { wch: 8 }, { wch: 8 },
|
||||
{ wch: 16 }, { wch: 16 }, { wch: 10 }, { wch: 20 }, { wch: 10 }, { wch: 16 },
|
||||
{ wch: 10 }, { wch: 10 }, { wch: 10 }, { wch: 12 }, { wch: 10 }
|
||||
];
|
||||
XLSX.utils.book_append_sheet(wb, ws, '综合导入模板');
|
||||
XLSX.writeFile(wb, '综合导入模板.xlsx');
|
||||
},
|
||||
handleError(msg) {
|
||||
this.$message.error(msg);
|
||||
this.importStatus = 'error';
|
||||
this.importErrorMsg = msg;
|
||||
this.validateLoading = false;
|
||||
this.importLoading = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.import-container { padding: 0 4px; }
|
||||
|
||||
.import-steps {
|
||||
display: flex; align-items: center; justify-content: center;
|
||||
margin-bottom: 24px; padding: 20px 0 16px;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
}
|
||||
|
||||
.step {
|
||||
display: flex; flex-direction: column; align-items: center; gap: 6px;
|
||||
opacity: 0.45; transition: all 0.3s;
|
||||
}
|
||||
.step.active { opacity: 1; }
|
||||
.step.done { opacity: 0.65; }
|
||||
|
||||
.step-badge {
|
||||
width: 32px; height: 32px; border-radius: 50%;
|
||||
background: #dcdfe6; color: #fff;
|
||||
display: flex; align-items: center; justify-content: center;
|
||||
font-size: 14px; font-weight: 600; transition: all 0.3s;
|
||||
}
|
||||
.step.active .step-badge { background: #409eff; box-shadow: 0 2px 8px rgba(64,158,255,0.35); }
|
||||
.step.done .step-badge { background: #67c23a; }
|
||||
.step-badge-success { background: #67c23a !important; }
|
||||
.step.active .step-badge-success { background: #67c23a !important; box-shadow: 0 2px 8px rgba(103,194,58,0.35) !important; }
|
||||
|
||||
.step-label { font-size: 12px; color: #606266; white-space: nowrap; }
|
||||
.step.active .step-label { color: #303133; font-weight: 600; }
|
||||
|
||||
.step-connector {
|
||||
width: 48px; height: 2px; background: #dcdfe6;
|
||||
margin: 0 4px; margin-bottom: 24px; transition: all 0.3s;
|
||||
}
|
||||
.step-connector.done { background: #67c23a; }
|
||||
|
||||
.import-toolbar {
|
||||
display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap;
|
||||
gap: 8px; margin-bottom: 16px; padding: 12px 16px;
|
||||
background: #fafafa; border-radius: 8px; border: 1px solid #eee;
|
||||
}
|
||||
|
||||
.toolbar-left, .toolbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
|
||||
|
||||
.data-preview { margin-bottom: 12px; }
|
||||
|
||||
.import-progress {
|
||||
padding: 24px; background: #f6ffed; border-radius: 8px;
|
||||
border: 1px solid #b7eb8f; margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.progress-header {
|
||||
display: flex; align-items: center; gap: 8px;
|
||||
margin-bottom: 12px; font-size: 14px; color: #52c41a; font-weight: 500;
|
||||
}
|
||||
|
||||
.result-panel {
|
||||
display: flex; align-items: center; gap: 16px;
|
||||
padding: 20px 24px; border-radius: 8px; margin-bottom: 12px;
|
||||
}
|
||||
.result-success { background: #f6ffed; border: 1px solid #b7eb8f; }
|
||||
.result-error { background: #fff2f0; border: 1px solid #ffa39e; }
|
||||
|
||||
.result-icon { font-size: 36px; line-height: 1; }
|
||||
.result-success .result-icon { color: #52c41a; }
|
||||
.result-error .result-icon { color: #ff4d4f; }
|
||||
|
||||
.result-title { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
|
||||
.result-success .result-title { color: #389e0d; }
|
||||
.result-error .result-title { color: #cf1322; }
|
||||
|
||||
.result-desc { font-size: 13px; color: #606266; }
|
||||
</style>
|
||||
@@ -1,25 +1,45 @@
|
||||
<template>
|
||||
<div :class="{'show':show}" class="header-search">
|
||||
<div class="header-search">
|
||||
<svg-icon class-name="search-icon" icon-class="search" @click.stop="click" />
|
||||
<el-select
|
||||
ref="headerSearchSelect"
|
||||
v-model="search"
|
||||
:remote-method="querySearch"
|
||||
filterable
|
||||
default-first-option
|
||||
remote
|
||||
placeholder="Search"
|
||||
class="header-search-select"
|
||||
@change="change"
|
||||
<el-dialog
|
||||
:visible.sync="show"
|
||||
:close-on-click-modal="true"
|
||||
width="560px"
|
||||
append-to-body
|
||||
:show-close="false"
|
||||
custom-class="header-search-dialog"
|
||||
@opened="$refs.searchInput && $refs.searchInput.focus()"
|
||||
>
|
||||
<el-option v-for="option in options" :key="option.item.path" :value="option.item" :label="option.item.title.join(' > ')" />
|
||||
</el-select>
|
||||
<div class="search-body">
|
||||
<div class="search-input-wrap">
|
||||
<svg-icon class-name="search-prefix" icon-class="search" />
|
||||
<input
|
||||
ref="searchInput"
|
||||
v-model="search"
|
||||
class="search-input"
|
||||
placeholder="搜索菜单"
|
||||
@input="querySearch($event.target.value)"
|
||||
/>
|
||||
</div>
|
||||
<ul v-if="options.length" class="search-results">
|
||||
<li
|
||||
v-for="option in options"
|
||||
:key="option.item.path"
|
||||
class="search-result-item"
|
||||
@click="change(option.item)"
|
||||
>
|
||||
<span>{{ option.item.title.join(' > ') }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
<div v-if="search && options.length === 0" class="no-result">
|
||||
无匹配结果
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// fuse is a lightweight fuzzy-search module
|
||||
// make search results more in line with expectations
|
||||
import Fuse from 'fuse.js/dist/fuse.min.js'
|
||||
import path from 'path'
|
||||
|
||||
@@ -45,13 +65,6 @@ export default {
|
||||
},
|
||||
searchPool(list) {
|
||||
this.initFuse(list)
|
||||
},
|
||||
show(value) {
|
||||
if (value) {
|
||||
document.body.addEventListener('click', this.close)
|
||||
} else {
|
||||
document.body.removeEventListener('click', this.close)
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -59,30 +72,20 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
click() {
|
||||
this.show = !this.show
|
||||
if (this.show) {
|
||||
this.$refs.headerSearchSelect && this.$refs.headerSearchSelect.focus()
|
||||
}
|
||||
},
|
||||
close() {
|
||||
this.$refs.headerSearchSelect && this.$refs.headerSearchSelect.blur()
|
||||
this.show = true
|
||||
this.search = ''
|
||||
this.options = []
|
||||
this.show = false
|
||||
},
|
||||
change(val) {
|
||||
const path = val.path;
|
||||
if(this.ishttp(val.path)) {
|
||||
// http(s):// 路径新窗口打开
|
||||
const pindex = path.indexOf("http");
|
||||
window.open(path.substr(pindex, path.length), "_blank");
|
||||
if (this.ishttp(val.path)) {
|
||||
const pindex = val.path.indexOf('http')
|
||||
window.open(val.path.substr(pindex, val.path.length), '_blank')
|
||||
} else {
|
||||
this.$router.push(val.path)
|
||||
}
|
||||
this.show = false
|
||||
this.search = ''
|
||||
this.options = []
|
||||
this.$nextTick(() => {
|
||||
this.show = false
|
||||
})
|
||||
},
|
||||
initFuse(list) {
|
||||
this.fuse = new Fuse(list, {
|
||||
@@ -100,13 +103,10 @@ export default {
|
||||
}]
|
||||
})
|
||||
},
|
||||
// Filter out the routes that can be displayed in the sidebar
|
||||
// And generate the internationalized title
|
||||
generateRoutes(routes, basePath = '/', prefixTitle = []) {
|
||||
let res = []
|
||||
|
||||
for (const router of routes) {
|
||||
// skip hidden router
|
||||
if (router.hidden) { continue }
|
||||
|
||||
const data = {
|
||||
@@ -118,13 +118,10 @@ export default {
|
||||
data.title = [...data.title, router.meta.title]
|
||||
|
||||
if (router.redirect !== 'noRedirect') {
|
||||
// only push the routes with title
|
||||
// special case: need to exclude parent router without redirect
|
||||
res.push(data)
|
||||
}
|
||||
}
|
||||
|
||||
// recursive child routes
|
||||
if (router.children) {
|
||||
const tempRoutes = this.generateRoutes(router.children, data.path, data.title)
|
||||
if (tempRoutes.length >= 1) {
|
||||
@@ -150,39 +147,81 @@ export default {
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.header-search {
|
||||
font-size: 0 !important;
|
||||
|
||||
.search-icon {
|
||||
cursor: pointer;
|
||||
font-size: 18px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
.header-search-select {
|
||||
font-size: 18px;
|
||||
transition: width 0.2s;
|
||||
width: 0;
|
||||
overflow: hidden;
|
||||
background: transparent;
|
||||
border-radius: 0;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
<style lang="scss">
|
||||
.header-search-dialog {
|
||||
border-radius: 8px;
|
||||
|
||||
::v-deep .el-input__inner {
|
||||
border-radius: 0;
|
||||
border: 0;
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
box-shadow: none !important;
|
||||
border-bottom: 1px solid #d9d9d9;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.el-dialog__header {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
&.show {
|
||||
.header-search-select {
|
||||
width: 210px;
|
||||
margin-left: 10px;
|
||||
.el-dialog__body {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.search-body {
|
||||
.search-input-wrap {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: 12px 20px;
|
||||
padding-bottom: 12px;
|
||||
border-bottom: 1px solid #e8e8e8;
|
||||
|
||||
.search-prefix {
|
||||
font-size: 18px;
|
||||
color: #999;
|
||||
flex-shrink: 0;
|
||||
margin-right: 12px;
|
||||
}
|
||||
|
||||
.search-input {
|
||||
flex: 1;
|
||||
border: none;
|
||||
outline: none;
|
||||
font-size: 16px;
|
||||
line-height: 32px;
|
||||
height: 32px;
|
||||
background: transparent;
|
||||
|
||||
&::placeholder {
|
||||
color: #bfbfbf;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.search-results {
|
||||
max-height: 360px;
|
||||
overflow-y: auto;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
list-style: none;
|
||||
|
||||
.search-result-item {
|
||||
padding: 10px 20px;
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
color: #333;
|
||||
transition: background 0.15s;
|
||||
|
||||
&:hover {
|
||||
background: #f0f2f5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.no-result {
|
||||
padding: 32px 0;
|
||||
text-align: center;
|
||||
color: #999;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,14 @@
|
||||
<template>
|
||||
<div>
|
||||
<div style="display: flex; align-items: center; margin-bottom: 12px;">
|
||||
<el-select v-model="selectedValue" placeholder="请选择合同" style="width: 100%">
|
||||
<div style="display: flex; align-items: center; margin-bottom: 0px;">
|
||||
<!-- all模式:远程搜索 -->
|
||||
<el-select v-if="mode == 'all'" v-model="selectedValue" placeholder="请选择合同" style="width: 100%" clearable
|
||||
filterable remote :remote-method="handleRemoteSearch" :loading="selectLoading">
|
||||
<el-option v-for="item in contractList" :key="item.orderId" :value="item.orderId"
|
||||
:label="item.contractCode" />
|
||||
</el-select>
|
||||
<!-- today模式:本地 -->
|
||||
<el-select v-else v-model="selectedValue" placeholder="请选择合同" style="width: 100%" clearable filterable>
|
||||
<el-option v-for="item in contractList" :key="item.orderId" :value="item.orderId"
|
||||
:label="item.contractCode" />
|
||||
</el-select>
|
||||
@@ -55,13 +62,14 @@
|
||||
<!-- 所有合同tab -->
|
||||
<el-tab-pane label="所有合同" name="all">
|
||||
<div style="margin-bottom: 16px;">
|
||||
<el-input v-model="searchKeyword" placeholder="搜索合同" @input="handleSearch" clearable
|
||||
<el-input v-model="searchKeyword" placeholder="搜索合同" @blur="handleSearch"
|
||||
@keyup.enter.native="handleSearch" @clear="handleSearch" clearable
|
||||
size="small">
|
||||
<el-button slot="append" icon="el-icon-search" size="small"></el-button>
|
||||
<el-button slot="append" icon="el-icon-search" @click="handleSearch" size="small"></el-button>
|
||||
</el-input>
|
||||
</div>
|
||||
|
||||
<el-table :data="allContracts" style="width: 100%" size="mini" height="600">
|
||||
<el-table :data="allContracts" style="width: 100%" size="mini" height="520">
|
||||
<el-table-column prop="contractCode" label="合同编号" width="160" />
|
||||
<el-table-column prop="contractName" label="合同名称" width="180" />
|
||||
<el-table-column prop="customer" label="客户" width="140" />
|
||||
@@ -93,6 +101,10 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<el-pagination v-if="allTotal > 0" background layout="total, prev, pager, next, jumper"
|
||||
:total="allTotal" :page-size="allPageSize" :current-page.sync="allPageNum"
|
||||
@current-change="handleAllPageChange" style="margin-top: 12px; text-align: right;" />
|
||||
|
||||
<div v-if="allContracts.length === 0" style="text-align: center; padding: 20px;">
|
||||
暂无合同数据
|
||||
</div>
|
||||
@@ -104,7 +116,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listOrder, listTodayOrder } from '@/api/crm/order';
|
||||
import { listOrder, listTodayOrder, getOrder } from '@/api/crm/order';
|
||||
|
||||
export default {
|
||||
name: "ContractSelect",
|
||||
@@ -125,6 +137,11 @@ export default {
|
||||
searchKeyword: '',
|
||||
allContracts: [],
|
||||
activeTab: 'configured', // 默认显示已配置合同tab
|
||||
allPageNum: 1,
|
||||
allPageSize: 20,
|
||||
allTotal: 0,
|
||||
selectLoading: false,
|
||||
selectTimer: null,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -134,15 +151,17 @@ export default {
|
||||
},
|
||||
set(val) {
|
||||
this.$emit('input', val);
|
||||
if (val) {
|
||||
localStorage.setItem('lastSelectedContractId', val);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
if (this.mode == "today") {
|
||||
// 从localstorage中获取合同列表
|
||||
this.loadFromLocalStorage();
|
||||
} else {
|
||||
this.loadContractList();
|
||||
this.handleRemoteSearch('');
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -172,33 +191,36 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
// 加载合同列表
|
||||
async loadContractList(keyword) {
|
||||
if (this.mode == "all") {
|
||||
const res = await listOrder({
|
||||
pageNum: 1,
|
||||
pageSize: 1000,
|
||||
keyword: keyword || undefined,
|
||||
});
|
||||
this.contractList = res.rows || [];
|
||||
}
|
||||
else if (this.mode == "today") {
|
||||
const res = await listTodayOrder();
|
||||
// 获取现有手动添加的合同
|
||||
const existingManualContracts = this.contractList.filter(item => item.isManual);
|
||||
// 将接口返回的合同标记为非手动添加
|
||||
const apiContracts = (res.data || []).map(item => ({
|
||||
...item,
|
||||
isManual: false
|
||||
}));
|
||||
// 合并合同列表,保留手动添加的合同
|
||||
this.contractList = [...apiContracts, ...existingManualContracts];
|
||||
// 去重,避免重复合同
|
||||
this.contractList = this.contractList.filter((item, index, self) =>
|
||||
index === self.findIndex(t => t.orderId === item.orderId)
|
||||
);
|
||||
// 保存到localStorage
|
||||
this.saveToLocalStorage();
|
||||
// 加载合同列表(today模式)
|
||||
async loadContractList() {
|
||||
const res = await listTodayOrder();
|
||||
// 获取现有手动添加的合同
|
||||
const existingManualContracts = this.contractList.filter(item => item.isManual);
|
||||
// 将接口返回的合同标记为非手动添加
|
||||
const apiContracts = (res.data || []).map(item => ({
|
||||
...item,
|
||||
isManual: false
|
||||
}));
|
||||
// 合并合同列表,保留手动添加的合同
|
||||
this.contractList = [...apiContracts, ...existingManualContracts];
|
||||
// 去重,避免重复合同
|
||||
this.contractList = this.contractList.filter((item, index, self) =>
|
||||
index === self.findIndex(t => t.orderId === item.orderId)
|
||||
);
|
||||
// 上一次选择的合同放在列表第一位
|
||||
this.sortLastSelectedToFirst();
|
||||
// 保存到localStorage
|
||||
this.saveToLocalStorage();
|
||||
},
|
||||
|
||||
// 将上一次选择的合同排到列表第一位
|
||||
sortLastSelectedToFirst() {
|
||||
const lastId = localStorage.getItem('lastSelectedContractId');
|
||||
if (!lastId) return;
|
||||
const index = this.contractList.findIndex(item => String(item.orderId) === String(lastId));
|
||||
if (index > 0) {
|
||||
const [item] = this.contractList.splice(index, 1);
|
||||
this.contractList.unshift(item);
|
||||
}
|
||||
},
|
||||
// 打开选择弹窗
|
||||
@@ -212,15 +234,12 @@ export default {
|
||||
async loadAllContracts() {
|
||||
try {
|
||||
const res = await listOrder({
|
||||
pageNum: 1,
|
||||
pageSize: 1000,
|
||||
pageNum: this.allPageNum,
|
||||
pageSize: this.allPageSize,
|
||||
keyword: this.searchKeyword || undefined,
|
||||
});
|
||||
// 合并现有合同(包括手动添加的)
|
||||
const existingContracts = this.contractList;
|
||||
this.allContracts = [...res.rows || [], ...existingContracts].filter((item, index, self) =>
|
||||
index === self.findIndex(t => t.orderId === item.orderId)
|
||||
);
|
||||
this.allTotal = res.total || 0;
|
||||
this.allContracts = res.rows || [];
|
||||
} catch (error) {
|
||||
console.error('Failed to load all contracts:', error);
|
||||
this.allContracts = [];
|
||||
@@ -229,6 +248,12 @@ export default {
|
||||
|
||||
// 搜索合同
|
||||
handleSearch() {
|
||||
this.allPageNum = 1;
|
||||
this.loadAllContracts();
|
||||
},
|
||||
|
||||
handleAllPageChange(page) {
|
||||
this.allPageNum = page;
|
||||
this.loadAllContracts();
|
||||
},
|
||||
|
||||
@@ -256,7 +281,53 @@ export default {
|
||||
|
||||
// 刷新合同列表
|
||||
handleRefresh() {
|
||||
this.loadContractList();
|
||||
if (this.mode == 'all') {
|
||||
this.handleRemoteSearch('');
|
||||
} else {
|
||||
this.loadContractList();
|
||||
}
|
||||
},
|
||||
|
||||
// all模式远程搜索
|
||||
handleRemoteSearch(query) {
|
||||
if (this.selectTimer) {
|
||||
clearTimeout(this.selectTimer);
|
||||
}
|
||||
if (!query) {
|
||||
this.selectTimer = null;
|
||||
this.doRemoteSearch('');
|
||||
return;
|
||||
}
|
||||
this.selectLoading = true;
|
||||
this.selectTimer = setTimeout(() => {
|
||||
this.doRemoteSearch(query);
|
||||
}, 300);
|
||||
},
|
||||
|
||||
async doRemoteSearch(query) {
|
||||
try {
|
||||
const res = await listOrder({
|
||||
pageNum: 1,
|
||||
pageSize: 100,
|
||||
keyword: query || undefined,
|
||||
});
|
||||
this.contractList = res.rows || [];
|
||||
// 初始加载时,确保已选中的合同在列表中
|
||||
if (!query && this.value && !this.contractList.some(item => String(item.orderId) === String(this.value))) {
|
||||
try {
|
||||
const contract = await getOrder(this.value);
|
||||
if (contract.data) {
|
||||
this.contractList.unshift(contract.data);
|
||||
}
|
||||
} catch (e) {
|
||||
console.error('Failed to fetch selected contract:', e);
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Failed to search contracts:', error);
|
||||
} finally {
|
||||
this.selectLoading = false;
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -145,6 +145,7 @@
|
||||
<script>
|
||||
import { listProduct, getProduct, addProduct } from '@/api/wms/product';
|
||||
import MemoInput from '@/components/MemoInput/index.vue';
|
||||
import { validSpecification } from '@/utils/validate';
|
||||
|
||||
export default {
|
||||
name: 'ProductSelector',
|
||||
@@ -184,7 +185,8 @@ export default {
|
||||
{ required: true, message: "计量单位不能为空", trigger: "blur" }
|
||||
],
|
||||
specification: [
|
||||
{ required: true, message: "规格不能为空", trigger: "blur" }
|
||||
{ required: true, message: "规格不能为空", trigger: "blur" },
|
||||
{ validator: validSpecification, trigger: 'blur' }
|
||||
],
|
||||
},
|
||||
buttonLoading: false,
|
||||
|
||||
@@ -130,6 +130,7 @@
|
||||
<script>
|
||||
import { listRawMaterial, getRawMaterial, updateRawMaterial, addRawMaterial } from '@/api/wms/rawMaterial';
|
||||
import MemoInput from '@/components/MemoInput/index.vue'
|
||||
import { validSpecification } from '@/utils/validate';
|
||||
|
||||
export default {
|
||||
name: 'RawMaterialSelector',
|
||||
@@ -197,7 +198,8 @@ export default {
|
||||
{ required: true, message: "计量单位不能为空", trigger: "blur" }
|
||||
],
|
||||
specification: [
|
||||
{ required: true, message: "规格不能为空", trigger: "blur" }
|
||||
{ required: true, message: "规格不能为空", trigger: "blur" },
|
||||
{ validator: validSpecification, trigger: 'blur' }
|
||||
],
|
||||
},
|
||||
// 提交按钮加载状态
|
||||
|
||||
@@ -180,6 +180,14 @@ export default {
|
||||
visible: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
company: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
scheme: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@@ -194,11 +202,16 @@ export default {
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 999,
|
||||
templateName: undefined
|
||||
templateName: undefined,
|
||||
templateUnit: undefined
|
||||
},
|
||||
selectedCoils: [],
|
||||
form: {
|
||||
taskCode: undefined
|
||||
taskCode: undefined,
|
||||
taskType: undefined,
|
||||
belongCompany: undefined,
|
||||
enterCoilNos: undefined,
|
||||
supplierCoilNos: undefined
|
||||
},
|
||||
schemeAddOpen: false,
|
||||
schemeAddLoading: false,
|
||||
@@ -239,12 +252,16 @@ export default {
|
||||
this.selectedTemplate = null;
|
||||
this.checkItemList = [];
|
||||
this.form.taskCode = undefined;
|
||||
this.form.belongCompany = undefined;
|
||||
this.form.taskType = undefined;
|
||||
this.selectedCoils = [];
|
||||
this.selectedEnterCoilNos = [];
|
||||
this.tempEnterCoilNo = '';
|
||||
this.selectedSupplierCoilNos = [];
|
||||
this.tempSupplierCoilNo = '';
|
||||
this.enterCoilNoError = false;
|
||||
this.queryParams.templateName = undefined;
|
||||
this.queryParams.templateUnit = this.company || undefined;
|
||||
this.getList();
|
||||
}
|
||||
}
|
||||
@@ -256,6 +273,12 @@ export default {
|
||||
this.templateList = response.rows || [];
|
||||
this.total = response.total || 0;
|
||||
this.loading = false;
|
||||
if (this.scheme && this.templateList.length > 0) {
|
||||
const match = this.templateList.find(t => t.templateName === this.scheme);
|
||||
if (match) {
|
||||
this.handleSchemeClick(match);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
handleQuery() {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user