change - PDA获取质量缺陷

master
yinq 1 year ago
parent cd5ccf8518
commit a830004005

@ -108,4 +108,14 @@ public class BaseQualityInspectionItemController extends BaseController {
public AjaxResult remove(@PathVariable Long[] objIds) { public AjaxResult remove(@PathVariable Long[] objIds) {
return toAjax(baseQualityInspectionItemService.deleteBaseQualityInspectionItemByObjIds(objIds)); return toAjax(baseQualityInspectionItemService.deleteBaseQualityInspectionItemByObjIds(objIds));
} }
/**
* PDA
* @param stationCode
* @return
*/
@GetMapping(value = "/getQualityDefects/{stationCode}" )
public AjaxResult getQualityDefects(@PathVariable("stationCode" ) String stationCode) {
return success(baseQualityInspectionItemService.getQualityDefects(stationCode));
}
} }

@ -63,4 +63,11 @@ public interface BaseQualityInspectionItemMapper
* @return * @return
*/ */
public int deleteBaseQualityInspectionItemByObjIds(Long[] objIds); public int deleteBaseQualityInspectionItemByObjIds(Long[] objIds);
/**
* PDA
* @param stationCode
* @return
*/
List<BaseQualityInspectionItem> getQualityDefects(String stationCode);
} }

@ -63,4 +63,13 @@ public interface IBaseQualityInspectionItemService
* @return * @return
*/ */
public int deleteBaseQualityInspectionItemByObjId(Long objId); public int deleteBaseQualityInspectionItemByObjId(Long objId);
/**
* PDA
* @param stationCode
* @return
*/
List<BaseQualityInspectionItem> getQualityDefects(String stationCode);
} }

@ -98,4 +98,14 @@ public class BaseQualityInspectionItemServiceImpl implements IBaseQualityInspect
{ {
return baseQualityInspectionItemMapper.deleteBaseQualityInspectionItemByObjId(objId); return baseQualityInspectionItemMapper.deleteBaseQualityInspectionItemByObjId(objId);
} }
/**
* PDA
* @param stationCode
* @return
*/
@Override
public List<BaseQualityInspectionItem> getQualityDefects(String stationCode) {
return baseQualityInspectionItemMapper.getQualityDefects(stationCode);
}
} }

@ -74,6 +74,15 @@
where PARENT_ID = 0 where PARENT_ID = 0
order by quality_defect_code order by quality_defect_code
</select> </select>
<select id="getQualityDefects" parameterType="String" resultMap="BaseQualityInspectionItemResult">
select bq2.obj_id,
bq2.quality_defect_code,
bq2.quality_defect_name,
bq1.station_code
from base_quality_inspection_item bq1
left join base_quality_inspection_item bq2 on bq2.PARENT_ID = bq1.quality_defect_code
where bq1.station_code = '1003'
</select>
<insert id="insertBaseQualityInspectionItem" parameterType="BaseQualityInspectionItem"> <insert id="insertBaseQualityInspectionItem" parameterType="BaseQualityInspectionItem">
<selectKey keyProperty="objId" resultType="long" order="BEFORE"> <selectKey keyProperty="objId" resultType="long" order="BEFORE">

Loading…
Cancel
Save