fix: 临时提交

This commit is contained in:
wxyclub
2023-11-27 17:05:46 +08:00
parent b29fbc7e73
commit 8600cf8172
5 changed files with 112 additions and 0 deletions
@@ -150,6 +150,43 @@ public class SarStandardsInfoController extends BaseController<SarStandardsInfo>
return Result.success(getPageInfo(page.getPager(), rows));
}
@ApiOperation(value = "|SarStandardsInfoEO|自定义手机端分页查询")
@GetMapping("/getSarStandardsInfoPageForPhone")
public ResponseMessage<PageInfo<SarStandardsInfo>> getSarStandardsInfoPageForPhone(SarStandardsInfoEOPage page,@RequestParam(defaultValue = "0") String mark) throws Exception {
if (null != page.getNowOrderBy()) {
nowOrderFunc(page);
}
if (StringUtils.isNotBlank(page.getAdvanceSearchVOStr())) {
List<SarAdvanceSearchVO> searchList = JSONObject.parseArray(page.getAdvanceSearchVOStr(),SarAdvanceSearchVO.class);
//不改传参强行置换
String advanceStr = SarAdvanceSearchUtil.createStandSql(searchList,"sar_stand_attr_info");
if (StringUtils.isNotBlank(advanceStr)) {
page.setAdvanceSearchStr(advanceStr);
} else {
page.setAdvanceSearchStr(null);
}
}
if(page.getUserId() == null || page.getUserId().equals("")){
page.setUserId(LoginUserUtil.getUserId());
}
List<SarStandardsInfo> rows = sarStandardsInfoEOService.getSarStandardsInfoPage(page);
// 去掉日期时分秒
rows.forEach(item->{
Optional.ofNullable(item.getSSRQ())
.ifPresent(SSRQ -> item.setSSRQ(item.getSSRQ().replaceAll("\\s[0-6][0-9]\\:[0-6][0-9]\\:[0-6][0-9]", "")));
Optional.ofNullable(item.getXCXSSRQ())
.ifPresent(SSRQ ->item.setXCXSSRQ(item.getXCXSSRQ().replaceAll("\\s[0-6][0-9]\\:[0-6][0-9]\\:[0-6][0-9]", "")));
Optional.ofNullable(item.getZCCSSRQ())
.ifPresent(SSRQ ->item.setZCCSSRQ(item.getZCCSSRQ().replaceAll("\\s[0-6][0-9]\\:[0-6][0-9]\\:[0-6][0-9]", "")));
});
return Result.success(getPageInfo(page.getPager(), rows));
}
@ApiOperation(value = "|SarStandardsInfoEO|自定义分页查询")
@GetMapping("/getSarStandardsInfoSplitPage")
//@RequiresPermissions("lawss:sarStandardsInfo:getSarStandardsInfoPage")
@@ -125,5 +125,7 @@ public interface SarStandardsInfoDao extends BaseMapper<SarStandardsInfo> {
@Select("select * from SAR_STANDARDS_INFO where VALID_FLAG = 0")
List<SarStandardsInfo> getSarStandardsInfo();
List<SarStandardsInfo> getSarStandardsInfoPageForPhone(SarStandardsInfoEOPage page, String s);
}
@@ -24,6 +24,8 @@ public interface ISarStandardsInfoService extends IService<SarStandardsInfo> {
List<SarStandardsInfo> getSarStandardsInfoPage(SarStandardsInfoEOPage page) throws Exception;
public List<SarStandardsInfo> getSarStandardsInfoPageForPhone(SarStandardsInfoEOPage page) throws Exception;
List<SarStandardsInfo> getSarStandardsInfoPageByWk1(SarStandardsInfoEOPage page) throws Exception;
List<SarStandardsInfo> getSarStandardsInfoPageBak(SarStandardsInfoEOPage page) throws Exception;
@@ -593,6 +593,62 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
return sarlist;
}
/***
* @Description: 手机端分页查询
* @Param: [page]
* @Return: java.util.List<com.adc.da.lawss.entity.SarStandardsInfoEO>
*/
@Override
public List<SarStandardsInfo> getSarStandardsInfoPageForPhone(SarStandardsInfoEOPage page) throws Exception {
//查询当前登录人角色拥有权限的菜单
if (page.getMenuId() != null && page.getUserId() != null && StringUtils.isNotBlank(page.getUserId())) {
String treeType = page.getTreeType();
QueryWrapper<TsResource> qw = new QueryWrapper<>();
qw.eq("ID", page.getMenuId());
qw.isNull("PARENT_ID");
List<TsResource> children = iTsResourceService.list(qw);
if (children.isEmpty() && !page.getMenuId().equals("nomenu") && StringUtils.isNotBlank(treeType) && "tsr".equals(treeType)) {
// List<String> getMenuIdList = tsUserService.getResourceUserId(page.getUserId());
// if (getMenuIdList != null && !getMenuIdList.isEmpty()) {
// page.setMenuRoleList(getMenuIdList);
// } else {
// page.setMenuRoleList(null);
// }
List<String> ids = iTsResourceService.getChildMenuList(page.getMenuId());
if (ids != null && !ids.isEmpty()) {
page.setMenuAllChildrenIdList(ids);
}
} else if (!page.getMenuId().equals("nomenu") && StringUtils.isNotBlank(treeType) && "sarMs".equals(treeType)) {
// List<String> getMenuIdList = tsUserService.getResourceUserId(page.getUserId());
// if (getMenuIdList != null && !getMenuIdList.isEmpty()) {
// page.setMenuRoleList(getMenuIdList);
// } else {
// page.setMenuRoleList(null);
// }
List<String> ids = iSarMenuStandardService.getChildMenuList(page.getMenuId());
if (ids != null && !ids.isEmpty()) {
page.setMenuAllChildrenIdList(ids);
}
} else if (page.getMenuId().equals("nomenu") && StringUtils.isNotBlank(page.getSarMsType()) && "filterSarMsMenu".equals(page.getSarMsType())) {
// List<String> getMenuIdList = tsUserService.getResourceUserId(page.getUserId());
// if (getMenuIdList != null && !getMenuIdList.isEmpty()) {
// page.setMenuRoleList(getMenuIdList);
// } else {
// page.setMenuRoleList(null);
// }
List<String> ids = iSarMenuStandardService.getChildMenuList(page.getSarMsMenuId());
if (ids != null && !ids.isEmpty()) {
page.setMenuAllChildrenIdList(ids);
}
}
}
int rowCount = dao.getSarStandardsInfoCount(page);
page.getPager().setRowCount(rowCount);
List<SarStandardsInfo> sarlist = dao.getSarStandardsInfoPageForPhone(page, "0");
attrInfoCollect(sarlist);
return sarlist;
}
@Override
public List<SarStandardsInfo> getSarStandardsInfoPageByWk1(SarStandardsInfoEOPage page) throws Exception {
//查询当前登录人角色拥有权限的菜单
@@ -2073,6 +2073,21 @@
</if>
and ssi.id = #{id} and ssi.VALID_FLAG = 0
</select>
<select id="getSarStandardsInfoPageForPhone" resultMap="BaseResultMap"
parameterType="com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfoEOPage">
SELECT
<include refid="Base_Column_List_DIS"/>
from SAR_STANDARDS_INFO
<include refid="SarStandardsInfo_in_left_2"/>
<if test="mark == 999 ">
and sar_standards_info.ID in (select distinct stand_id from sar_stand_items)
</if>
<if test='(page.orderByA != null and page.orderByA != "" and page.order1 != null and page.order1 != "")
or (page.standType != null and page.standType != "") '>
<include refid="standSort_in"/>
</if>
limit ${page.pager.startIndex-1},${page.pageSize}
</select>
</mapper>