Compare commits
151 Commits
8684bc4a63
...
0.8.X
| Author | SHA1 | Date | |
|---|---|---|---|
| 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 | |||
| 577de8eb64 | |||
| 03add7c96b | |||
| 42e5b6dd2b | |||
| 88149561c5 | |||
| 51bb7593c7 | |||
| c34fc1e477 | |||
| 9bd6077599 | |||
| 6fe1f668d3 | |||
| 53b991242c | |||
| 91017f7c84 | |||
| 7b80ef035a | |||
| e54efab7c8 | |||
| 715c1b9728 | |||
| 8723924002 | |||
| cbaa47b34e | |||
| fe24426f59 | |||
| ef04d73e0c | |||
| b7d47a5d9d | |||
| 021c1c908a | |||
| cd3b25fa30 | |||
| 3106b2c530 | |||
| f4e6b24c92 | |||
| d6620e2449 | |||
| b59bb1789e | |||
| 4295a28f33 | |||
| 8572a60044 | |||
| 29328d70e9 | |||
| 12545f7c8b | |||
| 6ec4275088 | |||
| 14dbd633b5 | |||
| 8d68d2bdee | |||
| 6b8eac4139 | |||
| 13780c635b | |||
| a425a9052a | |||
| f64da15bc3 | |||
| b134539e53 | |||
| effc1f6f2e | |||
| ca285f78c6 | |||
| 0cfffcc60d | |||
| 37b2987279 | |||
| 59bdcf96dc | |||
| 8f602d80a9 | |||
| 7bddfad80f | |||
| 8b1d7ed280 | |||
| 285775c733 | |||
| 7e6bc1e8b4 | |||
| bf3967d7b5 | |||
| a0cd885fc7 | |||
| 481188f654 | |||
| c8fe545950 | |||
| 94840b2153 | |||
| c5ce33f71a | |||
| 43f4692a72 | |||
| 9af5284ff3 | |||
| 62da44382a | |||
| 6a5220ad78 | |||
| 3b7ae10499 | |||
| 6044413384 | |||
| 91d1236c37 | |||
| 020863d1ef | |||
| 6832209e98 | |||
| 3a0f729669 | |||
| aad568f320 | |||
| d6099a781f | |||
| e23098b766 | |||
| 37ea2b7d78 | |||
| c707a0356f | |||
| 484f63f9cc | |||
| 1f32171800 | |||
| 5a16a9d2b1 | |||
| 6147ad2252 | |||
| 5e9bf6069e | |||
| 3cc37ae3d3 | |||
| 5b4ea8f486 | |||
| b8ed505971 | |||
| 6f488c74fc | |||
| 1b65444ab3 | |||
| 125e07eed4 | |||
| 82a54e3200 | |||
| 327ae685c1 | |||
| df643a8e4e |
@@ -1,9 +0,0 @@
|
||||
---
|
||||
alwaysApply: true
|
||||
scene: git_message
|
||||
---
|
||||
|
||||
使用中文编写提交信息, 提交信息格式为:
|
||||
```
|
||||
<type>(<scope>): <subject>
|
||||
```
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -249,6 +252,49 @@ public class SqlServerApiBusinessService {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 测试用:统计 V_VBDA_GAUGE 中各 THICK 列的非空/非零数量,
|
||||
* 用于排查"末架出口厚度恒为 0"问题——确认实际数据落在哪一列。
|
||||
*/
|
||||
public Map<String, Object> getGaugeStats(String matId) {
|
||||
List<Map<String, Object>> rows = asRowList(client.queryGaugeByMatId(matId));
|
||||
String[] cols = {"THICK0", "THICK1", "THICK4", "THICK5",
|
||||
"THICK0REF", "THICK1REF", "THICK4REF", "THICK5REF"};
|
||||
Map<String, Object> stats = new LinkedHashMap<>();
|
||||
for (String col : cols) {
|
||||
long nonNull = 0, nonZero = 0;
|
||||
Double min = null, max = null;
|
||||
for (Map<String, Object> r : rows) {
|
||||
Object raw = r.get(col);
|
||||
if (raw == null) raw = r.get(col.toLowerCase());
|
||||
if (raw == null) continue;
|
||||
nonNull++;
|
||||
Number n = asNumber(raw);
|
||||
if (n == null) continue;
|
||||
double d = n.doubleValue();
|
||||
if (d != 0.0) nonZero++;
|
||||
if (min == null || d < min) min = d;
|
||||
if (max == null || d > max) max = d;
|
||||
}
|
||||
Map<String, Object> info = new LinkedHashMap<>();
|
||||
info.put("nonNullCount", nonNull);
|
||||
info.put("nonZeroCount", nonZero);
|
||||
info.put("min", min);
|
||||
info.put("max", max);
|
||||
stats.put(col, info);
|
||||
}
|
||||
Map<String, Object> result = new LinkedHashMap<>();
|
||||
result.put("matId", matId);
|
||||
result.put("totalRows", rows.size());
|
||||
result.put("columnStats", stats);
|
||||
List<Map<String, Object>> samples = new ArrayList<>();
|
||||
if (!rows.isEmpty()) samples.add(rows.get(0));
|
||||
if (rows.size() > 1) samples.add(rows.get(rows.size() / 2));
|
||||
if (rows.size() > 2) samples.add(rows.get(rows.size() - 1));
|
||||
result.put("sampleRows", samples);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 轧辊数据:返回全部在辊/备辊数据。
|
||||
*/
|
||||
@@ -378,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() {
|
||||
@@ -397,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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -94,6 +94,15 @@ public class SqlServerApiController {
|
||||
return R.ok(businessService.getRealtimeData(matId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 测试用:V_VBDA_GAUGE 各 THICK 列非空/非零统计 + 样本行。
|
||||
* 用于定位"末架出口厚度恒为 0"问题。
|
||||
*/
|
||||
@GetMapping("/test/gauge-stats/{matId}")
|
||||
public R<Map<String, Object>> testGaugeStats(@PathVariable String matId) {
|
||||
return R.ok(businessService.getGaugeStats(matId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 轧辊数据:type / status 均可选,不传则返回全量。
|
||||
*/
|
||||
|
||||
@@ -76,6 +76,16 @@ public class ApsPlanDetailController extends BaseController {
|
||||
return toAjax(iApsPlanDetailService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量新增排产单明细
|
||||
*/
|
||||
@Log(title = "排产单明细", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping("/batch")
|
||||
public R<Void> batchAdd(@Validated(AddGroup.class) @RequestBody List<ApsPlanDetailBo> boList) {
|
||||
return toAjax(iApsPlanDetailService.insertBatchByBo(boList));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改排产单明细
|
||||
*/
|
||||
|
||||
@@ -226,5 +226,9 @@ public class ApsPlanDetailBo extends BaseEntity {
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 排产日期(字符串格式,例如 '2025-12-29')
|
||||
*/
|
||||
private String detailDate;
|
||||
|
||||
}
|
||||
|
||||
@@ -52,6 +52,11 @@ public class ApsPlanSheetBo extends BaseEntity {
|
||||
*/
|
||||
private String planType;
|
||||
|
||||
/**
|
||||
* 排产文件
|
||||
*/
|
||||
private String apsUrl;
|
||||
|
||||
/**
|
||||
* 排产人
|
||||
*/
|
||||
|
||||
@@ -184,6 +184,10 @@ public class ApsPlanDetail extends BaseEntity {
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 排产日期(字符串格式,例如 '2025-12-29')
|
||||
*/
|
||||
private String detailDate;
|
||||
/**
|
||||
* 删除标记(0正常 1删除)
|
||||
*/
|
||||
|
||||
@@ -49,6 +49,10 @@ public class ApsPlanSheet extends BaseEntity {
|
||||
* 排产类型
|
||||
*/
|
||||
private String planType;
|
||||
/**
|
||||
* 排产文件
|
||||
*/
|
||||
private String apsUrl;
|
||||
/**
|
||||
* 排产人
|
||||
*/
|
||||
|
||||
@@ -261,6 +261,12 @@ public class ApsPlanDetailVo {
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 排产日期(字符串格式,例如 '2025-12-29')
|
||||
*/
|
||||
@ExcelProperty(value = "排产日期")
|
||||
private String detailDate;
|
||||
|
||||
/**
|
||||
* 技术附件
|
||||
*/
|
||||
|
||||
@@ -60,6 +60,12 @@ public class ApsPlanSheetVo {
|
||||
@ExcelProperty(value = "排产类型")
|
||||
private String planType;
|
||||
|
||||
/**
|
||||
* 排产文件
|
||||
*/
|
||||
@ExcelProperty(value = "排产文件")
|
||||
private String apsUrl;
|
||||
|
||||
/**
|
||||
* 排产人
|
||||
*/
|
||||
|
||||
@@ -43,6 +43,11 @@ public interface IApsPlanDetailService {
|
||||
*/
|
||||
Boolean insertByBo(ApsPlanDetailBo bo);
|
||||
|
||||
/**
|
||||
* 批量新增排产单明细
|
||||
*/
|
||||
Boolean insertBatchByBo(List<ApsPlanDetailBo> boList);
|
||||
|
||||
/**
|
||||
* 修改排产单明细
|
||||
*/
|
||||
|
||||
@@ -101,6 +101,7 @@ public class ApsPlanDetailServiceImpl implements IApsPlanDetailService {
|
||||
qw.eq(StringUtils.isNotBlank(bo.getSampleReq()), "d.sample_req", bo.getSampleReq());
|
||||
qw.eq(bo.getStartTime() != null, "d.start_time", bo.getStartTime());
|
||||
qw.eq(bo.getEndTime() != null, "d.end_time", bo.getEndTime());
|
||||
qw.eq(StringUtils.isNotBlank(bo.getDetailDate()), "d.detail_date", bo.getDetailDate());
|
||||
//根据创建时间倒叙
|
||||
qw.orderByDesc("d.create_time");
|
||||
return qw;
|
||||
@@ -168,6 +169,7 @@ public class ApsPlanDetailServiceImpl implements IApsPlanDetailService {
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getSampleReq()), ApsPlanDetail::getSampleReq, bo.getSampleReq());
|
||||
lqw.eq(bo.getStartTime() != null, ApsPlanDetail::getStartTime, bo.getStartTime());
|
||||
lqw.eq(bo.getEndTime() != null, ApsPlanDetail::getEndTime, bo.getEndTime());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getDetailDate()), ApsPlanDetail::getDetailDate, bo.getDetailDate());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
@@ -185,6 +187,16 @@ public class ApsPlanDetailServiceImpl implements IApsPlanDetailService {
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量新增排产单明细
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertBatchByBo(List<ApsPlanDetailBo> boList) {
|
||||
List<ApsPlanDetail> list = BeanUtil.copyToList(boList, ApsPlanDetail.class);
|
||||
list.forEach(this::validEntityBeforeSave);
|
||||
return baseMapper.insertBatch(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改排产单明细
|
||||
*/
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
<result property="startTime" column="start_time"/>
|
||||
<result property="endTime" column="end_time"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="detailDate" column="detail_date"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -26,9 +26,15 @@ import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* Excel相关处理
|
||||
@@ -149,6 +155,33 @@ public class ExcelUtil {
|
||||
builder.doWrite(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel(仅导出指定列)
|
||||
*
|
||||
* @param list 导出数据集合
|
||||
* @param sheetName 工作表的名称
|
||||
* @param clazz 实体类
|
||||
* @param includeColumnFieldNames 需要导出的字段名集合(Java字段名,非Excel列名)
|
||||
* @param response 响应体
|
||||
*/
|
||||
public static <T> void exportExcel(List<T> list, String sheetName, Class<T> clazz,
|
||||
Set<String> includeColumnFieldNames,
|
||||
HttpServletResponse response) {
|
||||
try {
|
||||
resetResponse(sheetName, response);
|
||||
ServletOutputStream os = response.getOutputStream();
|
||||
EasyExcel.write(os, clazz)
|
||||
.autoCloseStream(false)
|
||||
.registerWriteHandler(new LongestMatchColumnWidthStyleStrategy())
|
||||
.registerConverter(new ExcelBigNumberConvert())
|
||||
.includeColumnFieldNames(includeColumnFieldNames)
|
||||
.sheet(sheetName)
|
||||
.doWrite(list);
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException("导出Excel异常");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 单表多数据模板导出 模板格式为 {.属性}
|
||||
*
|
||||
@@ -325,4 +358,67 @@ public class ExcelUtil {
|
||||
return IdUtil.fastSimpleUUID() + "_" + filename + ".xlsx";
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel(按指定顺序的列导出,使用动态表头)
|
||||
*
|
||||
* @param list 导出数据集合
|
||||
* @param sheetName 工作表的名称
|
||||
* @param orderedFields 按导出顺序排列的Java字段名列表
|
||||
* @param fieldLabelMap Java字段名 -> Excel列头中文名 映射
|
||||
* @param response 响应体
|
||||
*/
|
||||
public static <T> void exportExcelOrdered(List<T> list, String sheetName,
|
||||
List<String> orderedFields,
|
||||
Map<String, String> fieldLabelMap,
|
||||
HttpServletResponse response) {
|
||||
if (orderedFields == null || orderedFields.isEmpty()) {
|
||||
throw new IllegalArgumentException("导出列不能为空");
|
||||
}
|
||||
// 构建动态表头
|
||||
List<List<String>> heads = orderedFields.stream()
|
||||
.map(f -> Collections.singletonList(fieldLabelMap.getOrDefault(f, f)))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
// 构建数据行
|
||||
List<List<Object>> data = new ArrayList<>(list.size());
|
||||
if (!list.isEmpty()) {
|
||||
Map<String, Field> fieldCache = new HashMap<>();
|
||||
Class<?> clazz = list.get(0).getClass();
|
||||
for (T vo : list) {
|
||||
List<Object> row = new ArrayList<>(orderedFields.size());
|
||||
for (String fieldName : orderedFields) {
|
||||
Field field = fieldCache.computeIfAbsent(fieldName, k -> {
|
||||
try {
|
||||
Field f = clazz.getDeclaredField(k);
|
||||
f.setAccessible(true);
|
||||
return f;
|
||||
} catch (NoSuchFieldException e) {
|
||||
return null;
|
||||
}
|
||||
});
|
||||
try {
|
||||
row.add(field != null ? field.get(vo) : null);
|
||||
} catch (IllegalAccessException e) {
|
||||
row.add(null);
|
||||
}
|
||||
}
|
||||
data.add(row);
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
resetResponse(sheetName, response);
|
||||
ServletOutputStream os = response.getOutputStream();
|
||||
EasyExcel.write(os)
|
||||
.head(heads)
|
||||
.autoCloseStream(false)
|
||||
.registerWriteHandler(new LongestMatchColumnWidthStyleStrategy())
|
||||
.registerConverter(new ExcelBigNumberConvert())
|
||||
.sheet(sheetName)
|
||||
.doWrite(data);
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException("导出Excel异常", e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -44,6 +44,10 @@ public class CostItem extends BaseEntity {
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 查询条件(JSON格式)
|
||||
*/
|
||||
private String queryCondition;
|
||||
/**
|
||||
* 删除标识 0=正常 2=删除
|
||||
*/
|
||||
|
||||
@@ -47,5 +47,10 @@ public class CostItemBo extends BaseEntity {
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 查询条件(JSON格式)
|
||||
*/
|
||||
private String queryCondition;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -55,5 +55,11 @@ public class CostItemVo {
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 查询条件(JSON格式)
|
||||
*/
|
||||
@ExcelProperty(value = "查询条件(JSON格式)")
|
||||
private String queryCondition;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -65,6 +65,7 @@ public class CostItemServiceImpl implements ICostItemService {
|
||||
lqw.like(StringUtils.isNotBlank(bo.getItemName()), CostItem::getItemName, bo.getItemName());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getCategory()), CostItem::getCategory, bo.getCategory());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getUnit()), CostItem::getUnit, bo.getUnit());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getQueryCondition()), CostItem::getQueryCondition, bo.getQueryCondition());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="category" column="category"/>
|
||||
<result property="unit" column="unit"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="queryCondition" column="query_condition"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
|
||||
@@ -85,6 +85,15 @@ public class CrmSalesReportController extends BaseController {
|
||||
return R.ok(stats);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询省份统计数据
|
||||
*/
|
||||
@GetMapping("/provinceStats")
|
||||
public R<List<CrmSalesReportVo.ProvinceStat>> getProvinceStats(CrmSalesReportBo bo) {
|
||||
List<CrmSalesReportVo.ProvinceStat> stats = iCrmSalesReportService.queryProvinceStats(bo);
|
||||
return R.ok(stats);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出销售报表订单明细
|
||||
*/
|
||||
|
||||
@@ -290,4 +290,35 @@ public class CrmSalesReportVo {
|
||||
@ExcelProperty(value = "销售金额")
|
||||
private BigDecimal salesAmount;
|
||||
}
|
||||
|
||||
/**
|
||||
* 省份统计内部类
|
||||
*/
|
||||
@Data
|
||||
public static class ProvinceStat {
|
||||
|
||||
/**
|
||||
* 省份
|
||||
*/
|
||||
@ExcelProperty(value = "省份")
|
||||
private String province;
|
||||
|
||||
/**
|
||||
* 客户数量
|
||||
*/
|
||||
@ExcelProperty(value = "客户数量")
|
||||
private Integer customerCount;
|
||||
|
||||
/**
|
||||
* 订单数量
|
||||
*/
|
||||
@ExcelProperty(value = "订单数量")
|
||||
private Integer orderCount;
|
||||
|
||||
/**
|
||||
* 销售金额
|
||||
*/
|
||||
@ExcelProperty(value = "销售金额")
|
||||
private BigDecimal salesAmount;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,4 +54,12 @@ public interface CrmSalesReportMapper {
|
||||
* @return 行业统计列表
|
||||
*/
|
||||
List<CrmSalesReportVo.IndustryStat> selectIndustryStats(@Param("bo") CrmSalesReportBo bo);
|
||||
|
||||
/**
|
||||
* 查询省份统计数据
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 省份统计列表
|
||||
*/
|
||||
List<CrmSalesReportVo.ProvinceStat> selectProvinceStats(@Param("bo") CrmSalesReportBo bo);
|
||||
}
|
||||
@@ -72,4 +72,12 @@ public interface ICrmSalesReportService {
|
||||
* @return 行业统计列表
|
||||
*/
|
||||
List<CrmSalesReportVo.IndustryStat> queryIndustryStats(CrmSalesReportBo bo);
|
||||
|
||||
/**
|
||||
* 查询省份统计数据
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 省份统计列表
|
||||
*/
|
||||
List<CrmSalesReportVo.ProvinceStat> queryProvinceStats(CrmSalesReportBo bo);
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -136,4 +136,12 @@ public class CrmSalesReportServiceImpl implements ICrmSalesReportService {
|
||||
public List<CrmSalesReportVo.IndustryStat> queryIndustryStats(CrmSalesReportBo bo) {
|
||||
return baseMapper.selectIndustryStats(bo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询省份统计数据
|
||||
*/
|
||||
@Override
|
||||
public List<CrmSalesReportVo.ProvinceStat> queryProvinceStats(CrmSalesReportBo bo) {
|
||||
return baseMapper.selectProvinceStats(bo);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -268,4 +268,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
ORDER BY salesAmount DESC
|
||||
</select>
|
||||
|
||||
<!-- 查询省份统计数据 -->
|
||||
<select id="selectProvinceStats" resultType="com.klp.crm.domain.vo.CrmSalesReportVo$ProvinceStat">
|
||||
SELECT
|
||||
COALESCE(c.province, '其他') as province,
|
||||
COUNT(DISTINCT c.customer_id) as customerCount,
|
||||
COUNT(o.order_id) as orderCount,
|
||||
COALESCE(SUM(o.order_amount), 0) as salesAmount
|
||||
FROM crm_order o
|
||||
LEFT JOIN crm_customer c ON o.customer_id = c.customer_id
|
||||
<include refid="selectCondition"/>
|
||||
GROUP BY c.province
|
||||
ORDER BY salesAmount DESC
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
package com.klp.mes.eqp.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.mes.eqp.domain.vo.EqpEquipmentInspectionApprovalVo;
|
||||
import com.klp.mes.eqp.domain.bo.EqpEquipmentInspectionApprovalBo;
|
||||
import com.klp.mes.eqp.service.IEqpEquipmentInspectionApprovalService;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 设备巡检审批(按产线+时间范围审批)
|
||||
*
|
||||
* @author klp
|
||||
* @date 2026-05-29
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/eqp/equipmentInspectionApproval")
|
||||
public class EqpEquipmentInspectionApprovalController extends BaseController {
|
||||
|
||||
private final IEqpEquipmentInspectionApprovalService iEqpEquipmentInspectionApprovalService;
|
||||
|
||||
/**
|
||||
* 查询设备巡检审批(按产线+时间范围审批)列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<EqpEquipmentInspectionApprovalVo> list(EqpEquipmentInspectionApprovalBo bo, PageQuery pageQuery) {
|
||||
return iEqpEquipmentInspectionApprovalService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出设备巡检审批(按产线+时间范围审批)列表
|
||||
*/
|
||||
@Log(title = "设备巡检审批(按产线+时间范围审批)", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(EqpEquipmentInspectionApprovalBo bo, HttpServletResponse response) {
|
||||
List<EqpEquipmentInspectionApprovalVo> list = iEqpEquipmentInspectionApprovalService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "设备巡检审批(按产线+时间范围审批)", EqpEquipmentInspectionApprovalVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取设备巡检审批(按产线+时间范围审批)详细信息
|
||||
*
|
||||
* @param approvalId 主键
|
||||
*/
|
||||
@GetMapping("/{approvalId}")
|
||||
public R<EqpEquipmentInspectionApprovalVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long approvalId) {
|
||||
return R.ok(iEqpEquipmentInspectionApprovalService.queryById(approvalId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备巡检审批(按产线+时间范围审批)
|
||||
*/
|
||||
@Log(title = "设备巡检审批(按产线+时间范围审批)", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody EqpEquipmentInspectionApprovalBo bo) {
|
||||
return toAjax(iEqpEquipmentInspectionApprovalService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备巡检审批(按产线+时间范围审批)
|
||||
*/
|
||||
@Log(title = "设备巡检审批(按产线+时间范围审批)", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody EqpEquipmentInspectionApprovalBo bo) {
|
||||
return toAjax(iEqpEquipmentInspectionApprovalService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备巡检审批(按产线+时间范围审批)
|
||||
*
|
||||
* @param approvalIds 主键串
|
||||
*/
|
||||
@Log(title = "设备巡检审批(按产线+时间范围审批)", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{approvalIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] approvalIds) {
|
||||
return toAjax(iEqpEquipmentInspectionApprovalService.deleteWithValidByIds(Arrays.asList(approvalIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
package com.klp.mes.eqp.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;
|
||||
|
||||
/**
|
||||
* 设备巡检审批(按产线+时间范围审批)对象 eqp_equipment_inspection_approval
|
||||
*
|
||||
* @author klp
|
||||
* @date 2026-05-29
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("eqp_equipment_inspection_approval")
|
||||
public class EqpEquipmentInspectionApproval extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
* 审批ID 主键
|
||||
*/
|
||||
@TableId(value = "approval_id")
|
||||
private Long approvalId;
|
||||
/**
|
||||
* 产线ID(对应你刚改的bigint类型)
|
||||
*/
|
||||
private Long productionLine;
|
||||
/**
|
||||
* 巡检开始时间
|
||||
*/
|
||||
private Date insStartTime;
|
||||
/**
|
||||
* 巡检结束时间
|
||||
*/
|
||||
private Date insEndTime;
|
||||
/**
|
||||
* 申请人
|
||||
*/
|
||||
private String applyUser;
|
||||
/**
|
||||
* 申请时间
|
||||
*/
|
||||
private Date applyTime;
|
||||
/**
|
||||
* 审批状态 1=待审批 2=已通过 3=已驳回 4=已撤销
|
||||
*/
|
||||
private Integer approvalStatus;
|
||||
/**
|
||||
* 审批人
|
||||
*/
|
||||
private String approvalUser;
|
||||
/**
|
||||
* 审批时间
|
||||
*/
|
||||
private Date approvalTime;
|
||||
/**
|
||||
* 审批意见
|
||||
*/
|
||||
private String approvalOpinion;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 删除标识 0正常 2删除
|
||||
*/
|
||||
@TableLogic
|
||||
private Long delFlag;
|
||||
|
||||
}
|
||||
@@ -31,7 +31,7 @@ public class EqpEquipmentPart extends BaseEntity {
|
||||
/**
|
||||
* 产线
|
||||
*/
|
||||
private String productionLine;
|
||||
private Long productionLine;
|
||||
/**
|
||||
* 产线段
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
package com.klp.mes.eqp.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;
|
||||
|
||||
/**
|
||||
* 设备巡检审批(按产线+时间范围审批)业务对象 eqp_equipment_inspection_approval
|
||||
*
|
||||
* @author klp
|
||||
* @date 2026-05-29
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class EqpEquipmentInspectionApprovalBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 审批ID 主键
|
||||
*/
|
||||
private Long approvalId;
|
||||
|
||||
/**
|
||||
* 产线ID(对应你刚改的bigint类型)
|
||||
*/
|
||||
private Long productionLine;
|
||||
|
||||
/**
|
||||
* 巡检开始时间
|
||||
*/
|
||||
private Date insStartTime;
|
||||
|
||||
/**
|
||||
* 巡检结束时间
|
||||
*/
|
||||
private Date insEndTime;
|
||||
|
||||
/**
|
||||
* 申请人
|
||||
*/
|
||||
private String applyUser;
|
||||
|
||||
/**
|
||||
* 申请时间
|
||||
*/
|
||||
private Date applyTime;
|
||||
|
||||
/**
|
||||
* 审批状态 1=待审批 2=已通过 3=已驳回 4=已撤销
|
||||
*/
|
||||
private Integer approvalStatus;
|
||||
|
||||
/**
|
||||
* 审批人
|
||||
*/
|
||||
private String approvalUser;
|
||||
|
||||
/**
|
||||
* 审批时间
|
||||
*/
|
||||
private Date approvalTime;
|
||||
|
||||
/**
|
||||
* 审批意见
|
||||
*/
|
||||
private String approvalOpinion;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -68,7 +68,7 @@ public class EqpEquipmentInspectionRecordBo extends BaseEntity {
|
||||
/**
|
||||
* 产线
|
||||
*/
|
||||
private String productionLine;
|
||||
private Long productionLine;
|
||||
|
||||
/**
|
||||
* 巡检时间开始
|
||||
|
||||
@@ -31,7 +31,7 @@ public class EqpEquipmentPartBo extends BaseEntity {
|
||||
/**
|
||||
* 产线
|
||||
*/
|
||||
private String productionLine;
|
||||
private Long productionLine;
|
||||
|
||||
/**
|
||||
* 产线段
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
package com.klp.mes.eqp.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;
|
||||
|
||||
|
||||
/**
|
||||
* 设备巡检审批(按产线+时间范围审批)视图对象 eqp_equipment_inspection_approval
|
||||
*
|
||||
* @author klp
|
||||
* @date 2026-05-29
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class EqpEquipmentInspectionApprovalVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 审批ID 主键
|
||||
*/
|
||||
@ExcelProperty(value = "审批ID 主键")
|
||||
private Long approvalId;
|
||||
|
||||
/**
|
||||
* 产线ID(对应你刚改的bigint类型)
|
||||
*/
|
||||
@ExcelProperty(value = "产线ID", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "对=应你刚改的bigint类型")
|
||||
private Long productionLine;
|
||||
|
||||
/**
|
||||
* 巡检开始时间
|
||||
*/
|
||||
@ExcelProperty(value = "巡检开始时间")
|
||||
private Date insStartTime;
|
||||
|
||||
/**
|
||||
* 巡检结束时间
|
||||
*/
|
||||
@ExcelProperty(value = "巡检结束时间")
|
||||
private Date insEndTime;
|
||||
|
||||
/**
|
||||
* 申请人
|
||||
*/
|
||||
@ExcelProperty(value = "申请人")
|
||||
private String applyUser;
|
||||
|
||||
/**
|
||||
* 申请时间
|
||||
*/
|
||||
@ExcelProperty(value = "申请时间")
|
||||
private Date applyTime;
|
||||
|
||||
/**
|
||||
* 审批状态 1=待审批 2=已通过 3=已驳回 4=已撤销
|
||||
*/
|
||||
@ExcelProperty(value = "审批状态 1=待审批 2=已通过 3=已驳回 4=已撤销")
|
||||
private Integer approvalStatus;
|
||||
|
||||
/**
|
||||
* 审批人
|
||||
*/
|
||||
@ExcelProperty(value = "审批人")
|
||||
private String approvalUser;
|
||||
|
||||
/**
|
||||
* 审批时间
|
||||
*/
|
||||
@ExcelProperty(value = "审批时间")
|
||||
private Date approvalTime;
|
||||
|
||||
/**
|
||||
* 审批意见
|
||||
*/
|
||||
@ExcelProperty(value = "审批意见")
|
||||
private String approvalOpinion;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -37,7 +37,7 @@ public class EqpEquipmentPartVo {
|
||||
* 产线
|
||||
*/
|
||||
@ExcelProperty(value = "产线")
|
||||
private String productionLine;
|
||||
private Long productionLine;
|
||||
|
||||
/**
|
||||
* 产线段
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.klp.mes.eqp.mapper;
|
||||
|
||||
import com.klp.mes.eqp.domain.EqpEquipmentInspectionApproval;
|
||||
import com.klp.mes.eqp.domain.vo.EqpEquipmentInspectionApprovalVo;
|
||||
import com.klp.common.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 设备巡检审批(按产线+时间范围审批)Mapper接口
|
||||
*
|
||||
* @author klp
|
||||
* @date 2026-05-29
|
||||
*/
|
||||
public interface EqpEquipmentInspectionApprovalMapper extends BaseMapperPlus<EqpEquipmentInspectionApprovalMapper, EqpEquipmentInspectionApproval, EqpEquipmentInspectionApprovalVo> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.klp.mes.eqp.service;
|
||||
|
||||
import com.klp.mes.eqp.domain.EqpEquipmentInspectionApproval;
|
||||
import com.klp.mes.eqp.domain.vo.EqpEquipmentInspectionApprovalVo;
|
||||
import com.klp.mes.eqp.domain.bo.EqpEquipmentInspectionApprovalBo;
|
||||
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-05-29
|
||||
*/
|
||||
public interface IEqpEquipmentInspectionApprovalService {
|
||||
|
||||
/**
|
||||
* 查询设备巡检审批(按产线+时间范围审批)
|
||||
*/
|
||||
EqpEquipmentInspectionApprovalVo queryById(Long approvalId);
|
||||
|
||||
/**
|
||||
* 查询设备巡检审批(按产线+时间范围审批)列表
|
||||
*/
|
||||
TableDataInfo<EqpEquipmentInspectionApprovalVo> queryPageList(EqpEquipmentInspectionApprovalBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询设备巡检审批(按产线+时间范围审批)列表
|
||||
*/
|
||||
List<EqpEquipmentInspectionApprovalVo> queryList(EqpEquipmentInspectionApprovalBo bo);
|
||||
|
||||
/**
|
||||
* 新增设备巡检审批(按产线+时间范围审批)
|
||||
*/
|
||||
Boolean insertByBo(EqpEquipmentInspectionApprovalBo bo);
|
||||
|
||||
/**
|
||||
* 修改设备巡检审批(按产线+时间范围审批)
|
||||
*/
|
||||
Boolean updateByBo(EqpEquipmentInspectionApprovalBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除设备巡检审批(按产线+时间范围审批)信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
package com.klp.mes.eqp.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.helper.LoginHelper;
|
||||
import com.klp.common.utils.StringUtils;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.klp.mes.eqp.domain.bo.EqpEquipmentInspectionApprovalBo;
|
||||
import com.klp.mes.eqp.domain.vo.EqpEquipmentInspectionApprovalVo;
|
||||
import com.klp.mes.eqp.domain.EqpEquipmentInspectionApproval;
|
||||
import com.klp.mes.eqp.mapper.EqpEquipmentInspectionApprovalMapper;
|
||||
import com.klp.mes.eqp.service.IEqpEquipmentInspectionApprovalService;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 设备巡检审批(按产线+时间范围审批)Service业务层处理
|
||||
*
|
||||
* @author klp
|
||||
* @date 2026-05-29
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class EqpEquipmentInspectionApprovalServiceImpl implements IEqpEquipmentInspectionApprovalService {
|
||||
|
||||
private final EqpEquipmentInspectionApprovalMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询设备巡检审批(按产线+时间范围审批)
|
||||
*/
|
||||
@Override
|
||||
public EqpEquipmentInspectionApprovalVo queryById(Long approvalId){
|
||||
return baseMapper.selectVoById(approvalId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询设备巡检审批(按产线+时间范围审批)列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<EqpEquipmentInspectionApprovalVo> queryPageList(EqpEquipmentInspectionApprovalBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<EqpEquipmentInspectionApproval> lqw = buildQueryWrapper(bo);
|
||||
Page<EqpEquipmentInspectionApprovalVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询设备巡检审批(按产线+时间范围审批)列表
|
||||
*/
|
||||
@Override
|
||||
public List<EqpEquipmentInspectionApprovalVo> queryList(EqpEquipmentInspectionApprovalBo bo) {
|
||||
LambdaQueryWrapper<EqpEquipmentInspectionApproval> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<EqpEquipmentInspectionApproval> buildQueryWrapper(EqpEquipmentInspectionApprovalBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<EqpEquipmentInspectionApproval> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(bo.getProductionLine() != null, EqpEquipmentInspectionApproval::getProductionLine, bo.getProductionLine());
|
||||
lqw.eq(bo.getInsStartTime() != null, EqpEquipmentInspectionApproval::getInsStartTime, bo.getInsStartTime());
|
||||
lqw.eq(bo.getInsEndTime() != null, EqpEquipmentInspectionApproval::getInsEndTime, bo.getInsEndTime());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getApplyUser()), EqpEquipmentInspectionApproval::getApplyUser, bo.getApplyUser());
|
||||
lqw.eq(bo.getApplyTime() != null, EqpEquipmentInspectionApproval::getApplyTime, bo.getApplyTime());
|
||||
lqw.eq(bo.getApprovalStatus() != null, EqpEquipmentInspectionApproval::getApprovalStatus, bo.getApprovalStatus());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getApprovalUser()), EqpEquipmentInspectionApproval::getApprovalUser, bo.getApprovalUser());
|
||||
lqw.eq(bo.getApprovalTime() != null, EqpEquipmentInspectionApproval::getApprovalTime, bo.getApprovalTime());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getApprovalOpinion()), EqpEquipmentInspectionApproval::getApprovalOpinion, bo.getApprovalOpinion());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备巡检审批(按产线+时间范围审批)
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(EqpEquipmentInspectionApprovalBo bo) {
|
||||
EqpEquipmentInspectionApproval add = BeanUtil.toBean(bo, EqpEquipmentInspectionApproval.class);
|
||||
add.setApplyUser(LoginHelper.getNickName());
|
||||
add.setApplyTime(new Date());
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setApprovalId(add.getApprovalId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备巡检审批(按产线+时间范围审批)
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(EqpEquipmentInspectionApprovalBo bo) {
|
||||
EqpEquipmentInspectionApproval update = BeanUtil.toBean(bo, EqpEquipmentInspectionApproval.class);
|
||||
if (bo.getApprovalStatus() != null && (bo.getApprovalStatus() == 2 || bo.getApprovalStatus() == 3)) {
|
||||
update.setApprovalUser(LoginHelper.getNickName());
|
||||
update.setApprovalTime(new Date());
|
||||
}
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(EqpEquipmentInspectionApproval entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除设备巡检审批(按产线+时间范围审批)
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
@@ -58,7 +58,7 @@ public class EqpEquipmentInspectionRecordServiceImpl implements IEqpEquipmentIns
|
||||
qw.eq(bo.getRunStatus() != null, "r.run_status", bo.getRunStatus());
|
||||
qw.eq(StringUtils.isNotBlank(bo.getInspector()), "r.inspector", bo.getInspector());
|
||||
qw.eq(StringUtils.isNotBlank(bo.getAbnormalDesc()), "r.abnormal_desc", bo.getAbnormalDesc());
|
||||
qw.eq(StringUtils.isNotBlank(bo.getProductionLine()), "p.production_line", bo.getProductionLine());
|
||||
qw.eq(bo.getProductionLine() != null, "p.production_line", bo.getProductionLine());
|
||||
qw.ge(bo.getStartInspectTime() != null, "r.inspect_time", bo.getStartInspectTime());
|
||||
qw.le(bo.getEndInspectTime() != null, "r.inspect_time", bo.getEndInspectTime());
|
||||
qw.eq("r.del_flag", 0);
|
||||
|
||||
@@ -82,7 +82,7 @@ public class EqpEquipmentPartServiceImpl implements IEqpEquipmentPartService {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<EqpEquipmentPart> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getInspectPart()), EqpEquipmentPart::getInspectPart, bo.getInspectPart());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getProductionLine()), EqpEquipmentPart::getProductionLine, bo.getProductionLine());
|
||||
lqw.eq(bo.getProductionLine() != null, EqpEquipmentPart::getProductionLine, bo.getProductionLine());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getLineSection()), EqpEquipmentPart::getLineSection, bo.getLineSection());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getResponsiblePerson()), EqpEquipmentPart::getResponsiblePerson, bo.getResponsiblePerson());
|
||||
return lqw;
|
||||
|
||||
@@ -70,6 +70,10 @@ public class QcCertificate extends BaseEntity {
|
||||
* 质保证明说明(注释)
|
||||
*/
|
||||
private String note;
|
||||
/**
|
||||
* 证书类型(如:出厂合格证、检测报告、质保书等)
|
||||
*/
|
||||
private String certificateType;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
|
||||
@@ -37,6 +37,10 @@ public class QcCertificateItem extends BaseEntity {
|
||||
* 钢卷号
|
||||
*/
|
||||
private String coilNo;
|
||||
/**
|
||||
* 原料卷号
|
||||
*/
|
||||
private String rawCoilNo;
|
||||
/**
|
||||
* 炉号
|
||||
*/
|
||||
@@ -81,10 +85,46 @@ public class QcCertificateItem extends BaseEntity {
|
||||
* Als
|
||||
*/
|
||||
private BigDecimal als;
|
||||
/**
|
||||
* 铝(%)
|
||||
*/
|
||||
private BigDecimal al;
|
||||
/**
|
||||
* 钛(%)
|
||||
*/
|
||||
private BigDecimal ti;
|
||||
/**
|
||||
* 铬(%)
|
||||
*/
|
||||
private BigDecimal cr;
|
||||
/**
|
||||
* 镍(%)
|
||||
*/
|
||||
private BigDecimal ni;
|
||||
/**
|
||||
* 铜(%)
|
||||
*/
|
||||
private BigDecimal cu;
|
||||
/**
|
||||
* 氮(%)
|
||||
*/
|
||||
private BigDecimal n;
|
||||
/**
|
||||
* 铁(%)
|
||||
*/
|
||||
private BigDecimal fe;
|
||||
/**
|
||||
* 硼(%)
|
||||
*/
|
||||
private BigDecimal b;
|
||||
/**
|
||||
* 拉伸试验-屈服强度(MPa)
|
||||
*/
|
||||
private BigDecimal yieldStrength;
|
||||
/**
|
||||
* 规定塑性延伸强度(MPa)
|
||||
*/
|
||||
private BigDecimal plasticExtensionStrength;
|
||||
/**
|
||||
* 拉伸试验-抗拉强度(MPa)
|
||||
*/
|
||||
@@ -109,6 +149,18 @@ public class QcCertificateItem extends BaseEntity {
|
||||
* 表面结构
|
||||
*/
|
||||
private String surfaceStructure;
|
||||
/**
|
||||
* 表面处理
|
||||
*/
|
||||
private String surfaceTreatment;
|
||||
/**
|
||||
* 镀层表面结构
|
||||
*/
|
||||
private String coatingSurfaceStructure;
|
||||
/**
|
||||
* 镀层重量 COATING MASS(g/m²)
|
||||
*/
|
||||
private BigDecimal coatingMass;
|
||||
/**
|
||||
* 边缘状态
|
||||
*/
|
||||
@@ -117,6 +169,10 @@ public class QcCertificateItem extends BaseEntity {
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 调质度
|
||||
*/
|
||||
private String temperDegree;
|
||||
/**
|
||||
* 删除标志(0=正常,1=已删除)
|
||||
*/
|
||||
|
||||
@@ -65,6 +65,38 @@ public class QcChemicalItem extends BaseEntity {
|
||||
* 酸溶铝(%)
|
||||
*/
|
||||
private BigDecimal als;
|
||||
/**
|
||||
* 铝(%)
|
||||
*/
|
||||
private BigDecimal al;
|
||||
/**
|
||||
* 钛(%)
|
||||
*/
|
||||
private BigDecimal ti;
|
||||
/**
|
||||
* 铬(%)
|
||||
*/
|
||||
private BigDecimal cr;
|
||||
/**
|
||||
* 镍(%)
|
||||
*/
|
||||
private BigDecimal ni;
|
||||
/**
|
||||
* 铜(%)
|
||||
*/
|
||||
private BigDecimal cu;
|
||||
/**
|
||||
* 氮(%)
|
||||
*/
|
||||
private BigDecimal n;
|
||||
/**
|
||||
* 铁(%)
|
||||
*/
|
||||
private BigDecimal fe;
|
||||
/**
|
||||
* 硼(%)
|
||||
*/
|
||||
private BigDecimal b;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
|
||||
@@ -94,6 +94,10 @@ public class QcInspectionTask extends BaseEntity {
|
||||
* 附件路径(多个用英文逗号分隔)
|
||||
*/
|
||||
private String attachmentFiles;
|
||||
/**
|
||||
* 厂家卷号集合,多个使用英文逗号分隔
|
||||
*/
|
||||
private String supplierCoilNos;
|
||||
|
||||
/**
|
||||
* 删除标志(0=正常,1=已删除)
|
||||
|
||||
@@ -41,6 +41,10 @@ public class QcPhysicalItem extends BaseEntity {
|
||||
* 拉伸试验-屈服强度(MPa)
|
||||
*/
|
||||
private BigDecimal yieldStrength;
|
||||
/**
|
||||
* 规定塑性延伸强度(MPa)
|
||||
*/
|
||||
private BigDecimal plasticExtensionStrength;
|
||||
/**
|
||||
* 拉伸试验-抗拉强度(MPa)
|
||||
*/
|
||||
@@ -65,6 +69,14 @@ public class QcPhysicalItem extends BaseEntity {
|
||||
* 表面结构
|
||||
*/
|
||||
private String surfaceStructure;
|
||||
/**
|
||||
* 镀层表面结构
|
||||
*/
|
||||
private String coatingSurfaceStructure;
|
||||
/**
|
||||
* 镀层重量 COATING MASS(g/m²)
|
||||
*/
|
||||
private BigDecimal coatingMass;
|
||||
/**
|
||||
* 边缘状态
|
||||
*/
|
||||
|
||||
@@ -82,6 +82,11 @@ public class QcCertificateBo extends BaseEntity {
|
||||
*/
|
||||
private String note;
|
||||
|
||||
/**
|
||||
* 证书类型(如:出厂合格证、检测报告、质保书等)
|
||||
*/
|
||||
private String certificateType;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
|
||||
@@ -38,6 +38,11 @@ public class QcCertificateItemBo extends BaseEntity {
|
||||
*/
|
||||
private String coilNo;
|
||||
|
||||
/**
|
||||
* 原料卷号
|
||||
*/
|
||||
private String rawCoilNo;
|
||||
|
||||
/**
|
||||
* 炉号
|
||||
*/
|
||||
@@ -93,11 +98,56 @@ public class QcCertificateItemBo extends BaseEntity {
|
||||
*/
|
||||
private BigDecimal als;
|
||||
|
||||
/**
|
||||
* 铝(%)
|
||||
*/
|
||||
private BigDecimal al;
|
||||
|
||||
/**
|
||||
* 钛(%)
|
||||
*/
|
||||
private BigDecimal ti;
|
||||
|
||||
/**
|
||||
* 铬(%)
|
||||
*/
|
||||
private BigDecimal cr;
|
||||
|
||||
/**
|
||||
* 镍(%)
|
||||
*/
|
||||
private BigDecimal ni;
|
||||
|
||||
/**
|
||||
* 铜(%)
|
||||
*/
|
||||
private BigDecimal cu;
|
||||
|
||||
/**
|
||||
* 氮(%)
|
||||
*/
|
||||
private BigDecimal n;
|
||||
|
||||
/**
|
||||
* 铁(%)
|
||||
*/
|
||||
private BigDecimal fe;
|
||||
|
||||
/**
|
||||
* 硼(%)
|
||||
*/
|
||||
private BigDecimal b;
|
||||
|
||||
/**
|
||||
* 拉伸试验-屈服强度(MPa)
|
||||
*/
|
||||
private BigDecimal yieldStrength;
|
||||
|
||||
/**
|
||||
* 规定塑性延伸强度(MPa)
|
||||
*/
|
||||
private BigDecimal plasticExtensionStrength;
|
||||
|
||||
/**
|
||||
* 拉伸试验-抗拉强度(MPa)
|
||||
*/
|
||||
@@ -128,6 +178,21 @@ public class QcCertificateItemBo extends BaseEntity {
|
||||
*/
|
||||
private String surfaceStructure;
|
||||
|
||||
/**
|
||||
* 表面处理
|
||||
*/
|
||||
private String surfaceTreatment;
|
||||
|
||||
/**
|
||||
* 镀层表面结构
|
||||
*/
|
||||
private String coatingSurfaceStructure;
|
||||
|
||||
/**
|
||||
* 镀层重量 COATING MASS(g/m²)
|
||||
*/
|
||||
private BigDecimal coatingMass;
|
||||
|
||||
/**
|
||||
* 边缘状态
|
||||
*/
|
||||
@@ -138,5 +203,10 @@ public class QcCertificateItemBo extends BaseEntity {
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 调质度
|
||||
*/
|
||||
private String temperDegree;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -73,6 +73,46 @@ public class QcChemicalItemBo extends BaseEntity {
|
||||
*/
|
||||
private BigDecimal als;
|
||||
|
||||
/**
|
||||
* 铝(%)
|
||||
*/
|
||||
private BigDecimal al;
|
||||
|
||||
/**
|
||||
* 钛(%)
|
||||
*/
|
||||
private BigDecimal ti;
|
||||
|
||||
/**
|
||||
* 铬(%)
|
||||
*/
|
||||
private BigDecimal cr;
|
||||
|
||||
/**
|
||||
* 镍(%)
|
||||
*/
|
||||
private BigDecimal ni;
|
||||
|
||||
/**
|
||||
* 铜(%)
|
||||
*/
|
||||
private BigDecimal cu;
|
||||
|
||||
/**
|
||||
* 氮(%)
|
||||
*/
|
||||
private BigDecimal n;
|
||||
|
||||
/**
|
||||
* 铁(%)
|
||||
*/
|
||||
private BigDecimal fe;
|
||||
|
||||
/**
|
||||
* 硼(%)
|
||||
*/
|
||||
private BigDecimal b;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
|
||||
@@ -108,4 +108,9 @@ public class QcInspectionTaskBo extends BaseEntity {
|
||||
* 附件路径(多个用英文逗号分隔)
|
||||
*/
|
||||
private String attachmentFiles;
|
||||
|
||||
/**
|
||||
* 厂家卷号集合,多个使用英文逗号分隔
|
||||
*/
|
||||
private String supplierCoilNos;
|
||||
}
|
||||
|
||||
@@ -43,6 +43,11 @@ public class QcPhysicalItemBo extends BaseEntity {
|
||||
*/
|
||||
private BigDecimal yieldStrength;
|
||||
|
||||
/**
|
||||
* 规定塑性延伸强度(MPa)
|
||||
*/
|
||||
private BigDecimal plasticExtensionStrength;
|
||||
|
||||
/**
|
||||
* 拉伸试验-抗拉强度(MPa)
|
||||
*/
|
||||
@@ -73,6 +78,16 @@ public class QcPhysicalItemBo extends BaseEntity {
|
||||
*/
|
||||
private String surfaceStructure;
|
||||
|
||||
/**
|
||||
* 镀层表面结构
|
||||
*/
|
||||
private String coatingSurfaceStructure;
|
||||
|
||||
/**
|
||||
* 镀层重量 COATING MASS(g/m²)
|
||||
*/
|
||||
private BigDecimal coatingMass;
|
||||
|
||||
/**
|
||||
* 边缘状态
|
||||
*/
|
||||
|
||||
@@ -43,6 +43,12 @@ public class QcCertificateItemVo {
|
||||
@ExcelProperty(value = "钢卷号")
|
||||
private String coilNo;
|
||||
|
||||
/**
|
||||
* 原料卷号
|
||||
*/
|
||||
@ExcelProperty(value = "原料卷号")
|
||||
private String rawCoilNo;
|
||||
|
||||
/**
|
||||
* 炉号
|
||||
*/
|
||||
@@ -109,12 +115,66 @@ public class QcCertificateItemVo {
|
||||
@ExcelProperty(value = "Als")
|
||||
private BigDecimal als;
|
||||
|
||||
/**
|
||||
* 铝(%)
|
||||
*/
|
||||
@ExcelProperty(value = "铝(%)")
|
||||
private BigDecimal al;
|
||||
|
||||
/**
|
||||
* 钛(%)
|
||||
*/
|
||||
@ExcelProperty(value = "钛(%)")
|
||||
private BigDecimal ti;
|
||||
|
||||
/**
|
||||
* 铬(%)
|
||||
*/
|
||||
@ExcelProperty(value = "铬(%)")
|
||||
private BigDecimal cr;
|
||||
|
||||
/**
|
||||
* 镍(%)
|
||||
*/
|
||||
@ExcelProperty(value = "镍(%)")
|
||||
private BigDecimal ni;
|
||||
|
||||
/**
|
||||
* 铜(%)
|
||||
*/
|
||||
@ExcelProperty(value = "铜(%)")
|
||||
private BigDecimal cu;
|
||||
|
||||
/**
|
||||
* 氮(%)
|
||||
*/
|
||||
@ExcelProperty(value = "氮(%)")
|
||||
private BigDecimal n;
|
||||
|
||||
/**
|
||||
* 铁(%)
|
||||
*/
|
||||
@ExcelProperty(value = "铁(%)")
|
||||
private BigDecimal fe;
|
||||
|
||||
/**
|
||||
* 硼(%)
|
||||
*/
|
||||
@ExcelProperty(value = "硼(%)")
|
||||
private BigDecimal b;
|
||||
|
||||
/**
|
||||
* 拉伸试验-屈服强度(MPa)
|
||||
*/
|
||||
@ExcelProperty(value = "拉伸试验-屈服强度(MPa)")
|
||||
private BigDecimal yieldStrength;
|
||||
|
||||
/**
|
||||
* 规定塑性延伸强度(MPa)
|
||||
*/
|
||||
@ExcelProperty(value = "规定塑性延伸强度(MPa)")
|
||||
private BigDecimal plasticExtensionStrength;
|
||||
|
||||
/**
|
||||
* 拉伸试验-抗拉强度(MPa)
|
||||
*/
|
||||
@@ -151,6 +211,24 @@ public class QcCertificateItemVo {
|
||||
@ExcelProperty(value = "表面结构")
|
||||
private String surfaceStructure;
|
||||
|
||||
/**
|
||||
* 表面处理
|
||||
*/
|
||||
@ExcelProperty(value = "表面处理")
|
||||
private String surfaceTreatment;
|
||||
|
||||
/**
|
||||
* 镀层表面结构
|
||||
*/
|
||||
@ExcelProperty(value = "镀层表面结构")
|
||||
private String coatingSurfaceStructure;
|
||||
|
||||
/**
|
||||
* 镀层重量 COATING MASS(g/m²)
|
||||
*/
|
||||
@ExcelProperty(value = "镀层重量 COATING MASS(g/m²)")
|
||||
private BigDecimal coatingMass;
|
||||
|
||||
/**
|
||||
* 边缘状态
|
||||
*/
|
||||
@@ -163,5 +241,11 @@ public class QcCertificateItemVo {
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 调质度
|
||||
*/
|
||||
@ExcelProperty(value = "调质度")
|
||||
private String temperDegree;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -100,5 +100,11 @@ public class QcCertificateVo {
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 证书类型(如:出厂合格证、检测报告、质保书等)
|
||||
*/
|
||||
@ExcelProperty(value = "证书类型")
|
||||
private String certificateType;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -86,6 +86,54 @@ public class QcChemicalItemVo {
|
||||
@ExcelProperty(value = "酸溶铝(%)")
|
||||
private BigDecimal als;
|
||||
|
||||
/**
|
||||
* 铝(%)
|
||||
*/
|
||||
@ExcelProperty(value = "铝(%)")
|
||||
private BigDecimal al;
|
||||
|
||||
/**
|
||||
* 钛(%)
|
||||
*/
|
||||
@ExcelProperty(value = "钛(%)")
|
||||
private BigDecimal ti;
|
||||
|
||||
/**
|
||||
* 铬(%)
|
||||
*/
|
||||
@ExcelProperty(value = "铬(%)")
|
||||
private BigDecimal cr;
|
||||
|
||||
/**
|
||||
* 镍(%)
|
||||
*/
|
||||
@ExcelProperty(value = "镍(%)")
|
||||
private BigDecimal ni;
|
||||
|
||||
/**
|
||||
* 铜(%)
|
||||
*/
|
||||
@ExcelProperty(value = "铜(%)")
|
||||
private BigDecimal cu;
|
||||
|
||||
/**
|
||||
* 氮(%)
|
||||
*/
|
||||
@ExcelProperty(value = "氮(%)")
|
||||
private BigDecimal n;
|
||||
|
||||
/**
|
||||
* 铁(%)
|
||||
*/
|
||||
@ExcelProperty(value = "铁(%)")
|
||||
private BigDecimal fe;
|
||||
|
||||
/**
|
||||
* 硼(%)
|
||||
*/
|
||||
@ExcelProperty(value = "硼(%)")
|
||||
private BigDecimal b;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
|
||||
@@ -134,6 +134,11 @@ public class QcInspectionTaskVo {
|
||||
*/
|
||||
private String attachmentFiles;
|
||||
|
||||
/**
|
||||
* 厂家卷号集合,多个使用英文逗号分隔
|
||||
*/
|
||||
private String supplierCoilNos;
|
||||
|
||||
private List<WmsMaterialCoilVo> coilList;
|
||||
|
||||
|
||||
|
||||
@@ -51,6 +51,12 @@ public class QcPhysicalItemVo {
|
||||
@ExcelProperty(value = "拉伸试验-屈服强度(MPa)")
|
||||
private BigDecimal yieldStrength;
|
||||
|
||||
/**
|
||||
* 规定塑性延伸强度(MPa)
|
||||
*/
|
||||
@ExcelProperty(value = "规定塑性延伸强度(MPa)")
|
||||
private BigDecimal plasticExtensionStrength;
|
||||
|
||||
/**
|
||||
* 拉伸试验-抗拉强度(MPa)
|
||||
*/
|
||||
@@ -87,6 +93,18 @@ public class QcPhysicalItemVo {
|
||||
@ExcelProperty(value = "表面结构")
|
||||
private String surfaceStructure;
|
||||
|
||||
/**
|
||||
* 镀层表面结构
|
||||
*/
|
||||
@ExcelProperty(value = "镀层表面结构")
|
||||
private String coatingSurfaceStructure;
|
||||
|
||||
/**
|
||||
* 镀层重量 COATING MASS(g/m²)
|
||||
*/
|
||||
@ExcelProperty(value = "镀层重量 COATING MASS(g/m²)")
|
||||
private BigDecimal coatingMass;
|
||||
|
||||
/**
|
||||
* 边缘状态
|
||||
*/
|
||||
|
||||
@@ -64,6 +64,7 @@ public class QcCertificateItemServiceImpl implements IQcCertificateItemService {
|
||||
lqw.eq(bo.getCertificateId() != null, QcCertificateItem::getCertificateId, bo.getCertificateId());
|
||||
lqw.eq(bo.getCoilId() != null, QcCertificateItem::getCoilId, bo.getCoilId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getCoilNo()), QcCertificateItem::getCoilNo, bo.getCoilNo());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getRawCoilNo()), QcCertificateItem::getRawCoilNo, bo.getRawCoilNo());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getHeatNo()), QcCertificateItem::getHeatNo, bo.getHeatNo());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getMaterialType()), QcCertificateItem::getMaterialType, bo.getMaterialType());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getSize()), QcCertificateItem::getSize, bo.getSize());
|
||||
@@ -75,14 +76,27 @@ public class QcCertificateItemServiceImpl implements IQcCertificateItemService {
|
||||
lqw.eq(bo.getP() != null, QcCertificateItem::getP, bo.getP());
|
||||
lqw.eq(bo.getS() != null, QcCertificateItem::getS, bo.getS());
|
||||
lqw.eq(bo.getAls() != null, QcCertificateItem::getAls, bo.getAls());
|
||||
lqw.eq(bo.getAl() != null, QcCertificateItem::getAl, bo.getAl());
|
||||
lqw.eq(bo.getTi() != null, QcCertificateItem::getTi, bo.getTi());
|
||||
lqw.eq(bo.getCr() != null, QcCertificateItem::getCr, bo.getCr());
|
||||
lqw.eq(bo.getNi() != null, QcCertificateItem::getNi, bo.getNi());
|
||||
lqw.eq(bo.getCu() != null, QcCertificateItem::getCu, bo.getCu());
|
||||
lqw.eq(bo.getN() != null, QcCertificateItem::getN, bo.getN());
|
||||
lqw.eq(bo.getFe() != null, QcCertificateItem::getFe, bo.getFe());
|
||||
lqw.eq(bo.getB() != null, QcCertificateItem::getB, bo.getB());
|
||||
lqw.eq(bo.getYieldStrength() != null, QcCertificateItem::getYieldStrength, bo.getYieldStrength());
|
||||
lqw.eq(bo.getPlasticExtensionStrength() != null, QcCertificateItem::getPlasticExtensionStrength, bo.getPlasticExtensionStrength());
|
||||
lqw.eq(bo.getTensileStrength() != null, QcCertificateItem::getTensileStrength, bo.getTensileStrength());
|
||||
lqw.eq(bo.getElongation() != null, QcCertificateItem::getElongation, bo.getElongation());
|
||||
lqw.eq(bo.getHardness() != null, QcCertificateItem::getHardness, bo.getHardness());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getBendingTest()), QcCertificateItem::getBendingTest, bo.getBendingTest());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getSurfaceQuality()), QcCertificateItem::getSurfaceQuality, bo.getSurfaceQuality());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getSurfaceStructure()), QcCertificateItem::getSurfaceStructure, bo.getSurfaceStructure());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getSurfaceTreatment()), QcCertificateItem::getSurfaceTreatment, bo.getSurfaceTreatment());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getCoatingSurfaceStructure()), QcCertificateItem::getCoatingSurfaceStructure, bo.getCoatingSurfaceStructure());
|
||||
lqw.eq(bo.getCoatingMass() != null, QcCertificateItem::getCoatingMass, bo.getCoatingMass());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getEdgeStatus()), QcCertificateItem::getEdgeStatus, bo.getEdgeStatus());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getTemperDegree()), QcCertificateItem::getTemperDegree, bo.getTemperDegree());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -79,6 +79,14 @@ public class QcChemicalItemServiceImpl implements IQcChemicalItemService {
|
||||
lqw.eq(bo.getP() != null, QcChemicalItem::getP, bo.getP());
|
||||
lqw.eq(bo.getS() != null, QcChemicalItem::getS, bo.getS());
|
||||
lqw.eq(bo.getAls() != null, QcChemicalItem::getAls, bo.getAls());
|
||||
lqw.eq(bo.getAl() != null, QcChemicalItem::getAl, bo.getAl());
|
||||
lqw.eq(bo.getTi() != null, QcChemicalItem::getTi, bo.getTi());
|
||||
lqw.eq(bo.getCr() != null, QcChemicalItem::getCr, bo.getCr());
|
||||
lqw.eq(bo.getNi() != null, QcChemicalItem::getNi, bo.getNi());
|
||||
lqw.eq(bo.getCu() != null, QcChemicalItem::getCu, bo.getCu());
|
||||
lqw.eq(bo.getN() != null, QcChemicalItem::getN, bo.getN());
|
||||
lqw.eq(bo.getFe() != null, QcChemicalItem::getFe, bo.getFe());
|
||||
lqw.eq(bo.getB() != null, QcChemicalItem::getB, bo.getB());
|
||||
// 根据创建时间倒叙
|
||||
lqw.orderByDesc(QcChemicalItem::getCreateTime);
|
||||
return lqw;
|
||||
|
||||
@@ -136,6 +136,7 @@ public class QcInspectionTaskServiceImpl implements IQcInspectionTaskService {
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getResult()), QcInspectionTask::getResult, bo.getResult());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getCoilIds()), QcInspectionTask::getCoilIds, bo.getCoilIds());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getEnterCoilNos()), QcInspectionTask::getEnterCoilNos, bo.getEnterCoilNos());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getSupplierCoilNos()), QcInspectionTask::getSupplierCoilNos, bo.getSupplierCoilNos());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
|
||||
@@ -73,12 +73,15 @@ public class QcPhysicalItemServiceImpl implements IQcPhysicalItemService {
|
||||
lqw.eq(bo.getCoilId() != null, QcPhysicalItem::getCoilId, bo.getCoilId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getCoilNo()), QcPhysicalItem::getCoilNo, bo.getCoilNo());
|
||||
lqw.eq(bo.getYieldStrength() != null, QcPhysicalItem::getYieldStrength, bo.getYieldStrength());
|
||||
lqw.eq(bo.getPlasticExtensionStrength() != null, QcPhysicalItem::getPlasticExtensionStrength, bo.getPlasticExtensionStrength());
|
||||
lqw.eq(bo.getTensileStrength() != null, QcPhysicalItem::getTensileStrength, bo.getTensileStrength());
|
||||
lqw.eq(bo.getElongation() != null, QcPhysicalItem::getElongation, bo.getElongation());
|
||||
lqw.eq(bo.getHardness() != null, QcPhysicalItem::getHardness, bo.getHardness());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getBendingTest()), QcPhysicalItem::getBendingTest, bo.getBendingTest());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getSurfaceQuality()), QcPhysicalItem::getSurfaceQuality, bo.getSurfaceQuality());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getSurfaceStructure()), QcPhysicalItem::getSurfaceStructure, bo.getSurfaceStructure());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getCoatingSurfaceStructure()), QcPhysicalItem::getCoatingSurfaceStructure, bo.getCoatingSurfaceStructure());
|
||||
lqw.eq(bo.getCoatingMass() != null, QcPhysicalItem::getCoatingMass, bo.getCoatingMass());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getEdgeStatus()), QcPhysicalItem::getEdgeStatus, bo.getEdgeStatus());
|
||||
// 根据创建时间倒叙
|
||||
lqw.orderByDesc(QcPhysicalItem::getCreateTime);
|
||||
|
||||
@@ -26,17 +26,19 @@ public class MesRollGrindController extends BaseController {
|
||||
|
||||
private final IMesRollGrindService iMesRollGrindService;
|
||||
|
||||
/** 查询磨削记录列表(不传 rollId 时返回全部,支持时间范围和产线筛选) */
|
||||
/** 查询磨削记录列表(不传 rollId 时返回全部,支持时间范围、产线、班组、轧辊类型筛选) */
|
||||
@GetMapping("/list")
|
||||
public R<List<MesRollGrindVo>> list(
|
||||
@RequestParam(required = false) Long rollId,
|
||||
@RequestParam(required = false) Long lineId,
|
||||
@RequestParam(required = false) String beginTime,
|
||||
@RequestParam(required = false) String endTime) {
|
||||
@RequestParam(required = false) String endTime,
|
||||
@RequestParam(required = false) String team,
|
||||
@RequestParam(required = false) String rollType) {
|
||||
if (rollId != null) {
|
||||
return R.ok(iMesRollGrindService.listByRoll(rollId));
|
||||
}
|
||||
return R.ok(iMesRollGrindService.listByQuery(null, lineId, beginTime, endTime));
|
||||
return R.ok(iMesRollGrindService.listByQuery(null, lineId, beginTime, endTime, team, rollType));
|
||||
}
|
||||
|
||||
/** 按年份查询月度汇总 */
|
||||
|
||||
@@ -82,6 +82,9 @@ public class MesRollGrind extends BaseEntity {
|
||||
/** 操作者 */
|
||||
private String operator;
|
||||
|
||||
/** 备注 */
|
||||
private String remark;
|
||||
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
}
|
||||
|
||||
@@ -26,6 +26,9 @@ public class MesRollInfo extends BaseEntity {
|
||||
/** 产线ID */
|
||||
private Long lineId;
|
||||
|
||||
/** 机架 */
|
||||
private String frame;
|
||||
|
||||
/** 轧辊编号 */
|
||||
private String rollNo;
|
||||
|
||||
@@ -71,6 +74,9 @@ public class MesRollInfo extends BaseEntity {
|
||||
/** 厂家 */
|
||||
private String manufacturer;
|
||||
|
||||
/** 备注 */
|
||||
private String remark;
|
||||
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
}
|
||||
|
||||
@@ -37,4 +37,5 @@ public class MesRollGrindBo extends BaseEntity {
|
||||
private String flawResult;
|
||||
private BigDecimal hardness;
|
||||
private String operator;
|
||||
private String remark;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ public class MesRollGrindVo {
|
||||
private Date grindTime;
|
||||
|
||||
private String team;
|
||||
private String rollType;
|
||||
private BigDecimal diaBefore;
|
||||
private BigDecimal diaAfter;
|
||||
private BigDecimal grindAmount;
|
||||
|
||||
@@ -25,6 +25,9 @@ public class MesRollInfoVo {
|
||||
@ExcelProperty("产线名称")
|
||||
private String lineName;
|
||||
|
||||
@ExcelProperty("机架")
|
||||
private String frame;
|
||||
|
||||
@ExcelProperty("轧辊编号")
|
||||
private String rollNo;
|
||||
|
||||
|
||||
@@ -20,7 +20,9 @@ public interface MesRollGrindMapper extends BaseMapperPlus<MesRollGrindMapper, M
|
||||
List<MesRollGrindVo> selectList(@Param("rollId") Long rollId,
|
||||
@Param("lineId") Long lineId,
|
||||
@Param("beginTime") String beginTime,
|
||||
@Param("endTime") String endTime);
|
||||
@Param("endTime") String endTime,
|
||||
@Param("team") String team,
|
||||
@Param("rollType") String rollType);
|
||||
|
||||
/** 按年份统计每月磨削量 { month, grindCount, totalGrindAmount } */
|
||||
List<Map<String, Object>> selectMonthlyStats(@Param("rollId") Long rollId, @Param("year") int year);
|
||||
|
||||
@@ -15,7 +15,7 @@ public interface IMesRollGrindService {
|
||||
List<MesRollGrindVo> listByRoll(Long rollId);
|
||||
|
||||
/** 通用查询(所有参数可选) */
|
||||
List<MesRollGrindVo> listByQuery(Long rollId, Long lineId, String beginTime, String endTime);
|
||||
List<MesRollGrindVo> listByQuery(Long rollId, Long lineId, String beginTime, String endTime, String team, String rollType);
|
||||
|
||||
/** 新增磨削记录,同步更新轧辊当前直径和磨削次数 */
|
||||
Long addGrind(MesRollGrindBo bo);
|
||||
|
||||
@@ -35,8 +35,8 @@ public class MesRollGrindServiceImpl implements IMesRollGrindService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MesRollGrindVo> listByQuery(Long rollId, Long lineId, String beginTime, String endTime) {
|
||||
return baseMapper.selectList(rollId, lineId, beginTime, endTime);
|
||||
public List<MesRollGrindVo> listByQuery(Long rollId, Long lineId, String beginTime, String endTime, String team, String rollType) {
|
||||
return baseMapper.selectList(rollId, lineId, beginTime, endTime, team, rollType);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.klp.mes.eqp.mapper.EqpEquipmentInspectionApprovalMapper">
|
||||
|
||||
<resultMap type="com.klp.mes.eqp.domain.EqpEquipmentInspectionApproval" id="EqpEquipmentInspectionApprovalResult">
|
||||
<result property="approvalId" column="approval_id"/>
|
||||
<result property="productionLine" column="production_line"/>
|
||||
<result property="insStartTime" column="ins_start_time"/>
|
||||
<result property="insEndTime" column="ins_end_time"/>
|
||||
<result property="applyUser" column="apply_user"/>
|
||||
<result property="applyTime" column="apply_time"/>
|
||||
<result property="approvalStatus" column="approval_status"/>
|
||||
<result property="approvalUser" column="approval_user"/>
|
||||
<result property="approvalTime" column="approval_time"/>
|
||||
<result property="approvalOpinion" column="approval_opinion"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -9,6 +9,7 @@
|
||||
<result property="certificateId" column="certificate_id"/>
|
||||
<result property="coilId" column="coil_id"/>
|
||||
<result property="coilNo" column="coil_no"/>
|
||||
<result property="rawCoilNo" column="raw_coil_no"/>
|
||||
<result property="heatNo" column="heat_no"/>
|
||||
<result property="materialType" column="material_type"/>
|
||||
<result property="size" column="size"/>
|
||||
@@ -20,15 +21,28 @@
|
||||
<result property="p" column="p"/>
|
||||
<result property="s" column="s"/>
|
||||
<result property="als" column="als"/>
|
||||
<result property="al" column="al"/>
|
||||
<result property="ti" column="ti"/>
|
||||
<result property="cr" column="cr"/>
|
||||
<result property="ni" column="ni"/>
|
||||
<result property="cu" column="cu"/>
|
||||
<result property="n" column="n"/>
|
||||
<result property="fe" column="fe"/>
|
||||
<result property="b" column="b"/>
|
||||
<result property="yieldStrength" column="yield_strength"/>
|
||||
<result property="plasticExtensionStrength" column="plastic_extension_strength"/>
|
||||
<result property="tensileStrength" column="tensile_strength"/>
|
||||
<result property="elongation" column="elongation"/>
|
||||
<result property="hardness" column="hardness"/>
|
||||
<result property="bendingTest" column="bending_test"/>
|
||||
<result property="surfaceQuality" column="surface_quality"/>
|
||||
<result property="surfaceStructure" column="surface_structure"/>
|
||||
<result property="surfaceTreatment" column="surface_treatment"/>
|
||||
<result property="coatingSurfaceStructure" column="coating_surface_structure"/>
|
||||
<result property="coatingMass" column="coating_mass"/>
|
||||
<result property="edgeStatus" column="edge_status"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="temperDegree" column="temper_degree"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
|
||||
@@ -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"/>
|
||||
|
||||
@@ -16,6 +16,14 @@
|
||||
<result property="p" column="p"/>
|
||||
<result property="s" column="s"/>
|
||||
<result property="als" column="als"/>
|
||||
<result property="al" column="al"/>
|
||||
<result property="ti" column="ti"/>
|
||||
<result property="cr" column="cr"/>
|
||||
<result property="ni" column="ni"/>
|
||||
<result property="cu" column="cu"/>
|
||||
<result property="n" column="n"/>
|
||||
<result property="fe" column="fe"/>
|
||||
<result property="b" column="b"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
<result property="attachmentFiles" column="attachment_files"/>
|
||||
<result property="coilIds" column="coil_ids"/>
|
||||
<result property="enterCoilNos" column="enter_coil_nos"/>
|
||||
<result property="supplierCoilNos" column="supplier_coil_nos"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
|
||||
@@ -10,12 +10,15 @@
|
||||
<result property="coilId" column="coil_id"/>
|
||||
<result property="coilNo" column="coil_no"/>
|
||||
<result property="yieldStrength" column="yield_strength"/>
|
||||
<result property="plasticExtensionStrength" column="plastic_extension_strength"/>
|
||||
<result property="tensileStrength" column="tensile_strength"/>
|
||||
<result property="elongation" column="elongation"/>
|
||||
<result property="hardness" column="hardness"/>
|
||||
<result property="bendingTest" column="bending_test"/>
|
||||
<result property="surfaceQuality" column="surface_quality"/>
|
||||
<result property="surfaceStructure" column="surface_structure"/>
|
||||
<result property="coatingSurfaceStructure" column="coating_surface_structure"/>
|
||||
<result property="coatingMass" column="coating_mass"/>
|
||||
<result property="edgeStatus" column="edge_status"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
|
||||
@@ -10,22 +10,26 @@
|
||||
operator, remark, create_time
|
||||
FROM mes_roll_grind
|
||||
WHERE del_flag = 0 AND roll_id = #{rollId}
|
||||
ORDER BY grind_time ASC, grind_id ASC
|
||||
ORDER BY grind_time Desc
|
||||
</select>
|
||||
|
||||
<select id="selectList" resultType="com.klp.mes.roll.domain.vo.MesRollGrindVo">
|
||||
SELECT grind_id, roll_id, roll_no, grind_time, team,
|
||||
dia_before, dia_after, grind_amount, roll_shape,
|
||||
flaw_result,
|
||||
CASE WHEN hardness = '未倒角' THEN 0 ELSE CAST(hardness AS DECIMAL(10,1)) END AS hardness,
|
||||
operator, remark, create_time
|
||||
FROM mes_roll_grind
|
||||
WHERE del_flag = 0
|
||||
<if test="rollId != null">AND roll_id = #{rollId}</if>
|
||||
<if test="lineId != null">AND line_id = #{lineId}</if>
|
||||
<if test="beginTime != null and beginTime != ''">AND grind_time >= #{beginTime}</if>
|
||||
<if test="endTime != null and endTime != ''">AND grind_time <= #{endTime}</if>
|
||||
ORDER BY grind_time ASC, grind_id ASC
|
||||
SELECT g.grind_id, g.roll_id, g.roll_no, g.grind_time, g.team,
|
||||
g.dia_before, g.dia_after, g.grind_amount, g.roll_shape,
|
||||
g.flaw_result,
|
||||
CASE WHEN g.hardness = '未倒角' THEN 0 ELSE CAST(g.hardness AS DECIMAL(10,1)) END AS hardness,
|
||||
g.operator, g.remark, g.create_time,
|
||||
ri.roll_type
|
||||
FROM mes_roll_grind g
|
||||
LEFT JOIN mes_roll_info ri ON g.roll_id = ri.roll_id
|
||||
WHERE g.del_flag = 0
|
||||
<if test="rollId != null">AND g.roll_id = #{rollId}</if>
|
||||
<if test="lineId != null">AND g.line_id = #{lineId}</if>
|
||||
<if test="beginTime != null and beginTime != ''">AND g.grind_time >= #{beginTime}</if>
|
||||
<if test="endTime != null and endTime != ''">AND g.grind_time <= #{endTime}</if>
|
||||
<if test="team != null and team != ''">AND g.team = #{team}</if>
|
||||
<if test="rollType != null and rollType != ''">AND ri.roll_type = #{rollType}</if>
|
||||
ORDER BY g.grind_time DESC
|
||||
</select>
|
||||
|
||||
<select id="selectMonthlyStats" resultType="map">
|
||||
|
||||
@@ -73,6 +73,7 @@
|
||||
"quill": "1.3.7",
|
||||
"screenfull": "5.0.2",
|
||||
"sortablejs": "1.10.2",
|
||||
"three": "^0.160.1",
|
||||
"vditor": "^3.11.1",
|
||||
"video.js": "^8.23.3",
|
||||
"vue": "2.6.12",
|
||||
|
||||
@@ -26,6 +26,15 @@ export function addPlanDetail(data) {
|
||||
})
|
||||
}
|
||||
|
||||
// 批量新增排产单明细
|
||||
export function addPlanDetailBatch(data) {
|
||||
return request({
|
||||
url: '/aps/planDetail/batch',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改排产单明细
|
||||
export function updatePlanDetail(data) {
|
||||
return request({
|
||||
|
||||
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
|
||||
})
|
||||
}
|
||||
39
klp-ui/src/api/mes/eqp/equipmentInspectionApproval.js
Normal file
39
klp-ui/src/api/mes/eqp/equipmentInspectionApproval.js
Normal file
@@ -0,0 +1,39 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function listEquipmentInspectionApproval(query) {
|
||||
return request({
|
||||
url: '/eqp/equipmentInspectionApproval/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function getEquipmentInspectionApproval(approvalId) {
|
||||
return request({
|
||||
url: '/eqp/equipmentInspectionApproval/' + approvalId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function addEquipmentInspectionApproval(data) {
|
||||
return request({
|
||||
url: '/eqp/equipmentInspectionApproval',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function updateEquipmentInspectionApproval(data) {
|
||||
return request({
|
||||
url: '/eqp/equipmentInspectionApproval',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function delEquipmentInspectionApproval(approvalId) {
|
||||
return request({
|
||||
url: '/eqp/equipmentInspectionApproval/' + approvalId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
@@ -45,12 +45,14 @@ export function delRecords(id) {
|
||||
}
|
||||
|
||||
// 同步考勤记录
|
||||
export function syncRecords(starttime) {
|
||||
export function syncRecords({ starttime, endtime }) {
|
||||
return attendanceRequest({
|
||||
url: '/sync_attendance',
|
||||
method: 'post',
|
||||
timeout: 60000,
|
||||
data: {
|
||||
starttime
|
||||
starttime,
|
||||
endtime
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -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'
|
||||
})
|
||||
}
|
||||
@@ -488,4 +488,12 @@ export function listLightCoil(data) {
|
||||
timeout: 600000,
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 获取可导出的列元数据
|
||||
export function getExportColumns() {
|
||||
return request({
|
||||
url: '/wms/materialCoil/exportColumns',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
@@ -61,6 +61,14 @@ export function listBoundCoil(query) {
|
||||
})
|
||||
}
|
||||
|
||||
export function getBoundCoilStatisticsList(query) {
|
||||
return request({
|
||||
url: '/wms/deliveryWaybillDetail/statistics',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 按销售员查询订单明细的卷
|
||||
export function listDeliveryWaybillDetailBySaleman(principal) {
|
||||
return request({
|
||||
|
||||
44
klp-ui/src/api/wms/materialWarning.js
Normal file
44
klp-ui/src/api/wms/materialWarning.js
Normal file
@@ -0,0 +1,44 @@
|
||||
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 delMaterialWarning(warningId) {
|
||||
return request({
|
||||
url: '/wms/materialWarning/' + warningId,
|
||||
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
|
||||
BIN
klp-ui/src/assets/images/contractLogo.png
Normal file
BIN
klp-ui/src/assets/images/contractLogo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 70 KiB |
@@ -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>
|
||||
@@ -11,6 +11,12 @@ export const defaultColumns = [
|
||||
prop: 'currentCoilNo',
|
||||
showOverflowTooltip: true
|
||||
},
|
||||
{
|
||||
label: '镀铬卷号',
|
||||
align: 'center',
|
||||
prop: 'chromelCoilNo',
|
||||
showOverflowTooltip: true
|
||||
},
|
||||
{
|
||||
label: '存储位置',
|
||||
align: 'center',
|
||||
@@ -83,6 +89,12 @@ export const fullPageDefaultColumns = [
|
||||
prop: 'currentCoilNo',
|
||||
showOverflowTooltip: true
|
||||
},
|
||||
{
|
||||
label: '镀铬卷号',
|
||||
align: 'center',
|
||||
prop: 'chromelCoilNo',
|
||||
showOverflowTooltip: true
|
||||
},
|
||||
{
|
||||
label: '存储位置',
|
||||
align: 'center',
|
||||
@@ -171,6 +183,7 @@ export const fullPageDefaultColumns = [
|
||||
export const optionalColumns = [
|
||||
{ label: '入场卷号', value: 'enterCoilNo' },
|
||||
{ label: '当前卷号', value: 'currentCoilNo' },
|
||||
{ label: '镀铬卷号', value: 'chromelCoilNo' },
|
||||
{ label: '厂家钢卷号', value: 'supplierCoilNo' },
|
||||
{ label: '逻辑库区', value: 'warehouseName' },
|
||||
{ label: '实际库区', value: 'actualWarehouseName' },
|
||||
@@ -187,7 +200,11 @@ export const optionalColumns = [
|
||||
{ label: '厂家', value: 'manufacturer' },
|
||||
{ label: '表面处理', value: 'surfaceTreatmentDesc' },
|
||||
{ label: '镀层质量', value: 'zincLayer' },
|
||||
{ label: '长度', value: 'length' },
|
||||
{ label: '实测长度', value: 'actualLength' },
|
||||
{ label: '理论长度', value: 'theoreticalLength' },
|
||||
{ label: '实测厚度', value: 'actualThickness' },
|
||||
{ label: '理论厚度', value: 'theoreticalThickness' },
|
||||
{ label: '实测宽度', value: 'actualWidth' },
|
||||
{ label: '毛重', value: 'grossWeight' },
|
||||
{ label: '净重', value: 'netWeight' },
|
||||
{ label: '创建时间', value: 'createTime' },
|
||||
|
||||
@@ -79,6 +79,10 @@
|
||||
canSelectDisabled :clearInput="false" clearable />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="备注" prop="remark" v-if="orderBy">
|
||||
<el-input v-model="queryParams.remark" placeholder="请输入备注" clearable size="small" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
|
||||
<el-button v-if="multiple" type="primary" size="small" icon="el-icon-check"
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
<span class="param-value">{{ coil.netWeight }}t</span>
|
||||
</div>
|
||||
<div class="param-row" v-if="coil.length">
|
||||
<span class="param-label">长度:</span>
|
||||
<span class="param-label">参考长度:</span>
|
||||
<span class="param-value">{{ coil.length }}m</span>
|
||||
</div>
|
||||
<div class="param-row" v-if="coil.actualLength">
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user