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

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

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