change - 质量返修查询:质检班长获取所有返修信息

master
yinq 5 months ago
parent e46fdf683f
commit f889f839aa

@ -169,7 +169,7 @@ public class PdaApiController {
public AjaxResult findCheckInfoByCode(String code) {
List<ReportQualityInspection> list = service.findCheckInfoByCode(code);
if (list == null || list.isEmpty()) {
return error("扫描条码不正确");
return error("扫描条码不正确或无返修信息");
}
return success(list);
}

@ -54,4 +54,11 @@ public interface PdaBindingMapper {
*/
@DataSource(value = DataSourceType.SLAVE)
int printSupplementBarcode(HashMap<String, String> hashMap);
/**
*
* @param code
* @return
*/
List<ReportQualityInspection> findCheckInfoByCodeUserId(String code);
}

@ -3,8 +3,10 @@ package com.aucma.api.service.impl;
import com.aucma.api.domain.dto.RepairSubmitInfoDto;
import com.aucma.api.mapper.PdaBindingMapper;
import com.aucma.api.service.IPdaBindingService;
import com.aucma.common.utils.SecurityUtils;
import com.aucma.common.utils.StringUtils;
import com.aucma.report.domain.ReportQualityInspection;
import com.aucma.system.service.ISysPostService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -20,6 +22,9 @@ public class PdaServiceImpl implements IPdaBindingService {
@Autowired
private PdaBindingMapper mapper;
@Autowired
private ISysPostService postService;
@Override
public String selectBoxNameByCode(String boxCode) {
@ -41,6 +46,11 @@ public class PdaServiceImpl implements IPdaBindingService {
return mapper.updateCodeBinding(boxCode,innerCode);
}
/**
*
* @param info
* @return
*/
@Override
public int submitRepair(RepairSubmitInfoDto info) {
return mapper.submitRepair(info);
@ -48,6 +58,18 @@ public class PdaServiceImpl implements IPdaBindingService {
@Override
public List<ReportQualityInspection> findCheckInfoByCode(String code) {
try {
Long userId = SecurityUtils.getUserId();
if (StringUtils.isNotNull(userId)){
List<Long> postList = postService.selectPostListByUserId(userId);
if (postList.contains(9L)){
//质量返修查询:巡检班长获取所有返修信息
return mapper.findCheckInfoByCodeUserId(code);
}
}
} catch (Exception e) {
System.out.println("findCheckInfoByCode异常" + e);
}
return mapper.findCheckInfoByCode(code);
}

@ -32,10 +32,11 @@
IS_FLAG = #{info.isFlag},
UPDATED_BY = #{info.loginName},
UPDATED_TIME = sysdate
WHERE OBJ_ID in
WHERE PROCESS_RESULT IS NULL AND OBJ_ID IN
<foreach item="objId" collection="info.list" open="(" separator="," close=")">
#{objId}
</foreach>
</update>
<select id="findCheckInfoByCode" resultMap="com.aucma.report.mapper.ReportQualityInspectionMapper.ReportQualityInspectionResult">
@ -45,8 +46,10 @@
QUALITY_DEFECT_NAME
from REPORT_QUALITY_INSPECTION
where BAR_CODE = #{code}
and IS_FLAG is null
AND TREATMENT_MEASURE = '1'
AND PROCESS_RESULT IS NULL
</select>
<select id="checkSelectRepairInfo" resultMap="com.aucma.report.mapper.ReportQualityInspectionMapper.ReportQualityInspectionResult">
select rqi.OBJ_ID,
MATERIAL_NAME,
@ -58,7 +61,7 @@
from REPORT_QUALITY_INSPECTION rqi
left join BASE_PRODUCTLINE br on rqi.STATION_CODE=br.PRODUCT_LINE_CODE
where BAR_CODE =#{code}
and TREATMENT_MEASURE=1
and TREATMENT_MEASURE=1
</select>
<select id="selectPrintBarcode" resultType="java.util.HashMap">
@ -77,6 +80,16 @@
OI.PRINT_NAME
</select>
<select id="findCheckInfoByCodeUserId" resultType="com.aucma.report.domain.ReportQualityInspection">
select OBJ_ID,
MATERIAL_NAME,
QUALITY_DEFECT_CODE,
QUALITY_DEFECT_NAME
from REPORT_QUALITY_INSPECTION
where BAR_CODE = #{code}
AND TREATMENT_MEASURE = '1'
</select>
<update id="unbindBarCode">
UPDATE CODE_BINDING
SET PRODUCT_CODE = NULL, RECORD_TIME2 = NULL

Loading…
Cancel
Save