销售出货打印时过滤掉取消的行以及优化单据的查询
This commit is contained in:
parent
c008821c13
commit
de092f9bb7
@ -162,6 +162,9 @@ public class Document extends Model<Document> {
|
||||
@TableField(exist = false)
|
||||
private String postingDate;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String timeOrderBy;
|
||||
|
||||
public static String genHandle(String site, String id) {
|
||||
return StringUtils.genHandle(KW_WMS_DOCUMENT_BO, site, id);
|
||||
}
|
||||
|
||||
@ -242,7 +242,7 @@ public class DocumentController {
|
||||
} else {
|
||||
statusList = Arrays.asList(Constant.DOCUMENT_STATUS_CLOSE, Constant.DOCUMENT_STATUS_SUBMIT, Constant.DOCUMENT_STATUS_PICKING, Constant.DOCUMENT_STATUS_TBC);
|
||||
}
|
||||
return R.ok(documentService.findDocumentBySalesOutPlateForm(page, statusList, TenantContextHolder.getTenantId(), document.getDocumentType(), page.getSearchText()));
|
||||
return R.ok(documentService.findDocumentBySalesOutPlateForm(page, statusList, TenantContextHolder.getTenantId(), document.getDocumentType(), page.getSearchText(),document.getTimeOrderBy()));
|
||||
}
|
||||
|
||||
private IPage<Document> findDocumentPage(FrontPage page, Document document, List<String> statusList) {
|
||||
|
||||
@ -324,5 +324,5 @@ public interface DocumentService extends IService<Document> {
|
||||
|
||||
void documentCancelExecute(Document document);
|
||||
|
||||
IPage<Document> findDocumentBySalesOutPlateForm(IPage iPage, List<String> statusList, String site, String documentType, String searchText);
|
||||
IPage<Document> findDocumentBySalesOutPlateForm(IPage iPage, List<String> statusList, String site, String documentType, String searchText, String timeOrderBy);
|
||||
}
|
||||
|
||||
@ -4061,8 +4061,8 @@ public class DocumentServiceImpl extends ServiceImpl<DocumentMapper, Document> i
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<Document> findDocumentBySalesOutPlateForm(IPage iPage, List<String> statusList, String site, String documentType, String searchText) {
|
||||
return documentMapper.findDocumentBySalesOutPlateForm(iPage, statusList, site, documentType, searchText);
|
||||
public IPage<Document> findDocumentBySalesOutPlateForm(IPage iPage, List<String> statusList, String site, String documentType, String searchText, String timeOrderBy) {
|
||||
return documentMapper.findDocumentBySalesOutPlateForm(iPage, statusList, site, documentType, searchText,timeOrderBy);
|
||||
}
|
||||
|
||||
private void callErpExecuteDocumentCancel(String externalDocumentNo, String user, String postingDate) {
|
||||
|
||||
@ -66,5 +66,5 @@ public interface DocumentMapper extends MomBaseMapper<Document> {
|
||||
|
||||
DeliveryOrderCreationReservedDTO getReserved(@Param("shopOrderBo") String shopOrderBo, @Param("item") String item);
|
||||
|
||||
IPage<Document> findDocumentBySalesOutPlateForm(IPage iPage,@Param("statusList") List<String> statusList,@Param("site") String site,@Param("documentType") String documentType,@Param("searchText") String searchText);
|
||||
IPage<Document> findDocumentBySalesOutPlateForm(IPage iPage,@Param("statusList") List<String> statusList,@Param("site") String site,@Param("documentType") String documentType,@Param("searchText") String searchText,@Param("timeOrderBy") String timeOrderBy);
|
||||
}
|
||||
|
||||
@ -267,7 +267,7 @@
|
||||
</select>
|
||||
|
||||
<select id="findDocumentBySalesOutPlateForm" resultMap="documentMap">
|
||||
SELECT zd.HANDLE, zd.SITE, zd.DOCUMENT_TYPE, zd.DOCUMENT_NO, zd.STATE, zd.CREATE_USER, zd.CREATE_DATE,ifnull(zd.UPDATE_DATE,zd.CREATE_DATE) UPDATE_DATE,
|
||||
SELECT zd.HANDLE, zd.SITE, zd.DOCUMENT_TYPE, zd.DOCUMENT_NO, zd.STATE, zd.CREATE_USER,zd.CREATE_DATE,zd.UPDATE_DATE,
|
||||
zd.UPDATE_USER, zd.SALES_BATCH, zd.CUSTOMER, zd.CUSTOMER_DESC, zd.EXTERNAL_DOCUMENT_NO, zd.MATERIAL_DOCUMENT, zd.CUSTOMER_PO,
|
||||
zd.EQUIPMENT_INVENTORY, zd.STORAGE_STATUS
|
||||
FROM z_document zd
|
||||
@ -284,7 +284,9 @@
|
||||
<if test="searchText != null and searchText != ''">
|
||||
AND zd.DOCUMENT_NO like concat('%', #{searchText}, '%') or EXTERNAL_DOCUMENT_NO like concat('%', #{searchText}, '%')
|
||||
</if>
|
||||
order by ifnull(zd.UPDATE_DATE,zd.CREATE_DATE) desc
|
||||
<if test="timeOrderBy != null and timeOrderBy != ''">
|
||||
ORDER BY ${timeOrderBy}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user