From 4b323702f65f308c8bd7ea382f15ab22221174f5 Mon Sep 17 00:00:00 2001 From: Yangwl <1726150332@qq.com> Date: Wed, 14 Aug 2024 19:28:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=81=E4=B8=9A=E5=BE=AE=E4=BF=A1=E6=8A=A5?= =?UTF-8?q?=E8=A1=A8=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../op/mes/controller/H5ApiController.java | 36 +++++ .../src/main/java/com/op/mes/domain/H5.java | 149 ++++++++++++++++++ .../java/com/op/mes/mapper/H5ApiMapper.java | 21 +++ .../java/com/op/mes/service/H5ApiService.java | 9 ++ .../op/mes/service/impl/H5ApiServiceImpl.java | 31 ++++ .../main/resources/mapper/mes/H5ApiMapper.xml | 133 ++++++++++++++++ 6 files changed, 379 insertions(+) create mode 100644 op-modules/op-mes/src/main/java/com/op/mes/controller/H5ApiController.java create mode 100644 op-modules/op-mes/src/main/java/com/op/mes/domain/H5.java create mode 100644 op-modules/op-mes/src/main/java/com/op/mes/mapper/H5ApiMapper.java create mode 100644 op-modules/op-mes/src/main/java/com/op/mes/service/H5ApiService.java create mode 100644 op-modules/op-mes/src/main/java/com/op/mes/service/impl/H5ApiServiceImpl.java create mode 100644 op-modules/op-mes/src/main/resources/mapper/mes/H5ApiMapper.xml diff --git a/op-modules/op-mes/src/main/java/com/op/mes/controller/H5ApiController.java b/op-modules/op-mes/src/main/java/com/op/mes/controller/H5ApiController.java new file mode 100644 index 000000000..d636154c0 --- /dev/null +++ b/op-modules/op-mes/src/main/java/com/op/mes/controller/H5ApiController.java @@ -0,0 +1,36 @@ +package com.op.mes.controller; + + +import com.op.mes.domain.H5; +import com.op.mes.service.H5ApiService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.validation.constraints.Max; +import java.util.List; + +/** + * H5接口 + * + * @author ruoyi + * @date 2024-07-04 + */ +@RestController +@RequestMapping("/h5") +public class H5ApiController { + + @Autowired + private H5ApiService h5ApiService; + + @GetMapping("/dailyProductDetil") + public List
list(H5 h5) + { + String workTime=h5.getFeedbackTime(); + List
list = h5ApiService.dailyProductDetil(workTime); + return list; + } + +} diff --git a/op-modules/op-mes/src/main/java/com/op/mes/domain/H5.java b/op-modules/op-mes/src/main/java/com/op/mes/domain/H5.java new file mode 100644 index 000000000..ca066f064 --- /dev/null +++ b/op-modules/op-mes/src/main/java/com/op/mes/domain/H5.java @@ -0,0 +1,149 @@ +package com.op.mes.domain; + +public class H5 { + private String workOrderCode; + private String lineName; + private String productName; + private String category; + private String specifications; + private String StandardStaffing; + private String actualEmployment; + private String productionDuration; + private int planProduction; + private int production; + private String hourlyProduction; + private String standardEfficiency; + private String actualEfficiency; + private String efficiencyAcRate; + private String feedbackTime; + private String parentOrder; + + + public int getPlanProduction() { + return planProduction; + } + + public void setPlanProduction(int planProduction) { + this.planProduction = planProduction; + } + + public String getWorkOrderCode() { + return workOrderCode; + } + + public void setWorkOrderCode(String workOrderCode) { + this.workOrderCode = workOrderCode; + } + + public String getParentOrder() { + return parentOrder; + } + + public void setParentOrder(String parentOrder) { + this.parentOrder = parentOrder; + } + + public String getFeedbackTime() { + return feedbackTime; + } + + public void setFeedbackTime(String feedbackTime) { + this.feedbackTime = feedbackTime; + } + + public String getLineName() { + return lineName; + } + + public void setLineName(String lineName) { + this.lineName = lineName; + } + + public String getProductName() { + return productName; + } + + public void setProductName(String productName) { + this.productName = productName; + } + + public String getCategory() { + return category; + } + + public void setCategory(String category) { + this.category = category; + } + + public String getSpecifications() { + return specifications; + } + + public void setSpecifications(String specifications) { + this.specifications = specifications; + } + + public String getStandardStaffing() { + return StandardStaffing; + } + + public void setStandardStaffing(String standardStaffing) { + StandardStaffing = standardStaffing; + } + + public String getActualEmployment() { + return actualEmployment; + } + + public void setActualEmployment(String actualEmployment) { + this.actualEmployment = actualEmployment; + } + + public String getProductionDuration() { + return productionDuration; + } + + public void setProductionDuration(String productionDuration) { + this.productionDuration = productionDuration; + } + + public int getProduction() { + return production; + } + + public void setProduction(int production) { + this.production = production; + } + + public String getHourlyProduction() { + return hourlyProduction; + } + + public void setHourlyProduction(String hourlyProduction) { + this.hourlyProduction = hourlyProduction; + } + + public String getStandardEfficiency() { + return standardEfficiency; + } + + public void setStandardEfficiency(String standardEfficiency) { + this.standardEfficiency = standardEfficiency; + } + + public String getActualEfficiency() { + return actualEfficiency; + } + + public void setActualEfficiency(String actualEfficiency) { + this.actualEfficiency = actualEfficiency; + } + + public String getEfficiencyAcRate() { + return efficiencyAcRate; + } + + public void setEfficiencyAcRate(String efficiencyAcRate) { + this.efficiencyAcRate = efficiencyAcRate; + } +} diff --git a/op-modules/op-mes/src/main/java/com/op/mes/mapper/H5ApiMapper.java b/op-modules/op-mes/src/main/java/com/op/mes/mapper/H5ApiMapper.java new file mode 100644 index 000000000..a5eff2580 --- /dev/null +++ b/op-modules/op-mes/src/main/java/com/op/mes/mapper/H5ApiMapper.java @@ -0,0 +1,21 @@ +package com.op.mes.mapper; + +import com.op.mes.domain.H5; + +import java.util.List; + +public interface H5ApiMapper { + /** + * 查询母单报工信息 + * @param h5 + * @return + */ + public List
selectMesLineProdceList(H5 h5); + + /** + * 查询子单报工信息 + * @param h5 + * @return + */ + public List
selectMesLineProsdceLists(H5 h5); +} diff --git a/op-modules/op-mes/src/main/java/com/op/mes/service/H5ApiService.java b/op-modules/op-mes/src/main/java/com/op/mes/service/H5ApiService.java new file mode 100644 index 000000000..a5c9a6929 --- /dev/null +++ b/op-modules/op-mes/src/main/java/com/op/mes/service/H5ApiService.java @@ -0,0 +1,9 @@ +package com.op.mes.service; + +import com.op.mes.domain.H5; + +import java.util.List; + +public interface H5ApiService { + List
dailyProductDetil(String workTime); +} diff --git a/op-modules/op-mes/src/main/java/com/op/mes/service/impl/H5ApiServiceImpl.java b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/H5ApiServiceImpl.java new file mode 100644 index 000000000..ee937e5a1 --- /dev/null +++ b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/H5ApiServiceImpl.java @@ -0,0 +1,31 @@ +package com.op.mes.service.impl; + + +import com.baomidou.dynamic.datasource.annotation.DS; +import com.op.mes.domain.H5; +import com.op.mes.mapper.H5ApiMapper; +import com.op.mes.service.H5ApiService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +@Service +public class H5ApiServiceImpl implements H5ApiService { + @Autowired + private H5ApiMapper h5ApiMapper; + + + @Override + @DS("#header.poolName") + public List
dailyProductDetil(String workTime) { + //查询当天的生产情况 + H5 h5=new H5(); + h5.setFeedbackTime(workTime); + //母单报工信息 + List
h5List=h5ApiMapper.selectMesLineProdceList(h5); + return h5List; + } +} diff --git a/op-modules/op-mes/src/main/resources/mapper/mes/H5ApiMapper.xml b/op-modules/op-mes/src/main/resources/mapper/mes/H5ApiMapper.xml new file mode 100644 index 000000000..b5e0bb6da --- /dev/null +++ b/op-modules/op-mes/src/main/resources/mapper/mes/H5ApiMapper.xml @@ -0,0 +1,133 @@ + + + + + + + + + + + + + + + + + + + + + + + +