forked from BaoKaiWms/202501-Wms-Kate-Wuxi
1.增加重启系统、重载配置的功能
2.后台增加盘点记录查询功能。
This commit is contained in:
parent
78eb0460b0
commit
d5cdf23197
|
|
@ -42,7 +42,7 @@ const closeTag = (tag) => {
|
|||
const handleClose = (tag, index) => {
|
||||
// 处理跳转
|
||||
if (router.currentRoute.value.path === tag.path) {
|
||||
if (index === (tags.value.length - 1)) { // 关闭最后一个标签,则路由跳转至最后一个
|
||||
if (tags.value.length === 1) { // 关闭最后一个标签,则路由跳转至最后一个
|
||||
router.push('/home')
|
||||
} else { // 路由跳转至下一个标签页
|
||||
if (index === 0) {
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@
|
|||
<div style="display: flex;justify-content: space-between;">
|
||||
<el-row>
|
||||
<el-form-item label="入库类型">
|
||||
<el-select-v2 v-model="taskRequestEntity.emptyTask" placeholder="请选择入库类型"
|
||||
<el-select-v2 style="width: 196px" v-model="taskRequestEntity.emptyTask" placeholder="请选择入库类型"
|
||||
:options="inTypeOptions" disabled></el-select-v2>
|
||||
</el-form-item>
|
||||
<el-form-item label="箱号">
|
||||
|
|
|
|||
|
|
@ -8,9 +8,6 @@
|
|||
<el-form-item style="width: 100%">
|
||||
<el-button color="#87CEEB" style="width: 100%; border: none" @click="loginToImage">工作图纸</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item style="width: 100%">
|
||||
<el-button color="#87CEEB" style="width: 100%; border: none" @click="loginToImageTable">所有图纸预览</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item style="width: 100%">
|
||||
<el-button color="#87CEEB" style="width: 100%; border: none" @click="loginToScanImage">产线扫码</el-button>
|
||||
</el-form-item>
|
||||
|
|
@ -41,10 +38,6 @@ const loginToWms = () => {
|
|||
const loginToImage = () => {
|
||||
router.replace({ path: '/imageDisplay' })
|
||||
}
|
||||
// 登录到所有图纸预览系统
|
||||
const loginToImageTable = () => {
|
||||
router.replace({ path: '/imageTable' })
|
||||
}
|
||||
// 登录到产线扫码系统
|
||||
const loginToScanImage = () => {
|
||||
router.replace({ path: '/scanForImage' })
|
||||
|
|
|
|||
|
|
@ -0,0 +1,39 @@
|
|||
package com.wms_main.controller.wms;
|
||||
|
||||
import com.wms_main.model.dto.request.wms.BaseWmsRequest;
|
||||
import com.wms_main.model.dto.response.wms.BaseWmsApiResponse;
|
||||
import com.wms_main.service.controller.ISystemControllerService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* 系统控制类
|
||||
*/
|
||||
@RestController
|
||||
@ResponseBody
|
||||
@CrossOrigin
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/wms/system")
|
||||
public class SystemController {
|
||||
private final ISystemControllerService systemControllerService;// 系统控制类服务
|
||||
|
||||
/**
|
||||
* 重启系统
|
||||
* @param baseWmsRequest 请求
|
||||
* @return 响应结果
|
||||
*/
|
||||
@PostMapping("/restartSystem")
|
||||
public BaseWmsApiResponse restartSystem(@RequestBody BaseWmsRequest baseWmsRequest) {
|
||||
return systemControllerService.restartSystem(baseWmsRequest);
|
||||
}
|
||||
|
||||
/**
|
||||
* 重载配置
|
||||
* @param baseWmsRequest 请求
|
||||
* @return 响应结果
|
||||
*/
|
||||
@PostMapping("/reloadConfig")
|
||||
public BaseWmsApiResponse reloadConfig(@RequestBody BaseWmsRequest baseWmsRequest) {
|
||||
return systemControllerService.reloadConfig(baseWmsRequest);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
package com.wms_main.controller.wms;
|
||||
|
||||
import com.wms_main.model.dto.query.InventoryQuery;
|
||||
import com.wms_main.model.dto.query.OutsQuery;
|
||||
import com.wms_main.model.dto.query.PickTaskQuery;
|
||||
import com.wms_main.model.dto.query.WmsTaskQuery;
|
||||
|
|
@ -75,4 +76,15 @@ public class TaskQueryController {
|
|||
{
|
||||
return taskQueryControllerService.queryOutsByPage(outsQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 盘点信息分页查询
|
||||
* @param inventoryQuery 查询参数
|
||||
* @return 查询结果
|
||||
*/
|
||||
@PostMapping("/queryInventoryRecordByPage")
|
||||
public WmsApiResponse<PageVo<InventoryRecordVo>> queryInventoryRecordByPage(@RequestBody InventoryQuery inventoryQuery)
|
||||
{
|
||||
return taskQueryControllerService.queryInventoryRecordByPage(inventoryQuery);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,64 @@
|
|||
package com.wms_main.model.dto.query;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 盘点查询参数
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class InventoryQuery extends PageQuery {
|
||||
/**
|
||||
* 查询类型
|
||||
*/
|
||||
@JsonProperty("queryType")
|
||||
private Integer queryType;
|
||||
/**
|
||||
* 盘点id
|
||||
*/
|
||||
@JsonProperty("inventoryId")
|
||||
private String inventoryId;
|
||||
/**
|
||||
* 料号
|
||||
*/
|
||||
@JsonProperty("goodsId")
|
||||
private String goodsId;
|
||||
/**
|
||||
* 载具号
|
||||
*/
|
||||
@JsonProperty("vehicleId")
|
||||
private String vehicleId;
|
||||
/**
|
||||
* 盘点站台
|
||||
*/
|
||||
@JsonProperty("invStand")
|
||||
private String invStand;
|
||||
/**
|
||||
* 盘点类型:1:明盘;2:盲盘
|
||||
*/
|
||||
@JsonProperty("invType")
|
||||
private Integer invType;
|
||||
/**
|
||||
* 盘点状态
|
||||
* 1. 初始化
|
||||
* 2. 已解析
|
||||
* 3. 数量确认
|
||||
* 4. 盘点关闭
|
||||
*/
|
||||
@JsonProperty("invStatus")
|
||||
private Integer invStatus;
|
||||
/**
|
||||
* 盘点结果
|
||||
* -1: 盘亏
|
||||
* 0: 正常
|
||||
* 1: 盘盈
|
||||
*/
|
||||
@JsonProperty("invResult")
|
||||
private Integer invResult;
|
||||
}
|
||||
|
|
@ -1,8 +1,13 @@
|
|||
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.TAppInventory;
|
||||
import com.wms_main.model.po.TAppInventoryRecord;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
|
|
@ -16,35 +21,43 @@ public class InventoryRecordVo {
|
|||
/**
|
||||
* 盘点id
|
||||
*/
|
||||
@JsonProperty("inventoryId")
|
||||
private String inventoryId;
|
||||
/**
|
||||
* 料号
|
||||
*/
|
||||
@JsonProperty("goodsId")
|
||||
private String goodsId;
|
||||
/**
|
||||
* 载具号
|
||||
*/
|
||||
@JsonProperty("vehicleId")
|
||||
private String vehicleId;
|
||||
/**
|
||||
* 库存数量
|
||||
* 只记录盘点确认时间点
|
||||
*/
|
||||
@JsonProperty("stockNum")
|
||||
private Integer stockNum;
|
||||
/**
|
||||
* 确认数量
|
||||
*/
|
||||
@JsonProperty("confirmNum")
|
||||
private Integer confirmNum;
|
||||
/**
|
||||
* 盘点站台
|
||||
*/
|
||||
@JsonProperty("invStand")
|
||||
private String invStand;
|
||||
/**
|
||||
* 盘点人
|
||||
*/
|
||||
@JsonProperty("invUser")
|
||||
private String invUser;
|
||||
/**
|
||||
* 盘点类型:1:明盘;2:盲盘
|
||||
*/
|
||||
@JsonProperty("invType")
|
||||
private Integer invType;
|
||||
/**
|
||||
* 盘点状态
|
||||
|
|
@ -53,6 +66,7 @@ public class InventoryRecordVo {
|
|||
* 3. 数量确认
|
||||
* 4. 盘点关闭
|
||||
*/
|
||||
@JsonProperty("invStatus")
|
||||
private Integer invStatus;
|
||||
/**
|
||||
* 盘点结果
|
||||
|
|
@ -60,17 +74,77 @@ public class InventoryRecordVo {
|
|||
* 0: 正常
|
||||
* 1: 盘盈
|
||||
*/
|
||||
@JsonProperty("invResult")
|
||||
private Integer invResult;
|
||||
/**
|
||||
* 盘点任务创建时间
|
||||
*/
|
||||
@JsonProperty("invCreateTime")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime invCreateTime;
|
||||
/**
|
||||
* 盘点确认时间
|
||||
*/
|
||||
@JsonProperty("invConfirmTime")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime invConfirmTime;
|
||||
/**
|
||||
* 这个字段用于合并哪些任务是同一时间下发的
|
||||
*/
|
||||
@JsonProperty("invOrderId")
|
||||
private String invOrderId;
|
||||
|
||||
/**
|
||||
* 将盘点请求的Po转化为Vo
|
||||
* @param inventoryPo 请求Po
|
||||
* @return 盘点Vo
|
||||
*/
|
||||
public static InventoryRecordVo ofTaskPo(TAppInventory inventoryPo) {
|
||||
if (inventoryPo == null) {
|
||||
return new InventoryRecordVo();
|
||||
}
|
||||
return new InventoryRecordVo(
|
||||
inventoryPo.getInventoryId(),
|
||||
inventoryPo.getGoodsId(),
|
||||
inventoryPo.getVehicleId(),
|
||||
inventoryPo.getStockNum(),
|
||||
inventoryPo.getConfirmNum(),
|
||||
inventoryPo.getInvStand(),
|
||||
inventoryPo.getInvUser(),
|
||||
inventoryPo.getInvType(),
|
||||
inventoryPo.getInvStatus(),
|
||||
inventoryPo.getInvResult(),
|
||||
inventoryPo.getInvCreateTime(),
|
||||
inventoryPo.getInvConfirmTime(),
|
||||
inventoryPo.getInvOrderId()
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 将盘点记录的Po转化为Vo
|
||||
* @param inventoryRecordPo 盘点记录Po
|
||||
* @return 盘点记录Vo
|
||||
*/
|
||||
public static InventoryRecordVo ofRecordPo(TAppInventoryRecord inventoryRecordPo) {
|
||||
if (inventoryRecordPo == null) {
|
||||
return new InventoryRecordVo();
|
||||
}
|
||||
return new InventoryRecordVo(
|
||||
inventoryRecordPo.getInventoryId(),
|
||||
inventoryRecordPo.getGoodsId(),
|
||||
inventoryRecordPo.getVehicleId(),
|
||||
inventoryRecordPo.getStockNum(),
|
||||
inventoryRecordPo.getConfirmNum(),
|
||||
inventoryRecordPo.getInvStand(),
|
||||
inventoryRecordPo.getInvUser(),
|
||||
inventoryRecordPo.getInvType(),
|
||||
inventoryRecordPo.getInvStatus(),
|
||||
inventoryRecordPo.getInvResult(),
|
||||
inventoryRecordPo.getInvCreateTime(),
|
||||
inventoryRecordPo.getInvConfirmTime(),
|
||||
inventoryRecordPo.getInvOrderId()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,23 @@
|
|||
package com.wms_main.service.controller;
|
||||
|
||||
import com.wms_main.model.dto.request.wms.BaseWmsRequest;
|
||||
import com.wms_main.model.dto.response.wms.BaseWmsApiResponse;
|
||||
|
||||
/**
|
||||
* 系统控制类服务接口
|
||||
*/
|
||||
public interface ISystemControllerService {
|
||||
/**
|
||||
* 重启系统
|
||||
* @param baseWmsRequest 请求
|
||||
* @return 响应
|
||||
*/
|
||||
BaseWmsApiResponse restartSystem(BaseWmsRequest baseWmsRequest);
|
||||
|
||||
/**
|
||||
* 重载配置
|
||||
* @param baseWmsRequest 请求
|
||||
* @return 响应
|
||||
*/
|
||||
BaseWmsApiResponse reloadConfig(BaseWmsRequest baseWmsRequest);
|
||||
}
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
package com.wms_main.service.controller;
|
||||
|
||||
import com.wms_main.model.dto.query.InventoryQuery;
|
||||
import com.wms_main.model.dto.query.OutsQuery;
|
||||
import com.wms_main.model.dto.query.PickTaskQuery;
|
||||
import com.wms_main.model.dto.query.WmsTaskQuery;
|
||||
|
|
@ -44,4 +45,11 @@ public interface ITaskQueryControllerService {
|
|||
* @return 查询结果---分页
|
||||
*/
|
||||
WmsApiResponse<PageVo<OutsVo>> queryOutsByPage(OutsQuery outsQuery);
|
||||
|
||||
/**
|
||||
* 查询盘点相关信息
|
||||
* @param inventoryQuery 查询参数
|
||||
* @return 查询结果---分页
|
||||
*/
|
||||
WmsApiResponse<PageVo<InventoryRecordVo>> queryInventoryRecordByPage(InventoryQuery inventoryQuery);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,37 @@
|
|||
package com.wms_main.service.controller.serviceImpl;
|
||||
|
||||
import com.wms_main.model.dto.request.wms.BaseWmsRequest;
|
||||
import com.wms_main.model.dto.response.wms.BaseWmsApiResponse;
|
||||
import com.wms_main.service.controller.ISystemControllerService;
|
||||
import com.wms_main.service.system.ISystemService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 系统控制类 服务实现
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class SystemControllerServiceImpl implements ISystemControllerService {
|
||||
private final ISystemService systemService;// 系统服务
|
||||
|
||||
/**
|
||||
* 重启系统---实现
|
||||
* @param baseWmsRequest 请求
|
||||
* @return 重启结果
|
||||
*/
|
||||
@Override
|
||||
public BaseWmsApiResponse restartSystem(BaseWmsRequest baseWmsRequest) {
|
||||
return systemService.restartSystem() ? BaseWmsApiResponse.success("重启系统成功。") : BaseWmsApiResponse.error("重启系统失败。");
|
||||
}
|
||||
|
||||
/**
|
||||
* 重新加载配置文件---实现
|
||||
* @param baseWmsRequest 请求
|
||||
* @return 重新加载结果
|
||||
*/
|
||||
@Override
|
||||
public BaseWmsApiResponse reloadConfig(BaseWmsRequest baseWmsRequest) {
|
||||
return systemService.reloadConfig() ? BaseWmsApiResponse.success("重载配置成功。") : BaseWmsApiResponse.error("重载配置失败。");
|
||||
}
|
||||
}
|
||||
|
|
@ -3,18 +3,13 @@ package com.wms_main.service.controller.serviceImpl;
|
|||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.wms_main.constant.enums.wms.WmsTaskTypeEnums;
|
||||
import com.wms_main.dao.ITAppOutsService;
|
||||
import com.wms_main.dao.ITAppPickTaskService;
|
||||
import com.wms_main.dao.ITAppTaskBakService;
|
||||
import com.wms_main.dao.ITAppTaskService;
|
||||
import com.wms_main.dao.*;
|
||||
import com.wms_main.model.dto.query.InventoryQuery;
|
||||
import com.wms_main.model.dto.query.OutsQuery;
|
||||
import com.wms_main.model.dto.query.PickTaskQuery;
|
||||
import com.wms_main.model.dto.query.WmsTaskQuery;
|
||||
import com.wms_main.model.dto.response.wms.WmsApiResponse;
|
||||
import com.wms_main.model.po.TAppOuts;
|
||||
import com.wms_main.model.po.TAppPickTask;
|
||||
import com.wms_main.model.po.TAppTask;
|
||||
import com.wms_main.model.po.TAppTaskBak;
|
||||
import com.wms_main.model.po.*;
|
||||
import com.wms_main.model.vo.wms.*;
|
||||
import com.wms_main.repository.utils.StringUtils;
|
||||
import com.wms_main.service.controller.ITaskQueryControllerService;
|
||||
|
|
@ -31,6 +26,8 @@ public class TaskQueryControllerServiceImpl implements ITaskQueryControllerServi
|
|||
private final ITAppTaskBakService appTaskBakService;// 任务记录服务
|
||||
private final ITAppPickTaskService appPickTaskService;// 拣选任务服务
|
||||
private final ITAppOutsService appOutsService;// 出库单服务
|
||||
private final ITAppInventoryService appInventoryService;// 盘点请求服务
|
||||
private final ITAppInventoryRecordService appInventoryRecordService;// 盘点记录服务
|
||||
|
||||
/**
|
||||
* 查询wms任务监控---分页
|
||||
|
|
@ -164,4 +161,37 @@ public class TaskQueryControllerServiceImpl implements ITaskQueryControllerServi
|
|||
PageVo<OutsVo> pageVo = PageVo.of(outsPage, OutsVo::of);
|
||||
return WmsApiResponse.success("查询出库单成功。", pageVo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询盘点相关信息---实现
|
||||
* @param inventoryQuery 查询参数
|
||||
* @return 查询结果
|
||||
*/
|
||||
@Override
|
||||
public WmsApiResponse<PageVo<InventoryRecordVo>> queryInventoryRecordByPage(InventoryQuery inventoryQuery) {
|
||||
if (inventoryQuery == null) {
|
||||
return WmsApiResponse.error("查询参数不能为NULL", null);
|
||||
}
|
||||
if (inventoryQuery.getQueryType() == 1) {
|
||||
// 查询盘点请求
|
||||
Page<TAppInventory> page = inventoryQuery.toMpPage();
|
||||
LambdaQueryWrapper<TAppInventory> lambdaQueryWrapper = new LambdaQueryWrapper<TAppInventory>()
|
||||
.like(StringUtils.isNotEmpty(inventoryQuery.getGoodsId()), TAppInventory::getGoodsId, inventoryQuery.getGoodsId())
|
||||
.like(StringUtils.isNotEmpty(inventoryQuery.getVehicleId()), TAppInventory::getVehicleId, inventoryQuery.getVehicleId())
|
||||
.eq(inventoryQuery.getInvResult() != null, TAppInventory::getInvResult, inventoryQuery.getInvResult());
|
||||
Page<TAppInventory> inventoryPage = appInventoryService.page(page, lambdaQueryWrapper);
|
||||
PageVo<InventoryRecordVo> pageVo = PageVo.of(inventoryPage, InventoryRecordVo::ofTaskPo);
|
||||
return WmsApiResponse.success("查询盘点任务成功。", pageVo);
|
||||
} else {
|
||||
// 默认;查询盘点记录
|
||||
Page<TAppInventoryRecord> page = inventoryQuery.toMpPage();
|
||||
LambdaQueryWrapper<TAppInventoryRecord> lambdaQueryWrapper = new LambdaQueryWrapper<TAppInventoryRecord>()
|
||||
.like(StringUtils.isNotEmpty(inventoryQuery.getGoodsId()), TAppInventoryRecord::getGoodsId, inventoryQuery.getGoodsId())
|
||||
.like(StringUtils.isNotEmpty(inventoryQuery.getVehicleId()), TAppInventoryRecord::getVehicleId, inventoryQuery.getVehicleId())
|
||||
.eq(inventoryQuery.getInvResult() != null, TAppInventoryRecord::getInvResult, inventoryQuery.getInvResult());
|
||||
Page<TAppInventoryRecord> inventoryRecordPage = appInventoryRecordService.page(page, lambdaQueryWrapper);
|
||||
PageVo<InventoryRecordVo> pageVo = PageVo.of(inventoryRecordPage, InventoryRecordVo::ofRecordPo);
|
||||
return WmsApiResponse.success("查询盘点记录成功。", pageVo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user