标准详情->分解单->排序split_pid函数
This commit is contained in:
+2
-1
@@ -8,6 +8,7 @@ import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.sarLawsAttrDetailedList.entity.LawsDto;
|
||||
import com.adc.da.slrs.sarStandItems.entity.*;
|
||||
import com.adc.da.slrs.sarStandItems.service.impl.SarStandItemsServiceImpl;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfo;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@@ -55,7 +56,7 @@ public class SarStandItemsController extends BaseController<SarStandItems> {
|
||||
|
||||
@ApiOperation(value = "分解单查询")
|
||||
@GetMapping("/querySarItemAndInterpretation")
|
||||
public ResponseMessage querySarItemAndInterpretation(FindSarItemsPageReqDTO page){
|
||||
public ResponseMessage<PageInfo<SarStandItems>> querySarItemAndInterpretation(FindSarItemsPageReqDTO page){
|
||||
List<SarStandItems> rows = ServiceImpl.querySarItemAndInterpretation(page);
|
||||
|
||||
PageInfo<SarStandItems> pageInfo = getPageInfo(page.getPager(), rows);
|
||||
|
||||
-3
@@ -13,9 +13,6 @@ import java.util.Date;
|
||||
public class FindSarItemsPageReqDTO extends BasePage {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private Integer page = 1;
|
||||
private Integer pageSize = 20;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "标准id")
|
||||
private String standId;
|
||||
|
||||
+3
-5
@@ -225,10 +225,6 @@ public class SarStandItemsServiceImpl extends ServiceImpl<SarStandItemsDao, SarS
|
||||
|
||||
|
||||
public List<SarStandItems> querySarItemAndInterpretation(FindSarItemsPageReqDTO page){
|
||||
//分页查询的总数
|
||||
Integer count=dao.sarItemCount(page);
|
||||
page.getPager().setRowCount(count);
|
||||
|
||||
//排序
|
||||
if (page.getOrderBy()!=null && page.getOrder()!=null){
|
||||
|
||||
@@ -246,7 +242,9 @@ public class SarStandItemsServiceImpl extends ServiceImpl<SarStandItemsDao, SarS
|
||||
page.setOrder("DESC");
|
||||
}
|
||||
|
||||
|
||||
//分页查询的总数
|
||||
Integer count=dao.sarItemCount(page);
|
||||
page.getPager().setRowCount(count);
|
||||
List<SarStandItems> sarStandItems = dao.querySarItemAndInterpretation(page);
|
||||
return sarStandItems;
|
||||
}
|
||||
|
||||
@@ -408,16 +408,14 @@
|
||||
<select id="querySarItemAndInterpretation" resultMap="sarItemVOResultMap"
|
||||
parameterType="com.adc.da.slrs.sarStandItems.entity.FindSarItemsPageReqDTO">
|
||||
SELECT
|
||||
*
|
||||
sar_stand_items.*,split_pid(sar_stand_items.ITEMS_NUM,'.') as tt
|
||||
FROM
|
||||
sar_stand_items
|
||||
<include refid="sarItemWhere"/>
|
||||
|
||||
<if test="orderBy !=null and orderBy!=''">
|
||||
order by ${orderBy} ${order}
|
||||
order by tt ${order}
|
||||
</if>
|
||||
LIMIT #{page},#{pageSize}
|
||||
|
||||
LIMIT ${pager.startIndex-1},${pageSize}
|
||||
</select>
|
||||
|
||||
<!-- 查询SAR_STAND_ITEMS列表 -->
|
||||
|
||||
Reference in New Issue
Block a user