来料检验上线

master
zhaoxiaolin 10 months ago
parent 5ea60773d6
commit 0eecd31a19

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

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

@ -143,15 +143,6 @@ public class MesReportWorkServiceImpl implements IMesReportWorkService {
@DS("#header.poolName")
public List<MesReportWork> getReportWorkHzList(MesReportWork mesReportWork) {
List<MesReportWork> 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;
}

@ -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
<where>
pow.del_flag = '0'
<if test="keywords != null and keywords != ''">

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

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

@ -82,4 +82,6 @@ public interface QcCheckTypeProjectMapper {
int insertQcCheckTypeProjects(@Param("list") List<QcCheckTypeProject> typeProjects);
List<QcProjectType> getProjectOptions(QcCheckProject qcCheckProject);
QcProjectType getProductGroup(String materialCode);
}

@ -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<QcCheckTaskDetail> itemsGG = qcCheckTypeProjectMapper.getTPByTypeGroup(qctp);
List<QcCheckTaskDetail> itemsGG = null;
if(StringUtils.isNotBlank(group.getGroupId())){
qctp.setGroupId(group.getGroupId());
itemsGG = qcCheckTypeProjectMapper.getTPByTypeGroup(qctp);
}
items.addAll(itemsGG);
/**qc_check_task_detail**/

@ -133,19 +133,19 @@
</select>
<select id="getTPByTypeGroup" resultType="com.op.quality.domain.QcCheckTaskDetail">
select qctp.id typeProjectId,
qctp.project_id projectId,
qctp.project_no projectNo,
qctp.standard_value standardValue,
qctp.upper_diff upperDiff,
qctp.down_diff downDiff,
qctp.sample,
qctp.sort,
qcp.rule_name ruleName,
qcp.property_code propertyCode,
qcp.check_tool checkTool,
qcp.unit_code unitCode,
qcp.check_mode checkMode
<!--,qcp.check_standard checkStandard-->
qctp.project_id projectId,
qctp.project_no projectNo,
qctp.standard_value standardValue,
qctp.upper_diff upperDiff,
qctp.down_diff downDiff,
qctp.sample,
qctp.sort,
qcp.rule_name ruleName,
qcp.property_code propertyCode,
qcp.check_tool checkTool,
qcp.unit_code unitCode,
qcp.check_mode checkMode
<!--,qcp.check_standard checkStandard-->
from qc_check_type_project qctp
left join qc_check_project qcp on qcp.id = qctp.project_id
where qctp.del_flag = '0' and qctp.status = '1'
@ -323,4 +323,13 @@
from qc_project_type
where del_flag = '0'
</select>
<select id="getProductGroup" resultType="com.op.quality.domain.QcProjectType">
select bp.product_group productGroup,
bp.product_group_name productGroupName,
qmg.id groupId
from base_product bp
left join qc_material_group qmg on qmg.group_code = bp.product_group
where bp.product_code = #{materialCode}
and bp.del_flag = '0'
</select>
</mapper>

Loading…
Cancel
Save