Browse Source

列表查询语句修改

dev
liwenxuan 2 years ago
parent
commit
45595bd6ba
  1. 3
      src/main/java/com/hxgk/zxxy/controller/GraphicformController.java
  2. 5
      src/main/java/com/hxgk/zxxy/service/GraphicformService.java
  3. 4
      src/main/java/com/hxgk/zxxy/service/impl/GraphicformServiceImpl.java
  4. 4
      src/main/java/com/hxgk/zxxy/service/impl/HrServiceImpl.java
  5. 2
      src/main/resources/mapper/GraphicformMapper.xml

3
src/main/java/com/hxgk/zxxy/controller/GraphicformController.java

@ -1,6 +1,7 @@
package com.hxgk.zxxy.controller;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageInfo;
import com.hxgk.zxxy.model.entity.ArchivesType;
import com.hxgk.zxxy.model.entity.Graphicform;
import com.hxgk.zxxy.model.request.ArchivesTypeRequest;
@ -23,7 +24,7 @@ public class GraphicformController {
private GraphicformService graphicformService;
@PostMapping("zxxy")
public JsonData getZxxyArchivesType(@RequestBody GraphicformRequest graphicformRequest) throws Exception {
List<Graphicform> graphicformList = graphicformService.queryListByParam(graphicformRequest);
PageInfo<Graphicform> graphicformList = graphicformService.queryListByParam(graphicformRequest);
return JsonData.buildSuccess(graphicformList);
}
}

5
src/main/java/com/hxgk/zxxy/service/GraphicformService.java

@ -1,10 +1,11 @@
package com.hxgk.zxxy.service;
import com.github.pagehelper.PageInfo;
import com.hxgk.zxxy.model.entity.Graphicform;
import com.hxgk.zxxy.model.request.GraphicformRequest;
import java.util.List;
public interface GraphicformService {
List<Graphicform> queryListByParam(GraphicformRequest graphicformRequest) throws Exception;
PageInfo<Graphicform> queryListByParam(GraphicformRequest graphicformRequest) throws Exception;
}

4
src/main/java/com/hxgk/zxxy/service/impl/GraphicformServiceImpl.java

@ -28,7 +28,7 @@ public class GraphicformServiceImpl implements GraphicformService {
@DS("readdocument")
@Override
public List<Graphicform> queryListByParam(GraphicformRequest graphicformRequest) throws Exception {
public PageInfo<Graphicform> queryListByParam(GraphicformRequest graphicformRequest) throws Exception {
Map<String, String> userInfo = new HashMap<>();
userInfo.put("userkey",graphicformRequest.getUserkey());
userInfo.put("usertoken",graphicformRequest.getUsertoken());
@ -42,6 +42,6 @@ public class GraphicformServiceImpl implements GraphicformService {
List<Graphicform> graphicforms = graphicformMapper
.queryListByParam(graphicformRequest.getArchivesTypeAtParentId(),graphicformRequest.getgParentSun(), gBfIdList, gWsIdList, Long.parseLong(graphicformRequest.getKey()));
PageInfo<Graphicform> pageInfo = new PageInfo<Graphicform>(graphicforms);
return pageInfo.getList();
return pageInfo;
}
}

4
src/main/java/com/hxgk/zxxy/service/impl/HrServiceImpl.java

@ -30,7 +30,7 @@ public class HrServiceImpl implements HrService {
//备煤,机焦表里是车间,level5,但是要当成部门,level4,我查时,向上向下查询时,如果adminorg in[282,115],则说明他是机焦或者备煤,他level看作4
@Override
public List<Long> queryGBfId(Long adminorg) {
adminorg = 313L;
//adminorg = 313L;
OrgContType orgContType = queryOrgContTypeByAdminorg(adminorg);
Integer level = orgContType.getLevel();
List<Long> gBfIdList = new ArrayList<Long>();
@ -61,7 +61,7 @@ public class HrServiceImpl implements HrService {
//如果当前org的superior(父级)为115或282(备煤或机焦),则当前org即可能是level6,也可能是level5,如果是level6,则加入list,如果是level5则继续查询
@Override
public List<Long> queryGWsId(Long adminorg) throws Exception {
adminorg = 313L;
//adminorg = 313L;
List<Long> gGWsIdList = new ArrayList<Long>();
OrgContType orgContType = queryOrgContTypeByAdminorg(adminorg);
Integer level = orgContType.getLevel();

2
src/main/resources/mapper/GraphicformMapper.xml

@ -7,7 +7,7 @@
SELECT * FROM graphicform WHERE 1 = 1
<if test="g_parent_sun =='2'">
<if test='g_parent_sun != "" and g_parent_sun!=null' >
AND g_parent_sun = #{g_parent_sun}
</if>
and g_parent = #{g_parent}

Loading…
Cancel
Save