计划bug修改-- 计划的选择方式修改
parent
fdd2069372
commit
d6d5ff4ae3
@ -0,0 +1,150 @@
|
|||||||
|
package com.op.mes.domain;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.op.common.core.annotation.Excel;
|
||||||
|
import com.op.common.core.web.domain.BaseEntity;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报工报表对象 mes_report_work
|
||||||
|
*
|
||||||
|
* @author Open Platform
|
||||||
|
* @date 2023-08-24
|
||||||
|
*/
|
||||||
|
public class MesProcessReport extends BaseEntity {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@Excel(name = "生产日期")
|
||||||
|
private String productDate;
|
||||||
|
@Excel(name = "订单编号")
|
||||||
|
private String orderCode;
|
||||||
|
@Excel(name = "排产数量")
|
||||||
|
private BigDecimal quantity;
|
||||||
|
@Excel(name = "产品编码")
|
||||||
|
private String productCode;
|
||||||
|
@Excel(name = "产品名称")
|
||||||
|
private String productName;
|
||||||
|
@Excel(name = "产品型号")
|
||||||
|
private String productSpc;
|
||||||
|
@Excel(name = "工单编号")
|
||||||
|
private String workorderCode;
|
||||||
|
@Excel(name = "工序编码")
|
||||||
|
private String processCode;
|
||||||
|
@Excel(name = "工序名称")
|
||||||
|
private String processName;
|
||||||
|
@Excel(name = "完成数量")
|
||||||
|
private BigDecimal quantityFeedback;
|
||||||
|
@Excel(name = "单位")
|
||||||
|
private String unit;
|
||||||
|
private String productDateStart;
|
||||||
|
private String productDateEnd;
|
||||||
|
|
||||||
|
public String getProductDateStart() {
|
||||||
|
return productDateStart;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProductDateStart(String productDateStart) {
|
||||||
|
this.productDateStart = productDateStart;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getProductDateEnd() {
|
||||||
|
return productDateEnd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProductDateEnd(String productDateEnd) {
|
||||||
|
this.productDateEnd = productDateEnd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getProductDate() {
|
||||||
|
return productDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProductDate(String productDate) {
|
||||||
|
this.productDate = productDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOrderCode() {
|
||||||
|
return orderCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOrderCode(String orderCode) {
|
||||||
|
this.orderCode = orderCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getQuantity() {
|
||||||
|
return quantity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setQuantity(BigDecimal quantity) {
|
||||||
|
this.quantity = quantity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getQuantityFeedback() {
|
||||||
|
return quantityFeedback;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setQuantityFeedback(BigDecimal quantityFeedback) {
|
||||||
|
this.quantityFeedback = quantityFeedback;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getProductCode() {
|
||||||
|
return productCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProductCode(String productCode) {
|
||||||
|
this.productCode = productCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getProductName() {
|
||||||
|
return productName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProductName(String productName) {
|
||||||
|
this.productName = productName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getProductSpc() {
|
||||||
|
return productSpc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProductSpc(String productSpc) {
|
||||||
|
this.productSpc = productSpc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getWorkorderCode() {
|
||||||
|
return workorderCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setWorkorderCode(String workorderCode) {
|
||||||
|
this.workorderCode = workorderCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getProcessCode() {
|
||||||
|
return processCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProcessCode(String processCode) {
|
||||||
|
this.processCode = processCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getProcessName() {
|
||||||
|
return processName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProcessName(String processName) {
|
||||||
|
this.processName = processName;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public String getUnit() {
|
||||||
|
return unit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUnit(String unit) {
|
||||||
|
this.unit = unit;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,150 @@
|
|||||||
|
package com.op.mes.domain;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.op.common.core.annotation.Excel;
|
||||||
|
import com.op.common.core.web.domain.BaseEntity;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报工报表对象 mes_report_work
|
||||||
|
*
|
||||||
|
* @author Open Platform
|
||||||
|
* @date 2023-08-24
|
||||||
|
*/
|
||||||
|
public class MesReportProduction extends BaseEntity {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
@Excel(name = "工厂编码")
|
||||||
|
private String factoryCode;
|
||||||
|
@Excel(name = "工厂名称")
|
||||||
|
private String factoryName;
|
||||||
|
@Excel(name = "车间编码")
|
||||||
|
private String carCode;
|
||||||
|
@Excel(name = "工厂名称")
|
||||||
|
private String carName;
|
||||||
|
@Excel(name = "工厂编码")
|
||||||
|
private String machineCode;
|
||||||
|
@Excel(name = "工厂名称")
|
||||||
|
private String machineName;
|
||||||
|
@Excel(name = "订单编号")
|
||||||
|
private String orderCode;
|
||||||
|
@Excel(name = "产品编码")
|
||||||
|
private String productCode;
|
||||||
|
@Excel(name = "产品名称")
|
||||||
|
private String productName;
|
||||||
|
@Excel(name = "计划产量")
|
||||||
|
private String quantity;
|
||||||
|
@Excel(name = "报工产量")
|
||||||
|
private String quantityFeedback;
|
||||||
|
@Excel(name = "规格型号")
|
||||||
|
private String productSpc;
|
||||||
|
@Excel(name = "工厂编码")
|
||||||
|
private String unit;
|
||||||
|
|
||||||
|
public String getFactoryCode() {
|
||||||
|
return factoryCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFactoryCode(String factoryCode) {
|
||||||
|
this.factoryCode = factoryCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFactoryName() {
|
||||||
|
return factoryName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFactoryName(String factoryName) {
|
||||||
|
this.factoryName = factoryName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCarCode() {
|
||||||
|
return carCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCarCode(String carCode) {
|
||||||
|
this.carCode = carCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCarName() {
|
||||||
|
return carName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCarName(String carName) {
|
||||||
|
this.carName = carName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMachineCode() {
|
||||||
|
return machineCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMachineCode(String machineCode) {
|
||||||
|
this.machineCode = machineCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMachineName() {
|
||||||
|
return machineName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMachineName(String machineName) {
|
||||||
|
this.machineName = machineName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOrderCode() {
|
||||||
|
return orderCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOrderCode(String orderCode) {
|
||||||
|
this.orderCode = orderCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getProductCode() {
|
||||||
|
return productCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProductCode(String productCode) {
|
||||||
|
this.productCode = productCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getProductName() {
|
||||||
|
return productName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProductName(String productName) {
|
||||||
|
this.productName = productName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getQuantity() {
|
||||||
|
return quantity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setQuantity(String quantity) {
|
||||||
|
this.quantity = quantity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getQuantityFeedback() {
|
||||||
|
return quantityFeedback;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setQuantityFeedback(String quantityFeedback) {
|
||||||
|
this.quantityFeedback = quantityFeedback;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getProductSpc() {
|
||||||
|
return productSpc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProductSpc(String productSpc) {
|
||||||
|
this.productSpc = productSpc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUnit() {
|
||||||
|
return unit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUnit(String unit) {
|
||||||
|
this.unit = unit;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,69 @@
|
|||||||
|
package com.op.plan.domain.vo;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Treeselect树结构实体类
|
||||||
|
*
|
||||||
|
* @author OP
|
||||||
|
*/
|
||||||
|
public class CascaderDTO implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 节点ID */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
private String value;
|
||||||
|
|
||||||
|
/** 节点名称 */
|
||||||
|
private String label;
|
||||||
|
|
||||||
|
/** 子节点 */
|
||||||
|
private List<CascaderDTO> children;
|
||||||
|
//
|
||||||
|
// public TreeSelect() {
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// public TreeSelect(SysDept dept) {
|
||||||
|
// this.id = dept.getDeptId();
|
||||||
|
// this.label = dept.getDeptName();
|
||||||
|
// this.children = dept.getChildren().stream().map(TreeSelect::new).collect(Collectors.toList());
|
||||||
|
// }
|
||||||
|
|
||||||
|
public Long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLabel() {
|
||||||
|
return label;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLabel(String label) {
|
||||||
|
this.label = label;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<CascaderDTO> getChildren() {
|
||||||
|
return children;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setChildren(List<CascaderDTO> children) {
|
||||||
|
this.children = children;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getValue() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setValue(String value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,31 +0,0 @@
|
|||||||
package com.op.quality.mapper;
|
|
||||||
|
|
||||||
import com.op.common.core.domain.R;
|
|
||||||
import com.op.quality.domain.QcProCheck;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @ClassName : QuaMapper
|
|
||||||
* @Description :
|
|
||||||
* @Author :
|
|
||||||
* @Date: 2023-08-17 10:40
|
|
||||||
*/
|
|
||||||
@Mapper
|
|
||||||
public interface QcProCheckMapper {
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
List<QcProCheck> selectQcProCheckList();
|
|
||||||
|
|
||||||
int insertQcProCheck(QcProCheck qcProCheck);
|
|
||||||
|
|
||||||
int updateQcProCheckById(String rfid);
|
|
||||||
|
|
||||||
int deleteQcProCheckById(String rfid);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
@ -1,158 +0,0 @@
|
|||||||
package com.op.quality.utils;
|
|
||||||
|
|
||||||
import com.op.common.core.exception.file.FileException;
|
|
||||||
import com.op.common.core.exception.file.FileNameLengthLimitExceededException;
|
|
||||||
import com.op.common.core.exception.file.FileSizeLimitExceededException;
|
|
||||||
import com.op.common.core.exception.file.InvalidExtensionException;
|
|
||||||
import com.op.common.core.utils.DateUtils;
|
|
||||||
import com.op.common.core.utils.StringUtils;
|
|
||||||
import com.op.common.core.utils.file.FileTypeUtils;
|
|
||||||
import com.op.common.core.utils.file.MimeTypeUtils;
|
|
||||||
import com.op.common.core.utils.uuid.Seq;
|
|
||||||
import org.apache.commons.io.FilenameUtils;
|
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.nio.file.Paths;
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 文件上传工具类
|
|
||||||
*
|
|
||||||
* @author OP
|
|
||||||
*/
|
|
||||||
public class FileUploadUtils {
|
|
||||||
/**
|
|
||||||
* 默认大小 50M
|
|
||||||
*/
|
|
||||||
public static final long DEFAULT_MAX_SIZE = 50 * 1024 * 1024;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 默认的文件名最大长度 100
|
|
||||||
*/
|
|
||||||
public static final int DEFAULT_FILE_NAME_LENGTH = 100;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据文件路径上传
|
|
||||||
*
|
|
||||||
* @param baseDir 相对应用的基目录
|
|
||||||
* @param file 上传的文件
|
|
||||||
* @return 文件名称
|
|
||||||
* @throws IOException
|
|
||||||
*/
|
|
||||||
public static final String upload(String baseDir, MultipartFile file) throws IOException {
|
|
||||||
try {
|
|
||||||
return upload(baseDir, file, MimeTypeUtils.DEFAULT_ALLOWED_EXTENSION);
|
|
||||||
} catch (FileException fe) {
|
|
||||||
throw new IOException(fe.getDefaultMessage(), fe);
|
|
||||||
} catch (Exception e) {
|
|
||||||
throw new IOException(e.getMessage(), e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 文件上传
|
|
||||||
*
|
|
||||||
* @param baseDir 相对应用的基目录
|
|
||||||
* @param file 上传的文件
|
|
||||||
* @param allowedExtension 上传文件类型
|
|
||||||
* @return 返回上传成功的文件名
|
|
||||||
* @throws FileSizeLimitExceededException 如果超出最大大小
|
|
||||||
* @throws FileNameLengthLimitExceededException 文件名太长
|
|
||||||
* @throws IOException 比如读写文件出错时
|
|
||||||
* @throws InvalidExtensionException 文件校验异常
|
|
||||||
*/
|
|
||||||
public static final String upload(String baseDir, MultipartFile file, String[] allowedExtension)
|
|
||||||
throws FileSizeLimitExceededException, IOException, FileNameLengthLimitExceededException,
|
|
||||||
InvalidExtensionException {
|
|
||||||
int fileNamelength = Objects.requireNonNull(file.getOriginalFilename()).length();
|
|
||||||
if (fileNamelength > FileUploadUtils.DEFAULT_FILE_NAME_LENGTH) {
|
|
||||||
throw new FileNameLengthLimitExceededException(FileUploadUtils.DEFAULT_FILE_NAME_LENGTH);
|
|
||||||
}
|
|
||||||
|
|
||||||
assertAllowed(file, allowedExtension);
|
|
||||||
|
|
||||||
String fileName = extractFilename(file);
|
|
||||||
|
|
||||||
String absPath = getAbsoluteFile(baseDir, fileName).getAbsolutePath();
|
|
||||||
file.transferTo(Paths.get(absPath));
|
|
||||||
return getPathFileName(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 编码文件名
|
|
||||||
*/
|
|
||||||
public static final String extractFilename(MultipartFile file) {
|
|
||||||
return StringUtils.format("{}/{}_{}.{}", DateUtils.datePath(),
|
|
||||||
FilenameUtils.getBaseName(file.getOriginalFilename()), Seq.getId(Seq.uploadSeqType),
|
|
||||||
FileTypeUtils.getExtension(file));
|
|
||||||
}
|
|
||||||
|
|
||||||
private static final File getAbsoluteFile(String uploadDir, String fileName) throws IOException {
|
|
||||||
File desc = new File(uploadDir + File.separator + fileName);
|
|
||||||
|
|
||||||
if (!desc.exists()) {
|
|
||||||
if (!desc.getParentFile().exists()) {
|
|
||||||
desc.getParentFile().mkdirs();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return desc.isAbsolute() ? desc : desc.getAbsoluteFile();
|
|
||||||
}
|
|
||||||
|
|
||||||
private static final String getPathFileName(String fileName) throws IOException {
|
|
||||||
String pathFileName = "/" + fileName;
|
|
||||||
return pathFileName;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 文件大小校验
|
|
||||||
*
|
|
||||||
* @param file 上传的文件
|
|
||||||
* @throws FileSizeLimitExceededException 如果超出最大大小
|
|
||||||
* @throws InvalidExtensionException 文件校验异常
|
|
||||||
*/
|
|
||||||
public static final void assertAllowed(MultipartFile file, String[] allowedExtension)
|
|
||||||
throws FileSizeLimitExceededException, InvalidExtensionException {
|
|
||||||
long size = file.getSize();
|
|
||||||
if (size > DEFAULT_MAX_SIZE) {
|
|
||||||
throw new FileSizeLimitExceededException(DEFAULT_MAX_SIZE / 1024 / 1024);
|
|
||||||
}
|
|
||||||
|
|
||||||
String fileName = file.getOriginalFilename();
|
|
||||||
String extension = FileTypeUtils.getExtension(file);
|
|
||||||
if (allowedExtension != null && !isAllowedExtension(extension, allowedExtension)) {
|
|
||||||
if (allowedExtension == MimeTypeUtils.IMAGE_EXTENSION) {
|
|
||||||
throw new InvalidExtensionException.InvalidImageExtensionException(allowedExtension, extension,
|
|
||||||
fileName);
|
|
||||||
} else if (allowedExtension == MimeTypeUtils.FLASH_EXTENSION) {
|
|
||||||
throw new InvalidExtensionException.InvalidFlashExtensionException(allowedExtension, extension,
|
|
||||||
fileName);
|
|
||||||
} else if (allowedExtension == MimeTypeUtils.MEDIA_EXTENSION) {
|
|
||||||
throw new InvalidExtensionException.InvalidMediaExtensionException(allowedExtension, extension,
|
|
||||||
fileName);
|
|
||||||
} else if (allowedExtension == MimeTypeUtils.VIDEO_EXTENSION) {
|
|
||||||
throw new InvalidExtensionException.InvalidVideoExtensionException(allowedExtension, extension,
|
|
||||||
fileName);
|
|
||||||
} else {
|
|
||||||
throw new InvalidExtensionException(allowedExtension, extension, fileName);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 判断MIME类型是否是允许的MIME类型
|
|
||||||
*
|
|
||||||
* @param extension 上传文件类型
|
|
||||||
* @param allowedExtension 允许上传文件类型
|
|
||||||
* @return true/false
|
|
||||||
*/
|
|
||||||
public static final boolean isAllowedExtension(String extension, String[] allowedExtension) {
|
|
||||||
for (String str : allowedExtension) {
|
|
||||||
if (str.equalsIgnoreCase(extension)) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue