diff --git a/op-api/op-api-system/src/main/java/com/op/system/api/domain/sap/SapBaseSupplier.java b/op-api/op-api-system/src/main/java/com/op/system/api/domain/sap/SapBaseSupplier.java new file mode 100644 index 00000000..d9c56985 --- /dev/null +++ b/op-api/op-api-system/src/main/java/com/op/system/api/domain/sap/SapBaseSupplier.java @@ -0,0 +1,279 @@ +package com.op.system.api.domain.sap; + +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; + +/** + * 供应商管理对象 base_supplier + * + * @author Open Platform + * @date 2023-07-18 + */ +public class SapBaseSupplier extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** 主键uuid */ + private String supplierId; + + /** 供应商代码 */ + @Excel(name = "供应商代码") + private String supplierCode; + + /** 中文描述 */ + @Excel(name = "中文描述") + private String zhDesc; + + /** 英文描述 */ + @Excel(name = "英文描述") + private String enDesc; + + /** 供应商类型 */ + @Excel(name = "供应商类型") + private String supplierType; + + /** 账号 */ + @Excel(name = "账号") + private String accountNumber; + + /** 证照编码 */ + @Excel(name = "证照编码") + private String licenceNumber; + + /** 经营范围 */ + @Excel(name = "经营范围") + private String businessScope; + + /** 省 */ + @Excel(name = "省") + private String province; + + /** 市 */ + @Excel(name = "市") + private String city; + + /** 区 */ + @Excel(name = "区") + private String area; + + /** 详细地址 */ + @Excel(name = "详细地址") + private String address; + + /** 邮编 */ + @Excel(name = "邮编") + private String postcode; + + /** 联系人 */ + @Excel(name = "联系人") + private String contact; + + /** 联系人电话 */ + @Excel(name = "联系人电话") + private String contactPhone; + + /** 联系人职务 */ + @Excel(name = "联系人职务") + private String contactPosition; + + /** 联系人电子邮件 */ + @Excel(name = "联系人电子邮件") + private String contactEmail; + + /** 激活标记 */ + @Excel(name = "激活标记") + private String activeFlag; + + /** 用户自定义1--国家 */ + @Excel(name = "用户自定义1--国家") + private String userDefined1; + + /** 用户自定义2--税号 */ + @Excel(name = "用户自定义2--税号") + private String userDefined2; + + /** 用户自定义3 */ + @Excel(name = "用户自定义3") + private String userDefined3; + + public void setSupplierId(String supplierId) { + this.supplierId = supplierId; + } + + public String getSupplierId() { + return supplierId; + } + public void setSupplierCode(String supplierCode) { + this.supplierCode = supplierCode; + } + + public String getSupplierCode() { + return supplierCode; + } + public void setZhDesc(String zhDesc) { + this.zhDesc = zhDesc; + } + + public String getZhDesc() { + return zhDesc; + } + public void setEnDesc(String enDesc) { + this.enDesc = enDesc; + } + + public String getEnDesc() { + return enDesc; + } + public void setSupplierType(String supplierType) { + this.supplierType = supplierType; + } + + public String getSupplierType() { + return supplierType; + } + public void setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + } + + public String getAccountNumber() { + return accountNumber; + } + public void setLicenceNumber(String licenceNumber) { + this.licenceNumber = licenceNumber; + } + + public String getLicenceNumber() { + return licenceNumber; + } + public void setBusinessScope(String businessScope) { + this.businessScope = businessScope; + } + + public String getBusinessScope() { + return businessScope; + } + public void setProvince(String province) { + this.province = province; + } + + public String getProvince() { + return province; + } + public void setCity(String city) { + this.city = city; + } + + public String getCity() { + return city; + } + public void setArea(String area) { + this.area = area; + } + + public String getArea() { + return area; + } + public void setAddress(String address) { + this.address = address; + } + + public String getAddress() { + return address; + } + public void setPostcode(String postcode) { + this.postcode = postcode; + } + + public String getPostcode() { + return postcode; + } + public void setContact(String contact) { + this.contact = contact; + } + + public String getContact() { + return contact; + } + public void setContactPhone(String contactPhone) { + this.contactPhone = contactPhone; + } + + public String getContactPhone() { + return contactPhone; + } + public void setContactPosition(String contactPosition) { + this.contactPosition = contactPosition; + } + + public String getContactPosition() { + return contactPosition; + } + public void setContactEmail(String contactEmail) { + this.contactEmail = contactEmail; + } + + public String getContactEmail() { + return contactEmail; + } + public void setActiveFlag(String activeFlag) { + this.activeFlag = activeFlag; + } + + public String getActiveFlag() { + return activeFlag; + } + public void setUserDefined1(String userDefined1) { + this.userDefined1 = userDefined1; + } + + public String getUserDefined1() { + return userDefined1; + } + public void setUserDefined2(String userDefined2) { + this.userDefined2 = userDefined2; + } + + public String getUserDefined2() { + return userDefined2; + } + public void setUserDefined3(String userDefined3) { + this.userDefined3 = userDefined3; + } + + public String getUserDefined3() { + return userDefined3; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("supplierId", getSupplierId()) + .append("supplierCode", getSupplierCode()) + .append("zhDesc", getZhDesc()) + .append("enDesc", getEnDesc()) + .append("supplierType", getSupplierType()) + .append("accountNumber", getAccountNumber()) + .append("licenceNumber", getLicenceNumber()) + .append("businessScope", getBusinessScope()) + .append("province", getProvince()) + .append("city", getCity()) + .append("area", getArea()) + .append("address", getAddress()) + .append("postcode", getPostcode()) + .append("contact", getContact()) + .append("contactPhone", getContactPhone()) + .append("contactPosition", getContactPosition()) + .append("contactEmail", getContactEmail()) + .append("activeFlag", getActiveFlag()) + .append("userDefined1", getUserDefined1()) + .append("userDefined2", getUserDefined2()) + .append("userDefined3", getUserDefined3()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("remark", getRemark()) + .toString(); + } +} diff --git a/op-modules/op-mes/src/main/java/com/op/mes/controller/MesReportWorkController.java b/op-modules/op-mes/src/main/java/com/op/mes/controller/MesReportWorkController.java index ef171e3d..81e0dadc 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/controller/MesReportWorkController.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/controller/MesReportWorkController.java @@ -4,6 +4,7 @@ import java.util.List; import javax.servlet.http.HttpServletResponse; import com.op.common.core.utils.uuid.IdUtils; +import com.op.mes.domain.MesDailyReport; import com.op.mes.domain.MesProcessReport; import com.op.mes.domain.MesReportProduction; import org.springframework.beans.factory.annotation.Autowired; @@ -146,6 +147,17 @@ public class MesReportWorkController extends BaseController { ExcelUtil util = new ExcelUtil(MesReportProduction.class); util.exportExcel(response, list, "工单各工序完成数据"); } + + /** + * 获取产量报表 + */ + @RequiresPermissions("mes:production:list") + @GetMapping("/getDailyReport") + public TableDataInfo getDailyReport(MesDailyReport mesDailyReport) { + startPage(); + List list = mesReportWorkService.getDailyReport(mesDailyReport); + return getDataTable(list); + } } diff --git a/op-modules/op-mes/src/main/java/com/op/mes/domain/MesDailyReport.java b/op-modules/op-mes/src/main/java/com/op/mes/domain/MesDailyReport.java new file mode 100644 index 00000000..d56cffaf --- /dev/null +++ b/op-modules/op-mes/src/main/java/com/op/mes/domain/MesDailyReport.java @@ -0,0 +1,560 @@ +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 MesDailyReport extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** 记录id */ + private String id; + + /** 报工类型,报工类型:SELF自行报工、UNI统一报工 */ + @Excel(name = "报工类型,报工类型:SELF自行报工、UNI统一报工") + private String reportType; + + /** 报工单编号 */ + @Excel(name = "报工单编号") + private String reportCode; + + /** 生产工单编码 */ + @Excel(name = "生产工单编码") + private String workorderCode; + + /** 产品编码 */ + @Excel(name = "产品编码") + private String productCode; + + /** 产品名称 */ + @Excel(name = "产品名称") + private String productName; + + /** 规格型号 */ + @Excel(name = "规格型号") + private String spec; + + /** 单位 */ + @Excel(name = "单位") + private String unit; + + /** 排产数量 */ + @Excel(name = "排产数量") + private BigDecimal quantity; + + /** 本次报工数量 */ + @Excel(name = "本次报工数量") + private BigDecimal quantityFeedback; + + /** 合格数量 */ + @Excel(name = "合格数量") + private BigDecimal quantityQualified; + + /** 不合格数量 */ + @Excel(name = "不合格数量") + private BigDecimal quantityUnqualified; + + /** 报工人员 */ + @Excel(name = "报工人员") + private String userName; + + /** 人员名称 */ + @Excel(name = "人员名称") + private String nickName; + + /** 报工途径:PAD、MOBILE、PC */ + @Excel(name = "报工途径:PAD、MOBILE、PC") + private String feedbackChannel; + + /** 报工时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "报工时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date feedbackTime; + + /** 录入人员 */ + @Excel(name = "录入人员") + private String recordUser; + + /** 状态 */ + @Excel(name = "状态") + private String status; + + /** 工时 */ + @Excel(name = "工时") + private Long workTime; + + /** 线体编码 */ + @Excel(name = "线体编码") + private String machineCode; + + /** 线体名称 */ + @Excel(name = "线体名称") + private String machineName; + + /** 班组编码 */ + @Excel(name = "班组编码") + private String teamCode; + + /** 班次编码 */ + @Excel(name = "班次编码") + private String shiftCode; + + /** 预留字段1 */ + @Excel(name = "预留字段1") + private String attr1; + + /** 预留字段2 */ + @Excel(name = "预留字段2") + private String attr2; + + /** 预留字段3 */ + @Excel(name = "预留字段3") + private String attr3; + + /** 预留字段4 */ + @Excel(name = "预留字段4") + private String attr4; + @Excel(name = "计划生产日期") + private String productDate; + private String productDateStart; + private String productDateEnd; + @Excel(name = "订单编号") + private String orderCode; + @Excel(name = "规格型号") + private String productSpc; + @Excel(name = "工序名称") + private String processName; + @Excel(name = "工序编码") + private String processCode; + private String factoryCode; + private String factoryName; + private String carCode; + private String carName; + private Date uploadTime; + private String uploadStatus; + private String uploadMsg; + private String workorderCodeSap; + private String routeCode; + private String sac1; + private String sac2; + private String sac3; + private String sac4; + private String sac5; + private String sac6; + + public String getWorkorderCodeSap() { + return workorderCodeSap; + } + + public void setWorkorderCodeSap(String workorderCodeSap) { + this.workorderCodeSap = workorderCodeSap; + } + + public String getRouteCode() { + return routeCode; + } + + public void setRouteCode(String routeCode) { + this.routeCode = routeCode; + } + + public String getSac1() { + return sac1; + } + + public void setSac1(String sac1) { + this.sac1 = sac1; + } + + public String getSac2() { + return sac2; + } + + public void setSac2(String sac2) { + this.sac2 = sac2; + } + + public String getSac3() { + return sac3; + } + + public void setSac3(String sac3) { + this.sac3 = sac3; + } + + public String getSac4() { + return sac4; + } + + public void setSac4(String sac4) { + this.sac4 = sac4; + } + + public String getSac5() { + return sac5; + } + + public void setSac5(String sac5) { + this.sac5 = sac5; + } + + public String getSac6() { + return sac6; + } + + public void setSac6(String sac6) { + this.sac6 = sac6; + } + + public Date getUploadTime() { + return uploadTime; + } + + public void setUploadTime(Date uploadTime) { + this.uploadTime = uploadTime; + } + + public String getUploadStatus() { + return uploadStatus; + } + + public void setUploadStatus(String uploadStatus) { + this.uploadStatus = uploadStatus; + } + + public String getUploadMsg() { + return uploadMsg; + } + + public void setUploadMsg(String uploadMsg) { + this.uploadMsg = uploadMsg; + } + + 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 getProcessCode() { + return processCode; + } + + public void setProcessCode(String processCode) { + this.processCode = processCode; + } + + 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 void setId(String id) { + this.id = id; + } + + public String getId() { + return id; + } + + public void setReportType(String reportType) { + this.reportType = reportType; + } + public String getReportType() { + return reportType; + } + + public void setReportCode(String reportCode) { + this.reportCode = reportCode; + } + public String getReportCode() { + return reportCode; + } + + public void setWorkorderCode(String workorderCode) { + this.workorderCode = workorderCode; + } + + public String getWorkorderCode() { + return workorderCode; + } + public void setProductCode(String productCode) { + this.productCode = productCode; + } + + public String getProductCode() { + return productCode; + } + public void setProductName(String productName) { + this.productName = productName; + } + + public String getProductName() { + return productName; + } + public void setSpec(String spec) { + this.spec = spec; + } + + public String getSpec() { + return spec; + } + public void setUnit(String unit) { + this.unit = unit; + } + + public String getUnit() { + return unit; + } + public void setQuantity(BigDecimal quantity) { + this.quantity = quantity; + } + + public BigDecimal getQuantity() { + return quantity; + } + public void setQuantityFeedback(BigDecimal quantityFeedback) { + this.quantityFeedback = quantityFeedback; + } + + public BigDecimal getQuantityFeedback() { + return quantityFeedback; + } + public void setQuantityQualified(BigDecimal quantityQualified) { + this.quantityQualified = quantityQualified; + } + + public BigDecimal getQuantityQualified() { + return quantityQualified; + } + public void setQuantityUnqualified(BigDecimal quantityUnqualified) { + this.quantityUnqualified = quantityUnqualified; + } + + public BigDecimal getQuantityUnqualified() { + return quantityUnqualified; + } + public void setUserName(String userName) { + this.userName = userName; + } + + public String getUserName() { + return userName; + } + public void setNickName(String nickName) { + this.nickName = nickName; + } + + public String getNickName() { + return nickName; + } + public void setFeedbackChannel(String feedbackChannel) { + this.feedbackChannel = feedbackChannel; + } + + public String getFeedbackChannel() { + return feedbackChannel; + } + public void setFeedbackTime(Date feedbackTime) { + this.feedbackTime = feedbackTime; + } + + public Date getFeedbackTime() { + return feedbackTime; + } + public void setRecordUser(String recordUser) { + this.recordUser = recordUser; + } + + public String getRecordUser() { + return recordUser; + } + public void setStatus(String status) { + this.status = status; + } + + public String getStatus() { + return status; + } + public void setWorkTime(Long workTime) { + this.workTime = workTime; + } + + public Long getWorkTime() { + return workTime; + } + public void setMachineCode(String machineCode) { + this.machineCode = machineCode; + } + + public String getMachineCode() { + return machineCode; + } + public void setMachineName(String machineName) { + this.machineName = machineName; + } + + public String getMachineName() { + return machineName; + } + public void setTeamCode(String teamCode) { + this.teamCode = teamCode; + } + + public String getTeamCode() { + return teamCode; + } + public void setShiftCode(String shiftCode) { + this.shiftCode = shiftCode; + } + + public String getShiftCode() { + return shiftCode; + } + public void setAttr1(String attr1) { + this.attr1 = attr1; + } + + public String getAttr1() { + return attr1; + } + public void setAttr2(String attr2) { + this.attr2 = attr2; + } + + public String getAttr2() { + return attr2; + } + public void setAttr3(String attr3) { + this.attr3 = attr3; + } + + public String getAttr3() { + return attr3; + } + public void setAttr4(String attr4) { + this.attr4 = attr4; + } + + public String getAttr4() { + return attr4; + } + + 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 String getProductSpc() { + return productSpc; + } + + public void setProductSpc(String productSpc) { + this.productSpc = productSpc; + } + + public String getProcessName() { + return processName; + } + + public void setProcessName(String processName) { + this.processName = processName; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("reportType", getReportType()) + .append("reportCode", getReportCode()) + .append("workorderCode", getWorkorderCode()) + .append("productCode", getProductCode()) + .append("productName", getProductName()) + .append("spec", getSpec()) + .append("unit", getUnit()) + .append("quantity", getQuantity()) + .append("quantityFeedback", getQuantityFeedback()) + .append("quantityQualified", getQuantityQualified()) + .append("quantityUnqualified", getQuantityUnqualified()) + .append("userName", getUserName()) + .append("nickName", getNickName()) + .append("feedbackChannel", getFeedbackChannel()) + .append("feedbackTime", getFeedbackTime()) + .append("recordUser", getRecordUser()) + .append("status", getStatus()) + .append("remark", getRemark()) + .append("workTime", getWorkTime()) + .append("machineCode", getMachineCode()) + .append("machineName", getMachineName()) + .append("teamCode", getTeamCode()) + .append("shiftCode", getShiftCode()) + .append("attr1", getAttr1()) + .append("attr2", getAttr2()) + .append("attr3", getAttr3()) + .append("attr4", getAttr4()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateTime", getUpdateTime()) + .append("updateBy", getUpdateBy()) + .toString(); + } +} diff --git a/op-modules/op-mes/src/main/java/com/op/mes/mapper/MesReportWorkMapper.java b/op-modules/op-mes/src/main/java/com/op/mes/mapper/MesReportWorkMapper.java index bafd6fb3..7a665776 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/mapper/MesReportWorkMapper.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/mapper/MesReportWorkMapper.java @@ -2,6 +2,7 @@ package com.op.mes.mapper; import java.util.List; +import com.op.mes.domain.MesDailyReport; import com.op.mes.domain.MesProcessReport; import com.op.mes.domain.MesReportProduction; import com.op.mes.domain.MesReportWork; @@ -67,5 +68,7 @@ public interface MesReportWorkMapper { public List getReportWorkList(MesReportWork mesReportWork); - void updateSyncSapStatus(MesReportWork work); + public void updateSyncSapStatus(MesReportWork work); + + public List getDailyReport(MesDailyReport mesDailyReport); } diff --git a/op-modules/op-mes/src/main/java/com/op/mes/service/IMesReportWorkService.java b/op-modules/op-mes/src/main/java/com/op/mes/service/IMesReportWorkService.java index f1eebbf0..34cf877e 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/service/IMesReportWorkService.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/service/IMesReportWorkService.java @@ -2,6 +2,7 @@ package com.op.mes.service; import java.util.List; +import com.op.mes.domain.MesDailyReport; import com.op.mes.domain.MesProcessReport; import com.op.mes.domain.MesReportProduction; import com.op.mes.domain.MesReportWork; @@ -64,4 +65,6 @@ public interface IMesReportWorkService { public List getProcessFinishList(MesProcessReport mesReportWork); public List getProductionList(MesReportProduction mesReportProduction); + + public List getDailyReport(MesDailyReport mesDailyReport); } diff --git a/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesReportWorkServiceImpl.java b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesReportWorkServiceImpl.java index 03d9e4f4..0332de5d 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesReportWorkServiceImpl.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesReportWorkServiceImpl.java @@ -6,6 +6,7 @@ import java.util.List; import com.baomidou.dynamic.datasource.annotation.DS; import com.op.common.core.utils.DateUtils; +import com.op.mes.domain.MesDailyReport; import com.op.mes.domain.MesProcessReport; import com.op.mes.domain.MesReportProduction; import org.springframework.beans.factory.annotation.Autowired; @@ -166,4 +167,10 @@ public class MesReportWorkServiceImpl implements IMesReportWorkService { return mesReportWorkMapper.getProductionList(mesReportProduction); } + @Override + @DS("#header.poolName") + public List getDailyReport(MesDailyReport mesDailyReport) { + return mesReportWorkMapper.getDailyReport(mesDailyReport); + } + } diff --git a/op-modules/op-mes/src/main/resources/mapper/mes/MesReportWorkMapper.xml b/op-modules/op-mes/src/main/resources/mapper/mes/MesReportWorkMapper.xml index e52bed5f..c04358b3 100644 --- a/op-modules/op-mes/src/main/resources/mapper/mes/MesReportWorkMapper.xml +++ b/op-modules/op-mes/src/main/resources/mapper/mes/MesReportWorkMapper.xml @@ -175,6 +175,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where mrw.upload_status != #{uploadStatus} order by mrw.create_time + insert into mes_report_work