自制件打印,查询到多笔数据,返回一条数据;

master
zpl 3 years ago
parent 6a08aa6d3b
commit 78d8b00a65

@ -26,6 +26,6 @@ public interface PrintLogMapper extends BaseMapper<PrintLog> {
*/ */
List<PrintLog> getPrintLogListByCondition(PrintLog printLog); List<PrintLog> getPrintLogListByCondition(PrintLog printLog);
LabelPrintDto findSfcPrintInfoBySfc(@Param("sfc") String sfc, @Param("site") String site); List<LabelPrintDto> findSfcPrintInfoBySfc(@Param("sfc") String sfc, @Param("site") String site);
} }

@ -109,7 +109,12 @@ public class PrintLogServiceImpl extends ServiceImpl<PrintLogMapper, PrintLog> i
@Override @Override
public LabelPrintDto findSfcPrintInfoBySfc(String sfc) { public LabelPrintDto findSfcPrintInfoBySfc(String sfc) {
return printLogMapper.findSfcPrintInfoBySfc(sfc,CommonMethods.getSite()); String site = CommonMethods.getSite();
List<LabelPrintDto> sfcPrintInfoBySfc = printLogMapper.findSfcPrintInfoBySfc(sfc, site);
if (sfcPrintInfoBySfc.size() < 1){
throw BusinessException.build("未找到数据【未生成库存】!");
}
return sfcPrintInfoBySfc.get(0);
} }
@Override @Override

@ -584,6 +584,7 @@
LEFT JOIN CUSTOM_FIELDS CF ON CF.HANDLE = I.ITEM_BO AND CF."ATTRIBUTE" = 'DRAWING_REVISION' LEFT JOIN CUSTOM_FIELDS CF ON CF.HANDLE = I.ITEM_BO AND CF."ATTRIBUTE" = 'DRAWING_REVISION'
LEFT JOIN CUSTOM_FIELDS CFA ON CFA.HANDLE = I.ITEM_BO AND CFA."ATTRIBUTE" = 'ACCESSORY_TYPE' LEFT JOIN CUSTOM_FIELDS CFA ON CFA.HANDLE = I.ITEM_BO AND CFA."ATTRIBUTE" = 'ACCESSORY_TYPE'
WHERE S.SFC = #{sfc} AND I.SITE = #{site} WHERE S.SFC = #{sfc} AND I.SITE = #{site}
ORDER BY ZSD.BLANKING_SIZE
</select> </select>
<!--自定义sql--> <!--自定义sql-->

Loading…
Cancel
Save