Merge remote-tracking branch 'origin/master'

master
zhaoxiaolin 5 months ago
commit 74da1f1b19

@ -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<H5> list(H5 h5)
{
String workTime=h5.getFeedbackTime();
List<H5> list = h5ApiService.dailyProductDetil(workTime);
return list;
}
}

@ -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;
}
}

@ -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<H5> selectMesLineProdceList(H5 h5);
/**
*
* @param h5
* @return
*/
public List<H5> selectMesLineProsdceLists(H5 h5);
}

@ -0,0 +1,9 @@
package com.op.mes.service;
import com.op.mes.domain.H5;
import java.util.List;
public interface H5ApiService {
List<H5> dailyProductDetil(String workTime);
}

@ -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<H5> dailyProductDetil(String workTime) {
//查询当天的生产情况
H5 h5=new H5();
h5.setFeedbackTime(workTime);
//母单报工信息
List<H5> h5List=h5ApiMapper.selectMesLineProdceList(h5);
return h5List;
}
}

@ -0,0 +1,133 @@
<?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.op.mes.mapper.H5ApiMapper">
<resultMap type="H5" id="H5Result">
<result property="workOrderCode" column="workorder_code"/>
<result property="lineName" column="machine_name"/>
<result property="productName" column="product_name"/>
<result property="category" column="category"/>
<result property="specifications" column="umrez"/>
<result property="StandardStaffing" column="man_standar"/>
<result property="actualEmployment" column="use_man"/>
<result property="productionDuration" column="work_time"/>
<result property="planProduction" column="plan_production"/>
<result property="production" column="quantity_feedback"/>
<result property="parentOrder" column="parent_order"/>
<result property="standardEfficiency" column="standardEfficiency"/>
<result property="actualEfficiency" column="actualEfficiency"/>
<result property="efficiencyAcRate" column="efficiencyAcRate"/>
</resultMap>
<select id="selectMesLineProdceList" parameterType="H5" resultMap="H5Result">
SELECT
mrw.workorder_code,
mrw.machine_name,
mrw.product_code,
mrw.product_name,
bpa.category,
bp.umrez,
SUM ( mrw.quantity ) AS plan_production,
SUM ( mrw.quantity_feedback ) AS quantity_feedback,
MAX(A.quantity_s) AS quantity_s,
MAX(A.quantity_s_total) AS quantity_s_total,
bpa.man_standar,
MAX(A.use_man) AS use_man,
SUM(A.work_time) AS work_time,
mrw.parent_order ,
bpa.iei,
FORMAT(ROUND((bpa.iei / bp.umrez / bpa.man_standar), 1), '0.#') AS standardEfficiency,
FORMAT(ROUND(
CASE
WHEN MAX(A.use_man) = 0 OR SUM(A.work_time) = 0 THEN NULL
ELSE SUM(mrw.quantity_feedback) / MAX(A.use_man) / SUM(A.work_time)
END,
1
), '0.#') AS actualEfficiency,
FORMAT(
CASE
WHEN (bpa.iei / bp.umrez / bpa.man_standar) = 0
THEN NULL
ELSE (CAST(
ROUND(
CASE
WHEN MAX(A.use_man) = 0 OR SUM(A.work_time) = 0 THEN NULL
ELSE SUM(mrw.quantity_feedback) / MAX(A.use_man) / SUM(A.work_time)
END,
1
) AS DECIMAL(10,1))
/ CAST(
ROUND((bpa.iei / bp.umrez / bpa.man_standar), 1) AS DECIMAL(10,1)
) * 100
)
END,
'0.#'
) + '%' AS efficiencyAcRate
FROM
[dbo].[mes_report_work] mrw
LEFT JOIN base_product_attached bpa ON bpa.product_code = RIGHT ( mrw.product_code, 11 )
LEFT JOIN base_product bp ON bp.product_code = mrw.product_code
LEFT JOIN (
SELECT
mrws.workorder_code,
mrws.parent_order,
MAX(mrws.use_man) AS use_man,
MAX(pow.quantity_split) AS quantity_s,
SUM(mrws.quantity_feedback) AS quantity_s_total,
SUM (mrws.work_time ) AS work_time
FROM
[dbo].[mes_report_work] mrws
LEFT JOIN pro_order_workorder pow ON mrws.workorder_code=pow.workorder_code
WHERE
CAST (mrws.feedback_time AS DATE ) = #{feedbackTime}
AND mrws.parent_order != '0'
GROUP BY
mrws.workorder_code,
mrws.parent_order
) A ON A.parent_order= mrw.workorder_code
WHERE
CAST ( mrw.feedback_time AS DATE ) = #{feedbackTime}
AND mrw.parent_order = '0'
GROUP BY
mrw.workorder_code,
mrw.machine_name,
mrw.product_code,
mrw.product_name,
bpa.category,
bp.umrez,
bpa.man_standar,
mrw.use_man,
mrw.parent_order,
bpa.iei
ORDER BY mrw.machine_name ASC
</select>
<select id="selectMesLineProsdceLists" parameterType="H5" resultMap="H5Result">
SELECT
mrw.workorder_code,
mrw.machine_name,
mrw.product_code,
SUM ( mrw.quantity ) AS plan_production,
SUM ( mrw.quantity_feedback ) AS quantity_feedback,
mrw.use_man,
SUM ( mrw.work_time ) AS work_time,
mrw.parent_order
FROM
[dbo].[mes_report_work] mrw
LEFT JOIN base_product_attached bpa ON bpa.product_code = RIGHT(mrw.product_code, 11)
LEFT JOIN base_product bp ON bp.product_code = mrw.product_code
<where>
<if test="feedbackTime != null and feedbackTime != ''">
CAST ( mrw.feedback_time AS DATE ) = #{feedbackTime}
</if>
AND mrw.parent_order != '0'
</where>
GROUP BY
mrw.workorder_code,
mrw.machine_name,
mrw.product_code,
mrw.use_man,
mrw.parent_order;
</select>
</mapper>

@ -216,6 +216,38 @@ public class QcCheckTaskIncome extends BaseEntity {
private String oaFactoryF;//异常范围 private String oaFactoryF;//异常范围
private String sccj; private String sccj;
private String bz; private String bz;
/**
* cxzz:线()
* jgy:()
* pgy:()
*/
private String cxzz;
private String jgy;
private String pgy;
public String getCxzz() {
return cxzz;
}
public void setCxzz(String cxzz) {
this.cxzz = cxzz;
}
public String getJgy() {
return jgy;
}
public void setJgy(String jgy) {
this.jgy = jgy;
}
public String getPgy() {
return pgy;
}
public void setPgy(String pgy) {
this.pgy = pgy;
}
public String getBz() { public String getBz() {
return bz; return bz;

@ -1,6 +1,7 @@
package com.op.quality.service.impl; package com.op.quality.service.impl;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.*; import java.util.*;
import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletableFuture;
import java.util.regex.Matcher; import java.util.regex.Matcher;
@ -852,6 +853,9 @@ public class QcCheckTaskIncomeServiceImpl<QcCheckUnqualifiedService> implements
qcCheckTask.setCheckManName(qcCheckTaskIncome.getUpdateByName()); qcCheckTask.setCheckManName(qcCheckTaskIncome.getUpdateByName());
qcCheckTask.setReason(qcCheckTaskIncome.getReason()); qcCheckTask.setReason(qcCheckTaskIncome.getReason());
qcCheckTask.setBz(qcCheckTaskIncome.getAttr3());//备注 qcCheckTask.setBz(qcCheckTaskIncome.getAttr3());//备注
qcCheckTask.setCxzz(qcCheckTaskIncome.getCxzz());
qcCheckTask.setJgy(qcCheckTaskIncome.getJgy());
qcCheckTask.setPgy(qcCheckTaskIncome.getPgy());
BigDecimal sampleQuality = new BigDecimal("0"); BigDecimal sampleQuality = new BigDecimal("0");
for(QcCheckTaskDetail detail:details){ for(QcCheckTaskDetail detail:details){

@ -315,6 +315,9 @@
<if test="remark != null">remark = #{remark},</if> <if test="remark != null">remark = #{remark},</if>
<if test="reason != null">reason = #{reason},</if> <if test="reason != null">reason = #{reason},</if>
<if test="bz != null">bz = #{bz},</if> <if test="bz != null">bz = #{bz},</if>
<if test="cxzz != null">cxzz = #{cxzz},</if>
<if test="jgy != null">jgy = #{jgy},</if>
<if test="pgy != null">pgy = #{pgy},</if>
check_result = #{checkResult}, check_result = #{checkResult},
update_by = #{updateBy}, update_by = #{updateBy},
update_time = #{updateTime} update_time = #{updateTime}
@ -588,7 +591,10 @@
qct.check_result checkResult, qct.check_result checkResult,
qct.income_time incomeTime, qct.income_time incomeTime,
qct.check_loc checkLoc, qct.check_loc checkLoc,
qct.remark qct.remark,
qct.cxzz,
qct.jgy,
qct.pgy
from qc_check_task qct from qc_check_task qct
left join pro_order_workorder pow on pow.workorder_code = qct.order_no and pow.del_flag = '0' left join pro_order_workorder pow on pow.workorder_code = qct.order_no and pow.del_flag = '0'
where qct.record_id = #{recordId} where qct.record_id = #{recordId}

@ -44,6 +44,12 @@ public class BaseDictDataController extends BaseController {
List<SysDictData> list = dictDataService.selectDictDataList(dictData); List<SysDictData> list = dictDataService.selectDictDataList(dictData);
return getDataTable(list); return getDataTable(list);
} }
@GetMapping("/getDictData")
@DS("#header.poolName")
public AjaxResult getDict(SysDictData dictData) {
List<SysDictData> list = dictDataService.getDictDataList(dictData);
return success(list);
}
@Log(title = "字典数据", businessType = BusinessType.EXPORT) @Log(title = "字典数据", businessType = BusinessType.EXPORT)
@RequiresPermissions("factory:dict:export") @RequiresPermissions("factory:dict:export")

@ -92,4 +92,6 @@ public interface BaseDictDataMapper {
* @return * @return
*/ */
public int updateDictDataType(@Param("oldDictType") String oldDictType, @Param("newDictType") String newDictType); public int updateDictDataType(@Param("oldDictType") String oldDictType, @Param("newDictType") String newDictType);
List<SysDictData> getDictDataList(SysDictData dictData);
} }

@ -58,4 +58,6 @@ public interface IBaseDictDataService {
* @return * @return
*/ */
public int updateDictData(SysDictData dictData); public int updateDictData(SysDictData dictData);
List<SysDictData> getDictDataList(SysDictData dictData);
} }

@ -30,6 +30,11 @@ public class BaseDictDataServiceImpl implements IBaseDictDataService {
return dictDataMapper.selectDictDataList(dictData); return dictDataMapper.selectDictDataList(dictData);
} }
@Override
public List<SysDictData> getDictDataList(SysDictData dictData) {
return dictDataMapper.getDictDataList(dictData);
}
/** /**
* *
* *

@ -41,6 +41,37 @@
order by dict_sort asc order by dict_sort asc
</select> </select>
<select id="getDictDataList" parameterType="SysDictType" resultMap="SysDictTypeResult">
select
CONCAT(dict_label,'[',dict_value,']') AS dict_label,
dict_code,
dict_sort,
dict_value,
dict_type,
status,
remark
from base_dict_data
<where>
<if test="dictType != null and dictType != ''">
AND dict_type = #{dictType}
</if>
<if test="dictLabel != null and dictLabel != ''">
AND dict_label like concat('%', #{dictLabel}, '%')
</if>
<if test="dictValue != null and dictValue != ''">
AND dict_value = #{dictValue}
</if>
<if test="status != null and status != ''">
AND status = #{status}
</if>
<if test="remark != null and remark != ''">
AND remark like concat('%', #{remark}, '%')
</if>
</where>
order by dict_sort asc
</select>
<select id="selectDictDataByType" parameterType="SysDictType" resultMap="SysDictTypeResult"> <select id="selectDictDataByType" parameterType="SysDictType" resultMap="SysDictTypeResult">
<include refid="selectDictDataVo"/> <include refid="selectDictDataVo"/>
where status = '0' and dict_type = #{dictType} order by dict_sort asc where status = '0' and dict_type = #{dictType} order by dict_sort asc

Loading…
Cancel
Save