看板和其它bug修复

master
zhaoxiaolin 10 months ago
parent c9227dae4a
commit 5ebb81a661

@ -2,6 +2,7 @@ package com.op.system.api.domain.dto;
import com.op.system.api.domain.quality.QcCheckTaskDTO;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
@ -35,6 +36,42 @@ public class BoardDTO {
private String rfid;
private Date createTime;
private String isqua;
private BigDecimal standarMan;
private BigDecimal actMan;//实际用人
private BigDecimal standarXl;//标准效率
private BigDecimal actXl;//实际效率
public BigDecimal getStandarMan() {
return standarMan;
}
public void setStandarMan(BigDecimal standarMan) {
this.standarMan = standarMan;
}
public BigDecimal getActMan() {
return actMan;
}
public void setActMan(BigDecimal actMan) {
this.actMan = actMan;
}
public BigDecimal getStandarXl() {
return standarXl;
}
public void setStandarXl(BigDecimal standarXl) {
this.standarXl = standarXl;
}
public BigDecimal getActXl() {
return actXl;
}
public void setActXl(BigDecimal actXl) {
this.actXl = actXl;
}
public Integer getTotalNum0() {
return totalNum0;

@ -80,6 +80,42 @@ public class MesLine extends BaseEntity {
* 10
*/
private String delFlag;
private BigDecimal standarMan;
private BigDecimal actMan;//实际用人
private BigDecimal standarXl;//标准效率
private BigDecimal actXl;//实际效率
public BigDecimal getStandarMan() {
return standarMan;
}
public void setStandarMan(BigDecimal standarMan) {
this.standarMan = standarMan;
}
public BigDecimal getActMan() {
return actMan;
}
public void setActMan(BigDecimal actMan) {
this.actMan = actMan;
}
public BigDecimal getStandarXl() {
return standarXl;
}
public void setStandarXl(BigDecimal standarXl) {
this.standarXl = standarXl;
}
public BigDecimal getActXl() {
return actXl;
}
public void setActXl(BigDecimal actXl) {
this.actXl = actXl;
}
private List<String> processList;

@ -106,4 +106,6 @@ public interface MesMapper {
ProOrderWorkorderDTO getActOrderWork(MesStationArrive qo);
int updateTransferResult(@Param("list") List<MesStationArrive> todoList);
MesLine getMesLineInfo(BoardDTO boardDTO);
}

@ -7,6 +7,7 @@ import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder;
import com.op.common.core.utils.DateUtils;
import com.op.common.core.utils.StringUtils;
import com.op.common.core.web.domain.AjaxResult;
import com.op.mes.domain.MesLine;
import com.op.mes.domain.MesReportWork;
import com.op.mes.domain.ProOrderWorkorder;
import com.op.mes.mapper.MesMapper;
@ -17,6 +18,7 @@ import com.op.system.api.domain.quality.QcCheckTaskDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
@ -106,6 +108,20 @@ public class MesBoradServiceImpl implements IMesBoradService {
Map<String,BoardDTO> dtoMap = new HashMap<>();
//当前工单信息
BoardDTO workOrder = mesMapper.getWorkOrder(boardDTO);
MesLine meslineInfo = mesMapper.getMesLineInfo(boardDTO);
if(meslineInfo != null){
workOrder.setStandarMan(meslineInfo.getStandarMan());
workOrder.setActMan(meslineInfo.getActMan());
workOrder.setStandarXl(meslineInfo.getStandarXl());
workOrder.setActXl(meslineInfo.getActXl());
}else{
workOrder.setStandarMan(new BigDecimal("0"));
workOrder.setActMan(new BigDecimal("0"));
workOrder.setStandarXl(new BigDecimal("0"));
workOrder.setActXl(new BigDecimal("0"));
}
dtoMap.put("workOrder",workOrder);
QcCheckTaskDTO taskDTO = mesMapper.getTaskInfo(boardDTO);

@ -335,7 +335,7 @@
pow.quantity_split totalNum,
pow.unit
from pro_order_workorder pow
left join base_equipment be on pow.workorder_name = be.equipment_code and be.equipment_type_code = 'equ_type_bzx'
left join base_equipment be on pow.workorder_name = be.equipment_code and be.equipment_type_code = 'equ_type_bzx'
where pow.workorder_name = #{equCode} and pow.status = 'w2'
and CONVERT ( DATE, pow.product_date ) = CONVERT ( DATE, GETDATE( ) )
and pow.parent_order = '0' and pow.del_flag='0'
@ -447,5 +447,22 @@
and prod_line_code like concat('%"',#{stationNo},'"%')
order by create_time desc
</select>
<select id="getMesLineInfo" resultType="com.op.mes.domain.MesLine">
select
ml.use_man standarMan,
ml.efficiency standarXl,
mr.use_man actMan,
mr.work_time,
mr2.quantity_feedback,
ROUND( mr2.quantity_feedback/mr.work_time,2) AS actXl
from mes_line ml
left join(
select top 1 use_man,work_time,machine_code,report_code
from mes_report_work where del_flag = '0' and machine_code = #{equCode} and parent_order !='0' order by create_time desc
) mr on mr.machine_code = ml.line_code
left join mes_report_work mr2 on mr2.report_code = mr.report_code and mr2.parent_order ='0'
where ml.line_code = #{equCode}
and ml.del_flag='0'
</select>
</mapper>

@ -180,6 +180,7 @@ public class QcCheckReportIncomeController extends BaseController {
@GetMapping("/getCkeckProjectList")
public TableDataInfo getCkeckProjectList(QcCheckTaskDetail qcCheckTaskDetail) {
List<QcCheckTaskDetail> list = qcCheckReportIncomeService.getCkeckProjectList(qcCheckTaskDetail);
return getDataTable(list);
}
}

@ -39,7 +39,7 @@ public class QcCheckTaskDetail extends BaseEntity {
*/
@Excel(name = "检验规则名称")
private String ruleName;
private String projectRuleName;
/**
*
*/
@ -143,6 +143,14 @@ public class QcCheckTaskDetail extends BaseEntity {
private String samplePlan;
private String weight;
public String getProjectRuleName() {
return projectRuleName;
}
public void setProjectRuleName(String projectRuleName) {
this.projectRuleName = projectRuleName;
}
public String getWeight() {
return weight;
}

@ -18,6 +18,8 @@ import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
import java.util.Date;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* Service
@ -199,17 +201,25 @@ public class QcCheckReportIncomeServiceImpl implements IQcCheckReportIncomeServi
if (!CollectionUtils.isEmpty(files)) {
dto.setFiles(files);
}
//实测结果
if(StringUtils.isBlank(dto.getActualValue())){
dto.setActualValue("符合");
//实测结果,定量的用测量值定性的用remark
if(StringUtils.isNotBlank(dto.getActualValue())){
dto.setActualValue(dto.getActualValue());
}else if(StringUtils.isNotBlank(dto.getRemark())){
dto.setActualValue(dto.getRemark());
}
//判定
if("Y".equals(dto.getStatus())){
dto.setStatus("√");
}else if("N".equals(dto.getStatus())){
dto.setStatus("×");
//检验项目
String ruleName = dto.getRuleName();
String projectRuleName0 = ruleName.split("]")[0];
if(StringUtils.isNotBlank(projectRuleName0)){
dto.setProjectRuleName(projectRuleName0.replace("[",""));
}
// //判定(前端做了)
// if("Y".equals(dto.getStatus())){
// dto.setStatus("√");
// }else if("N".equals(dto.getStatus())){
// dto.setStatus("×");
// }
}
return dtos;

@ -165,20 +165,20 @@
order by qctp.sort
</select>
<select id="getTopInfo" resultType="com.op.quality.domain.QcCheckTaskProduce">
select t.*,be.equipment_name lineName from(
select t.*,be.equipment_name lineName,
pow.product_date checkTimeStart from(
SELECT
c.order_no orderNo,
c.supplier_name supplierName,
c.supplier_code supplierCode,
c.material_name materialName,
c.material_code materialCode,
CONVERT(varchar(10),c.income_time, 120) checkTimeStart,
stuff( ( SELECT ';' + income_batch_no FROM qc_check_task WHERE c.order_no= order_no FOR xml path ( '' ) ), 1, 1, '' ) as incomeBatchNo
FROM
qc_check_task c
where c.check_type='checkTypeSCXJ' and c.order_no = #{orderNo}
GROUP BY
c.order_no,c.supplier_name,c.supplier_code,c.material_name,c.material_code,CONVERT(varchar(10),c.income_time, 120)
c.order_no,c.supplier_name,c.supplier_code,c.material_name,c.material_code
) t
left join pro_order_workorder pow on pow.workorder_code = t.orderNo
left join base_equipment be on be.equipment_code = pow.workorder_name

@ -381,7 +381,7 @@
defect_code defectCode,
defect_subclass defectSubclass
from qc_defect_type qdt
left join qc_check_type qct on qdt.defect_type = qct.type_code
left join qc_check_type qct on qdt.defect_type = qct.type_code
where qct.order_code = #{checkType} and qdt.del_flag = '0'
order by qdt.defect_code
</select>

Loading…
Cancel
Save