3.5.6
1、看板:1楼生产看板、1楼能源看板、4楼生产看板和4楼仓储看板接口 2、销售订单绑定采购订单和采购订单绑定销售订单默认是按销售订单成品bom过滤,对于4楼对内生产的需要选择bom过滤 3、生产计划查看 4、生产任务增加超时任务的搜索条件 5、根据用户查看生产派工信息 6、车间生产,连接条码枪的问题master
parent
68da7e57f4
commit
453c590340
@ -0,0 +1,101 @@
|
||||
package com.hw.ems.board.controller;
|
||||
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.hw.common.core.utils.DateUtils;
|
||||
import com.hw.common.core.web.controller.BaseController;
|
||||
import com.hw.common.core.web.page.TableDataInfo;
|
||||
import com.hw.ems.record.domain.RecordDnbInstant;
|
||||
import com.hw.ems.record.service.IRecordDnbInstantService;
|
||||
import com.hw.ems.report.service.IDataAnalysisService;
|
||||
import com.hw.ems.report.service.IReportPointDnbService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.time.LocalDate;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/EmsBoard")
|
||||
public class EmsBoardController extends BaseController {
|
||||
@Autowired
|
||||
private IDataAnalysisService dataAnalysisService;
|
||||
|
||||
@Autowired
|
||||
private IRecordDnbInstantService recordDnbInstantService;
|
||||
|
||||
@GetMapping("/energyFourthFloorData")
|
||||
// public TableDataInfo energyStatisticsData(@RequestParam(required = false) Map paramMap)
|
||||
public TableDataInfo energyFourthFloorData()
|
||||
{
|
||||
Map paramMap = new HashMap();
|
||||
|
||||
// 获取今天的日期
|
||||
LocalDate today = LocalDate.now();
|
||||
|
||||
// 计算一个月前的日期
|
||||
LocalDate oneMonthAgo = today.minusMonths(1);
|
||||
|
||||
// 如果你需要格式化输出
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||
String formattedDate = oneMonthAgo.format(formatter);
|
||||
|
||||
String formattedToday = today.format(formatter);
|
||||
|
||||
paramMap.put("beginCollectTime",formattedDate);
|
||||
paramMap.put("endCollectTime",formattedToday);
|
||||
paramMap.put("energyType","2");
|
||||
|
||||
String monitorIdList = "E0004_0200,E0004_0300,E0004_3300,E0004_3400,E0004_3500,S01_00005,E0004_0400";
|
||||
paramMap.put("monitorIdList",monitorIdList);
|
||||
|
||||
List<Map<String, Object>> resultList = dataAnalysisService.energyStatisticsDataObject(paramMap);
|
||||
|
||||
|
||||
return getDataTable(resultList);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@GetMapping("/energyFirstFloorData")
|
||||
public TableDataInfo energyFirstFloorData()
|
||||
{
|
||||
Map paramMap = new HashMap();
|
||||
|
||||
// 获取今天的日期
|
||||
LocalDate today = LocalDate.now();
|
||||
|
||||
// 计算一个月前的日期
|
||||
LocalDate oneMonthAgo = today.minusMonths(1);
|
||||
|
||||
// 如果你需要格式化输出
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||
String formattedDate = oneMonthAgo.format(formatter);
|
||||
|
||||
String formattedToday = today.format(formatter);
|
||||
|
||||
paramMap.put("beginCollectTime",formattedDate);
|
||||
paramMap.put("endCollectTime",formattedToday);
|
||||
paramMap.put("energyType","2");
|
||||
paramMap.put("monitorIdList","");
|
||||
|
||||
List<Map<String, Object>> resultList = dataAnalysisService.energyStatisticsDataObject(paramMap);
|
||||
|
||||
return getDataTable(resultList);
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/getEnergyHistoryData")
|
||||
public TableDataInfo getEnergyHistoryData()
|
||||
{
|
||||
|
||||
startPage();
|
||||
PageHelper.startPage(1,200);
|
||||
RecordDnbInstant recordDnbInstant = new RecordDnbInstant();
|
||||
List<RecordDnbInstant> list = recordDnbInstantService.selectRecordDnbInstantList4Board(recordDnbInstant);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,4 @@
|
||||
package com.hw.ems.board.service;
|
||||
|
||||
public interface IEmsBoardService {
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
package com.hw.ems.board.service.impl;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.hw.ems.board.service.IEmsBoardService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class EmsBoardServiceImpl implements IEmsBoardService {
|
||||
|
||||
/**
|
||||
* 获取四楼生产中间当月耗电量信息
|
||||
* @return
|
||||
*/
|
||||
public JSONObject getFourthFloorEmsPie(){
|
||||
JSONObject resultJson = new JSONObject();
|
||||
|
||||
|
||||
return resultJson;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,458 @@
|
||||
package com.hw.mes.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.hw.common.core.annotation.Excel;
|
||||
import com.hw.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 调度任务对象 wcs_task
|
||||
*
|
||||
* @author xins
|
||||
* @date 2024-12-04
|
||||
*/
|
||||
public class WcsTask extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long objid;
|
||||
|
||||
/** wcs_warehouse_order 主键id */
|
||||
@Excel(name = "wcs_warehouse_order 主键id")
|
||||
private Long masterId;
|
||||
|
||||
/** wms出入库记录表id */
|
||||
@Excel(name = "wms出入库记录表id")
|
||||
private Long orderId;
|
||||
|
||||
/** 流水号 */
|
||||
@Excel(name = "流水号")
|
||||
private Long serialNo;
|
||||
|
||||
/** 设备编号 */
|
||||
@Excel(name = "设备编号")
|
||||
private String equipmentNo;
|
||||
|
||||
/** 容器号(托盘或者箱号) */
|
||||
@Excel(name = "容器号(托盘或者箱号)")
|
||||
private String containerNo;
|
||||
|
||||
/** 任务类型,字典表 */
|
||||
@Excel(name = "任务类型,字典表")
|
||||
private Long taskType;
|
||||
|
||||
/** 任务状态,字典表 */
|
||||
@Excel(name = "任务状态,字典表")
|
||||
private Long taskStatus;
|
||||
|
||||
/** 物料ID */
|
||||
@Excel(name = "物料ID")
|
||||
private Long materialId;
|
||||
|
||||
/** 物料号 */
|
||||
@Excel(name = "物料号")
|
||||
private String materialNo;
|
||||
|
||||
/** 数量 */
|
||||
@Excel(name = "数量")
|
||||
private Long qty;
|
||||
|
||||
/** 起始点编号 */
|
||||
@Excel(name = "起始点编号")
|
||||
private String startPointNo;
|
||||
|
||||
/** 起始点id */
|
||||
@Excel(name = "起始点id")
|
||||
private Long startPointId;
|
||||
|
||||
/** 当前点编号 */
|
||||
@Excel(name = "当前点编号")
|
||||
private String currPointNo;
|
||||
|
||||
/** 当前点id */
|
||||
@Excel(name = "当前点id")
|
||||
private Long currPointId;
|
||||
|
||||
/** 下一点位id */
|
||||
@Excel(name = "下一点位id")
|
||||
private Long nextPointId;
|
||||
|
||||
/** 下一点位编号 */
|
||||
@Excel(name = "下一点位编号")
|
||||
private String nextPointNo;
|
||||
|
||||
/** 结束点编号 */
|
||||
@Excel(name = "结束点编号")
|
||||
private String endPointNo;
|
||||
|
||||
/** 结束点id */
|
||||
@Excel(name = "结束点id")
|
||||
private Long endPointId;
|
||||
|
||||
/** 所属楼层 */
|
||||
@Excel(name = "所属楼层")
|
||||
private Long floorNo;
|
||||
|
||||
/** 是否可用 0:不可用 1:可用 */
|
||||
@Excel(name = "是否可用 0:不可用 1:可用")
|
||||
private Long useFlag;
|
||||
|
||||
/** 备用字段1 */
|
||||
@Excel(name = "备用字段1")
|
||||
private Long ud1;
|
||||
|
||||
/** 备用字段2 */
|
||||
@Excel(name = "备用字段2")
|
||||
private String ud2;
|
||||
|
||||
/** 备用字段3 */
|
||||
@Excel(name = "备用字段3")
|
||||
private String ud3;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long fromFloorNo;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String isEmpty;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String ctuExecute;
|
||||
|
||||
/** Agv返回code */
|
||||
@Excel(name = "Agv返回code")
|
||||
private String taskCode;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long isDelete;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long isStop;
|
||||
|
||||
private String taskStatusStr;
|
||||
|
||||
public void setObjid(Long objid)
|
||||
{
|
||||
this.objid = objid;
|
||||
}
|
||||
|
||||
public Long getObjid()
|
||||
{
|
||||
return objid;
|
||||
}
|
||||
public void setMasterId(Long masterId)
|
||||
{
|
||||
this.masterId = masterId;
|
||||
}
|
||||
|
||||
public Long getMasterId()
|
||||
{
|
||||
return masterId;
|
||||
}
|
||||
public void setOrderId(Long orderId)
|
||||
{
|
||||
this.orderId = orderId;
|
||||
}
|
||||
|
||||
public Long getOrderId()
|
||||
{
|
||||
return orderId;
|
||||
}
|
||||
public void setSerialNo(Long serialNo)
|
||||
{
|
||||
this.serialNo = serialNo;
|
||||
}
|
||||
|
||||
public Long getSerialNo()
|
||||
{
|
||||
return serialNo;
|
||||
}
|
||||
public void setEquipmentNo(String equipmentNo)
|
||||
{
|
||||
this.equipmentNo = equipmentNo;
|
||||
}
|
||||
|
||||
public String getEquipmentNo()
|
||||
{
|
||||
return equipmentNo;
|
||||
}
|
||||
public void setContainerNo(String containerNo)
|
||||
{
|
||||
this.containerNo = containerNo;
|
||||
}
|
||||
|
||||
public String getContainerNo()
|
||||
{
|
||||
return containerNo;
|
||||
}
|
||||
public void setTaskType(Long taskType)
|
||||
{
|
||||
this.taskType = taskType;
|
||||
}
|
||||
|
||||
public Long getTaskType()
|
||||
{
|
||||
return taskType;
|
||||
}
|
||||
public void setTaskStatus(Long taskStatus)
|
||||
{
|
||||
this.taskStatus = taskStatus;
|
||||
}
|
||||
|
||||
public Long getTaskStatus()
|
||||
{
|
||||
return taskStatus;
|
||||
}
|
||||
public void setMaterialId(Long materialId)
|
||||
{
|
||||
this.materialId = materialId;
|
||||
}
|
||||
|
||||
public Long getMaterialId()
|
||||
{
|
||||
return materialId;
|
||||
}
|
||||
public void setMaterialNo(String materialNo)
|
||||
{
|
||||
this.materialNo = materialNo;
|
||||
}
|
||||
|
||||
public String getMaterialNo()
|
||||
{
|
||||
return materialNo;
|
||||
}
|
||||
public void setQty(Long qty)
|
||||
{
|
||||
this.qty = qty;
|
||||
}
|
||||
|
||||
public Long getQty()
|
||||
{
|
||||
return qty;
|
||||
}
|
||||
public void setStartPointNo(String startPointNo)
|
||||
{
|
||||
this.startPointNo = startPointNo;
|
||||
}
|
||||
|
||||
public String getStartPointNo()
|
||||
{
|
||||
return startPointNo;
|
||||
}
|
||||
public void setStartPointId(Long startPointId)
|
||||
{
|
||||
this.startPointId = startPointId;
|
||||
}
|
||||
|
||||
public Long getStartPointId()
|
||||
{
|
||||
return startPointId;
|
||||
}
|
||||
public void setCurrPointNo(String currPointNo)
|
||||
{
|
||||
this.currPointNo = currPointNo;
|
||||
}
|
||||
|
||||
public String getCurrPointNo()
|
||||
{
|
||||
return currPointNo;
|
||||
}
|
||||
public void setCurrPointId(Long currPointId)
|
||||
{
|
||||
this.currPointId = currPointId;
|
||||
}
|
||||
|
||||
public Long getCurrPointId()
|
||||
{
|
||||
return currPointId;
|
||||
}
|
||||
public void setNextPointId(Long nextPointId)
|
||||
{
|
||||
this.nextPointId = nextPointId;
|
||||
}
|
||||
|
||||
public Long getNextPointId()
|
||||
{
|
||||
return nextPointId;
|
||||
}
|
||||
public void setNextPointNo(String nextPointNo)
|
||||
{
|
||||
this.nextPointNo = nextPointNo;
|
||||
}
|
||||
|
||||
public String getNextPointNo()
|
||||
{
|
||||
return nextPointNo;
|
||||
}
|
||||
public void setEndPointNo(String endPointNo)
|
||||
{
|
||||
this.endPointNo = endPointNo;
|
||||
}
|
||||
|
||||
public String getEndPointNo()
|
||||
{
|
||||
return endPointNo;
|
||||
}
|
||||
public void setEndPointId(Long endPointId)
|
||||
{
|
||||
this.endPointId = endPointId;
|
||||
}
|
||||
|
||||
public Long getEndPointId()
|
||||
{
|
||||
return endPointId;
|
||||
}
|
||||
public void setFloorNo(Long floorNo)
|
||||
{
|
||||
this.floorNo = floorNo;
|
||||
}
|
||||
|
||||
public Long getFloorNo()
|
||||
{
|
||||
return floorNo;
|
||||
}
|
||||
public void setUseFlag(Long useFlag)
|
||||
{
|
||||
this.useFlag = useFlag;
|
||||
}
|
||||
|
||||
public Long getUseFlag()
|
||||
{
|
||||
return useFlag;
|
||||
}
|
||||
public void setUd1(Long ud1)
|
||||
{
|
||||
this.ud1 = ud1;
|
||||
}
|
||||
|
||||
public Long getUd1()
|
||||
{
|
||||
return ud1;
|
||||
}
|
||||
public void setUd2(String ud2)
|
||||
{
|
||||
this.ud2 = ud2;
|
||||
}
|
||||
|
||||
public String getUd2()
|
||||
{
|
||||
return ud2;
|
||||
}
|
||||
public void setUd3(String ud3)
|
||||
{
|
||||
this.ud3 = ud3;
|
||||
}
|
||||
|
||||
public String getUd3()
|
||||
{
|
||||
return ud3;
|
||||
}
|
||||
public void setFromFloorNo(Long fromFloorNo)
|
||||
{
|
||||
this.fromFloorNo = fromFloorNo;
|
||||
}
|
||||
|
||||
public Long getFromFloorNo()
|
||||
{
|
||||
return fromFloorNo;
|
||||
}
|
||||
public void setIsEmpty(String isEmpty)
|
||||
{
|
||||
this.isEmpty = isEmpty;
|
||||
}
|
||||
|
||||
public String getIsEmpty()
|
||||
{
|
||||
return isEmpty;
|
||||
}
|
||||
public void setCtuExecute(String ctuExecute)
|
||||
{
|
||||
this.ctuExecute = ctuExecute;
|
||||
}
|
||||
|
||||
public String getCtuExecute()
|
||||
{
|
||||
return ctuExecute;
|
||||
}
|
||||
public void setTaskCode(String taskCode)
|
||||
{
|
||||
this.taskCode = taskCode;
|
||||
}
|
||||
|
||||
public String getTaskCode()
|
||||
{
|
||||
return taskCode;
|
||||
}
|
||||
public void setIsDelete(Long isDelete)
|
||||
{
|
||||
this.isDelete = isDelete;
|
||||
}
|
||||
|
||||
public Long getIsDelete()
|
||||
{
|
||||
return isDelete;
|
||||
}
|
||||
public void setIsStop(Long isStop)
|
||||
{
|
||||
this.isStop = isStop;
|
||||
}
|
||||
|
||||
public Long getIsStop()
|
||||
{
|
||||
return isStop;
|
||||
}
|
||||
|
||||
public String getTaskStatusStr() {
|
||||
return taskStatusStr;
|
||||
}
|
||||
|
||||
public void setTaskStatusStr(String taskStatusStr) {
|
||||
this.taskStatusStr = taskStatusStr;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("objid", getObjid())
|
||||
.append("masterId", getMasterId())
|
||||
.append("orderId", getOrderId())
|
||||
.append("serialNo", getSerialNo())
|
||||
.append("equipmentNo", getEquipmentNo())
|
||||
.append("containerNo", getContainerNo())
|
||||
.append("taskType", getTaskType())
|
||||
.append("taskStatus", getTaskStatus())
|
||||
.append("materialId", getMaterialId())
|
||||
.append("materialNo", getMaterialNo())
|
||||
.append("qty", getQty())
|
||||
.append("startPointNo", getStartPointNo())
|
||||
.append("startPointId", getStartPointId())
|
||||
.append("currPointNo", getCurrPointNo())
|
||||
.append("currPointId", getCurrPointId())
|
||||
.append("nextPointId", getNextPointId())
|
||||
.append("nextPointNo", getNextPointNo())
|
||||
.append("endPointNo", getEndPointNo())
|
||||
.append("endPointId", getEndPointId())
|
||||
.append("floorNo", getFloorNo())
|
||||
.append("useFlag", getUseFlag())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("ud1", getUd1())
|
||||
.append("ud2", getUd2())
|
||||
.append("ud3", getUd3())
|
||||
.append("remark", getRemark())
|
||||
.append("fromFloorNo", getFromFloorNo())
|
||||
.append("isEmpty", getIsEmpty())
|
||||
.append("ctuExecute", getCtuExecute())
|
||||
.append("taskCode", getTaskCode())
|
||||
.append("isDelete", getIsDelete())
|
||||
.append("isStop", getIsStop())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,69 @@
|
||||
package com.hw.mes.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.hw.mes.domain.WcsPlcpoint;
|
||||
|
||||
/**
|
||||
* PLC信息Mapper接口
|
||||
*
|
||||
* @author xins
|
||||
* @date 2024-12-04
|
||||
*/
|
||||
public interface WcsPlcpointMapper
|
||||
{
|
||||
/**
|
||||
* 查询PLC信息
|
||||
*
|
||||
* @param id PLC信息主键
|
||||
* @return PLC信息
|
||||
*/
|
||||
public WcsPlcpoint selectWcsPlcpointById(Long id);
|
||||
|
||||
/**
|
||||
* 查询PLC信息列表
|
||||
*
|
||||
* @param wcsPlcpoint PLC信息
|
||||
* @return PLC信息集合
|
||||
*/
|
||||
public List<WcsPlcpoint> selectWcsPlcpointList(WcsPlcpoint wcsPlcpoint);
|
||||
|
||||
/**
|
||||
* 新增PLC信息
|
||||
*
|
||||
* @param wcsPlcpoint PLC信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWcsPlcpoint(WcsPlcpoint wcsPlcpoint);
|
||||
|
||||
/**
|
||||
* 修改PLC信息
|
||||
*
|
||||
* @param wcsPlcpoint PLC信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWcsPlcpoint(WcsPlcpoint wcsPlcpoint);
|
||||
|
||||
/**
|
||||
* 删除PLC信息
|
||||
*
|
||||
* @param id PLC信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWcsPlcpointById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除PLC信息
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWcsPlcpointByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 查询提升机状态信息列表
|
||||
*
|
||||
* @return PLC信息集合
|
||||
*/
|
||||
public List<WcsPlcpoint> selectElevatorStatusList();
|
||||
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.hw.mes.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.hw.mes.domain.WcsTask;
|
||||
|
||||
/**
|
||||
* 调度任务Mapper接口
|
||||
*
|
||||
* @author xins
|
||||
* @date 2024-12-04
|
||||
*/
|
||||
public interface WcsTaskMapper
|
||||
{
|
||||
/**
|
||||
* 查询调度任务
|
||||
*
|
||||
* @param objid 调度任务主键
|
||||
* @return 调度任务
|
||||
*/
|
||||
public WcsTask selectWcsTaskByObjid(Long objid);
|
||||
|
||||
/**
|
||||
* 查询调度任务列表
|
||||
*
|
||||
* @param wcsTask 调度任务
|
||||
* @return 调度任务集合
|
||||
*/
|
||||
public List<WcsTask> selectWcsTaskList(WcsTask wcsTask);
|
||||
|
||||
/**
|
||||
* 新增调度任务
|
||||
*
|
||||
* @param wcsTask 调度任务
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWcsTask(WcsTask wcsTask);
|
||||
|
||||
/**
|
||||
* 修改调度任务
|
||||
*
|
||||
* @param wcsTask 调度任务
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWcsTask(WcsTask wcsTask);
|
||||
|
||||
/**
|
||||
* 删除调度任务
|
||||
*
|
||||
* @param objid 调度任务主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWcsTaskByObjid(Long objid);
|
||||
|
||||
/**
|
||||
* 批量删除调度任务
|
||||
*
|
||||
* @param objids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWcsTaskByObjids(Long[] objids);
|
||||
}
|
||||
@ -0,0 +1,84 @@
|
||||
<?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.hw.mes.mapper.WcsPlcpointMapper">
|
||||
|
||||
<resultMap type="WcsPlcpoint" id="WcsPlcpointResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="station" column="station" />
|
||||
<result property="address" column="address" />
|
||||
<result property="value" column="value" />
|
||||
<result property="type" column="type" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectWcsPlcpointVo">
|
||||
select id, name, station, address, value, type from wcs_plcpoint
|
||||
</sql>
|
||||
|
||||
<select id="selectWcsPlcpointList" parameterType="WcsPlcpoint" resultMap="WcsPlcpointResult">
|
||||
<include refid="selectWcsPlcpointVo"/>
|
||||
<where>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="station != null and station != ''"> and station = #{station}</if>
|
||||
<if test="address != null and address != ''"> and address = #{address}</if>
|
||||
<if test="value != null and value != ''"> and value = #{value}</if>
|
||||
<if test="type != null and type != ''"> and type = #{type}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectWcsPlcpointById" parameterType="Long" resultMap="WcsPlcpointResult">
|
||||
<include refid="selectWcsPlcpointVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertWcsPlcpoint" parameterType="WcsPlcpoint">
|
||||
insert into wcs_plcpoint
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="name != null">name,</if>
|
||||
<if test="station != null">station,</if>
|
||||
<if test="address != null">address,</if>
|
||||
<if test="value != null">value,</if>
|
||||
<if test="type != null">type,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="name != null">#{name},</if>
|
||||
<if test="station != null">#{station},</if>
|
||||
<if test="address != null">#{address},</if>
|
||||
<if test="value != null">#{value},</if>
|
||||
<if test="type != null">#{type},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateWcsPlcpoint" parameterType="WcsPlcpoint">
|
||||
update wcs_plcpoint
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="station != null">station = #{station},</if>
|
||||
<if test="address != null">address = #{address},</if>
|
||||
<if test="value != null">value = #{value},</if>
|
||||
<if test="type != null">type = #{type},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteWcsPlcpointById" parameterType="Long">
|
||||
delete from wcs_plcpoint where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteWcsPlcpointByIds" parameterType="String">
|
||||
delete from wcs_plcpoint where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
|
||||
<select id="selectElevatorStatusList" parameterType="WcsPlcpoint" resultMap="WcsPlcpointResult">
|
||||
<include refid="selectWcsPlcpointVo"/>
|
||||
where id in (82,83,84)
|
||||
</select>
|
||||
</mapper>
|
||||
@ -0,0 +1,218 @@
|
||||
<?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.hw.mes.mapper.WcsTaskMapper">
|
||||
|
||||
<resultMap type="WcsTask" id="WcsTaskResult">
|
||||
<result property="objid" column="objid" />
|
||||
<result property="masterId" column="master_id" />
|
||||
<result property="orderId" column="order_id" />
|
||||
<result property="serialNo" column="serial_no" />
|
||||
<result property="equipmentNo" column="equipment_no" />
|
||||
<result property="containerNo" column="container_no" />
|
||||
<result property="taskType" column="task_type" />
|
||||
<result property="taskStatus" column="task_status" />
|
||||
<result property="materialId" column="material_id" />
|
||||
<result property="materialNo" column="material_no" />
|
||||
<result property="qty" column="qty" />
|
||||
<result property="startPointNo" column="start_point_no" />
|
||||
<result property="startPointId" column="start_point_id" />
|
||||
<result property="currPointNo" column="curr_point_no" />
|
||||
<result property="currPointId" column="curr_point_id" />
|
||||
<result property="nextPointId" column="next_point_id" />
|
||||
<result property="nextPointNo" column="next_point_no" />
|
||||
<result property="endPointNo" column="end_point_no" />
|
||||
<result property="endPointId" column="end_point_id" />
|
||||
<result property="floorNo" column="floor_no" />
|
||||
<result property="useFlag" column="use_flag" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="ud1" column="ud1" />
|
||||
<result property="ud2" column="ud2" />
|
||||
<result property="ud3" column="ud3" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="fromFloorNo" column="from_floor_no" />
|
||||
<result property="isEmpty" column="is_empty" />
|
||||
<result property="ctuExecute" column="ctu_execute" />
|
||||
<result property="taskCode" column="taskCode" />
|
||||
<result property="isDelete" column="is_delete" />
|
||||
<result property="isStop" column="is_stop" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectWcsTaskVo">
|
||||
select objid, master_id, order_id, serial_no, equipment_no, container_no, task_type, task_status, material_id, material_no, qty, start_point_no, start_point_id, curr_point_no, curr_point_id, next_point_id, next_point_no, end_point_no, end_point_id, floor_no, use_flag, create_by, create_time, update_by, update_time, ud1, ud2, ud3, remark, from_floor_no, is_empty, ctu_execute, taskCode, is_delete, is_stop from wcs_task
|
||||
</sql>
|
||||
|
||||
<select id="selectWcsTaskList" parameterType="WcsTask" resultMap="WcsTaskResult">
|
||||
<include refid="selectWcsTaskVo"/>
|
||||
<where>
|
||||
<if test="masterId != null "> and master_id = #{masterId}</if>
|
||||
<if test="orderId != null "> and order_id = #{orderId}</if>
|
||||
<if test="serialNo != null "> and serial_no = #{serialNo}</if>
|
||||
<if test="equipmentNo != null and equipmentNo != ''"> and equipment_no = #{equipmentNo}</if>
|
||||
<if test="containerNo != null and containerNo != ''"> and container_no = #{containerNo}</if>
|
||||
<if test="taskType != null "> and task_type = #{taskType}</if>
|
||||
<if test="taskStatus != null "> and task_status = #{taskStatus}</if>
|
||||
<if test="materialId != null "> and material_id = #{materialId}</if>
|
||||
<if test="materialNo != null and materialNo != ''"> and material_no = #{materialNo}</if>
|
||||
<if test="qty != null "> and qty = #{qty}</if>
|
||||
<if test="startPointNo != null and startPointNo != ''"> and start_point_no = #{startPointNo}</if>
|
||||
<if test="startPointId != null "> and start_point_id = #{startPointId}</if>
|
||||
<if test="currPointNo != null and currPointNo != ''"> and curr_point_no = #{currPointNo}</if>
|
||||
<if test="currPointId != null "> and curr_point_id = #{currPointId}</if>
|
||||
<if test="nextPointId != null "> and next_point_id = #{nextPointId}</if>
|
||||
<if test="nextPointNo != null and nextPointNo != ''"> and next_point_no = #{nextPointNo}</if>
|
||||
<if test="endPointNo != null and endPointNo != ''"> and end_point_no = #{endPointNo}</if>
|
||||
<if test="endPointId != null "> and end_point_id = #{endPointId}</if>
|
||||
<if test="floorNo != null "> and floor_no = #{floorNo}</if>
|
||||
<if test="useFlag != null "> and use_flag = #{useFlag}</if>
|
||||
<if test="ud1 != null "> and ud1 = #{ud1}</if>
|
||||
<if test="ud2 != null and ud2 != ''"> and ud2 = #{ud2}</if>
|
||||
<if test="ud3 != null and ud3 != ''"> and ud3 = #{ud3}</if>
|
||||
<if test="fromFloorNo != null "> and from_floor_no = #{fromFloorNo}</if>
|
||||
<if test="isEmpty != null and isEmpty != ''"> and is_empty = #{isEmpty}</if>
|
||||
<if test="ctuExecute != null and ctuExecute != ''"> and ctu_execute = #{ctuExecute}</if>
|
||||
<if test="taskCode != null and taskCode != ''"> and taskCode = #{taskCode}</if>
|
||||
<if test="isDelete != null "> and is_delete = #{isDelete}</if>
|
||||
<if test="isStop != null "> and is_stop = #{isStop}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectWcsTaskByObjid" parameterType="Long" resultMap="WcsTaskResult">
|
||||
<include refid="selectWcsTaskVo"/>
|
||||
where objid = #{objid}
|
||||
</select>
|
||||
|
||||
<insert id="insertWcsTask" parameterType="WcsTask">
|
||||
insert into wcs_task
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="objid != null">objid,</if>
|
||||
<if test="masterId != null">master_id,</if>
|
||||
<if test="orderId != null">order_id,</if>
|
||||
<if test="serialNo != null">serial_no,</if>
|
||||
<if test="equipmentNo != null">equipment_no,</if>
|
||||
<if test="containerNo != null">container_no,</if>
|
||||
<if test="taskType != null">task_type,</if>
|
||||
<if test="taskStatus != null">task_status,</if>
|
||||
<if test="materialId != null">material_id,</if>
|
||||
<if test="materialNo != null">material_no,</if>
|
||||
<if test="qty != null">qty,</if>
|
||||
<if test="startPointNo != null">start_point_no,</if>
|
||||
<if test="startPointId != null">start_point_id,</if>
|
||||
<if test="currPointNo != null">curr_point_no,</if>
|
||||
<if test="currPointId != null">curr_point_id,</if>
|
||||
<if test="nextPointId != null">next_point_id,</if>
|
||||
<if test="nextPointNo != null">next_point_no,</if>
|
||||
<if test="endPointNo != null">end_point_no,</if>
|
||||
<if test="endPointId != null">end_point_id,</if>
|
||||
<if test="floorNo != null">floor_no,</if>
|
||||
<if test="useFlag != null">use_flag,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="ud1 != null">ud1,</if>
|
||||
<if test="ud2 != null">ud2,</if>
|
||||
<if test="ud3 != null">ud3,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="fromFloorNo != null">from_floor_no,</if>
|
||||
<if test="isEmpty != null">is_empty,</if>
|
||||
<if test="ctuExecute != null">ctu_execute,</if>
|
||||
<if test="taskCode != null">taskCode,</if>
|
||||
<if test="isDelete != null">is_delete,</if>
|
||||
<if test="isStop != null">is_stop,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="objid != null">#{objid},</if>
|
||||
<if test="masterId != null">#{masterId},</if>
|
||||
<if test="orderId != null">#{orderId},</if>
|
||||
<if test="serialNo != null">#{serialNo},</if>
|
||||
<if test="equipmentNo != null">#{equipmentNo},</if>
|
||||
<if test="containerNo != null">#{containerNo},</if>
|
||||
<if test="taskType != null">#{taskType},</if>
|
||||
<if test="taskStatus != null">#{taskStatus},</if>
|
||||
<if test="materialId != null">#{materialId},</if>
|
||||
<if test="materialNo != null">#{materialNo},</if>
|
||||
<if test="qty != null">#{qty},</if>
|
||||
<if test="startPointNo != null">#{startPointNo},</if>
|
||||
<if test="startPointId != null">#{startPointId},</if>
|
||||
<if test="currPointNo != null">#{currPointNo},</if>
|
||||
<if test="currPointId != null">#{currPointId},</if>
|
||||
<if test="nextPointId != null">#{nextPointId},</if>
|
||||
<if test="nextPointNo != null">#{nextPointNo},</if>
|
||||
<if test="endPointNo != null">#{endPointNo},</if>
|
||||
<if test="endPointId != null">#{endPointId},</if>
|
||||
<if test="floorNo != null">#{floorNo},</if>
|
||||
<if test="useFlag != null">#{useFlag},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="ud1 != null">#{ud1},</if>
|
||||
<if test="ud2 != null">#{ud2},</if>
|
||||
<if test="ud3 != null">#{ud3},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="fromFloorNo != null">#{fromFloorNo},</if>
|
||||
<if test="isEmpty != null">#{isEmpty},</if>
|
||||
<if test="ctuExecute != null">#{ctuExecute},</if>
|
||||
<if test="taskCode != null">#{taskCode},</if>
|
||||
<if test="isDelete != null">#{isDelete},</if>
|
||||
<if test="isStop != null">#{isStop},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateWcsTask" parameterType="WcsTask">
|
||||
update wcs_task
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="masterId != null">master_id = #{masterId},</if>
|
||||
<if test="orderId != null">order_id = #{orderId},</if>
|
||||
<if test="serialNo != null">serial_no = #{serialNo},</if>
|
||||
<if test="equipmentNo != null">equipment_no = #{equipmentNo},</if>
|
||||
<if test="containerNo != null">container_no = #{containerNo},</if>
|
||||
<if test="taskType != null">task_type = #{taskType},</if>
|
||||
<if test="taskStatus != null">task_status = #{taskStatus},</if>
|
||||
<if test="materialId != null">material_id = #{materialId},</if>
|
||||
<if test="materialNo != null">material_no = #{materialNo},</if>
|
||||
<if test="qty != null">qty = #{qty},</if>
|
||||
<if test="startPointNo != null">start_point_no = #{startPointNo},</if>
|
||||
<if test="startPointId != null">start_point_id = #{startPointId},</if>
|
||||
<if test="currPointNo != null">curr_point_no = #{currPointNo},</if>
|
||||
<if test="currPointId != null">curr_point_id = #{currPointId},</if>
|
||||
<if test="nextPointId != null">next_point_id = #{nextPointId},</if>
|
||||
<if test="nextPointNo != null">next_point_no = #{nextPointNo},</if>
|
||||
<if test="endPointNo != null">end_point_no = #{endPointNo},</if>
|
||||
<if test="endPointId != null">end_point_id = #{endPointId},</if>
|
||||
<if test="floorNo != null">floor_no = #{floorNo},</if>
|
||||
<if test="useFlag != null">use_flag = #{useFlag},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="ud1 != null">ud1 = #{ud1},</if>
|
||||
<if test="ud2 != null">ud2 = #{ud2},</if>
|
||||
<if test="ud3 != null">ud3 = #{ud3},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="fromFloorNo != null">from_floor_no = #{fromFloorNo},</if>
|
||||
<if test="isEmpty != null">is_empty = #{isEmpty},</if>
|
||||
<if test="ctuExecute != null">ctu_execute = #{ctuExecute},</if>
|
||||
<if test="taskCode != null">taskCode = #{taskCode},</if>
|
||||
<if test="isDelete != null">is_delete = #{isDelete},</if>
|
||||
<if test="isStop != null">is_stop = #{isStop},</if>
|
||||
</trim>
|
||||
where objid = #{objid}
|
||||
</update>
|
||||
|
||||
<delete id="deleteWcsTaskByObjid" parameterType="Long">
|
||||
delete from wcs_task where objid = #{objid}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteWcsTaskByObjids" parameterType="String">
|
||||
delete from wcs_task where objid in
|
||||
<foreach item="objid" collection="array" open="(" separator="," close=")">
|
||||
#{objid}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@ -0,0 +1,34 @@
|
||||
package com.hw.wms.board.service;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.hw.wms.domain.WmsStockTotal;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface IFourthWmsBoardService {
|
||||
|
||||
/**
|
||||
* 获取四楼仓储看板最上方数据
|
||||
* @return
|
||||
*/
|
||||
public JSONObject getOverallInOutStockInfo();
|
||||
|
||||
/**
|
||||
* 获取四楼仓库的成品库存
|
||||
* @return
|
||||
*/
|
||||
public List<WmsStockTotal> getFourthFloorTotalProductStocks();
|
||||
|
||||
/**
|
||||
* 获取四楼仓储看板成品出入库数量
|
||||
* @return
|
||||
*/
|
||||
public JSONObject getFourthFloorProductInOutstockInfo();
|
||||
|
||||
/**
|
||||
* 获取总库存信息
|
||||
* @param queryStockTotal
|
||||
* @return
|
||||
*/
|
||||
public List<WmsStockTotal> getRawStockTotals(WmsStockTotal queryStockTotal);
|
||||
}
|
||||
@ -0,0 +1,104 @@
|
||||
package com.hw.wms.board.service.impl;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.hw.wms.board.service.IFourthWmsBoardService;
|
||||
import com.hw.wms.domain.*;
|
||||
import com.hw.wms.mapper.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class FourthWmsBoardService implements IFourthWmsBoardService {
|
||||
@Autowired
|
||||
private WmsRawOutstockMapper wmsRawOutstockMapper;
|
||||
|
||||
@Autowired
|
||||
private WmsRawInstockMapper wmsRawInstockMapper;
|
||||
|
||||
@Autowired
|
||||
private WmsProductInstockMapper wmsProductInstockMapper;
|
||||
|
||||
@Autowired
|
||||
private WmsProductOutstockMapper wmsProductOutstockMapper;
|
||||
|
||||
@Autowired
|
||||
private WmsStockTotalMapper wmsStockTotalMapper;
|
||||
|
||||
/**
|
||||
* 获取四楼仓储看板最上方数据
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public JSONObject getOverallInOutStockInfo() {
|
||||
JSONObject resultJson = new JSONObject();
|
||||
|
||||
//获取近一年板材入库数量
|
||||
WmsRawInstock latestYearRawInstock = wmsRawInstockMapper.fourthFloorLatestInstockList();
|
||||
|
||||
//获取近一年板材出库数量
|
||||
WmsRawOutstock latestYearRawOutstock = wmsRawOutstockMapper.fourthFloorLatestYearRawOutstock();
|
||||
|
||||
//获取近一年成品入库数量
|
||||
WmsProductInstock latestYearProductInstock = wmsProductInstockMapper.fourthFloorLatestYearProductInstock();
|
||||
|
||||
BigDecimal rawInstockAmount = latestYearRawInstock.getInstockAmount().setScale(0, RoundingMode.HALF_UP);
|
||||
BigDecimal rawOutstockAmount = latestYearRawOutstock.getRealOutstockAmount().setScale(0, RoundingMode.HALF_UP);
|
||||
BigDecimal productInstockAmount = latestYearProductInstock.getInstockAmount().setScale(0, RoundingMode.HALF_UP);
|
||||
resultJson.put("rawInstockAmount", rawInstockAmount);
|
||||
resultJson.put("rawOutstockAmount", rawOutstockAmount);
|
||||
resultJson.put("productInstockAmount", productInstockAmount);
|
||||
return resultJson;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取四楼仓库的成品库存
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<WmsStockTotal> getFourthFloorTotalProductStocks() {
|
||||
WmsStockTotal queryStockTotal = new WmsStockTotal();
|
||||
//todo: 需要设置仓库ID为431
|
||||
List<WmsStockTotal> wmsStockTotalList = wmsStockTotalMapper.selectStockTotalListGroupByMaterial(queryStockTotal);
|
||||
return wmsStockTotalList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取四楼仓储看板成品出入库数量
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public JSONObject getFourthFloorProductInOutstockInfo(){
|
||||
JSONObject resultJson = new JSONObject();
|
||||
//四楼成品库近一个月的成品入库数量
|
||||
WmsProductInstock wmsProductInstock = wmsProductInstockMapper.fourthFloorLatestMonthProductInstock();
|
||||
//四楼成品库近一个月的成品出库数量
|
||||
WmsProductOutstock wmsProductOutstock = wmsProductOutstockMapper.fourthFloorLatestMonthProductOutstock();
|
||||
|
||||
BigDecimal productInstockAmount = wmsProductInstock.getInstockAmount().setScale(0, RoundingMode.HALF_UP);
|
||||
BigDecimal productOutStockAmount = wmsProductOutstock.getOutstockQty().setScale(0, RoundingMode.HALF_UP);
|
||||
|
||||
resultJson.put("productInstockAmount",productInstockAmount);
|
||||
resultJson.put("productOutStockAmount",productOutStockAmount);
|
||||
|
||||
return resultJson;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取总库存信息
|
||||
* @param queryStockTotal
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<WmsStockTotal> getRawStockTotals(WmsStockTotal queryStockTotal){
|
||||
return wmsStockTotalMapper.selectWmsStockTotalList(queryStockTotal);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,382 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row :gutter="20">
|
||||
<!--仓库数据-->
|
||||
<el-col :span="4" :xs="24">
|
||||
<div class="head-container">
|
||||
<el-input
|
||||
v-model="nickName"
|
||||
placeholder="请输入用户名称"
|
||||
clearable
|
||||
size="small"
|
||||
prefix-icon="el-icon-search"
|
||||
style="margin-bottom: 20px"
|
||||
/>
|
||||
</div>
|
||||
<div class="head-container">
|
||||
<el-tree
|
||||
:data="userList"
|
||||
:props="defaultProps"
|
||||
:expand-on-click-node="false"
|
||||
:filter-node-method="filterNode"
|
||||
ref="tree"
|
||||
node-key="userId"
|
||||
default-expand-all
|
||||
highlight-current
|
||||
@node-click="handleNodeClick"
|
||||
/>
|
||||
</div>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="20" :xs="24">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
|
||||
label-width="98px">
|
||||
|
||||
<el-form-item label="销售订单号" prop="saleorderCode">
|
||||
<el-input
|
||||
v-model="queryParams.saleorderCode"
|
||||
placeholder="请输入销售订单号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="计划编号" prop="planCode">
|
||||
<el-input
|
||||
v-model="queryParams.planCode"
|
||||
placeholder="请输入计划编号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="计划明细编号" prop="planDetailCode">
|
||||
<el-input
|
||||
v-model="queryParams.planDetailCode"
|
||||
placeholder="请输入计划明细编号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="成品编码" prop="productCode">
|
||||
<el-input
|
||||
v-model="queryParams.productCode"
|
||||
placeholder="请输入成品编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="成品名称" prop="productName">
|
||||
<el-input
|
||||
v-model="queryParams.productName"
|
||||
placeholder="请输入成品名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="成品规格" prop="productSpec">
|
||||
<el-input
|
||||
v-model="queryParams.productSpec"
|
||||
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-table v-loading="loading" :data="produceStatisticsDetailList" @selection-change="handleSelectionChange">
|
||||
<el-table-column label="销售订单号" align="center" prop="saleorderCode"/>
|
||||
<!-- <el-table-column label="生产任务编号" align="center" prop="orderCode"/>-->
|
||||
<el-table-column label="计划编号" align="center" prop="planCode"/>
|
||||
<el-table-column label="计划明细编号" align="center" prop="planDetailCode"/>
|
||||
<el-table-column label="成名编码" align="center" prop="productCode"/>
|
||||
<el-table-column label="成品名称" align="center" prop="productName"/>
|
||||
<el-table-column label="成品规格" align="center" prop="productSpec"/>
|
||||
<el-table-column label="操作人员" align="center" prop="nickName"/>
|
||||
<el-table-column label="工序名称" align="center" prop="processName"/>
|
||||
<el-table-column label="计划开始时间" align="center" prop="planBeginTime" width="180">
|
||||
</el-table-column>
|
||||
<el-table-column label="计划结束时间" align="center" prop="planEndTime" width="180">
|
||||
</el-table-column>
|
||||
<el-table-column label="开始时间" align="center" prop="realBeginTime" width="180">
|
||||
</el-table-column>
|
||||
<el-table-column label="完成时间" align="center" prop="realEndTime" width="180">
|
||||
</el-table-column>
|
||||
<el-table-column label="生产用时(小时)" align="center" prop="produceTime"/>
|
||||
<!-- <el-table-column label="工艺路线" align="center" prop="dispatchName" />-->
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
listProduceStatisticsDetail,
|
||||
getProduceStatisticsDetail,
|
||||
delProduceStatisticsDetail,
|
||||
addProduceStatisticsDetail,
|
||||
updateProduceStatisticsDetail,
|
||||
getUserList
|
||||
} from "@/api/mes/produceStatisticsDetail";
|
||||
import toggleMenuLeftImg from "@/assets/images/togglemenu-left.png";
|
||||
import toggleMenuRightImg from "@/assets/images/togglemenu-right.png";
|
||||
|
||||
export default {
|
||||
name: "ProduceStatisticsDetail",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 生产完成明细表格数据
|
||||
produceStatisticsDetailList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
productOrderId: null,
|
||||
saleOrderId: null,
|
||||
saleorderCode: null,
|
||||
planId: null,
|
||||
planCode: null,
|
||||
planDetailId: null,
|
||||
planDetailCode: null,
|
||||
productId: null,
|
||||
productCode: null,
|
||||
productName: null,
|
||||
productSpec: null,
|
||||
userId: null,
|
||||
nickName: null,
|
||||
processId: null,
|
||||
processName: null,
|
||||
planBeginTime: null,
|
||||
planEndTime: null,
|
||||
realBeginTime: null,
|
||||
realEndTime: null,
|
||||
produceTime: null,
|
||||
dispatchType: null,
|
||||
dispatchId: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
productOrderId: [
|
||||
{required: true, message: "生产工单ID不能为空", trigger: "blur"}
|
||||
],
|
||||
planId: [
|
||||
{required: true, message: "生产计划ID不能为空", trigger: "blur"}
|
||||
],
|
||||
planCode: [
|
||||
{required: true, message: "计划编号,关联mes_product_plan_info的plan_code不能为空", trigger: "blur"}
|
||||
],
|
||||
planDetailId: [
|
||||
{required: true, message: "生产计划明细ID不能为空", trigger: "blur"}
|
||||
],
|
||||
planDetailCode: [
|
||||
{required: true, message: "生产计划明细编号不能为空", trigger: "blur"}
|
||||
],
|
||||
productId: [
|
||||
{required: true, message: "生产成品ID不能为空", trigger: "blur"}
|
||||
],
|
||||
},
|
||||
|
||||
toggleMenuLeftImg: toggleMenuLeftImg,
|
||||
toggleMenuRightImg: toggleMenuRightImg,
|
||||
toggleLeftDisplay: true,
|
||||
toggleRightDisplay: false,
|
||||
// 用户昵称
|
||||
nickName: undefined,
|
||||
userList: [],
|
||||
defaultProps: {
|
||||
children: "children",
|
||||
label: "nickName"
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getUserList();
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询生产完成明细列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listProduceStatisticsDetail(this.queryParams).then(response => {
|
||||
this.produceStatisticsDetailList = response.rows;
|
||||
this.produceStatisticsDetailList.forEach(psd => {
|
||||
if(psd.produceTime && psd.produceTime!==''){
|
||||
psd.produceTime = (psd.produceTime/1000/60/60).toFixed(2);
|
||||
}
|
||||
});
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
statisticsDetailId: null,
|
||||
productOrderId: null,
|
||||
saleOrderId: null,
|
||||
saleorderCode: null,
|
||||
planId: null,
|
||||
planCode: null,
|
||||
planDetailId: null,
|
||||
planDetailCode: null,
|
||||
productId: null,
|
||||
productCode: null,
|
||||
productName: null,
|
||||
productSpec: null,
|
||||
userId: null,
|
||||
nickName: null,
|
||||
processId: null,
|
||||
processName: null,
|
||||
planBeginTime: null,
|
||||
planEndTime: null,
|
||||
realBeginTime: null,
|
||||
realEndTime: null,
|
||||
produceTime: null,
|
||||
createTime: null,
|
||||
dispatchType: null,
|
||||
dispatchId: 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.statisticsDetailId)
|
||||
this.single = selection.length !== 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加生产完成明细";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const statisticsDetailId = row.statisticsDetailId || this.ids
|
||||
getProduceStatisticsDetail(statisticsDetailId).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改生产完成明细";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.statisticsDetailId != null) {
|
||||
updateProduceStatisticsDetail(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addProduceStatisticsDetail(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const statisticsDetailIds = row.statisticsDetailId || this.ids;
|
||||
this.$modal.confirm('是否确认删除生产完成明细编号为"' + statisticsDetailIds + '"的数据项?').then(function () {
|
||||
return delProduceStatisticsDetail(statisticsDetailIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('mes/produceStatisticsDetail/export', {
|
||||
...this.queryParams
|
||||
}, `produceStatisticsDetail_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
|
||||
toggleClick() {
|
||||
if (this.toggleLeftDisplay) {
|
||||
this.toggleRightDisplay = true;
|
||||
this.toggleLeftDisplay = false;
|
||||
} else if (this.toggleRightDisplay) {
|
||||
this.toggleRightDisplay = false;
|
||||
this.toggleLeftDisplay = true;
|
||||
}
|
||||
},
|
||||
|
||||
// 筛选节点
|
||||
filterNode(value, data) {
|
||||
if (!value) return true;
|
||||
return data.nickName.indexOf(value) !== -1;
|
||||
},
|
||||
// 节点单击事件
|
||||
handleNodeClick(data) {
|
||||
this.queryParams.userId = data.userId;
|
||||
this.handleQuery();
|
||||
},
|
||||
|
||||
|
||||
getUserList() {
|
||||
this.loading = true;
|
||||
getUserList().then(response => {
|
||||
this.userList = response.data;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
Loading…
Reference in New Issue