现场wms使用优化
This commit is contained in:
@@ -66,7 +66,7 @@ public class ToWcsServiceImpl implements IToWcsService {
|
||||
|
||||
|
||||
@Override
|
||||
@Scheduled(fixedDelay=1500)
|
||||
//@Scheduled(fixedDelay=1500)
|
||||
public void pushOutMydoJob() {
|
||||
//查询所有未推送的料箱出库作业
|
||||
MydoJob mydoJobParam = new MydoJob();
|
||||
@@ -156,15 +156,6 @@ public class ToWcsServiceImpl implements IToWcsService {
|
||||
param.setWarehouseId(requestEnter.getWarehouseId());
|
||||
List<MydoJob> mydoJobs = mydoJobService.selectMydoJobListApi(param);
|
||||
if (CollUtil.isEmpty(mydoJobs)){
|
||||
/*//生成杂料入库任务
|
||||
TrayCodeMsg trayCodeMsg = new TrayCodeMsg();
|
||||
trayCodeMsg.setTrayCode(requestEnter.getTrayCode());
|
||||
trayCodeMsg.setWarehouseId(requestEnter.getWarehouseId());
|
||||
pdaService.zlin(trayCodeMsg);
|
||||
mydoJobs = mydoJobService.selectMydoJobListApi(param);
|
||||
if (CollUtil.isEmpty(mydoJobs)){
|
||||
return AjaxResult.error("杂料入库任务生成失败", requestEnter.getTrayCode());
|
||||
}*/
|
||||
if ("02".equals(requestEnter.getWarehouseId())){
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
map.put("v_tray_code", requestEnter.getTrayCode());
|
||||
@@ -219,6 +210,7 @@ public class ToWcsServiceImpl implements IToWcsService {
|
||||
basCargoSpaceParam.setRule1(null);
|
||||
basCargoSpaceParam.setRule2(null);
|
||||
basCargoSpaceParam.setTheFloor(null);
|
||||
basCargoSpaceParam.setCargoHight(null);
|
||||
basCargoSpace = basCargoSpaceService.selectEmptyCargoSpaceByWarehouseId(basCargoSpaceParam);
|
||||
if (ObjUtil.isNull(basCargoSpace)){
|
||||
return AjaxResult.error("没有空货位");
|
||||
|
||||
@@ -136,6 +136,16 @@ public class MydoJob extends BaseEntity
|
||||
|
||||
private String productId;
|
||||
|
||||
private List<String> warehouseIdList;
|
||||
|
||||
public List<String> getWarehouseIdList() {
|
||||
return warehouseIdList;
|
||||
}
|
||||
|
||||
public void setWarehouseIdList(List<String> warehouseIdList) {
|
||||
this.warehouseIdList = warehouseIdList;
|
||||
}
|
||||
|
||||
public String getProductId() {
|
||||
return productId;
|
||||
}
|
||||
|
||||
@@ -116,16 +116,19 @@ public class MydoJobServiceImpl implements IMydoJobService {
|
||||
}
|
||||
if ("1".equals(mydoJob.getInOut()) || "3".equals(mydoJob.getInOut())){
|
||||
//入库需要查看本部门任务
|
||||
mydoJob.setDepartmentId(Convert.toStr(SecurityUtils.getDeptId()));
|
||||
Optional<SysRole> first = roles.stream().filter(x -> "role1".equals(x.getRoleKey())).findFirst();
|
||||
if (first.isPresent()){
|
||||
//二联合普通人员
|
||||
mydoJob.setWarehouseId("02");
|
||||
mydoJob.setDepartmentId(Convert.toStr(SecurityUtils.getDeptId()));
|
||||
|
||||
}
|
||||
Optional<SysRole> first1 = roles.stream().filter(x -> "role2".equals(x.getRoleKey())).findFirst();
|
||||
if (first1.isPresent()){
|
||||
//三联合普通人员
|
||||
mydoJob.setWarehouseId("01");
|
||||
mydoJob.setDepartmentId(Convert.toStr(SecurityUtils.getDeptId()));
|
||||
|
||||
}
|
||||
Optional<SysRole> first2 = roles.stream().filter(x -> "role3".equals(x.getRoleKey())).findFirst();
|
||||
if (first2.isPresent()){
|
||||
|
||||
@@ -1,18 +1,22 @@
|
||||
package com.ruoyi.kpi.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.date.DateField;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.ruoyi.bas.cargoSpace.domain.BasCargoSpace;
|
||||
import com.ruoyi.bas.cargoSpace.mapper.BasCargoSpaceMapper;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.entity.SysRole;
|
||||
import com.ruoyi.common.utils.MessageUtils;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.job.mydojob.domain.MydoJob;
|
||||
import com.ruoyi.job.mydojobfinish.domain.MydoJobFinish;
|
||||
import com.ruoyi.job.mydojobfinish.mapper.MydoJobFinishMapper;
|
||||
import com.ruoyi.kpi.service.KpiService;
|
||||
import com.ruoyi.stock.stock.domain.BasStock;
|
||||
import com.ruoyi.stock.stock.mapper.BasStockMapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -26,6 +30,7 @@ import java.util.stream.Collectors;
|
||||
* @date 2025-05-21
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class KpiServiceImpl implements KpiService
|
||||
{
|
||||
@Autowired
|
||||
@@ -497,6 +502,43 @@ public class KpiServiceImpl implements KpiService
|
||||
mydoJobParam.setDateStart(startTime);
|
||||
mydoJobParam.setDateEnd(endTime);
|
||||
mydoJobParam.setInOut(inOut);
|
||||
try {
|
||||
if (!"admin".equals(SecurityUtils.getUsername())){
|
||||
List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
|
||||
if (CollUtil.isEmpty(roles)) {
|
||||
//如果未设置角色 ,直接返回空列表
|
||||
return AjaxResult.error("没有权限!");
|
||||
}
|
||||
ArrayList<String> warehouseIdList = new ArrayList<>();
|
||||
Optional<SysRole> first = roles.stream().filter(x -> "role1".equals(x.getRoleKey())).findFirst();
|
||||
if (first.isPresent()){
|
||||
//二联合普通人员
|
||||
mydoJobParam.setDepartmentId(SecurityUtils.getDeptId().toString());
|
||||
warehouseIdList.add("02");
|
||||
warehouseIdList.add("03");
|
||||
}
|
||||
Optional<SysRole> first1 = roles.stream().filter(x -> "role2".equals(x.getRoleKey())).findFirst();
|
||||
if (first1.isPresent()){
|
||||
//三联合普通人员
|
||||
mydoJobParam.setDepartmentId(SecurityUtils.getDeptId().toString());
|
||||
warehouseIdList.add("01");
|
||||
}
|
||||
Optional<SysRole> first2 = roles.stream().filter(x -> "role3".equals(x.getRoleKey())).findFirst();
|
||||
if (first2.isPresent()){
|
||||
//二联合管理员
|
||||
warehouseIdList.add("02");
|
||||
warehouseIdList.add("03");
|
||||
}
|
||||
Optional<SysRole> first3 = roles.stream().filter(x -> "role4".equals(x.getRoleKey())).findFirst();
|
||||
if (first3.isPresent()){
|
||||
//三联合管理员
|
||||
warehouseIdList.add("01");
|
||||
}
|
||||
mydoJobParam.setWarehouseIdList(warehouseIdList);
|
||||
}
|
||||
}catch (Exception e){
|
||||
log.error(e.getMessage(),e);
|
||||
}
|
||||
List<DateTime> datesBetween = DateUtil.rangeToList(DateUtil.parseDate(startTime), DateUtil.parseDate(endTime), DateField.DAY_OF_MONTH);
|
||||
List<MydoJob> list = mydoJobFinishMapper.selectMydoJobFinishListByMydoJob(mydoJobParam);
|
||||
|
||||
|
||||
@@ -172,6 +172,16 @@ public class ViewHandAllotStock extends BaseEntity
|
||||
private String theType;
|
||||
private String theTypeName;
|
||||
|
||||
private String deptName;
|
||||
|
||||
public String getDeptName() {
|
||||
return deptName;
|
||||
}
|
||||
|
||||
public void setDeptName(String deptName) {
|
||||
this.deptName = deptName;
|
||||
}
|
||||
|
||||
public String getTheType() {
|
||||
return theType;
|
||||
}
|
||||
|
||||
@@ -50,7 +50,6 @@ public class ViewInJobFlowServiceImpl implements IViewInJobFlowService
|
||||
public List<ViewInJobFlow> selectViewInJobFlowList(ViewInJobFlow viewInJobFlow)
|
||||
{
|
||||
if (!"admin".equals(SecurityUtils.getUsername())){
|
||||
viewInJobFlow.setDepartmentId(SecurityUtils.getDeptId().toString());
|
||||
List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
|
||||
if (CollUtil.isEmpty(roles)) {
|
||||
//如果未设置角色 ,直接返回空列表
|
||||
@@ -60,11 +59,15 @@ public class ViewInJobFlowServiceImpl implements IViewInJobFlowService
|
||||
if (first.isPresent()){
|
||||
//二联合普通人员
|
||||
viewInJobFlow.setWarehouseId("02");
|
||||
viewInJobFlow.setDepartmentId(SecurityUtils.getDeptId().toString());
|
||||
|
||||
}
|
||||
Optional<SysRole> first1 = roles.stream().filter(x -> "role2".equals(x.getRoleKey())).findFirst();
|
||||
if (first1.isPresent()){
|
||||
//三联合普通人员
|
||||
viewInJobFlow.setWarehouseId("01");
|
||||
viewInJobFlow.setDepartmentId(SecurityUtils.getDeptId().toString());
|
||||
|
||||
}
|
||||
Optional<SysRole> first2 = roles.stream().filter(x -> "role3".equals(x.getRoleKey())).findFirst();
|
||||
if (first2.isPresent()){
|
||||
|
||||
@@ -50,7 +50,6 @@ public class ViewOutJobFlowServiceImpl implements IViewOutJobFlowService
|
||||
public List<ViewOutJobFlow> selectViewOutJobFlowList(ViewOutJobFlow viewOutJobFlow)
|
||||
{
|
||||
if (!"admin".equals(SecurityUtils.getUsername())){
|
||||
viewOutJobFlow.setDepartmentId(SecurityUtils.getDeptId().toString());
|
||||
List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
|
||||
if (CollUtil.isEmpty(roles)) {
|
||||
//如果未设置角色 ,直接返回空列表
|
||||
@@ -60,11 +59,15 @@ public class ViewOutJobFlowServiceImpl implements IViewOutJobFlowService
|
||||
if (first.isPresent()){
|
||||
//二联合普通人员
|
||||
viewOutJobFlow.setWarehouseId("02");
|
||||
viewOutJobFlow.setDepartmentId(SecurityUtils.getDeptId().toString());
|
||||
|
||||
}
|
||||
Optional<SysRole> first1 = roles.stream().filter(x -> "role2".equals(x.getRoleKey())).findFirst();
|
||||
if (first1.isPresent()){
|
||||
//三联合普通人员
|
||||
viewOutJobFlow.setWarehouseId("01");
|
||||
viewOutJobFlow.setDepartmentId(SecurityUtils.getDeptId().toString());
|
||||
|
||||
}
|
||||
Optional<SysRole> first2 = roles.stream().filter(x -> "role3".equals(x.getRoleKey())).findFirst();
|
||||
if (first2.isPresent()){
|
||||
|
||||
@@ -49,7 +49,6 @@ public class ViewStockDetailServiceImpl implements IViewStockDetailService
|
||||
public List<ViewStockDetail> selectViewStockDetailList(ViewStockDetail viewStockDetail)
|
||||
{
|
||||
if (!"admin".equals(SecurityUtils.getUsername())){
|
||||
viewStockDetail.setModel(SecurityUtils.getDeptId().toString());
|
||||
List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
|
||||
if (CollUtil.isEmpty(roles)) {
|
||||
//如果未设置角色 ,直接返回空列表
|
||||
@@ -59,11 +58,15 @@ public class ViewStockDetailServiceImpl implements IViewStockDetailService
|
||||
if (first.isPresent()){
|
||||
//二联合普通人员
|
||||
viewStockDetail.setWarehouseId("02");
|
||||
viewStockDetail.setModel(SecurityUtils.getDeptId().toString());
|
||||
|
||||
}
|
||||
Optional<SysRole> first1 = roles.stream().filter(x -> "role2".equals(x.getRoleKey())).findFirst();
|
||||
if (first1.isPresent()){
|
||||
//三联合普通人员
|
||||
viewStockDetail.setWarehouseId("01");
|
||||
viewStockDetail.setModel(SecurityUtils.getDeptId().toString());
|
||||
|
||||
}
|
||||
Optional<SysRole> first2 = roles.stream().filter(x -> "role3".equals(x.getRoleKey())).findFirst();
|
||||
if (first2.isPresent()){
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.ruoyi.search.traycodeStatic.controller;
|
||||
|
||||
import java.util.List;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.search.traycodeStatic.domain.ViewTraycodeStatic;
|
||||
import com.ruoyi.search.traycodeStatic.service.IViewTraycodeStaticService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 托盘统计Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-23
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/search/traycodeStatic")
|
||||
public class ViewTraycodeStaticController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IViewTraycodeStaticService viewTraycodeStaticService;
|
||||
|
||||
/**
|
||||
* 查询托盘统计列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('search:traycodeStatic:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ViewTraycodeStatic viewTraycodeStatic)
|
||||
{
|
||||
startPage();
|
||||
List<ViewTraycodeStatic> list = viewTraycodeStaticService.selectViewTraycodeStaticList(viewTraycodeStatic);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出托盘统计列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('search:traycodeStatic:export')")
|
||||
@Log(title = "托盘统计", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, ViewTraycodeStatic viewTraycodeStatic)
|
||||
{
|
||||
List<ViewTraycodeStatic> list = viewTraycodeStaticService.selectViewTraycodeStaticList(viewTraycodeStatic);
|
||||
ExcelUtil<ViewTraycodeStatic> util = new ExcelUtil<ViewTraycodeStatic>(ViewTraycodeStatic.class);
|
||||
util.exportExcel(response, list, "托盘统计数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取托盘统计详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('search:traycodeStatic:query')")
|
||||
@GetMapping(value = "/{warehouseId}")
|
||||
public AjaxResult getInfo(@PathVariable("warehouseId") String warehouseId)
|
||||
{
|
||||
return success(viewTraycodeStaticService.selectViewTraycodeStaticByWarehouseId(warehouseId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增托盘统计
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('search:traycodeStatic:add')")
|
||||
@Log(title = "托盘统计", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ViewTraycodeStatic viewTraycodeStatic)
|
||||
{
|
||||
return toAjax(viewTraycodeStaticService.insertViewTraycodeStatic(viewTraycodeStatic));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改托盘统计
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('search:traycodeStatic:edit')")
|
||||
@Log(title = "托盘统计", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ViewTraycodeStatic viewTraycodeStatic)
|
||||
{
|
||||
return toAjax(viewTraycodeStaticService.updateViewTraycodeStatic(viewTraycodeStatic));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除托盘统计
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('search:traycodeStatic:remove')")
|
||||
@Log(title = "托盘统计", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{warehouseIds}")
|
||||
public AjaxResult remove(@PathVariable String[] warehouseIds)
|
||||
{
|
||||
return toAjax(viewTraycodeStaticService.deleteViewTraycodeStaticByWarehouseIds(warehouseIds));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,203 @@
|
||||
package com.ruoyi.search.traycodeStatic.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 托盘统计对象 view_traycode_static
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-23
|
||||
*/
|
||||
public class ViewTraycodeStatic extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 仓库编码 */
|
||||
@Excel(name = "仓库编码")
|
||||
private String warehouseId;
|
||||
|
||||
/** 仓库名称 */
|
||||
@Excel(name = "仓库名称")
|
||||
private String warehouseName;
|
||||
|
||||
/** 货位编码 */
|
||||
@Excel(name = "货位编码")
|
||||
private String cargoSpaceId;
|
||||
|
||||
/** 货位名称 */
|
||||
@Excel(name = "货位名称")
|
||||
private String cargoSpaceName;
|
||||
|
||||
/** 巷道 */
|
||||
@Excel(name = "巷道")
|
||||
private String roadwayId;
|
||||
|
||||
/** 排 */
|
||||
@Excel(name = "排")
|
||||
private Long thePlatoon;
|
||||
|
||||
/** 列 */
|
||||
@Excel(name = "列")
|
||||
private Long theColumn;
|
||||
|
||||
/** 层 */
|
||||
@Excel(name = "层")
|
||||
private Long theFloor;
|
||||
|
||||
/** 托盘号 */
|
||||
@Excel(name = "托盘号")
|
||||
private String trayCode;
|
||||
|
||||
/** 部门 */
|
||||
@Excel(name = "部门")
|
||||
private String model;
|
||||
|
||||
/** 部门名称 */
|
||||
@Excel(name = "部门名称")
|
||||
private String deptName;
|
||||
|
||||
/** 入库时间 */
|
||||
@Excel(name = "入库时间")
|
||||
private String inDate;
|
||||
|
||||
public void setWarehouseId(String warehouseId)
|
||||
{
|
||||
this.warehouseId = warehouseId;
|
||||
}
|
||||
|
||||
public String getWarehouseId()
|
||||
{
|
||||
return warehouseId;
|
||||
}
|
||||
|
||||
public void setWarehouseName(String warehouseName)
|
||||
{
|
||||
this.warehouseName = warehouseName;
|
||||
}
|
||||
|
||||
public String getWarehouseName()
|
||||
{
|
||||
return warehouseName;
|
||||
}
|
||||
|
||||
public void setCargoSpaceId(String cargoSpaceId)
|
||||
{
|
||||
this.cargoSpaceId = cargoSpaceId;
|
||||
}
|
||||
|
||||
public String getCargoSpaceId()
|
||||
{
|
||||
return cargoSpaceId;
|
||||
}
|
||||
|
||||
public void setCargoSpaceName(String cargoSpaceName)
|
||||
{
|
||||
this.cargoSpaceName = cargoSpaceName;
|
||||
}
|
||||
|
||||
public String getCargoSpaceName()
|
||||
{
|
||||
return cargoSpaceName;
|
||||
}
|
||||
|
||||
public void setRoadwayId(String roadwayId)
|
||||
{
|
||||
this.roadwayId = roadwayId;
|
||||
}
|
||||
|
||||
public String getRoadwayId()
|
||||
{
|
||||
return roadwayId;
|
||||
}
|
||||
|
||||
public void setThePlatoon(Long thePlatoon)
|
||||
{
|
||||
this.thePlatoon = thePlatoon;
|
||||
}
|
||||
|
||||
public Long getThePlatoon()
|
||||
{
|
||||
return thePlatoon;
|
||||
}
|
||||
|
||||
public void setTheColumn(Long theColumn)
|
||||
{
|
||||
this.theColumn = theColumn;
|
||||
}
|
||||
|
||||
public Long getTheColumn()
|
||||
{
|
||||
return theColumn;
|
||||
}
|
||||
|
||||
public void setTheFloor(Long theFloor)
|
||||
{
|
||||
this.theFloor = theFloor;
|
||||
}
|
||||
|
||||
public Long getTheFloor()
|
||||
{
|
||||
return theFloor;
|
||||
}
|
||||
|
||||
public void setTrayCode(String trayCode)
|
||||
{
|
||||
this.trayCode = trayCode;
|
||||
}
|
||||
|
||||
public String getTrayCode()
|
||||
{
|
||||
return trayCode;
|
||||
}
|
||||
|
||||
public void setModel(String model)
|
||||
{
|
||||
this.model = model;
|
||||
}
|
||||
|
||||
public String getModel()
|
||||
{
|
||||
return model;
|
||||
}
|
||||
|
||||
public void setDeptName(String deptName)
|
||||
{
|
||||
this.deptName = deptName;
|
||||
}
|
||||
|
||||
public String getDeptName()
|
||||
{
|
||||
return deptName;
|
||||
}
|
||||
|
||||
public void setInDate(String inDate)
|
||||
{
|
||||
this.inDate = inDate;
|
||||
}
|
||||
|
||||
public String getInDate()
|
||||
{
|
||||
return inDate;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("warehouseId", getWarehouseId())
|
||||
.append("warehouseName", getWarehouseName())
|
||||
.append("cargoSpaceId", getCargoSpaceId())
|
||||
.append("cargoSpaceName", getCargoSpaceName())
|
||||
.append("roadwayId", getRoadwayId())
|
||||
.append("thePlatoon", getThePlatoon())
|
||||
.append("theColumn", getTheColumn())
|
||||
.append("theFloor", getTheFloor())
|
||||
.append("trayCode", getTrayCode())
|
||||
.append("model", getModel())
|
||||
.append("deptName", getDeptName())
|
||||
.append("inDate", getInDate())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.search.traycodeStatic.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.search.traycodeStatic.domain.ViewTraycodeStatic;
|
||||
|
||||
/**
|
||||
* 托盘统计Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-23
|
||||
*/
|
||||
public interface ViewTraycodeStaticMapper
|
||||
{
|
||||
/**
|
||||
* 查询托盘统计
|
||||
*
|
||||
* @param warehouseId 托盘统计主键
|
||||
* @return 托盘统计
|
||||
*/
|
||||
public ViewTraycodeStatic selectViewTraycodeStaticByWarehouseId(String warehouseId);
|
||||
|
||||
/**
|
||||
* 查询托盘统计列表
|
||||
*
|
||||
* @param viewTraycodeStatic 托盘统计
|
||||
* @return 托盘统计集合
|
||||
*/
|
||||
public List<ViewTraycodeStatic> selectViewTraycodeStaticList(ViewTraycodeStatic viewTraycodeStatic);
|
||||
|
||||
/**
|
||||
* 新增托盘统计
|
||||
*
|
||||
* @param viewTraycodeStatic 托盘统计
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertViewTraycodeStatic(ViewTraycodeStatic viewTraycodeStatic);
|
||||
|
||||
/**
|
||||
* 修改托盘统计
|
||||
*
|
||||
* @param viewTraycodeStatic 托盘统计
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateViewTraycodeStatic(ViewTraycodeStatic viewTraycodeStatic);
|
||||
|
||||
/**
|
||||
* 删除托盘统计
|
||||
*
|
||||
* @param warehouseId 托盘统计主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteViewTraycodeStaticByWarehouseId(String warehouseId);
|
||||
|
||||
/**
|
||||
* 批量删除托盘统计
|
||||
*
|
||||
* @param warehouseIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteViewTraycodeStaticByWarehouseIds(String[] warehouseIds);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.search.traycodeStatic.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.search.traycodeStatic.domain.ViewTraycodeStatic;
|
||||
|
||||
/**
|
||||
* 托盘统计Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-23
|
||||
*/
|
||||
public interface IViewTraycodeStaticService
|
||||
{
|
||||
/**
|
||||
* 查询托盘统计
|
||||
*
|
||||
* @param warehouseId 托盘统计主键
|
||||
* @return 托盘统计
|
||||
*/
|
||||
public ViewTraycodeStatic selectViewTraycodeStaticByWarehouseId(String warehouseId);
|
||||
|
||||
/**
|
||||
* 查询托盘统计列表
|
||||
*
|
||||
* @param viewTraycodeStatic 托盘统计
|
||||
* @return 托盘统计集合
|
||||
*/
|
||||
public List<ViewTraycodeStatic> selectViewTraycodeStaticList(ViewTraycodeStatic viewTraycodeStatic);
|
||||
|
||||
/**
|
||||
* 新增托盘统计
|
||||
*
|
||||
* @param viewTraycodeStatic 托盘统计
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertViewTraycodeStatic(ViewTraycodeStatic viewTraycodeStatic);
|
||||
|
||||
/**
|
||||
* 修改托盘统计
|
||||
*
|
||||
* @param viewTraycodeStatic 托盘统计
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateViewTraycodeStatic(ViewTraycodeStatic viewTraycodeStatic);
|
||||
|
||||
/**
|
||||
* 批量删除托盘统计
|
||||
*
|
||||
* @param warehouseIds 需要删除的托盘统计主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteViewTraycodeStaticByWarehouseIds(String[] warehouseIds);
|
||||
|
||||
/**
|
||||
* 删除托盘统计信息
|
||||
*
|
||||
* @param warehouseId 托盘统计主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteViewTraycodeStaticByWarehouseId(String warehouseId);
|
||||
}
|
||||
@@ -0,0 +1,130 @@
|
||||
package com.ruoyi.search.traycodeStatic.service.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.ruoyi.common.core.domain.entity.SysRole;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.search.traycodeStatic.mapper.ViewTraycodeStaticMapper;
|
||||
import com.ruoyi.search.traycodeStatic.domain.ViewTraycodeStatic;
|
||||
import com.ruoyi.search.traycodeStatic.service.IViewTraycodeStaticService;
|
||||
|
||||
/**
|
||||
* 托盘统计Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-23
|
||||
*/
|
||||
@Service
|
||||
public class ViewTraycodeStaticServiceImpl implements IViewTraycodeStaticService
|
||||
{
|
||||
@Autowired
|
||||
private ViewTraycodeStaticMapper viewTraycodeStaticMapper;
|
||||
|
||||
/**
|
||||
* 查询托盘统计
|
||||
*
|
||||
* @param warehouseId 托盘统计主键
|
||||
* @return 托盘统计
|
||||
*/
|
||||
@Override
|
||||
public ViewTraycodeStatic selectViewTraycodeStaticByWarehouseId(String warehouseId)
|
||||
{
|
||||
return viewTraycodeStaticMapper.selectViewTraycodeStaticByWarehouseId(warehouseId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询托盘统计列表
|
||||
*
|
||||
* @param viewTraycodeStatic 托盘统计
|
||||
* @return 托盘统计
|
||||
*/
|
||||
@Override
|
||||
public List<ViewTraycodeStatic> selectViewTraycodeStaticList(ViewTraycodeStatic viewTraycodeStatic)
|
||||
{
|
||||
if (!"admin".equals(SecurityUtils.getUsername())){
|
||||
List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
|
||||
if (CollUtil.isEmpty(roles)) {
|
||||
//如果未设置角色 ,直接返回空列表
|
||||
return new ArrayList<>();
|
||||
}
|
||||
Optional<SysRole> first = roles.stream().filter(x -> "role1".equals(x.getRoleKey())).findFirst();
|
||||
if (first.isPresent()){
|
||||
//二联合普通人员
|
||||
viewTraycodeStatic.setWarehouseId("02");
|
||||
viewTraycodeStatic.setModel(SecurityUtils.getDeptId().toString());
|
||||
|
||||
}
|
||||
Optional<SysRole> first1 = roles.stream().filter(x -> "role2".equals(x.getRoleKey())).findFirst();
|
||||
if (first1.isPresent()){
|
||||
//三联合普通人员
|
||||
viewTraycodeStatic.setWarehouseId("01");
|
||||
viewTraycodeStatic.setModel(SecurityUtils.getDeptId().toString());
|
||||
|
||||
}
|
||||
Optional<SysRole> first2 = roles.stream().filter(x -> "role3".equals(x.getRoleKey())).findFirst();
|
||||
if (first2.isPresent()){
|
||||
//二联合管理员
|
||||
viewTraycodeStatic.setWarehouseId("02");
|
||||
}
|
||||
Optional<SysRole> first3 = roles.stream().filter(x -> "role4".equals(x.getRoleKey())).findFirst();
|
||||
if (first3.isPresent()){
|
||||
//三联合管理员
|
||||
viewTraycodeStatic.setWarehouseId("01");
|
||||
}
|
||||
}
|
||||
return viewTraycodeStaticMapper.selectViewTraycodeStaticList(viewTraycodeStatic);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增托盘统计
|
||||
*
|
||||
* @param viewTraycodeStatic 托盘统计
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertViewTraycodeStatic(ViewTraycodeStatic viewTraycodeStatic)
|
||||
{
|
||||
return viewTraycodeStaticMapper.insertViewTraycodeStatic(viewTraycodeStatic);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改托盘统计
|
||||
*
|
||||
* @param viewTraycodeStatic 托盘统计
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateViewTraycodeStatic(ViewTraycodeStatic viewTraycodeStatic)
|
||||
{
|
||||
return viewTraycodeStaticMapper.updateViewTraycodeStatic(viewTraycodeStatic);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除托盘统计
|
||||
*
|
||||
* @param warehouseIds 需要删除的托盘统计主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteViewTraycodeStaticByWarehouseIds(String[] warehouseIds)
|
||||
{
|
||||
return viewTraycodeStaticMapper.deleteViewTraycodeStaticByWarehouseIds(warehouseIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除托盘统计信息
|
||||
*
|
||||
* @param warehouseId 托盘统计主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteViewTraycodeStaticByWarehouseId(String warehouseId)
|
||||
{
|
||||
return viewTraycodeStaticMapper.deleteViewTraycodeStaticByWarehouseId(warehouseId);
|
||||
}
|
||||
}
|
||||
@@ -20,4 +20,5 @@ public class BasStockSummary {
|
||||
private String theFloor;
|
||||
private String theType;
|
||||
private String theTypeName;
|
||||
private String issDouble;
|
||||
}
|
||||
|
||||
@@ -73,4 +73,6 @@ public interface BasStockMapper
|
||||
List<BasStockSummary> selectBasStockSummary(BasStock basStock);
|
||||
|
||||
int updateBasStockDept(BasStock basStock);
|
||||
|
||||
int selectCountByTrayCodeAndWarehouseId(String trayCode, String warehouseId);
|
||||
}
|
||||
|
||||
@@ -1,14 +1,17 @@
|
||||
package com.ruoyi.stock.stock.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.ruoyi.bas.basJobId.service.IBasJobIdService;
|
||||
import com.ruoyi.bas.cargoSpace.service.IBasCargoSpaceService;
|
||||
import com.ruoyi.common.annotation.DataScope;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.entity.SysRole;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.in.stockindetail.domain.InStockinDetail;
|
||||
import com.ruoyi.in.stockindetail.service.IInStockinDetailService;
|
||||
import com.ruoyi.stock.freeze.domain.BasStockFreezeRecord;
|
||||
import com.ruoyi.stock.freeze.service.IBasStockFreezeRecordService;
|
||||
import com.ruoyi.stock.maintain.domain.BasStockMaintainRecord;
|
||||
@@ -21,6 +24,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
@@ -45,6 +49,8 @@ public class BasStockServiceImpl implements IBasStockService
|
||||
private IBasCargoSpaceService basCargoSpaceService;
|
||||
@Autowired
|
||||
private IBasJobIdService basJobIdService;
|
||||
@Autowired
|
||||
private IInStockinDetailService stockinDetailService;
|
||||
|
||||
/**
|
||||
* 查询库存信息
|
||||
@@ -91,6 +97,7 @@ public class BasStockServiceImpl implements IBasStockService
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public AjaxResult insertBasStock(BasStock basStock)
|
||||
{
|
||||
if (!"admin".equals(SecurityUtils.getUsername())) {
|
||||
@@ -110,7 +117,33 @@ public class BasStockServiceImpl implements IBasStockService
|
||||
basStock.setModel(SecurityUtils.getDeptId().toString());
|
||||
basStock.setProductStatus("1");
|
||||
basStock.setInDate(DateUtil.formatDateTime(new Date()));
|
||||
int i =basStockMapper.insertBasStock(basStock);
|
||||
if (StrUtil.isNotEmpty(basStock.getStockinDetailId())) {
|
||||
InStockinDetail inStockinDetail = stockinDetailService.selectInStockinDetailByStockinDetailId(basStock.getStockinDetailId());
|
||||
if (inStockinDetail != null) {
|
||||
BigDecimal scanNum = Convert.toBigDecimal(inStockinDetail.getScanNum());
|
||||
BigDecimal assignNum = Convert.toBigDecimal(inStockinDetail.getAssignNum());
|
||||
inStockinDetail.setScanNum(Convert.toStr(scanNum.add(Convert.toBigDecimal(basStock.getQuantity()))));
|
||||
inStockinDetail.setAssignNum(Convert.toStr(assignNum.add(Convert.toBigDecimal(basStock.getQuantity()))));
|
||||
stockinDetailService.updateInStockinDetail(inStockinDetail);
|
||||
}
|
||||
}
|
||||
BasStock param = new BasStock();
|
||||
param.setWarehouseId(basStock.getWarehouseId());
|
||||
param.setTrayCode(basStock.getTrayCode());
|
||||
param.setProductId(basStock.getProductId());
|
||||
param.setOrderId(basStock.getOrderId());
|
||||
param.setPower(basStock.getPower());
|
||||
param.setDistribution(basStock.getDistribution());
|
||||
param.setSpare5(basStock.getSpare5());
|
||||
List<BasStock> basStocks = basStockMapper.selectBasStockList(param);
|
||||
int i = 0;
|
||||
if (CollUtil.isNotEmpty(basStocks)) {
|
||||
BasStock oldStock = basStocks.get(0);
|
||||
oldStock.setQuantity(Convert.toBigDecimal(oldStock.getQuantity()).add(Convert.toBigDecimal(basStock.getQuantity())).toString());
|
||||
i = basStockMapper.updateBasStock(oldStock);
|
||||
} else {
|
||||
i = basStockMapper.insertBasStock(basStock);
|
||||
}
|
||||
if (i > 0){
|
||||
return AjaxResult.success();
|
||||
}else {
|
||||
@@ -202,6 +235,22 @@ public class BasStockServiceImpl implements IBasStockService
|
||||
BasStock oldBasStock = basStockMapper.selectBasStockByStockId(basStock.getStockId());
|
||||
insertMaintainRecord(oldBasStock,basStock,"2");
|
||||
insertFreezeRecord(oldBasStock,basStock);
|
||||
String stockinDetailId = oldBasStock.getStockinDetailId();
|
||||
if (StrUtil.isNotEmpty(stockinDetailId)){
|
||||
InStockinDetail inStockinDetail = stockinDetailService.selectInStockinDetailByStockinDetailId(basStock.getStockinDetailId());
|
||||
if (inStockinDetail != null){
|
||||
BigDecimal scanNum = Convert.toBigDecimal(inStockinDetail.getScanNum());
|
||||
BigDecimal assignNum = Convert.toBigDecimal(inStockinDetail.getAssignNum());
|
||||
BigDecimal oldQuantity = Convert.toBigDecimal(oldBasStock.getQuantity());
|
||||
BigDecimal newQuantity = Convert.toBigDecimal(basStock.getQuantity());
|
||||
BigDecimal subtract = newQuantity.subtract(oldQuantity);
|
||||
BigDecimal newAssignNum = assignNum.subtract(subtract);
|
||||
BigDecimal newScanNum = scanNum.subtract(subtract);
|
||||
inStockinDetail.setScanNum(newScanNum.toString());
|
||||
inStockinDetail.setAssignNum(newAssignNum.toString());
|
||||
stockinDetailService.updateInStockinDetail(inStockinDetail);
|
||||
}
|
||||
}
|
||||
int i = basStockMapper.updateBasStock(basStock);
|
||||
if (i > 0){
|
||||
return AjaxResult.success();
|
||||
@@ -257,15 +306,33 @@ public class BasStockServiceImpl implements IBasStockService
|
||||
}
|
||||
}
|
||||
|
||||
String warehouseId = "";
|
||||
String trayCode = "";
|
||||
for (String stockId : stockIds) {
|
||||
BasStock oldBasStock = basStockMapper.selectBasStockByStockId(stockId);
|
||||
insertMaintainRecord(oldBasStock,oldBasStock,"3");
|
||||
basStockMapper.deleteBasStockByStockId(stockId);
|
||||
warehouseId = oldBasStock.getWarehouseId();
|
||||
trayCode = oldBasStock.getTrayCode();
|
||||
//判断是否是最后一件货物
|
||||
int count = basStockMapper.selectCountByTrayCodeAndWarehouseId(trayCode, warehouseId);
|
||||
if (count == 0){
|
||||
BasStock ktpStock = new BasStock();
|
||||
ktpStock.setStockId(basJobIdService.getJobId("KC"));
|
||||
ktpStock.setCargoSpaceId(oldBasStock.getCargoSpaceId());
|
||||
ktpStock.setStockStatus("1");
|
||||
ktpStock.setProductStatus("1");
|
||||
ktpStock.setProductGuid("KTP0001");
|
||||
ktpStock.setQuantity("1");
|
||||
ktpStock.setTrayCode(oldBasStock.getTrayCode());
|
||||
ktpStock.setOutQuantity("0");
|
||||
ktpStock.setWarehouseId(oldBasStock.getWarehouseId());
|
||||
ktpStock.setProductId("KTP0001");
|
||||
ktpStock.setModel(oldBasStock.getModel());
|
||||
basStockMapper.insertBasStock(ktpStock);
|
||||
}
|
||||
}
|
||||
int i = basStockMapper.deleteBasStockByStockIds(stockIds);
|
||||
if (i > 0){
|
||||
return AjaxResult.success();
|
||||
}
|
||||
return AjaxResult.error();
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -184,7 +184,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
and locked = 'N'
|
||||
and warehouse_id = #{warehouseId}
|
||||
and roadway_id = #{roadwayId}
|
||||
and cargo_hight = #{cargoHight}
|
||||
<if test="cargoHight !=null and cargoHight != ''">and cargo_hight = #{cargoHight}</if>"
|
||||
<if test="thePlatoon != null">and the_platoon = #{thePlatoon}</if>
|
||||
<if test="rule1 != null and theFloor != null">and the_floor < #{theFloor}</if>
|
||||
<if test="rule2 != null and theFloor != null">and the_floor >= #{theFloor}</if>
|
||||
|
||||
@@ -57,7 +57,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<sql id="selectInStockinDetailVo">
|
||||
select
|
||||
isd.stockin_detail_id, isd.stockin_guid, isd.stockin_id, isd.lot_no, isd.product_guid,
|
||||
isd.product_id, isd.quantity, isd.quantity_x, isd.quantity_j, isd.price, bp.cargo_no, isd.remark,
|
||||
isd.product_id, isd.quantity, (CAST(isd.quantity AS INT) - CAST(isd.scan_num AS INT)) as quantity_x, isd.quantity_j, isd.price, bp.cargo_no, isd.remark,
|
||||
isd.assign_num, isd.assign_num_x, isd.assign_num_j, isd.print_date, isd.stock_status,
|
||||
isd.supplier_id, isd.customer_id, bp.unit, bp.spec, isd.spare1, isd.spare2, isd.spare3, isd.spare4,
|
||||
isd.spare5, isd.spare6, isd.scan_num, isd.scan_num_x, isd.scan_num_j,
|
||||
@@ -94,8 +94,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="spare2 != null and spare2 != ''"> and isd.spare2 = #{spare2}</if>
|
||||
<if test="spare3 != null and spare3 != ''"> and isd.spare3 = #{spare3}</if>
|
||||
<if test="spare4 != null and spare4 != ''"> and isd.spare4 = #{spare4}</if>
|
||||
<if test="spare5 != null and spare5 != ''"> and isd.spare5 = #{spare5}</if>
|
||||
<if test="spare6 != null and spare6 != ''"> and isd.spare6 = #{spare6}</if>
|
||||
<if test="spare5 != null and spare5 != ''"> and isd.spare5 like concat('%',#{spare5},'%') </if>
|
||||
<if test="spare6 != null and spare6 != ''"> and isd.spare6 like concat('%',#{spare6},'%') </if>
|
||||
<if test="spare7 != null and spare7 != ''"> and isd.spare7 like concat('%',#{spare7},'%') </if>
|
||||
<if test="spare9 != null and spare9 != ''"> and isd.spare9 like concat('%',#{spare9},'%') </if>
|
||||
<if test="scanNum != null and scanNum != ''"> and isd.scan_num = #{scanNum}</if>
|
||||
<if test="scanNumX != null and scanNumX != ''"> and isd.scan_num_x = #{scanNumX}</if>
|
||||
<if test="scanNumJ != null and scanNumJ != ''"> and isd.scan_num_j = #{scanNumJ}</if>
|
||||
|
||||
@@ -142,6 +142,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</if>
|
||||
<if test="dateStart != null and dateStart != ''"> and mj.create_time >= #{dateStart}</if>
|
||||
<if test="dateEnd != null and dateEnd != ''"> and mj.create_time <= #{dateEnd}</if>
|
||||
<if test="warehouseIdList != null and warehouseIdList.size() > 0">
|
||||
and bs.warehouse_id in
|
||||
<foreach collection="warehouseIdList" open="(" close=")" item="it" separator=",">
|
||||
#{it}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
|
||||
${params.warehouseDataScope}
|
||||
</if>
|
||||
|
||||
@@ -48,6 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="roadwayId" column="roadway_id" />
|
||||
<result property="theType" column="the_type" />
|
||||
<result property="theTypeName" column="the_type_name" />
|
||||
<result property="deptName" column="dept_name" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectViewHandAllotStockVo">
|
||||
@@ -56,7 +57,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
the_column,
|
||||
the_floor,
|
||||
the_type,
|
||||
the_type_name from view_hand_allot_stock vhat
|
||||
the_type_name,dept_name from view_hand_allot_stock vhat
|
||||
</sql>
|
||||
|
||||
<select id="selectViewHandAllotStockList" parameterType="ViewHandAllotStock" resultMap="ViewHandAllotStockResult">
|
||||
|
||||
@@ -99,8 +99,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
|
||||
${params.warehouseDataScope}
|
||||
</if>
|
||||
order by create_time asc
|
||||
</where>
|
||||
order by create_time asc
|
||||
</select>
|
||||
|
||||
<select id="selectViewInJobFlowByJobDetailId" parameterType="String" resultMap="ViewInJobFlowResult">
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.search.traycodeStatic.mapper.ViewTraycodeStaticMapper">
|
||||
|
||||
<resultMap type="ViewTraycodeStatic" id="ViewTraycodeStaticResult">
|
||||
<result property="warehouseId" column="warehouse_id" />
|
||||
<result property="warehouseName" column="warehouse_name" />
|
||||
<result property="cargoSpaceId" column="cargo_space_id" />
|
||||
<result property="cargoSpaceName" column="cargo_space_name" />
|
||||
<result property="roadwayId" column="roadway_id" />
|
||||
<result property="thePlatoon" column="the_platoon" />
|
||||
<result property="theColumn" column="the_column" />
|
||||
<result property="theFloor" column="the_floor" />
|
||||
<result property="trayCode" column="tray_code" />
|
||||
<result property="model" column="model" />
|
||||
<result property="deptName" column="dept_name" />
|
||||
<result property="inDate" column="in_date" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectViewTraycodeStaticVo">
|
||||
select warehouse_id, warehouse_name, cargo_space_id, cargo_space_name, roadway_id, the_platoon, the_column, the_floor, tray_code, model, dept_name, in_date from view_traycode_static
|
||||
</sql>
|
||||
|
||||
<select id="selectViewTraycodeStaticList" parameterType="ViewTraycodeStatic" resultMap="ViewTraycodeStaticResult">
|
||||
<include refid="selectViewTraycodeStaticVo"/>
|
||||
<where>
|
||||
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
|
||||
<if test="warehouseName != null and warehouseName != ''"> and warehouse_name like concat('%', #{warehouseName}, '%')</if>
|
||||
<if test="cargoSpaceId != null and cargoSpaceId != ''"> and cargo_space_id = #{cargoSpaceId}</if>
|
||||
<if test="cargoSpaceName != null and cargoSpaceName != ''"> and cargo_space_name like concat('%', #{cargoSpaceName}, '%')</if>
|
||||
<if test="roadwayId != null and roadwayId != ''"> and roadway_id = #{roadwayId}</if>
|
||||
<if test="thePlatoon != null "> and the_platoon = #{thePlatoon}</if>
|
||||
<if test="theColumn != null "> and the_column = #{theColumn}</if>
|
||||
<if test="theFloor != null "> and the_floor = #{theFloor}</if>
|
||||
<if test="trayCode != null and trayCode != ''"> and tray_code = #{trayCode}</if>
|
||||
<if test="model != null and model != ''"> and model = #{model}</if>
|
||||
<if test="deptName != null and deptName != ''"> and dept_name like concat('%', #{deptName}, '%')</if>
|
||||
<if test="inDate != null and inDate != ''"> and in_date = #{inDate}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectViewTraycodeStaticByWarehouseId" parameterType="String" resultMap="ViewTraycodeStaticResult">
|
||||
<include refid="selectViewTraycodeStaticVo"/>
|
||||
where warehouse_id = #{warehouseId}
|
||||
</select>
|
||||
|
||||
<insert id="insertViewTraycodeStatic" parameterType="ViewTraycodeStatic">
|
||||
insert into view_traycode_static
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="warehouseId != null">warehouse_id,</if>
|
||||
<if test="warehouseName != null">warehouse_name,</if>
|
||||
<if test="cargoSpaceId != null">cargo_space_id,</if>
|
||||
<if test="cargoSpaceName != null">cargo_space_name,</if>
|
||||
<if test="roadwayId != null">roadway_id,</if>
|
||||
<if test="thePlatoon != null">the_platoon,</if>
|
||||
<if test="theColumn != null">the_column,</if>
|
||||
<if test="theFloor != null">the_floor,</if>
|
||||
<if test="trayCode != null">tray_code,</if>
|
||||
<if test="model != null">model,</if>
|
||||
<if test="deptName != null">dept_name,</if>
|
||||
<if test="inDate != null">in_date,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="warehouseId != null">#{warehouseId},</if>
|
||||
<if test="warehouseName != null">#{warehouseName},</if>
|
||||
<if test="cargoSpaceId != null">#{cargoSpaceId},</if>
|
||||
<if test="cargoSpaceName != null">#{cargoSpaceName},</if>
|
||||
<if test="roadwayId != null">#{roadwayId},</if>
|
||||
<if test="thePlatoon != null">#{thePlatoon},</if>
|
||||
<if test="theColumn != null">#{theColumn},</if>
|
||||
<if test="theFloor != null">#{theFloor},</if>
|
||||
<if test="trayCode != null">#{trayCode},</if>
|
||||
<if test="model != null">#{model},</if>
|
||||
<if test="deptName != null">#{deptName},</if>
|
||||
<if test="inDate != null">#{inDate},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateViewTraycodeStatic" parameterType="ViewTraycodeStatic">
|
||||
update view_traycode_static
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="warehouseName != null">warehouse_name = #{warehouseName},</if>
|
||||
<if test="cargoSpaceId != null">cargo_space_id = #{cargoSpaceId},</if>
|
||||
<if test="cargoSpaceName != null">cargo_space_name = #{cargoSpaceName},</if>
|
||||
<if test="roadwayId != null">roadway_id = #{roadwayId},</if>
|
||||
<if test="thePlatoon != null">the_platoon = #{thePlatoon},</if>
|
||||
<if test="theColumn != null">the_column = #{theColumn},</if>
|
||||
<if test="theFloor != null">the_floor = #{theFloor},</if>
|
||||
<if test="trayCode != null">tray_code = #{trayCode},</if>
|
||||
<if test="model != null">model = #{model},</if>
|
||||
<if test="deptName != null">dept_name = #{deptName},</if>
|
||||
<if test="inDate != null">in_date = #{inDate},</if>
|
||||
</trim>
|
||||
where warehouse_id = #{warehouseId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteViewTraycodeStaticByWarehouseId" parameterType="String">
|
||||
delete from view_traycode_static where warehouse_id = #{warehouseId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteViewTraycodeStaticByWarehouseIds" parameterType="String">
|
||||
delete from view_traycode_static where warehouse_id in
|
||||
<foreach item="warehouseId" collection="array" open="(" separator="," close=")">
|
||||
#{warehouseId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -349,6 +349,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
from bas_stock bs
|
||||
left join bas_cargo_space bcs on bs.cargo_space_id = bcs.cargo_space_id and bs.tray_code = bcs.tray_code
|
||||
left join bas_warehouse bw on bcs.warehouse_id = bw.warehouse_id
|
||||
left join bas_product bp on bs.product_id = bp.product_id
|
||||
WHERE bcs.status = '2'
|
||||
<if test="model != null and model != ''">
|
||||
and (bs.model = #{model} or bs.model is null or bs.model = '')
|
||||
@@ -381,7 +382,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
and bs.power like concat('%',#{power},'%')
|
||||
</if>
|
||||
<if test="productName != null and productName != ''">
|
||||
and bs.product_name like concat('%',#{productName},'%')
|
||||
and bp.product_name like concat('%',#{productName},'%')
|
||||
</if>
|
||||
<if test="warehouseIdList != null and warehouseIdList.size() > 0">
|
||||
and bs.warehouse_id in
|
||||
@@ -392,4 +393,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
|
||||
</select>
|
||||
<select id="selectCountByTrayCodeAndWarehouseId" resultType="java.lang.Integer">
|
||||
select count(1) from bas_stock where tray_code = #{trayCode} and warehouse_id = #{warehouseId}
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
44
ruoyi-ui/src/api/search/traycodeStatic.js
Normal file
44
ruoyi-ui/src/api/search/traycodeStatic.js
Normal file
@@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询托盘统计列表
|
||||
export function listTraycodeStatic(query) {
|
||||
return request({
|
||||
url: '/search/traycodeStatic/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询托盘统计详细
|
||||
export function getTraycodeStatic(warehouseId) {
|
||||
return request({
|
||||
url: '/search/traycodeStatic/' + warehouseId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增托盘统计
|
||||
export function addTraycodeStatic(data) {
|
||||
return request({
|
||||
url: '/search/traycodeStatic',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改托盘统计
|
||||
export function updateTraycodeStatic(data) {
|
||||
return request({
|
||||
url: '/search/traycodeStatic',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除托盘统计
|
||||
export function delTraycodeStatic(warehouseId) {
|
||||
return request({
|
||||
url: '/search/traycodeStatic/' + warehouseId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
@@ -108,7 +108,7 @@
|
||||
<dict-tag :options="dict.type.mydo_job_status" :value="scope.row.status"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="任务类型" align="left" prop="inOrOut">
|
||||
<el-table-column label="任务类型" align="left" prop="inOrOut" width="120">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.in_job_type" :value="scope.row.inOrOut"/>
|
||||
</template>
|
||||
@@ -118,6 +118,7 @@
|
||||
<el-table-column label="货位" align="left" prop="cargoSpaceName" width="140" />
|
||||
<el-table-column label="重量" align="left" prop="lineId" />
|
||||
<el-table-column label="容量" align="left" prop="workshopId" />
|
||||
<el-table-column label="部门" align="left" prop="departmentName" />
|
||||
<el-table-column label="仓库" align="left" prop="warehouseName" />
|
||||
<el-table-column label="创建时间" align="left" prop="createTime" width="180"/>
|
||||
<el-table-column label="开始时间" align="left" prop="startTime" width="180"/>
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
<dict-tag :options="dict.type.on_line_type" :value="scope.row.onLineType"/>
|
||||
</template>
|
||||
</el-table-column>-->
|
||||
<el-table-column label="任务类型" align="left" prop="inOrOut"> <!-- 任务类型 -->
|
||||
<el-table-column label="任务类型" align="left" prop="inOrOut" width="120"> <!-- 任务类型 -->
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.out_job_type" :value="scope.row.inOrOut"/>
|
||||
</template>
|
||||
@@ -136,14 +136,14 @@
|
||||
<!-- <el-table-column :label="$t('outJobManagement.customerId')" align="left" prop="customerId" /> <!– 客户ID –>-->
|
||||
<el-table-column label="托盘码" align="left" prop="trayCode" /> <!-- 托盘码 -->
|
||||
<el-table-column label="巷道" align="left" prop="roadwayId" /> <!-- 巷道ID -->
|
||||
<el-table-column label="货位" align="left" prop="cargoSpaceName" /> <!-- 货位ID -->
|
||||
<el-table-column label="货位" align="left" prop="cargoSpaceName" width="120"/> <!-- 货位ID -->
|
||||
<!-- <el-table-column label="订单号" align="left" prop="lineId" /> <!– 结束时间 –>-->
|
||||
<el-table-column label="优先级" align="left" prop="priority" /> <!-- 优先级 -->
|
||||
<!-- <el-table-column label="执行阶段" align="left" prop="executionPhase"> <!– 执行阶段 –>-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <dict-tag :options="dict.type.execution_phase_type" :value="scope.row.executionPhase"/>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column label="执行阶段" align="left" prop="executionPhase"> <!-- 执行阶段 -->
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.execution_phase_type" :value="scope.row.executionPhase"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="仓库" align="left" prop="warehouseName" />
|
||||
<el-table-column label="出口" align="left" prop="exitId">
|
||||
@@ -151,6 +151,7 @@
|
||||
<dict-tag :options="dict.type.exit_type" :value="scope.row.exitId"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="部门" align="left" prop="departmentName" />
|
||||
<el-table-column label="创建时间" align="left" prop="createTime" width="160"/> <!-- 创建时间 -->
|
||||
<el-table-column label="开始时间" align="left" prop="startTime" width="160"/> <!-- 开始时间 -->
|
||||
<el-table-column label="结束时间" align="left" prop="finishTime" width="160"/> <!-- 结束时间 -->
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
<!-- 主表数据 -->
|
||||
<el-table v-loading="loading" :data="outStockoutList" @selection-change="handleSelectionChange" @row-click="handleRowClick" max-height="400">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="出库单编号" align="left" prop="stockoutId" /> <!-- 出库单编号 -->
|
||||
<el-table-column label="出库单编号" align="left" prop="stockoutId" width="160"/> <!-- 出库单编号 -->
|
||||
<!-- <el-table-column label="仓库" align="left" prop="warehouseName" /><!– 仓库名称 –>-->
|
||||
<el-table-column label="出库类型" align="left" prop="outType"> <!-- 出库类型 -->
|
||||
<template slot-scope="scope">
|
||||
@@ -146,9 +146,9 @@
|
||||
<!-- <el-table-column :label="'客户编码'" align="left" prop="customerNo" /><!– 客户编码 –>-->
|
||||
<!-- <el-table-column label="客户名称" align="left" prop="customerName" />-->
|
||||
<el-table-column label="建单人" align="left" prop="createManId" /> <!-- 建单人 -->
|
||||
<el-table-column label="创建时间" align="left" prop="createDate" /><!-- 创建时间 -->
|
||||
<el-table-column label="开始时间" align="left" prop="startDate" /><!-- 开始时间 -->
|
||||
<el-table-column label="确认时间" align="left" prop="finishDate" /> <!-- 确认时间 -->
|
||||
<el-table-column label="创建时间" align="left" prop="createDate" width="160"/><!-- 创建时间 -->
|
||||
<el-table-column label="开始时间" align="left" prop="startDate" width="160"/><!-- 开始时间 -->
|
||||
<el-table-column label="确认时间" align="left" prop="finishDate" width="160"/> <!-- 确认时间 -->
|
||||
<el-table-column label="备注" align="center" prop="remark" /> <!-- 备注 -->
|
||||
|
||||
</el-table>
|
||||
|
||||
@@ -291,7 +291,7 @@
|
||||
<el-table-column label="仓库名称" align="center" prop="warehouseName"/>
|
||||
<el-table-column label="库存编码" align="center" prop="stockId" width="160"/>
|
||||
<el-table-column label="库位编码" align="center" prop="cargoSpaceId" width="160"/>
|
||||
<el-table-column label="托盘" align="center" prop="trayCode"/>
|
||||
<el-table-column label="托盘" align="center" prop="trayCode" width="120"/>
|
||||
<el-table-column label="库存状态" align="center" prop="stockStatus" >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.stock_status" :value="scope.row.stockStatus"/>
|
||||
|
||||
348
ruoyi-ui/src/views/search/traycodeStatic/index.vue
Normal file
348
ruoyi-ui/src/views/search/traycodeStatic/index.vue
Normal file
@@ -0,0 +1,348 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="仓库编码" prop="warehouseId">
|
||||
<el-input
|
||||
v-model="queryParams.warehouseId"
|
||||
placeholder="请输入仓库编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="仓库名称" prop="warehouseName">
|
||||
<el-input
|
||||
v-model="queryParams.warehouseName"
|
||||
placeholder="请输入仓库名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="货位编码" prop="cargoSpaceId">
|
||||
<el-input
|
||||
v-model="queryParams.cargoSpaceId"
|
||||
placeholder="请输入货位编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="货位名称" prop="cargoSpaceName">
|
||||
<el-input
|
||||
v-model="queryParams.cargoSpaceName"
|
||||
placeholder="请输入货位名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="巷道" prop="roadwayId">
|
||||
<el-input
|
||||
v-model="queryParams.roadwayId"
|
||||
placeholder="请输入巷道"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="排" prop="thePlatoon">
|
||||
<el-input
|
||||
v-model="queryParams.thePlatoon"
|
||||
placeholder="请输入排"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="列" prop="theColumn">
|
||||
<el-input
|
||||
v-model="queryParams.theColumn"
|
||||
placeholder="请输入列"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="层" prop="theFloor">
|
||||
<el-input
|
||||
v-model="queryParams.theFloor"
|
||||
placeholder="请输入层"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="托盘号" prop="trayCode">
|
||||
<el-input
|
||||
v-model="queryParams.trayCode"
|
||||
placeholder="请输入托盘号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="部门" prop="model">
|
||||
<el-input
|
||||
v-model="queryParams.model"
|
||||
placeholder="请输入部门"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="部门名称" prop="deptName">
|
||||
<el-input
|
||||
v-model="queryParams.deptName"
|
||||
placeholder="请输入部门名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="入库时间" prop="inDate">
|
||||
<el-input
|
||||
v-model="queryParams.inDate"
|
||||
placeholder="请输入入库时间"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['search:traycodeStatic:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="traycodeStaticList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="仓库编码" align="center" prop="warehouseId" />
|
||||
<el-table-column label="仓库名称" align="center" prop="warehouseName" />
|
||||
<el-table-column label="货位编码" align="center" prop="cargoSpaceId" />
|
||||
<el-table-column label="货位名称" align="center" prop="cargoSpaceName" />
|
||||
<el-table-column label="巷道" align="center" prop="roadwayId" />
|
||||
<el-table-column label="排" align="center" prop="thePlatoon" />
|
||||
<el-table-column label="列" align="center" prop="theColumn" />
|
||||
<el-table-column label="层" align="center" prop="theFloor" />
|
||||
<el-table-column label="托盘号" align="center" prop="trayCode" />
|
||||
<!-- <el-table-column label="部门" align="center" prop="model" />-->
|
||||
<el-table-column label="部门名称" align="center" prop="deptName" />
|
||||
<el-table-column label="入库时间" align="center" prop="inDate" width="160"/>
|
||||
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改托盘统计对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="仓库编码" prop="warehouseId">
|
||||
<el-input v-model="form.warehouseId" placeholder="请输入仓库编码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="仓库名称" prop="warehouseName">
|
||||
<el-input v-model="form.warehouseName" placeholder="请输入仓库名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="货位编码" prop="cargoSpaceId">
|
||||
<el-input v-model="form.cargoSpaceId" placeholder="请输入货位编码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="货位名称" prop="cargoSpaceName">
|
||||
<el-input v-model="form.cargoSpaceName" placeholder="请输入货位名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="巷道" prop="roadwayId">
|
||||
<el-input v-model="form.roadwayId" placeholder="请输入巷道" />
|
||||
</el-form-item>
|
||||
<el-form-item label="排" prop="thePlatoon">
|
||||
<el-input v-model="form.thePlatoon" placeholder="请输入排" />
|
||||
</el-form-item>
|
||||
<el-form-item label="列" prop="theColumn">
|
||||
<el-input v-model="form.theColumn" placeholder="请输入列" />
|
||||
</el-form-item>
|
||||
<el-form-item label="层" prop="theFloor">
|
||||
<el-input v-model="form.theFloor" placeholder="请输入层" />
|
||||
</el-form-item>
|
||||
<el-form-item label="托盘号" prop="trayCode">
|
||||
<el-input v-model="form.trayCode" placeholder="请输入托盘号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="部门" prop="model">
|
||||
<el-input v-model="form.model" placeholder="请输入部门" />
|
||||
</el-form-item>
|
||||
<el-form-item label="部门名称" prop="deptName">
|
||||
<el-input v-model="form.deptName" placeholder="请输入部门名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="入库时间" prop="inDate">
|
||||
<el-input v-model="form.inDate" placeholder="请输入入库时间" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listTraycodeStatic, getTraycodeStatic, delTraycodeStatic, addTraycodeStatic, updateTraycodeStatic } from "@/api/search/traycodeStatic"
|
||||
|
||||
export default {
|
||||
name: "TraycodeStatic",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 托盘统计表格数据
|
||||
traycodeStaticList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
warehouseId: null,
|
||||
warehouseName: null,
|
||||
cargoSpaceId: null,
|
||||
cargoSpaceName: null,
|
||||
roadwayId: null,
|
||||
thePlatoon: null,
|
||||
theColumn: null,
|
||||
theFloor: null,
|
||||
trayCode: null,
|
||||
model: null,
|
||||
deptName: null,
|
||||
inDate: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
/** 查询托盘统计列表 */
|
||||
getList() {
|
||||
this.loading = true
|
||||
listTraycodeStatic(this.queryParams).then(response => {
|
||||
this.traycodeStaticList = response.rows
|
||||
this.total = response.total
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false
|
||||
this.reset()
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
warehouseId: null,
|
||||
warehouseName: null,
|
||||
cargoSpaceId: null,
|
||||
cargoSpaceName: null,
|
||||
roadwayId: null,
|
||||
thePlatoon: null,
|
||||
theColumn: null,
|
||||
theFloor: null,
|
||||
trayCode: null,
|
||||
model: null,
|
||||
deptName: null,
|
||||
inDate: null
|
||||
}
|
||||
this.resetForm("form")
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1
|
||||
this.getList()
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm")
|
||||
this.handleQuery()
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.warehouseId)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset()
|
||||
this.open = true
|
||||
this.title = "添加托盘统计"
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset()
|
||||
const warehouseId = row.warehouseId || this.ids
|
||||
getTraycodeStatic(warehouseId).then(response => {
|
||||
this.form = response.data
|
||||
this.open = true
|
||||
this.title = "修改托盘统计"
|
||||
})
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.warehouseId != null) {
|
||||
updateTraycodeStatic(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功")
|
||||
this.open = false
|
||||
this.getList()
|
||||
})
|
||||
} else {
|
||||
addTraycodeStatic(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功")
|
||||
this.open = false
|
||||
this.getList()
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const warehouseIds = row.warehouseId || this.ids
|
||||
this.$modal.confirm('是否确认删除托盘统计编号为"' + warehouseIds + '"的数据项?').then(function() {
|
||||
return delTraycodeStatic(warehouseIds)
|
||||
}).then(() => {
|
||||
this.getList()
|
||||
this.$modal.msgSuccess("删除成功")
|
||||
}).catch(() => {})
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('search/traycodeStatic/export', {
|
||||
...this.queryParams
|
||||
}, `traycodeStatic_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -123,9 +123,9 @@
|
||||
<el-table-column label="层" align="center" prop="theFloor"/>
|
||||
<el-table-column label="重量" align="center" prop="theType"/>
|
||||
<el-table-column label="容量" align="center" prop="theTypeName"/>
|
||||
<el-table-column label="部门" align="center" prop="model">
|
||||
<el-table-column label="部门" align="center" prop="issDouble">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="getDeptDictOptions(scope.row)" :value="scope.row.model"/>
|
||||
<dict-tag :options="getDeptDictOptions(scope.row)" :value="scope.row.issDouble"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width=120 label="操作" align="center" class-name="small-padding fixed-width"> <!-- 操作 -->
|
||||
@@ -262,9 +262,16 @@
|
||||
</div>
|
||||
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="90px">
|
||||
<el-row style="margin-bottom: 10px; margin-left: 20px;">
|
||||
<el-button type="primary" icon="el-icon-download" size="mini" @click="openImportDialog">导入入库子单</el-button>
|
||||
</el-row>
|
||||
<el-form-item label="子单编码" prop="stockinDetailId">
|
||||
<el-input v-model="form.stockinDetailId" placeholder="请输入子单编码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="合同号" prop="orderId">
|
||||
<el-input v-model="form.orderId" placeholder="请输入合同号" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="产品号" prop="power">
|
||||
<el-input v-model="form.power" placeholder="请输入产品号" />
|
||||
</el-form-item>
|
||||
@@ -470,6 +477,52 @@
|
||||
<el-button @click="cargoSpaceSelectVisible = false">取消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 导入入库子单弹窗 -->
|
||||
<el-dialog title="导入入库子单" :visible.sync="importDialogVisible" width="900px" append-to-body>
|
||||
<el-form :model="importQueryParams" ref="importQueryForm" :inline="true" size="mini">
|
||||
<el-form-item label="合同号" prop="spare6">
|
||||
<el-input v-model="importQueryParams.spare6" placeholder="请输入合同号" clearable @keyup.enter.native="handleImportQuery"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="产品号" prop="spare7">
|
||||
<el-input v-model="importQueryParams.spare7" placeholder="请输入产品号" clearable @keyup.enter.native="handleImportQuery"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="代号" prop="spare9">
|
||||
<el-input v-model="importQueryParams.spare9" placeholder="请输入代号" clearable @keyup.enter.native="handleImportQuery"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="台次" prop="spare5">
|
||||
<el-input v-model="importQueryParams.spare5" placeholder="请输入台次" clearable @keyup.enter.native="handleImportQuery"/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleImportQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetImportQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table v-loading="importLoading" :data="importList" @current-change="handleImportCurrentChange" highlight-current-row height="400">
|
||||
<el-table-column label="入库单号" align="center" prop="stockinId" />
|
||||
<el-table-column label="合同号" align="center" prop="spare6" />
|
||||
<el-table-column label="产品号" align="center" prop="spare7" />
|
||||
<el-table-column label="代号" align="center" prop="spare9" />
|
||||
<el-table-column label="台次" align="center" prop="spare5" />
|
||||
<el-table-column label="物料编码" align="center" prop="productId" />
|
||||
<el-table-column label="物料名称" align="center" prop="productName" />
|
||||
<el-table-column label="数量" align="center" prop="quantityX" />
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="importTotal>0"
|
||||
:total="importTotal"
|
||||
:page.sync="importQueryParams.pageNum"
|
||||
:limit.sync="importQueryParams.pageSize"
|
||||
@pagination="handleImportQuery"
|
||||
/>
|
||||
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitImport">确 定</el-button>
|
||||
<el-button @click="importDialogVisible = false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -485,6 +538,7 @@ import {
|
||||
import {listWarehouse} from "@/api/bas/warehouse"
|
||||
import {listBasProduct} from "@/api/bas/BasProduct"
|
||||
import {listCargoSpace} from "@/api/bas/cargoSpace"
|
||||
import { listStockInDetail } from "@/api/in/stockInDetail"
|
||||
|
||||
export default {
|
||||
name: "Management",
|
||||
@@ -597,7 +651,25 @@ export default {
|
||||
},
|
||||
selectedCargoSpace: null,
|
||||
// 子表加载状态
|
||||
detailLoading: false
|
||||
detailLoading: false,
|
||||
|
||||
// 选中的库存数据
|
||||
selectedStockData: [],
|
||||
|
||||
// 导入相关
|
||||
importDialogVisible: false,
|
||||
importLoading: false,
|
||||
importList: [],
|
||||
importTotal: 0,
|
||||
importQueryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
orderId: null,
|
||||
power: null,
|
||||
distribution: null,
|
||||
spare5: null
|
||||
},
|
||||
importCurrentRow: null
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -911,6 +983,59 @@ export default {
|
||||
} else {
|
||||
this.$modal.msgWarning("请选择一个货位")
|
||||
}
|
||||
},
|
||||
|
||||
/** 打开导入弹窗 */
|
||||
openImportDialog() {
|
||||
this.importDialogVisible = true;
|
||||
this.resetImportQuery();
|
||||
},
|
||||
/** 导入查询 */
|
||||
handleImportQuery() {
|
||||
this.importLoading = true;
|
||||
listStockInDetail(this.importQueryParams).then(response => {
|
||||
this.importList = response.rows;
|
||||
this.importTotal = response.total;
|
||||
this.importLoading = false;
|
||||
});
|
||||
},
|
||||
/** 重置导入查询 */
|
||||
resetImportQuery() {
|
||||
this.importQueryParams = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
orderId: null,
|
||||
power: null,
|
||||
distribution: null,
|
||||
spare5: null
|
||||
};
|
||||
this.importList = [];
|
||||
this.importTotal = 0;
|
||||
this.importCurrentRow = null;
|
||||
},
|
||||
/** 导入行选中 */
|
||||
handleImportCurrentChange(val) {
|
||||
this.importCurrentRow = val;
|
||||
},
|
||||
/** 确认导入 */
|
||||
submitImport() {
|
||||
if (!this.importCurrentRow) {
|
||||
this.$modal.msgWarning("请选择一条数据");
|
||||
return;
|
||||
}
|
||||
const row = this.importCurrentRow;
|
||||
// 回填数据
|
||||
this.form.orderId = row.spare6;
|
||||
this.form.power = row.spare7;
|
||||
this.form.distribution = row.spare9;
|
||||
this.form.spare5 = row.spare5;
|
||||
this.form.productId = row.productId;
|
||||
this.form.productName = row.productName;
|
||||
this.form.quantity = row.quantityX;
|
||||
this.form.stockinDetailId = row.stockinDetailId;
|
||||
|
||||
this.importDialogVisible = false;
|
||||
this.$modal.msgSuccess("导入数据成功");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@@ -111,9 +111,14 @@
|
||||
<dict-tag :options="dict.type.warehouse" :value="scope.row.warehouseId"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="库存编码" align="center" prop="stockId" width="160"/>
|
||||
<el-table-column label="货位名称" align="center" prop="cargoSpaceName" />
|
||||
<el-table-column label="托盘码" align="center" prop="trayCode" />
|
||||
<el-table-column label="库存编码" align="center" prop="stockId" width="140"/>
|
||||
<el-table-column label="货位名称" align="center" prop="cargoSpaceName" width="120"/>
|
||||
<el-table-column label="巷道" align="center" prop="roadwayId" width="80"/>
|
||||
<el-table-column label="排" align="center" prop="thePlatoon" />
|
||||
<el-table-column label="列" align="center" prop="theColumn" />
|
||||
<el-table-column label="层" align="center" prop="theFloor" />
|
||||
<el-table-column label="托盘码" align="center" prop="trayCode" width="120"/>
|
||||
<el-table-column label="部门" align="center" prop="deptName" width="120"/>
|
||||
<el-table-column label="合同号" align="center" prop="orderId" />
|
||||
<el-table-column label="产品号" align="center" prop="power" />
|
||||
<el-table-column label="代号" align="center" prop="distribution" />
|
||||
|
||||
Reference in New Issue
Block a user