QMS:质检PDA接口修改
master
xins 7 months ago
parent a06e93e518
commit 7f566937ec

@ -78,7 +78,7 @@ public class QmsMobileController extends BaseController {
} else {
MesBaseBarcodeInfo baseBarcodeInfo = mesBaseBarcodeInfoService.selectMesBaseBarcodeInfoByBarcodeInfo(materialBarcode);
if (baseBarcodeInfo == null) {
throw new ServiceException("此物料条码系统中不存在");
throw new ServiceException("物料条码有误");
}
Long materialId = baseBarcodeInfo.getMaterialId();
QmsCheckRuleDetail queryCheckRuleDetail = new QmsCheckRuleDetail();
@ -169,6 +169,7 @@ public class QmsMobileController extends BaseController {
qmsCheckResultDetailVo.setCheckSample(qmsCheckResult.getCheckSample());
qmsCheckResultDetailVo.setMaterialCode(qmsCheckResult.getMaterialCode());
qmsCheckResultDetailVo.setMaterialName(qmsCheckResult.getMaterialName());
qmsCheckResultDetailVo.setCheckRuleType(qmsCheckResult.getCheckRuleType());
QmsQualityInstance qmsQualityInstance = qmsQualityInstanceService.selectQmsQualityInstanceByCheckResultId(qmsCheckResult.getCheckResultId());
Long processActivityOrder = 1L;

@ -75,10 +75,12 @@ public class QmsCheckResult extends BaseEntity
@Excel(name = "检验状态(0待检验,1检验中,2质检通过,3质检不通过)")
private String checkStatus;
/** 预留字段1 */
@Excel(name = "检验规则名称")
private String checkRuleName;
/**检验规则类型(1来料检验,2,半成品检验3成品检验,4工序检验)*/
private String checkRuleType;
private String materialCode;
private String materialName;
@ -230,6 +232,14 @@ public class QmsCheckResult extends BaseEntity
this.checkRuleName = checkRuleName;
}
public String getCheckRuleType() {
return checkRuleType;
}
public void setCheckRuleType(String checkRuleType) {
this.checkRuleType = checkRuleType;
}
public List<QmsCheckResultDetail> getQmsCheckResultDetailList()
{
return qmsCheckResultDetailList;

@ -58,6 +58,9 @@ public class QmsCheckResultDetailProject extends BaseEntity
@Excel(name = "下差值,检验时从检验项目复制过来的值")
private BigDecimal downDiff;
/**巡检项目描述*/
private String inspectProjectDesc;
public void setResultDetailProjectId(Long resultDetailProjectId)
{
this.resultDetailProjectId = resultDetailProjectId;
@ -158,6 +161,14 @@ public class QmsCheckResultDetailProject extends BaseEntity
return downDiff;
}
public String getInspectProjectDesc() {
return inspectProjectDesc;
}
public void setInspectProjectDesc(String inspectProjectDesc) {
this.inspectProjectDesc = inspectProjectDesc;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

@ -40,6 +40,8 @@ public class QmsCheckResultDetailVo
private String wfInstsanceStatus;
private String checkRuleType;
List<QmsQualityInstanceActivity> qmsQualityInstanceActivities;
List<QmsCheckInstanceFile> qmsCheckInstanceFiles;
@ -118,6 +120,14 @@ public class QmsCheckResultDetailVo
this.wfInstsanceStatus = wfInstsanceStatus;
}
public String getCheckRuleType() {
return checkRuleType;
}
public void setCheckRuleType(String checkRuleType) {
this.checkRuleType = checkRuleType;
}
public List<QmsQualityInstanceActivity> getQmsQualityInstanceActivities() {
return qmsQualityInstanceActivities;
}

@ -4,6 +4,7 @@ import java.util.Date;
import java.util.List;
import com.hw.common.core.constant.QmsConstants;
import com.hw.common.core.exception.ServiceException;
import com.hw.common.core.utils.DateUtils;
import com.hw.common.security.utils.SecurityUtils;
import com.hw.qms.domain.*;
@ -128,12 +129,6 @@ public class QmsCheckResultServiceImpl implements IQmsCheckResultService {
}
/**
*
*
@ -143,12 +138,17 @@ public class QmsCheckResultServiceImpl implements IQmsCheckResultService {
*/
@Override
public Long insertCheckResult(MesBaseBarcodeInfo mesBaseBarcodeInfo, QmsCheckRule qmsCheckRule) {
if (qmsCheckRule == null) {
throw new ServiceException("没有此物料检验规则");
}
String batchCode = mesBaseBarcodeInfo.getBatchCode();
QmsCheckResult qmsCheckResult = qmsCheckResultMapper.selectQmsCheckResultByMaterialBatch(batchCode);
if (qmsCheckResult == null) {
qmsCheckResult = new QmsCheckResult();
String barcodeType = mesBaseBarcodeInfo.getBarcodeType();//条码类型1原材料,2半成品,3成品,4背板
qmsCheckResult.setCheckRuleId(qmsCheckRule.getCheckRuleId());
qmsCheckResult.setCheckRuleName(qmsCheckRule.getCheckRuleName());
qmsCheckResult.setCheckRuleType(qmsCheckRule.getCheckRuleType());
qmsCheckResult.setMaterialType(barcodeType);
qmsCheckResult.setMaterialId(mesBaseBarcodeInfo.getMaterialId());
qmsCheckResult.setMaterialBatch(mesBaseBarcodeInfo.getBatchCode());
@ -171,7 +171,6 @@ public class QmsCheckResultServiceImpl implements IQmsCheckResultService {
}
/**
* ,Join material
*

@ -20,6 +20,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="materialCode" column="material_code" />
<result property="materialName" column="material_name" />
</resultMap>
<resultMap id="QmsCheckResultDetailQmsCheckResultDetailProjectResult" type="QmsCheckResultDetail" extends="QmsCheckResultDetailResult">
@ -61,9 +64,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
b.check_project_id as sub_check_project_id, b.check_project_status as sub_check_project_status,
b.check_project_result as sub_check_project_result, b.project_step_order as sub_project_step_order,b.standard_value as sub_standard_value,
b.check_project_name as sub_check_project_name, b.check_project_property as sub_check_project_property,
b.upper_diff as sub_upper_diff, b.down_diff as sub_down_diff
b.upper_diff as sub_upper_diff, b.down_diff as sub_down_diff,mbmi.material_code,mbmi.material_name
from qms_check_result_detail a
left join qms_check_result_detail_project b on b.check_result_detail_id = a.check_result_detail_id
left join mes_base_material_info mbmi on a.material_id=mbmi.material_id
</sql>

@ -7,6 +7,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="QmsCheckResult" id="QmsCheckResultResult">
<result property="checkResultId" column="check_result_id" />
<result property="checkRuleId" column="check_rule_id" />
<result property="checkRuleName" column="check_rule_name" />
<result property="checkRuleType" column="check_rule_type" />
<result property="materialType" column="material_type" />
<result property="materialId" column="material_id" />
<result property="materialBatch" column="material_batch" />
@ -25,7 +27,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="checkRuleName" column="check_rule_name" />
<result property="materialCode" column="material_code" />
<result property="materialName" column="material_name" />
</resultMap>
@ -99,6 +100,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="checkRuleName != null">check_rule_name,</if>
<if test="checkRuleType != null">check_rule_type,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="checkRuleId != null">#{checkRuleId},</if>
@ -121,6 +123,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="checkRuleName != null">#{checkRuleName},</if>
<if test="checkRuleType != null">#{checkRuleType},</if>
</trim>
</insert>
@ -145,6 +148,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="checkRuleName != null">check_rule_name = #{checkRuleName},</if>
<if test="checkRuleType != null">check_rule_type = #{checkRuleType},</if>
</trim>
where check_result_id = #{checkResultId}
</update>
@ -193,9 +197,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectQmsCheckResultJoinList" parameterType="QmsCheckResult" resultMap="QmsCheckResultResult">
select qcr.check_result_id, qcr.material_type, qcr.material_id, qcr.material_batch, qcr.check_mode, qcr.check_sample, qcr.plan_code, qcr.plan_detail_code, qcr.saleorder_code,
qcr.po_no, qcr.check_status, qcr.check_rule_name,mbmi.material_code,mbmi.material_name
qcr.po_no, qcr.check_status, qcr.check_rule_name,qcr.check_rule_type,mbmi.material_code,mbmi.material_name
from qms_check_result qcr left join mes_base_material_info mbmi on qcr.material_id=mbmi.material_id
<where>
<if test="checkRuleType != null and checkRuleType != ''"> and check_rule_type = #{checkRuleType}</if>
<if test="materialType != null and materialType != ''"> and material_type = #{materialType}</if>
<if test="materialId != null "> and material_id = #{materialId}</if>
<if test="materialBatch != null and materialBatch != ''"> and material_batch = #{materialBatch}</if>

Loading…
Cancel
Save