forked from BaoKaiWms/202501-Wms-Kate-Wuxi
代码更新
1. 补全自动代码数据清理部分。 2. 增加缺料再配功能。
This commit is contained in:
parent
4ee8d8a187
commit
b0e85f49c0
|
|
@ -5,7 +5,6 @@ const request = axios.create({
|
|||
timeout: 5000
|
||||
})
|
||||
|
||||
// axios.defaults.baseURL = 'http://10.90.83.39:443/wmsServer/wms'
|
||||
// axios.defaults.baseURL = 'http://localhost:12315/wms'
|
||||
// axios.defaults.baseURL = 'https://s4wwjasrsp01.ap.cat.com/wmsServer/wms'
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,11 @@
|
|||
label-width="158px" style="max-width: 100%" status-icon>
|
||||
<div style="display: flex;justify-content: space-between;">
|
||||
<el-row>
|
||||
<el-form-item label="查询类型">
|
||||
<el-select-v2 style="width: 196px" v-model="searchQueryFormEntity.queryType" placeholder="查询类型"
|
||||
:options="queryTypeOptions"
|
||||
@change="search()"></el-select-v2>
|
||||
</el-form-item>
|
||||
<el-form-item label="任务类型">
|
||||
<el-select-v2 style="width: 196px" v-model="searchQueryFormEntity.outType" placeholder="任务类型"
|
||||
:options="addAllOptionOfOptions(outTypeOptions)"
|
||||
|
|
@ -62,7 +67,7 @@
|
|||
<el-table-column prop="requestTime" label="请求时间" :formatter="timeFormat" min-width="120px"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip/>
|
||||
<el-table-column fixed="right" label="操作" width="170px">
|
||||
<el-table-column fixed="right" label="操作" width="170px" v-if="searchQueryFormEntity.queryType === 1">
|
||||
<template v-slot="scope">
|
||||
<div style="display: inline-block; align-content: center;">
|
||||
<el-button type="danger"
|
||||
|
|
@ -121,10 +126,21 @@ let baseTableQuery = reactive({
|
|||
let searchQueryFormEntity = reactive({
|
||||
vehicleId: '',
|
||||
goodsId: '',
|
||||
outType: -99
|
||||
outType: -99,
|
||||
queryType: 1
|
||||
})
|
||||
let searchQueryFormRef = ref()
|
||||
let taskId = ''
|
||||
const queryTypeOptions = [
|
||||
{
|
||||
label: '未关闭',
|
||||
value: 1
|
||||
},
|
||||
{
|
||||
label: '已关闭',
|
||||
value: 2
|
||||
}
|
||||
]
|
||||
/**
|
||||
* 系统方法
|
||||
*/
|
||||
|
|
@ -152,7 +168,8 @@ const search = () => {
|
|||
// 设定查询参数
|
||||
request.vehicleId = searchQueryFormEntity.vehicleId.trim()
|
||||
request.goodsId = searchQueryFormEntity.goodsId.trim()
|
||||
request.out = searchQueryFormEntity.outType === -99 ? null : searchQueryFormEntity.outType
|
||||
request.outType = searchQueryFormEntity.outType === -99 ? null : searchQueryFormEntity.outType
|
||||
request.queryType = searchQueryFormEntity.queryType// 查询类型
|
||||
queryOutsByPage(request).then((res) => {
|
||||
const response = res.data
|
||||
if (response.code === 0) {
|
||||
|
|
|
|||
|
|
@ -12,19 +12,22 @@
|
|||
:options="outTypeOptions"></el-select-v2>
|
||||
</el-form-item>
|
||||
<el-form-item label="料号" prop="goodsId">
|
||||
<el-input v-model="outTaskEntity.goodsId" ref="goodsId" clearable/>
|
||||
<el-input v-model="outTaskEntity.goodsId" clearable/>
|
||||
</el-form-item>
|
||||
<el-form-item label="箱号" prop="vehicleId" v-if="outTaskEntity.outType != 9">
|
||||
<el-input v-model="outTaskEntity.vehicleId" ref="vehicleId" clearable/>
|
||||
<el-form-item label="箱号" prop="vehicleId" v-if="outTaskEntity.outType !== 9">
|
||||
<el-input v-model="outTaskEntity.vehicleId" clearable/>
|
||||
</el-form-item>
|
||||
<el-form-item label="数量" prop="needNum">
|
||||
<el-input-number style="width: 196px" v-model.number="outTaskEntity.needNum" ref="needNum"
|
||||
<el-input-number style="width: 196px" v-model.number="outTaskEntity.needNum"
|
||||
controls-position="right" :min="1" clearable/>
|
||||
</el-form-item>
|
||||
<el-form-item label="原因" prop="reason" v-if="outTaskEntity.outType == 9">
|
||||
<el-form-item label="原因" prop="reason" v-if="outTaskEntity.outType === 9">
|
||||
<el-select-v2 style="width: 196px" v-model="outTaskEntity.reason" placeholder="请选择紧急出库原因"
|
||||
:options="reasonOptions"></el-select-v2>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="工单" prop="workOrder" v-if="outTaskEntity.reason === '缺料'">-->
|
||||
<!-- <el-input v-model="outTaskEntity.workOrder" clearable/>-->
|
||||
<!-- </el-form-item>-->
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-button type="primary"
|
||||
|
|
|
|||
|
|
@ -0,0 +1,113 @@
|
|||
package com.wms_main.excel.easypoi.excelTemplate;
|
||||
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* DBS完成记录模板
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class DbsRecordExcelTemplateForSave {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@Excel(name = "dbs_id")
|
||||
private String dbsId;
|
||||
/**
|
||||
* 工单
|
||||
*/
|
||||
@Excel(name = "work_order")
|
||||
private String workOrder;
|
||||
/**
|
||||
* dbs原始未处理的零件号,成品号
|
||||
*/
|
||||
@Excel(name = "product_id_origin")
|
||||
private String productIdOrigin;
|
||||
/**
|
||||
* 零件号,成品号
|
||||
*/
|
||||
@Excel(name = "product_id")
|
||||
private String productId;
|
||||
/**
|
||||
* Test计划开始时间
|
||||
*/
|
||||
@Excel(name = "test_plan_start_date")
|
||||
private LocalDate testPlanStartDate;
|
||||
/**
|
||||
* Test计划完成时间
|
||||
*/
|
||||
@Excel(name = "test_plan_finish_date")
|
||||
private LocalDate testPlanFinishDate;
|
||||
/**
|
||||
* PNT计划开始时间
|
||||
*/
|
||||
@Excel(name = "pnt_plan_start_date")
|
||||
private LocalDate pntPlanStartDate;
|
||||
/**
|
||||
* PNT计划完成时间
|
||||
*/
|
||||
@Excel(name = "pnt_plan_finish_date")
|
||||
private LocalDate pntPlanFinishDate;
|
||||
/**
|
||||
* 计划产量/套
|
||||
*/
|
||||
@Excel(name = "plan_production")
|
||||
private Integer planProduction;
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
@Excel(name = "equipment_name")
|
||||
private String equipmentName;
|
||||
/**
|
||||
* 班次
|
||||
*/
|
||||
@Excel(name = "work_shift")
|
||||
private String workShift;
|
||||
/**
|
||||
* Family
|
||||
*/
|
||||
@Excel(name = "family")
|
||||
private String family;
|
||||
/**
|
||||
* Test No#
|
||||
*/
|
||||
@Excel(name = "test_no")
|
||||
private String testNo;
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@Excel(name = "dbs_status")
|
||||
private Integer dbsStatus;
|
||||
/**
|
||||
* 工作站台
|
||||
*/
|
||||
@Excel(name = "work_stand")
|
||||
private String workStand;
|
||||
/**
|
||||
* 实际工作日期
|
||||
*/
|
||||
@Excel(name = "real_work_date")
|
||||
private LocalDate realWorkDate;
|
||||
/**
|
||||
* 完成时间
|
||||
*/
|
||||
@Excel(name = "finish_time")
|
||||
private LocalDateTime finishTime;
|
||||
/**
|
||||
* K料备注
|
||||
*/
|
||||
@Excel(name = "kitting_remark")
|
||||
private String kittingRemark;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Excel(name = "remark")
|
||||
private String remark;
|
||||
}
|
||||
|
|
@ -0,0 +1,90 @@
|
|||
package com.wms_main.excel.easypoi.excelTemplate;
|
||||
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 盘点记录缓存模版
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class InventoryRecordExcelTemplateForSave {
|
||||
/**
|
||||
* 盘点id
|
||||
*/
|
||||
@Excel(name = "inventory_id")
|
||||
private String inventoryId;
|
||||
/**
|
||||
* 料号
|
||||
*/
|
||||
@Excel(name = "goods_id")
|
||||
private String goodsId;
|
||||
/**
|
||||
* 载具号
|
||||
*/
|
||||
@Excel(name = "vehicle_id")
|
||||
private String vehicleId;
|
||||
/**
|
||||
* 库存数量
|
||||
* 只记录盘点确认时间点
|
||||
*/
|
||||
@Excel(name = "stock_num")
|
||||
private Integer stockNum;
|
||||
/**
|
||||
* 确认数量
|
||||
*/
|
||||
@Excel(name = "confirm_num")
|
||||
private Integer confirmNum;
|
||||
/**
|
||||
* 盘点站台
|
||||
*/
|
||||
@Excel(name = "inv_stand")
|
||||
private String invStand;
|
||||
/**
|
||||
* 盘点人
|
||||
*/
|
||||
@Excel(name = "inv_user")
|
||||
private String invUser;
|
||||
/**
|
||||
* 盘点类型:1:明盘;2:盲盘
|
||||
*/
|
||||
@Excel(name = "inv_type")
|
||||
private Integer invType;
|
||||
/**
|
||||
* 盘点状态
|
||||
* 1. 初始化
|
||||
* 2. 已解析
|
||||
* 3. 数量确认
|
||||
* 4. 盘点关闭
|
||||
*/
|
||||
@Excel(name = "inv_status")
|
||||
private Integer invStatus;
|
||||
/**
|
||||
* 盘点结果
|
||||
* -1: 盘亏
|
||||
* 0: 正常
|
||||
* 1: 盘盈
|
||||
*/
|
||||
@Excel(name = "inv_result")
|
||||
private Integer invResult;
|
||||
/**
|
||||
* 盘点任务创建时间
|
||||
*/
|
||||
@Excel(name = "inv_create_time")
|
||||
private LocalDateTime invCreateTime;
|
||||
/**
|
||||
* 盘点确认时间
|
||||
*/
|
||||
@Excel(name = "inv_confirm_time")
|
||||
private LocalDateTime invConfirmTime;
|
||||
/**
|
||||
* 这个字段用于合并哪些任务是同一时间下发的
|
||||
*/
|
||||
@Excel(name = "inv_order_id")
|
||||
private String invOrderId;
|
||||
}
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
package com.wms_main.excel.easypoi.excelTemplate;
|
||||
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 出库单缓存模版
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class OutsRecordExcelTemplateForSave {
|
||||
/**
|
||||
* 任务号
|
||||
*/
|
||||
@Excel(name = "task_id")
|
||||
private String taskId;
|
||||
/**
|
||||
* 料号
|
||||
*/
|
||||
@Excel(name = "goods_id")
|
||||
private String goodsId;
|
||||
/**
|
||||
* 载具号
|
||||
*/
|
||||
@Excel(name = "vehicle_id")
|
||||
private String vehicleId;
|
||||
/**
|
||||
* 需求数量
|
||||
*/
|
||||
@Excel(name = "need_num")
|
||||
private Integer needNum;
|
||||
/**
|
||||
* 已分发数量
|
||||
*/
|
||||
@Excel(name = "distribute_num")
|
||||
private Integer distributeNum;
|
||||
/**
|
||||
* 已拣选数量
|
||||
*/
|
||||
@Excel(name = "pick_num")
|
||||
private Integer pickNum;
|
||||
/**
|
||||
* 出库类型
|
||||
*/
|
||||
@Excel(name = "out_type")
|
||||
private Integer outType;
|
||||
/**
|
||||
* 目的地
|
||||
*/
|
||||
@Excel(name = "destination")
|
||||
private String destination;
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
@Excel(name = "user_name")
|
||||
private String userName;
|
||||
/**
|
||||
* 出库理由
|
||||
* 紧急出库必填
|
||||
*/
|
||||
@Excel(name = "reason")
|
||||
private String reason;
|
||||
/**
|
||||
* 请求时间
|
||||
*/
|
||||
@Excel(name = "request_time")
|
||||
private LocalDateTime requestTime;
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
package com.wms_main.excel.easypoi.excelTemplate;
|
||||
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 库存流水缓存模版
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class StockUpdateRecordExcelTemplateForSave {
|
||||
/**
|
||||
* 库存更新记录id
|
||||
*/
|
||||
@Excel(name = "update_id")
|
||||
private String updateId;
|
||||
/**
|
||||
* 载具号
|
||||
*/
|
||||
@Excel(name = "vehicle_id")
|
||||
private String vehicleId;
|
||||
/**
|
||||
* 料号
|
||||
*/
|
||||
@Excel(name = "goods_id")
|
||||
private String goodsId;
|
||||
/**
|
||||
* 首次入库时间
|
||||
*/
|
||||
@Excel(name = "first_in_time")
|
||||
private LocalDateTime firstInTime;
|
||||
/**
|
||||
* 原数量
|
||||
*/
|
||||
@Excel(name = "before_num")
|
||||
private Integer beforeNum;
|
||||
/**
|
||||
* 新数量
|
||||
*/
|
||||
@Excel(name = "after_num")
|
||||
private Integer afterNum;
|
||||
/**
|
||||
* 更新理由
|
||||
*/
|
||||
@Excel(name = "reason")
|
||||
private String reason;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@Excel(name = "update_time")
|
||||
private LocalDateTime updateTime;
|
||||
/**
|
||||
* 更新用户
|
||||
*/
|
||||
@Excel(name = "update_user")
|
||||
private String updateUser;
|
||||
}
|
||||
|
|
@ -0,0 +1,111 @@
|
|||
package com.wms_main.excel.easypoi.excelTemplate;
|
||||
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 工作记录缓存模版
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class WorkRecordExcelTemplateForSave {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@Excel(name = "work_index")
|
||||
private String workIndex;
|
||||
/**
|
||||
* plant
|
||||
*/
|
||||
@Excel(name = "work_order")
|
||||
private String workOrder;
|
||||
/**
|
||||
* 计划开工日期
|
||||
*/
|
||||
@Excel(name = "plan_start_date")
|
||||
private LocalDate planStartDate;
|
||||
/**
|
||||
* 成品号
|
||||
*/
|
||||
@Excel(name = "product_id")
|
||||
private String productId;
|
||||
/**
|
||||
* 单片号
|
||||
*/
|
||||
@Excel(name = "single_product_id")
|
||||
private String singleProductId;
|
||||
/**
|
||||
* 料盒号
|
||||
*/
|
||||
@Excel(name = "box_no")
|
||||
private String boxNo;
|
||||
/**
|
||||
* 原材料号
|
||||
*/
|
||||
@Excel(name = "goods_id")
|
||||
private String goodsId;
|
||||
/**
|
||||
* 需求数量
|
||||
*/
|
||||
@Excel(name = "need_num")
|
||||
private Integer needNum;
|
||||
/**
|
||||
* 已完成数量
|
||||
*/
|
||||
@Excel(name = "finish_num")
|
||||
private Integer finishNum;
|
||||
/**
|
||||
* 工作站台
|
||||
*/
|
||||
@Excel(name = "work_stand")
|
||||
private String workStand;
|
||||
/**
|
||||
* 工作状态
|
||||
*/
|
||||
@Excel(name = "work_status")
|
||||
private Integer workStatus;
|
||||
/**
|
||||
* 工作用户
|
||||
*/
|
||||
@Excel(name = "work_user")
|
||||
private String workUser;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Excel(name = "create_time")
|
||||
private LocalDateTime createTime;
|
||||
/**
|
||||
* 完成时间
|
||||
*/
|
||||
@Excel(name = "finish_time")
|
||||
private LocalDateTime finishTime;
|
||||
/**
|
||||
* 缺料状态
|
||||
*/
|
||||
@Excel(name = "lack_status")
|
||||
private Integer lackStatus;
|
||||
/**
|
||||
* 是否是库外料
|
||||
*/
|
||||
@Excel(name = "is_out")
|
||||
private Integer isOut;
|
||||
/**
|
||||
* 产品类型
|
||||
* 1:非服务件
|
||||
* 2:服务件
|
||||
*/
|
||||
@Excel(name = "product_type")
|
||||
private Integer productType;
|
||||
/**
|
||||
* 备注
|
||||
* 用于ECN相关
|
||||
*/
|
||||
@Excel(name = "kitting_remark")
|
||||
private String kittingRemark;
|
||||
}
|
||||
|
|
@ -8,9 +8,73 @@ import java.util.List;
|
|||
* 保存数据服务接口
|
||||
*/
|
||||
public interface ISaveExcelEasyPoi {
|
||||
/**
|
||||
* 保存接口接收日志
|
||||
* @param fileSuffix 文件后缀
|
||||
* @param logList 数据列表
|
||||
*/
|
||||
void saveApiReceiveLogs(String fileSuffix, List<TSysLog> logList);
|
||||
|
||||
/**
|
||||
* 保存接口发送日志
|
||||
* @param fileSuffix 文件后缀
|
||||
* @param apiLogList 数据列表
|
||||
*/
|
||||
void saveApiSendLogs(String fileSuffix, List<TSysApi> apiLogList);
|
||||
|
||||
/**
|
||||
* 保存Wms任务记录
|
||||
* @param fileSuffix 文件后缀
|
||||
* @param wmsTaskBakList 数据列表
|
||||
*/
|
||||
void saveWmsTaskBak(String fileSuffix, List<TAppTaskBak> wmsTaskBakList);
|
||||
|
||||
/**
|
||||
* 保存Wcs任务记录
|
||||
* @param fileSuffix 文件后缀
|
||||
* @param wcsTaskBakList 数据列表
|
||||
*/
|
||||
void saveWcsTaskBak(String fileSuffix, List<TAppWcsTaskBak> wcsTaskBakList);
|
||||
|
||||
/**
|
||||
* 保存拣选任务记录
|
||||
* @param fileSuffix 文件后缀
|
||||
* @param pickTaskBakList 数据列表
|
||||
*/
|
||||
void savePickTaskBak(String fileSuffix, List<TAppPickTaskBak> pickTaskBakList);
|
||||
|
||||
/**
|
||||
* 保存Dbs记录
|
||||
* @param fileSuffix 文件后缀
|
||||
* @param dbsRecordList 数据列表
|
||||
*/
|
||||
void saveDbsRecord(String fileSuffix, List<TAppDbs> dbsRecordList);
|
||||
|
||||
/**
|
||||
* 保存出库单记录
|
||||
* @param fileSuffix 文件后缀
|
||||
* @param outsRecordList 数据列表
|
||||
*/
|
||||
void saveOutsRecord(String fileSuffix, List<TAppOutsRecord> outsRecordList);
|
||||
|
||||
/**
|
||||
* 保存库存流水记录
|
||||
* @param fileSuffix 文件后缀
|
||||
* @param stockUpdateList 数据列表
|
||||
*/
|
||||
void saveStockUpdateRecord(String fileSuffix, List<TAppStockUpdate> stockUpdateList);
|
||||
|
||||
/**
|
||||
* 保存盘点记录
|
||||
* @param fileSuffix 文件后缀
|
||||
* @param inventoryList 数据列表
|
||||
*/
|
||||
void saveInventoryRecord(String fileSuffix, List<TAppInventoryRecord> inventoryList);
|
||||
|
||||
/**
|
||||
* 保存工作记录
|
||||
* @param fileSuffix 文件后缀
|
||||
* @param workRecordList 数据列表
|
||||
*/
|
||||
void saveWorkRecord(String fileSuffix, List<TAppWorkRecord> workRecordList);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ public class SaveExcelEasyPoi implements ISaveExcelEasyPoi {
|
|||
|
||||
/**
|
||||
* 写入excel
|
||||
*
|
||||
* @param fileDesc 文件描述,不需要文件类型的后缀
|
||||
* @param filePath 文件路径,最后一位不需要添加文件分割符
|
||||
* @param sheetName 页名
|
||||
|
|
@ -53,6 +54,7 @@ public class SaveExcelEasyPoi implements ISaveExcelEasyPoi {
|
|||
|
||||
/**
|
||||
* 创建文件
|
||||
*
|
||||
* @param file 目标文件
|
||||
*/
|
||||
public void createFile(File file) {
|
||||
|
|
@ -80,6 +82,7 @@ public class SaveExcelEasyPoi implements ISaveExcelEasyPoi {
|
|||
|
||||
/**
|
||||
* 保存api接收日志
|
||||
*
|
||||
* @param fileSuffix 文件后缀
|
||||
* @param logList 数据列表
|
||||
*/
|
||||
|
|
@ -111,6 +114,7 @@ public class SaveExcelEasyPoi implements ISaveExcelEasyPoi {
|
|||
|
||||
/**
|
||||
* 保存api发送日志
|
||||
*
|
||||
* @param fileSuffix 文件后缀
|
||||
* @param apiLogList 数据列表
|
||||
*/
|
||||
|
|
@ -150,6 +154,7 @@ public class SaveExcelEasyPoi implements ISaveExcelEasyPoi {
|
|||
|
||||
/**
|
||||
* 保存Wms任务记录
|
||||
*
|
||||
* @param fileSuffix 文件后缀
|
||||
* @param wmsTaskBakList 数据列表
|
||||
*/
|
||||
|
|
@ -189,6 +194,7 @@ public class SaveExcelEasyPoi implements ISaveExcelEasyPoi {
|
|||
|
||||
/**
|
||||
* 保存wcs任务记录
|
||||
*
|
||||
* @param fileSuffix 文件后缀
|
||||
* @param wcsTaskBakList 数据记录
|
||||
*/
|
||||
|
|
@ -222,6 +228,7 @@ public class SaveExcelEasyPoi implements ISaveExcelEasyPoi {
|
|||
|
||||
/**
|
||||
* 保存拣选任务记录
|
||||
*
|
||||
* @param fileSuffix 文件后缀
|
||||
* @param pickTaskBakList 数据记录
|
||||
*/
|
||||
|
|
@ -249,4 +256,186 @@ public class SaveExcelEasyPoi implements ISaveExcelEasyPoi {
|
|||
log.error("缓存过期拣选任务记录异常。");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存DBS记录
|
||||
*
|
||||
* @param fileSuffix 文件后缀
|
||||
* @param dbsRecordList 数据列表
|
||||
*/
|
||||
@Override
|
||||
public void saveDbsRecord(String fileSuffix, List<TAppDbs> dbsRecordList) {
|
||||
if (dbsRecordList == null || dbsRecordList.isEmpty()) {
|
||||
// 空数据体,不做处理
|
||||
return;
|
||||
}
|
||||
// 将数据转化为excel Template
|
||||
List<DbsRecordExcelTemplateForSave> dbsRecordExcelTemplateList = new ArrayList<>(dbsRecordList.stream().map(dbsRecord -> new DbsRecordExcelTemplateForSave(
|
||||
dbsRecord.getDbsId(),
|
||||
dbsRecord.getWorkOrder(),
|
||||
dbsRecord.getProductIdOrigin(),
|
||||
dbsRecord.getProductId(),
|
||||
dbsRecord.getTestPlanStartDate(),
|
||||
dbsRecord.getTestPlanFinishDate(),
|
||||
dbsRecord.getPntPlanStartDate(),
|
||||
dbsRecord.getPntPlanFinishDate(),
|
||||
dbsRecord.getPlanProduction(),
|
||||
dbsRecord.getEquipmentName(),
|
||||
dbsRecord.getWorkShift(),
|
||||
dbsRecord.getFamily(),
|
||||
dbsRecord.getTestNo(),
|
||||
dbsRecord.getDbsStatus(),
|
||||
dbsRecord.getWorkStand(),
|
||||
dbsRecord.getRealWorkDate(),
|
||||
dbsRecord.getFinishTime(),
|
||||
dbsRecord.getKittingRemark(),
|
||||
dbsRecord.getRemark()
|
||||
)).toList());
|
||||
try {
|
||||
// 写入excel
|
||||
doWriteExcel("t_app_dbs_" + fileSuffix, ROOT_PATH + "/t_app_dbs", "t_app_dbs", dbsRecordExcelTemplateList, DbsRecordExcelTemplateForSave.class);
|
||||
} catch (IOException e) {
|
||||
log.error("缓存Dbs记录异常。");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存出库单记录
|
||||
* @param fileSuffix 文件后缀
|
||||
* @param outsRecordList 数据列表
|
||||
*/
|
||||
@Override
|
||||
public void saveOutsRecord(String fileSuffix, List<TAppOutsRecord> outsRecordList) {
|
||||
if (outsRecordList == null || outsRecordList.isEmpty()) {
|
||||
// 空数据体,不做处理
|
||||
return;
|
||||
}
|
||||
// 将数据转化为excel Template
|
||||
List<OutsRecordExcelTemplateForSave> outsRecordExcelTemplateList = new ArrayList<>(outsRecordList.stream().map(outsRecord -> new OutsRecordExcelTemplateForSave(
|
||||
outsRecord.getTaskId(),
|
||||
outsRecord.getGoodsId(),
|
||||
outsRecord.getVehicleId(),
|
||||
outsRecord.getNeedNum(),
|
||||
outsRecord.getDistributeNum(),
|
||||
outsRecord.getPickNum(),
|
||||
outsRecord.getOutType(),
|
||||
outsRecord.getDestination(),
|
||||
outsRecord.getUserName(),
|
||||
outsRecord.getReason(),
|
||||
outsRecord.getRequestTime()
|
||||
)).toList());
|
||||
try {
|
||||
// 写入excel
|
||||
doWriteExcel("t_app_outs_record_" + fileSuffix, ROOT_PATH + "/t_app_outs_record", "t_app_outs_record", outsRecordExcelTemplateList, OutsRecordExcelTemplateForSave.class);
|
||||
} catch (IOException e) {
|
||||
log.error("缓存出库单记录异常。");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 缓存库存流水记录
|
||||
* @param fileSuffix 文件后缀
|
||||
* @param stockUpdateList 数据列表
|
||||
*/
|
||||
@Override
|
||||
public void saveStockUpdateRecord(String fileSuffix, List<TAppStockUpdate> stockUpdateList) {
|
||||
if (stockUpdateList == null || stockUpdateList.isEmpty()) {
|
||||
// 空数据体,不做处理
|
||||
return;
|
||||
}
|
||||
// 将数据转化为excel Template
|
||||
List<StockUpdateRecordExcelTemplateForSave> stockUpdateExcelTemplateList = new ArrayList<>(stockUpdateList.stream().map(stockUpdate -> new StockUpdateRecordExcelTemplateForSave(
|
||||
stockUpdate.getUpdateId(),
|
||||
stockUpdate.getVehicleId(),
|
||||
stockUpdate.getGoodsId(),
|
||||
stockUpdate.getFirstInTime(),
|
||||
stockUpdate.getBeforeNum(),
|
||||
stockUpdate.getAfterNum(),
|
||||
stockUpdate.getReason(),
|
||||
stockUpdate.getUpdateTime(),
|
||||
stockUpdate.getUpdateUser()
|
||||
)).toList());
|
||||
try {
|
||||
// 写入excel
|
||||
doWriteExcel("t_app_stock_update_" + fileSuffix, ROOT_PATH + "/t_app_stock_update", "t_app_stock_update", stockUpdateExcelTemplateList, StockUpdateRecordExcelTemplateForSave.class);
|
||||
} catch (IOException e) {
|
||||
log.error("缓存库存流水记录异常。");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存盘点记录
|
||||
* @param fileSuffix 文件后缀
|
||||
* @param inventoryList 数据列表
|
||||
*/
|
||||
@Override
|
||||
public void saveInventoryRecord(String fileSuffix, List<TAppInventoryRecord> inventoryList) {
|
||||
if (inventoryList == null || inventoryList.isEmpty()) {
|
||||
// 空数据体,不做处理
|
||||
return;
|
||||
}
|
||||
// 将数据转化为excel Template
|
||||
List<InventoryRecordExcelTemplateForSave> inventoryRecordExcelTemplateList = new ArrayList<>(inventoryList.stream().map(inventoryRecord -> new InventoryRecordExcelTemplateForSave(
|
||||
inventoryRecord.getInventoryId(),
|
||||
inventoryRecord.getGoodsId(),
|
||||
inventoryRecord.getVehicleId(),
|
||||
inventoryRecord.getStockNum(),
|
||||
inventoryRecord.getConfirmNum(),
|
||||
inventoryRecord.getInvStand(),
|
||||
inventoryRecord.getInvUser(),
|
||||
inventoryRecord.getInvType(),
|
||||
inventoryRecord.getInvStatus(),
|
||||
inventoryRecord.getInvResult(),
|
||||
inventoryRecord.getInvCreateTime(),
|
||||
inventoryRecord.getInvConfirmTime(),
|
||||
inventoryRecord.getInvOrderId()
|
||||
)).toList());
|
||||
try {
|
||||
// 写入excel
|
||||
doWriteExcel("t_app_inventory_" + fileSuffix, ROOT_PATH + "/t_app_inventory", "t_app_inventory", inventoryRecordExcelTemplateList, InventoryRecordExcelTemplateForSave.class);
|
||||
} catch (IOException e) {
|
||||
log.error("缓存盘点记录异常。");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存工作记录
|
||||
*
|
||||
* @param fileSuffix 文件后缀
|
||||
* @param workRecordList 数据列表
|
||||
*/
|
||||
@Override
|
||||
public void saveWorkRecord(String fileSuffix, List<TAppWorkRecord> workRecordList) {
|
||||
if (workRecordList == null || workRecordList.isEmpty()) {
|
||||
// 空数据体,不做处理
|
||||
return;
|
||||
}
|
||||
// 将数据转化为excel Template
|
||||
List<WorkRecordExcelTemplateForSave> workRecordExcelTemplateList = new ArrayList<>(workRecordList.stream().map(workRecord -> new WorkRecordExcelTemplateForSave(
|
||||
workRecord.getWorkIndex(),
|
||||
workRecord.getWorkOrder(),
|
||||
workRecord.getPlanStartDate(),
|
||||
workRecord.getProductId(),
|
||||
workRecord.getSingleProductId(),
|
||||
workRecord.getBoxNo(),
|
||||
workRecord.getGoodsId(),
|
||||
workRecord.getNeedNum(),
|
||||
workRecord.getFinishNum(),
|
||||
workRecord.getWorkStand(),
|
||||
workRecord.getWorkStatus(),
|
||||
workRecord.getWorkUser(),
|
||||
workRecord.getCreateTime(),
|
||||
workRecord.getFinishTime(),
|
||||
workRecord.getLackStatus(),
|
||||
workRecord.getIsOut(),
|
||||
workRecord.getProductType(),
|
||||
workRecord.getKittingRemark()
|
||||
)).toList());
|
||||
try {
|
||||
// 写入excel
|
||||
doWriteExcel("t_app_work_record_" + fileSuffix, ROOT_PATH + "/t_app_work_record", "t_app_work_record", workRecordExcelTemplateList, WorkRecordExcelTemplateForSave.class);
|
||||
} catch (IOException e) {
|
||||
log.error("缓存工作记录异常。");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,6 +18,13 @@ import java.time.LocalDateTime;
|
|||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class OutsQuery extends PageQuery {
|
||||
/**
|
||||
* 查询类型
|
||||
* 1. 未关闭
|
||||
* 2. 已关闭
|
||||
*/
|
||||
@JsonProperty("queryType")
|
||||
private Integer queryType;
|
||||
/**
|
||||
* 任务号
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.wms_main.model.vo.wms;
|
|||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.wms_main.model.po.TAppOuts;
|
||||
import com.wms_main.model.po.TAppOutsRecord;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
|
@ -99,4 +100,28 @@ public class OutsVo {
|
|||
po.getRequestTime()
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 将记录po转换为vo
|
||||
* @param po 数据库实体
|
||||
* @return 转化结果
|
||||
*/
|
||||
public static OutsVo ofRecord(TAppOutsRecord po) {
|
||||
if (po == null) {
|
||||
return new OutsVo();
|
||||
}
|
||||
return new OutsVo(
|
||||
po.getTaskId(),
|
||||
po.getGoodsId(),
|
||||
po.getVehicleId(),
|
||||
po.getNeedNum(),
|
||||
po.getDistributeNum(),
|
||||
po.getPickNum(),
|
||||
po.getOutType(),
|
||||
po.getDestination(),
|
||||
po.getUserName(),
|
||||
po.getReason(),
|
||||
po.getRequestTime()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -163,7 +163,13 @@ public class KateWorkControllerServiceImpl implements IKateWorkControllerService
|
|||
// 根据查询条件筛选出对应的暂存数据
|
||||
List<TAppWork> filterWorks = currentWorkOrderWorkList.stream()
|
||||
.filter(work -> {
|
||||
boolean result = work.getWorkStatus() == -1;
|
||||
boolean result;
|
||||
if (work.getWorkStatus() == -1) {
|
||||
result = true;
|
||||
} else {
|
||||
// 缺料,可以下发
|
||||
result = work.getWorkStatus() == 2 && work.getLackStatus() == 1;
|
||||
}
|
||||
// 料盒号
|
||||
if (StringUtils.isNotEmpty(initKateWorkRequest.getBoxNo())) {
|
||||
result = result && Objects.equals(work.getBoxNo(), initKateWorkRequest.getBoxNo());
|
||||
|
|
@ -182,10 +188,12 @@ public class KateWorkControllerServiceImpl implements IKateWorkControllerService
|
|||
appWorkService.update(
|
||||
new LambdaUpdateWrapper<TAppWork>()
|
||||
.set(TAppWork::getWorkStatus, 0)
|
||||
.set(TAppWork::getLackStatus, 0)
|
||||
.set(TAppWork::getWorkStand, initKateWorkRequest.getStandId())
|
||||
.in(TAppWork::getWorkIndex, filterWorks.stream().map(TAppWork::getWorkIndex).toList())
|
||||
.setSql("distribute_num = finish_num")
|
||||
.in(TAppWork::getWorkIndex, filterWorks.stream().map(TAppWork::getWorkIndex).distinct().toList())
|
||||
);
|
||||
return BaseWmsApiResponse.success("创建工作成功。");
|
||||
return BaseWmsApiResponse.success("重新下发工作成功。");
|
||||
} catch (Exception e) {
|
||||
// 回滚事务
|
||||
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ public class TaskQueryControllerServiceImpl implements ITaskQueryControllerServi
|
|||
private final ITAppTaskBakService appTaskBakService;// 任务记录服务
|
||||
private final ITAppPickTaskService appPickTaskService;// 拣选任务服务
|
||||
private final ITAppOutsService appOutsService;// 出库单服务
|
||||
private final ITAppOutsRecordService appOutsRecordService;// 出库单记录服务
|
||||
private final ITAppInventoryService appInventoryService;// 盘点请求服务
|
||||
private final ITAppInventoryRecordService appInventoryRecordService;// 盘点记录服务
|
||||
|
||||
|
|
@ -150,6 +151,8 @@ public class TaskQueryControllerServiceImpl implements ITaskQueryControllerServi
|
|||
if (outsQuery == null) {
|
||||
return WmsApiResponse.error("查询参数不能为NULL", null);
|
||||
}
|
||||
if (outsQuery.getQueryType() == 1) {
|
||||
// 查询未关闭
|
||||
Page<TAppOuts> page = outsQuery.toMpPage();
|
||||
LambdaQueryWrapper<TAppOuts> lambdaQueryWrapper = new LambdaQueryWrapper<TAppOuts>()
|
||||
.like(StringUtils.isNotEmpty(outsQuery.getTaskId()), TAppOuts::getTaskId, outsQuery.getTaskId())
|
||||
|
|
@ -160,6 +163,20 @@ public class TaskQueryControllerServiceImpl implements ITaskQueryControllerServi
|
|||
|
||||
PageVo<OutsVo> pageVo = PageVo.of(outsPage, OutsVo::of);
|
||||
return WmsApiResponse.success("查询出库单成功。", pageVo);
|
||||
} else {
|
||||
// 查询已关闭的记录
|
||||
Page<TAppOutsRecord> page = outsQuery.toMpPage();
|
||||
LambdaQueryWrapper<TAppOutsRecord> lambdaQueryWrapper = new LambdaQueryWrapper<TAppOutsRecord>()
|
||||
.like(StringUtils.isNotEmpty(outsQuery.getTaskId()), TAppOutsRecord::getTaskId, outsQuery.getTaskId())
|
||||
.like(StringUtils.isNotEmpty(outsQuery.getGoodsId()), TAppOutsRecord::getGoodsId, outsQuery.getGoodsId())
|
||||
.like(StringUtils.isNotEmpty(outsQuery.getVehicleId()), TAppOutsRecord::getVehicleId, outsQuery.getVehicleId())
|
||||
.eq(outsQuery.getOutType() != null, TAppOutsRecord::getOutType, outsQuery.getOutType());
|
||||
Page<TAppOutsRecord> outsPage = appOutsRecordService.page(page, lambdaQueryWrapper);
|
||||
|
||||
PageVo<OutsVo> pageVo = PageVo.of(outsPage, OutsVo::ofRecord);
|
||||
return WmsApiResponse.success("查询出库单记录成功。", pageVo);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.wms_main.service.quartz_job.serviceImpl;
|
|||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.wms_main.app.AppCommon;
|
||||
import com.wms_main.constant.enums.others.DbsStatusEnums;
|
||||
import com.wms_main.constant.enums.wms.AppConfigKeyEnums;
|
||||
import com.wms_main.dao.*;
|
||||
import com.wms_main.excel.easypoi.service.ISaveExcelEasyPoi;
|
||||
|
|
@ -30,6 +31,11 @@ public class DataSolverServiceImpl implements IDataSolverService {
|
|||
private final ITAppWcsTaskBakService appWcsTaskBakService;// Wcs任务记录服务
|
||||
private final ITAppPickTaskBakService appPickTaskBakService;// 拣选任务记录服务
|
||||
private final ISaveExcelEasyPoi saveExcelEasyPoi;// 记录保存excel服务
|
||||
private final ITAppStockUpdateService appStockUpdateService;// 库存流水服务
|
||||
private final ITAppInventoryRecordService appInventoryRecordService;// 盘点记录服务
|
||||
private final ITAppOutsRecordService appOutsRecordService;// 出库单记录服务
|
||||
private final ITAppWorkRecordService appWorkRecordService;// 工作记录服务
|
||||
private final ITAppDbsService appDbsService;// Dbs服务
|
||||
|
||||
/**
|
||||
* 清理日志文件 实现
|
||||
|
|
@ -135,6 +141,46 @@ public class DataSolverServiceImpl implements IDataSolverService {
|
|||
// 获取删除时间
|
||||
LocalDateTime deleteTime = LocalDateTime.now().minusDays(importantRecordClearInterval);
|
||||
|
||||
// 查询过期库存流水记录
|
||||
List<TAppStockUpdate> stockUpdateList = appStockUpdateService.list(new LambdaQueryWrapper<TAppStockUpdate>().lt(TAppStockUpdate::getUpdateTime, deleteTime));
|
||||
if (stockUpdateList != null && !stockUpdateList.isEmpty()) {
|
||||
// 备份过期数据
|
||||
saveExcelEasyPoi.saveStockUpdateRecord(getSuffixFromDate(deleteTime, importantRecordClearInterval), stockUpdateList);
|
||||
// 清理过期数据
|
||||
appStockUpdateService.removeBatchByIds(stockUpdateList);
|
||||
}
|
||||
// 查询过期盘点记录
|
||||
List<TAppInventoryRecord> inventoryRecordList = appInventoryRecordService.list(new LambdaQueryWrapper<TAppInventoryRecord>().lt(TAppInventoryRecord::getInvConfirmTime, deleteTime));
|
||||
if (inventoryRecordList != null && !inventoryRecordList.isEmpty()) {
|
||||
// 缓存过期数据
|
||||
saveExcelEasyPoi.saveInventoryRecord(getSuffixFromDate(deleteTime, importantRecordClearInterval), inventoryRecordList);
|
||||
// 删除过期数据
|
||||
appInventoryRecordService.removeBatchByIds(inventoryRecordList);
|
||||
}
|
||||
// 查询过期出库单请求记录
|
||||
List<TAppOutsRecord> outsRecordList = appOutsRecordService.list(new LambdaQueryWrapper<TAppOutsRecord>().lt(TAppOutsRecord::getRequestTime, deleteTime));
|
||||
if (outsRecordList != null && !outsRecordList.isEmpty()) {
|
||||
// 缓存过期数据
|
||||
saveExcelEasyPoi.saveOutsRecord(getSuffixFromDate(deleteTime, importantRecordClearInterval), outsRecordList);
|
||||
// 删除过期数据
|
||||
appOutsRecordService.removeBatchByIds(outsRecordList);
|
||||
}
|
||||
// 查询过期工作记录
|
||||
List<TAppWorkRecord> workRecordList = appWorkRecordService.list(new LambdaQueryWrapper<TAppWorkRecord>().lt(TAppWorkRecord::getFinishTime, deleteTime));
|
||||
if (workRecordList != null && !workRecordList.isEmpty()) {
|
||||
// 缓存过期数据
|
||||
saveExcelEasyPoi.saveWorkRecord(getSuffixFromDate(deleteTime, importantRecordClearInterval), workRecordList);
|
||||
// 删除过期数据
|
||||
appWorkRecordService.removeBatchByIds(workRecordList);
|
||||
}
|
||||
// 查询过期dbs数据
|
||||
List<TAppDbs> dbsRecordList = appDbsService.list(new LambdaQueryWrapper<TAppDbs>().lt(TAppDbs::getFinishTime, deleteTime).eq(TAppDbs::getDbsStatus, DbsStatusEnums.FINISH.getValue()));
|
||||
if (dbsRecordList != null && !dbsRecordList.isEmpty()) {
|
||||
// 缓存过期数据
|
||||
saveExcelEasyPoi.saveDbsRecord(getSuffixFromDate(deleteTime, importantRecordClearInterval), dbsRecordList);
|
||||
// 删除过期数据
|
||||
appDbsService.removeBatchByIds(dbsRecordList);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user