diff --git a/op-modules/op-mes/src/main/java/com/op/mes/domain/MesReportWork.java b/op-modules/op-mes/src/main/java/com/op/mes/domain/MesReportWork.java index 4d2c1129..0c06acca 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/domain/MesReportWork.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/domain/MesReportWork.java @@ -202,6 +202,8 @@ public class MesReportWork extends BaseEntity { private Long workTimes; private String workCenter; private String shiftId; + @Excel(name = "班次") + private String shiftName; private String keywords; private String workshopName; //凭证 @@ -211,6 +213,24 @@ public class MesReportWork extends BaseEntity { private String sapCode; private String remark; + public String getShiftName() { + return shiftName; + } + + public void setShiftName(String shiftName) { + this.shiftName = shiftName; + } + + @Override + public String getRemark() { + return remark; + } + + @Override + public void setRemark(String remark) { + this.remark = remark; + } + public String getSapCode() { return sapCode; } diff --git a/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesReportWorkConsumeServiceImpl.java b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesReportWorkConsumeServiceImpl.java index e5bb05f5..8d49d1a7 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesReportWorkConsumeServiceImpl.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesReportWorkConsumeServiceImpl.java @@ -218,7 +218,7 @@ public class MesReportWorkConsumeServiceImpl implements IMesReportWorkConsumeSer /**修改sap物料损耗组成**/ R updateBomsSap = this.updateAttr1BomsSap(workOrders); if(updateBomsSap.getCode()== 500){ - throw new IllegalArgumentException("修改组件异常"); + throw new IllegalArgumentException("SAP修改组件异常:"+updateBomsSap.getMsg()); } return 1; 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 c5f546fc..b2fc9461 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 @@ -143,15 +143,6 @@ public class MesReportWorkServiceImpl implements IMesReportWorkService { @DS("#header.poolName") public List getReportWorkHzList(MesReportWork mesReportWork) { List dtos = mesReportWorkMapper.getReportWorkHzList(mesReportWork); -// for(MesReportWork dto:dtos){ -// if("1".equals(dto.getUploadStatus())){ -// dto.setUploadStatus("sap报工成功"); -// }else if("2".equals(dto.getUploadStatus())){ -// dto.setUploadStatus("sap报工失败"); -// }else if("0".equals(dto.getUploadStatus())){ -// dto.setUploadStatus("待报工sap"); -// } -// } return dtos; } 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 a4d36bcf..86193aa6 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 @@ -486,7 +486,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" pow.workorder_code_sap workorderCodeSap, pow.product_date productDate, mrw.uploadTime, - mrw.uploadMsg + mrw.uploadMsg, + pow.shift_id shiftId, + bst.Shift_Desc shiftName from ( select workorder_code workorderCode, product_code productCode, @@ -514,6 +516,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ,upload_time,upload_msg ) mrw left join pro_order_workorder pow on mrw.workorderCode = pow.workorder_code + left join base_shifts_t bst on bst.Shift_Id =pow.shift_id pow.del_flag = '0' diff --git a/op-modules/op-quality/src/main/java/com/op/quality/domain/QcMaterialGroupDetail.java b/op-modules/op-quality/src/main/java/com/op/quality/domain/QcMaterialGroupDetail.java index 130c7ff3..dbdce17d 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/domain/QcMaterialGroupDetail.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/domain/QcMaterialGroupDetail.java @@ -24,7 +24,8 @@ public class QcMaterialGroupDetail extends BaseEntity { */ @Excel(name = "物料组id") private String groupId; - + //物料组编码 + private String groupCode; /** * 物料号 */ @@ -54,6 +55,14 @@ public class QcMaterialGroupDetail extends BaseEntity { */ private String delFlag; + public String getGroupCode() { + return groupCode; + } + + public void setGroupCode(String groupCode) { + this.groupCode = groupCode; + } + public void setId(String id) { this.id = id; } diff --git a/op-modules/op-quality/src/main/java/com/op/quality/domain/QcProjectType.java b/op-modules/op-quality/src/main/java/com/op/quality/domain/QcProjectType.java index 4a039b87..2f4ccba7 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/domain/QcProjectType.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/domain/QcProjectType.java @@ -18,7 +18,7 @@ public class QcProjectType extends BaseEntity { * id */ private String id; - + private String groupId; /** * 检测项方案编号 */ @@ -54,6 +54,33 @@ public class QcProjectType extends BaseEntity { @Excel(name = "版本") private String version; + private String productGroupName; + private String productGroup; + + public String getProductGroupName() { + return productGroupName; + } + + public String getGroupId() { + return groupId; + } + + public void setGroupId(String groupId) { + this.groupId = groupId; + } + + public void setProductGroupName(String productGroupName) { + this.productGroupName = productGroupName; + } + + public String getProductGroup() { + return productGroup; + } + + public void setProductGroup(String productGroup) { + this.productGroup = productGroup; + } + public void setId(String id) { this.id = id; } diff --git a/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcCheckTypeProjectMapper.java b/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcCheckTypeProjectMapper.java index 98249adf..a858713c 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcCheckTypeProjectMapper.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcCheckTypeProjectMapper.java @@ -82,4 +82,6 @@ public interface QcCheckTypeProjectMapper { int insertQcCheckTypeProjects(@Param("list") List typeProjects); List getProjectOptions(QcCheckProject qcCheckProject); + + QcProjectType getProductGroup(String materialCode); } diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskIncomeServiceImpl.java b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskIncomeServiceImpl.java index e9e93f60..1e28f17a 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskIncomeServiceImpl.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskIncomeServiceImpl.java @@ -145,7 +145,6 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService { qcCheckTaskIncome.setCheckNo(bpDD+liushuiStr); - /**取检测项**/ QcCheckTypeProject qctp= new QcCheckTypeProject(); qctp.setTypeId(qcCheckTaskIncome.getCheckType());//生产过程检验 @@ -157,10 +156,19 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService { //共性 if(group == null){//默认 group = new QcMaterialGroupDetail(); - group.setGroupId("729971295b734782b544f9d6d06fb8b9"); + QcProjectType initGroup = qcCheckTypeProjectMapper.getProductGroup(qcCheckTaskIncome.getMaterialCode()); + if(initGroup != null){ + group.setGroupId(initGroup.getGroupId()); + }else{ + return 0;//没有找到检测项目 + } } - qctp.setGroupId(group.getGroupId()); - List itemsGG = qcCheckTypeProjectMapper.getTPByTypeGroup(qctp); + List itemsGG = null; + if(StringUtils.isNotBlank(group.getGroupId())){ + qctp.setGroupId(group.getGroupId()); + itemsGG = qcCheckTypeProjectMapper.getTPByTypeGroup(qctp); + } + items.addAll(itemsGG); /**qc_check_task_detail**/ diff --git a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTypeProjectMapper.xml b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTypeProjectMapper.xml index bbb163eb..f0ed818c 100644 --- a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTypeProjectMapper.xml +++ b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTypeProjectMapper.xml @@ -133,19 +133,19 @@ +