标准库查询 和 流程发起界面查询 做了一个标志位的区分 目的是为了提高标准库的查询速度
This commit is contained in:
+1
-1
@@ -155,7 +155,7 @@ public class SarStandItemsServiceImpl extends ServiceImpl<SarStandItemsDao, SarS
|
||||
page.setUserId(null);
|
||||
List<SarStandardsInfo> pageInfo = null;
|
||||
try {
|
||||
pageInfo = sarStandardsInfoController.getSarStandardsInfoPage(page).getData().getList();
|
||||
pageInfo = sarStandardsInfoController.getSarStandardsInfoPage(page,"1").getData().getList();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
+2
-2
@@ -91,7 +91,7 @@ public class SarStandardsInfoController extends BaseController<SarStandardsInfo>
|
||||
@ApiOperation(value = "|SarStandardsInfoEO|自定义分页查询")
|
||||
@GetMapping("/getSarStandardsInfoPage")
|
||||
//@RequiresPermissions("lawss:sarStandardsInfo:getSarStandardsInfoPage")
|
||||
public ResponseMessage<PageInfo<SarStandardsInfo>> getSarStandardsInfoPage(SarStandardsInfoEOPage page) throws Exception {
|
||||
public ResponseMessage<PageInfo<SarStandardsInfo>> getSarStandardsInfoPage(SarStandardsInfoEOPage page,@RequestParam(defaultValue = "0") String mark) throws Exception {
|
||||
int isNull = -1;
|
||||
if (null != page.getNowOrderBy()) {
|
||||
switch (page.getNowOrderBy()) {
|
||||
@@ -179,7 +179,7 @@ public class SarStandardsInfoController extends BaseController<SarStandardsInfo>
|
||||
if(page.getUserId() == null || page.getUserId().equals("")){
|
||||
page.setUserId(LoginUserUtil.getUserId());
|
||||
}
|
||||
List<SarStandardsInfo> rows = sarStandardsInfoEOService.getSarStandardsInfoPage(page);
|
||||
List<SarStandardsInfo> rows = sarStandardsInfoEOService.getSarStandardsInfoPage(page,mark);
|
||||
return Result.success(getPageInfo(page.getPager(), rows));
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ public interface ISarStandardsInfoService extends IService<SarStandardsInfo> {
|
||||
|
||||
// void reverseQueryStand(List<String> ids, String standName,String type);
|
||||
|
||||
List<SarStandardsInfo> getSarStandardsInfoPage(SarStandardsInfoEOPage page) throws Exception;
|
||||
List<SarStandardsInfo> getSarStandardsInfoPage(SarStandardsInfoEOPage page,String mark) throws Exception;
|
||||
|
||||
void createSarStandardsInfo(SarStandardsInfo sarStandardsInfoEO) throws Exception;
|
||||
|
||||
|
||||
+6
-2
@@ -284,7 +284,7 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
* @Param: [page]
|
||||
* @Return: java.util.List<com.adc.da.lawss.entity.SarStandardsInfoEO>
|
||||
*/
|
||||
public List<SarStandardsInfo> getSarStandardsInfoPage(SarStandardsInfoEOPage page) throws Exception {
|
||||
public List<SarStandardsInfo> getSarStandardsInfoPage(SarStandardsInfoEOPage page,String mark) throws Exception {
|
||||
//查询当前登录人角色拥有权限的菜单
|
||||
if(page.getMenuId() != null && page.getUserId() != null && StringUtils.isNotBlank(page.getUserId())){
|
||||
QueryWrapper<TsResource> qw = new QueryWrapper<>();
|
||||
@@ -307,7 +307,11 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
Integer rowCount = dao.getSarStandardsInfoCount(page);
|
||||
page.getPager().setRowCount(rowCount);
|
||||
List<SarStandardsInfo> sarlist = dao.getSarStandardsInfoPage(page);
|
||||
attrInfoCollect(sarlist);
|
||||
if ("0".equals(mark)) {
|
||||
attrInfoCollect(sarlist);
|
||||
}else {
|
||||
attrInfo(sarlist);
|
||||
}
|
||||
return sarlist;
|
||||
}
|
||||
|
||||
|
||||
+27
-14
@@ -159,20 +159,27 @@
|
||||
left join sar_stand_items ssi on ssi.stand_id = a.id
|
||||
<where>
|
||||
<if test="standName != null">
|
||||
and
|
||||
(a.STAND_NUMBER LIKE concat ('%',#{standName,jdbcType=VARCHAR},'%')
|
||||
or a.STAND_NAME LIKE concat ('%',#{standName,jdbcType=VARCHAR},'%'))
|
||||
and
|
||||
|
||||
</if>
|
||||
<if test="fileType !=null">
|
||||
ssi.FILE_TYPE = #{fileType} and
|
||||
and
|
||||
ssi.FILE_TYPE = #{fileType}
|
||||
</if>
|
||||
<if test="standType !=null">
|
||||
a.STAND_TYPE = #{standType} and
|
||||
and
|
||||
a.STAND_TYPE = #{standType}
|
||||
</if>
|
||||
|
||||
<if test="param1 !=null and param1.size()>0 " >
|
||||
and
|
||||
a.ID IN
|
||||
<foreach collection="param1" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
a.ID IN
|
||||
<foreach collection="param1" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</where>
|
||||
UNION
|
||||
SELECT a.ID,a.STAND_NUMBER as standNumber,a.STAND_NAME as standName,a.STAND_EN_NAME,b.NYLX,b.SSRQ as SSRQ,b.XCXSSRQ as XCXSSRQGJ,b.ZCCSSRQ as ZCCSSRQGJ,
|
||||
@@ -182,21 +189,27 @@
|
||||
a.ID = b.STAND_ID
|
||||
left join sar_stand_items ssi on ssi.stand_id = a.id
|
||||
<where>
|
||||
1=1
|
||||
<if test="standName != null">
|
||||
and
|
||||
(a.STAND_NUMBER LIKE concat ('%',#{standName,jdbcType=VARCHAR},'%')
|
||||
or a.STAND_NAME LIKE concat ('%',#{standName,jdbcType=VARCHAR},'%'))
|
||||
and
|
||||
</if>
|
||||
<if test="fileType !=null">
|
||||
ssi.FILE_TYPE = #{fileType} and
|
||||
and
|
||||
ssi.FILE_TYPE = #{fileType}
|
||||
</if>
|
||||
<if test="standType !=null">
|
||||
a.STAND_TYPE = #{standType} and
|
||||
and
|
||||
a.STAND_TYPE = #{standType}
|
||||
</if>
|
||||
<if test="param1 !=null and param1.size()>0 " >
|
||||
and
|
||||
a.ID IN
|
||||
<foreach collection="param1" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
a.ID IN
|
||||
<foreach collection="param1" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user