Commit 0612f6a2 authored by 高建强's avatar 高建强

调整页面为树+卡片列表后修改后端接口

parent 8d31b903
...@@ -52,10 +52,6 @@ public class PersonAccountDto extends BaseDto { ...@@ -52,10 +52,6 @@ public class PersonAccountDto extends BaseDto {
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd")
private Date stationWorkTime; private Date stationWorkTime;
@ApiModelProperty(value = "岗位")
private String postName;
@ApiModelProperty(value = "姓名") @ApiModelProperty(value = "姓名")
private String name; private String name;
......
...@@ -74,6 +74,12 @@ public class StationBasicDto extends BaseDto { ...@@ -74,6 +74,12 @@ public class StationBasicDto extends BaseDto {
@ApiModelProperty(value = "所属地区名称") @ApiModelProperty(value = "所属地区名称")
private String areaName; private String areaName;
@ApiModelProperty(value = "组织机构")
private String orgCode;
@ApiModelProperty(value = "岗位")
private String postName;
private List<StationCoordinateDto> stationCoordinate; private List<StationCoordinateDto> stationCoordinate;
......
...@@ -123,8 +123,9 @@ public class StationBasic extends BaseEntity { ...@@ -123,8 +123,9 @@ public class StationBasic extends BaseEntity {
@TableField("area") @TableField("area")
private String area; private String area;
@TableField("org_code")
private String orgCode;
@TableField(exist =false) @TableField(exist =false)
private List<StationCoordinate> stationCoordinate; private List<StationCoordinate> stationCoordinate;
} }
...@@ -19,18 +19,21 @@ public interface StationBasicMapper extends BaseMapper<StationBasic> { ...@@ -19,18 +19,21 @@ public interface StationBasicMapper extends BaseMapper<StationBasic> {
List<StationBasicDto> queryPage(Long current, Long size, List<StationBasicDto> queryPage(Long current, Long size,
String stationMasterName, String stationMasterName,
String stationName, String stationName,
String stationType); String stationType,
String orgCode);
//统计 //统计
List<StationBasicDto> queryPagecount( List<StationBasicDto> queryPagecount(
String stationMasterName, String stationMasterName,
String stationName, String stationName,
String stationType); String stationType,
String orgCode);
//删除 //删除
int deleteList(String[] ids); int deleteList(String[] ids);
//导出 //导出
List<ExStationBasicDto> getExStationBasicDto(String stationMasterName, List<ExStationBasicDto> getExStationBasicDto(String stationMasterName,
String stationName, String stationName,
String stationType); String stationType,
String orgCode);
} }
...@@ -21,6 +21,9 @@ ...@@ -21,6 +21,9 @@
<where> <where>
person_basic.is_delete=0 person_basic.is_delete=0
<if test="name != null and name != ''"> <if test="name != null and name != ''">
AND person_basic.org_code like concat('%',#{orgCode},'%')
</if>
<if test="name != null and name != ''">
AND person_basic.name like concat('%',#{name},'%') AND person_basic.name like concat('%',#{name},'%')
</if> </if>
<if test="accountName != null and accountName != ''"> <if test="accountName != null and accountName != ''">
...@@ -44,6 +47,9 @@ ...@@ -44,6 +47,9 @@
<where> <where>
person_basic.is_delete=0 person_basic.is_delete=0
<if test="name != null and name != ''"> <if test="name != null and name != ''">
AND person_basic.org_code like concat('%',#{orgCode},'%')
</if>
<if test="name != null and name != ''">
AND person_basic.name like concat('%',#{name},'%') AND person_basic.name like concat('%',#{name},'%')
</if> </if>
<if test="accountName != null and accountName != ''"> <if test="accountName != null and accountName != ''">
......
...@@ -26,6 +26,9 @@ ...@@ -26,6 +26,9 @@
<if test="stationType != null and stationType != ''"> <if test="stationType != null and stationType != ''">
AND station_basic.station_type = #{stationType} AND station_basic.station_type = #{stationType}
</if> </if>
<if test="orgCoce != null and orgCoce != ''">
AND station_basic.org_code like concat('%',#{orgCoce},'%')
</if>
</where> </where>
ORDER BY station_basic.rec_date DESC ORDER BY station_basic.rec_date DESC
limit #{current},#{size} limit #{current},#{size}
...@@ -47,6 +50,9 @@ ...@@ -47,6 +50,9 @@
<if test="stationType != null and stationType != ''"> <if test="stationType != null and stationType != ''">
AND station_basic.station_type = #{stationType} AND station_basic.station_type = #{stationType}
</if> </if>
<if test="orgCoce != null and orgCoce != ''">
AND station_basic.org_code like concat('%',#{orgCoce},'%')
</if>
</where> </where>
</select> </select>
...@@ -90,6 +96,9 @@ ...@@ -90,6 +96,9 @@
<if test="stationType != null and stationType != ''"> <if test="stationType != null and stationType != ''">
AND station_basic.station_type = #{stationType} AND station_basic.station_type = #{stationType}
</if> </if>
<if test="orgCoce != null and orgCoce != ''">
AND station_basic.org_code like concat('%',#{orgCoce},'%')
</if>
</where> </where>
ORDER BY station_basic.rec_date DESC ORDER BY station_basic.rec_date DESC
</select> </select>
......
...@@ -105,7 +105,8 @@ public class StationBasicController extends BaseController { ...@@ -105,7 +105,8 @@ public class StationBasicController extends BaseController {
@RequestParam(value = "size") int size, @RequestParam(value = "size") int size,
@RequestParam(value = "stationMasterName",required = false) String stationMasterName, @RequestParam(value = "stationMasterName",required = false) String stationMasterName,
@RequestParam(value = "stationName",required = false)String stationName, @RequestParam(value = "stationName",required = false)String stationName,
@RequestParam(value = "stationType",required = false)String stationType @RequestParam(value = "stationType",required = false)String stationType,
@RequestParam(value = "orgCode",required = false)String orgCode
) { ) {
Page<StationBasicDto> page = new Page<StationBasicDto>(); Page<StationBasicDto> page = new Page<StationBasicDto>();
...@@ -113,7 +114,9 @@ public class StationBasicController extends BaseController { ...@@ -113,7 +114,9 @@ public class StationBasicController extends BaseController {
page.setSize(size); page.setSize(size);
return ResponseHelper.buildResponse(stationBasicServiceImpl.queryPage(page, stationMasterName, return ResponseHelper.buildResponse(stationBasicServiceImpl.queryPage(page, stationMasterName,
stationName, stationName,
stationType)); stationType,
orgCode
));
} }
/** /**
......
...@@ -50,13 +50,16 @@ public class StationBasicServiceImpl extends BaseService<StationBasicDto,Station ...@@ -50,13 +50,16 @@ public class StationBasicServiceImpl extends BaseService<StationBasicDto,Station
public Page<StationBasicDto> queryPage(Page<StationBasicDto> page, public Page<StationBasicDto> queryPage(Page<StationBasicDto> page,
String stationMasterName, String stationMasterName,
String stationName, String stationName,
String stationType) { String stationType,
String orgCode
) {
List<StationBasicDto> list=stationBasicMapper.queryPage((page.getCurrent()-1) * page.getSize(),page.getSize(), stationMasterName, List<StationBasicDto> list=stationBasicMapper.queryPage((page.getCurrent()-1) * page.getSize(),page.getSize(), stationMasterName,
stationName, stationName,
stationType); stationType,orgCode);
List<StationBasicDto> listcount=stationBasicMapper.queryPagecount( stationMasterName, List<StationBasicDto> listcount=stationBasicMapper.queryPagecount( stationMasterName,
stationName, stationName,
stationType); stationType,
orgCode);
page.setTotal(listcount.size()); page.setTotal(listcount.size());
page.setRecords(list); page.setRecords(list);
return page; return page;
...@@ -85,6 +88,7 @@ public class StationBasicServiceImpl extends BaseService<StationBasicDto,Station ...@@ -85,6 +88,7 @@ public class StationBasicServiceImpl extends BaseService<StationBasicDto,Station
//单位 //单位
companyModel=personBasicServiceImpl.getCompanyModel(Long.parseLong(stationBasic.getArea())); companyModel=personBasicServiceImpl.getCompanyModel(Long.parseLong(stationBasic.getArea()));
stationBasic.setAreaName(companyModel.getCompanyName()); stationBasic.setAreaName(companyModel.getCompanyName());
stationBasic.setOrgCode(companyModel.getOrgCode());
//场站基本信息 //场站基本信息
this.save(stationBasic); this.save(stationBasic);
...@@ -111,6 +115,7 @@ public class StationBasicServiceImpl extends BaseService<StationBasicDto,Station ...@@ -111,6 +115,7 @@ public class StationBasicServiceImpl extends BaseService<StationBasicDto,Station
//单位 //单位
companyModel=personBasicServiceImpl.getCompanyModel(Long.parseLong(stationBasic.getArea())); companyModel=personBasicServiceImpl.getCompanyModel(Long.parseLong(stationBasic.getArea()));
stationBasic.setAreaName(companyModel.getCompanyName()); stationBasic.setAreaName(companyModel.getCompanyName());
stationBasic.setOrgCode(companyModel.getOrgCode());
//场站基本信息 //场站基本信息
stationBasicMapper.updateById(stationBasic); stationBasicMapper.updateById(stationBasic);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment