Commit 494e308b authored by 付培阳's avatar 付培阳

联动单位接口

parent 208d4928
......@@ -13,5 +13,5 @@ import java.util.List;
*/
public interface RescueEquipmentMapper extends BaseMapper<RescueEquipment> {
List<Long> getVehicleCodeCodeList(boolean isDelete);
List<Long> getVehicleCodeCodeList(boolean isDelete,Long companyId);
}
......@@ -16,5 +16,5 @@ public interface SpecialPositionStaffMapper extends BaseMapper<SpecialPositionSt
List<SpecialPositionStaff> getPositionStaffList(boolean isDelete);
List<Long> getPositionStaffCodeList(boolean isDelete);
List<Long> getPositionStaffCodeList(boolean isDelete,Long companyId);
}
......@@ -5,6 +5,6 @@
<select id="getVehicleCodeCodeList" resultType="java.lang.Long">
select distinct vehicle_type_code
from cb_rescue_equipment
where is_delete = #{isDelete}
where is_delete = #{isDelete} and company_id = #{companyId}
</select>
</mapper>
......@@ -11,6 +11,6 @@
<select id="getPositionStaffCodeList" resultType="java.lang.Long">
select distinct position_name_code
from cb_special_position_staff
where is_delete = #{isDelete}
where is_delete = #{isDelete} and company_id = #{companyId}
</select>
</mapper>
......@@ -103,11 +103,13 @@ public class RescueEquipmentController extends BaseController {
@ApiOperation(httpMethod = "GET", value = "救援装备分页查询", notes = "救援装备分页查询")
public ResponseModel<Page<RescueEquipmentDto>> queryForPage(@RequestParam(value = "current") int current,
@RequestParam(value = "size") int size,
Long companyId,
String vehicleTypeCode) {
Page<RescueEquipmentDto> page = new Page<RescueEquipmentDto>();
page.setCurrent(current);
page.setSize(size);
return ResponseHelper.buildResponse(rescueEquipmentServiceImpl.queryForRescueEquipmentPage(page, vehicleTypeCode));
return ResponseHelper.buildResponse(rescueEquipmentServiceImpl.queryForRescueEquipmentPage(page, false,
companyId, vehicleTypeCode));
}
/**
......@@ -143,7 +145,7 @@ public class RescueEquipmentController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "查询没有数据的岗位类型", notes = "查询没有数据的岗位类型")
@GetMapping(value = "/vehicle_list")
public ResponseModel<HashMap<Object, Object>> getRescueEquipmentList() throws Exception {
return ResponseHelper.buildResponse(rescueEquipmentServiceImpl.getRescueEquipmentList());
public ResponseModel<HashMap<Object, Object>> getRescueEquipmentList(Long companyId) throws Exception {
return ResponseHelper.buildResponse(rescueEquipmentServiceImpl.getRescueEquipmentList(companyId));
}
}
......@@ -102,11 +102,14 @@ public class SpecialPositionStaffController extends BaseController {
@ApiOperation(httpMethod = "GET", value = "特岗人员分页查询", notes = "特岗人员分页查询")
public ResponseModel<Page<SpecialPositionStaffDto>> queryForPage(@RequestParam(value = "current") int current,
@RequestParam(value = "size") int size,
Long companyId,
String positionNameCode) {
Page<SpecialPositionStaffDto> page = new Page<SpecialPositionStaffDto>();
page.setCurrent(current);
page.setSize(size);
return ResponseHelper.buildResponse(specialPositionStaffServiceImpl.queryForSpecialPositionStaffPage(page,
companyId,
false,
positionNameCode));
}
......@@ -143,7 +146,7 @@ public class SpecialPositionStaffController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "查询没有数据的岗位类型", notes = "查询没有数据的岗位类型")
@GetMapping(value = "/gwmc_list")
public ResponseModel<HashMap<Object, Object>> getSpecialPositionStaffList() throws Exception {
return ResponseHelper.buildResponse(specialPositionStaffServiceImpl.getSpecialPositionStaffList());
public ResponseModel<HashMap<Object, Object>> getSpecialPositionStaffList(Long companyId) throws Exception {
return ResponseHelper.buildResponse(specialPositionStaffServiceImpl.getSpecialPositionStaffList(companyId));
}
}
......@@ -34,8 +34,10 @@ public class RescueEquipmentServiceImpl extends BaseService<RescueEquipmentDto,
* 分页查询
*/
public Page<RescueEquipmentDto> queryForRescueEquipmentPage(Page<RescueEquipmentDto> page,
@Condition(Operator.eq) Boolean isDelete,
@Condition(Operator.eq) Long companyId,
@Condition(Operator.eq) String vehicleTypeCode) {
return this.queryForPage(page, null, false, vehicleTypeCode);
return this.queryForPage(page, null, false, isDelete, companyId, vehicleTypeCode);
}
/**
......@@ -60,11 +62,11 @@ public class RescueEquipmentServiceImpl extends BaseService<RescueEquipmentDto,
return update;
}
public HashMap<Object, Object> getRescueEquipmentList() throws Exception {
public HashMap<Object, Object> getRescueEquipmentList(Long companyId) throws Exception {
// 查询所有岗位类型
List<MenuFrom> menuList = dataDictionaryService.getGWMCDataDictionary("JYZBLX");
// 查询已有数据的岗位类型
List<Long> vehicleCodeCodeList = this.baseMapper.getVehicleCodeCodeList(false);
List<Long> vehicleCodeCodeList = this.baseMapper.getVehicleCodeCodeList(false, companyId);
// 排除已有数据的,返回
for (int i = 0; i < menuList.size(); i++) {
if (vehicleCodeCodeList.contains(Long.valueOf(menuList.get(i).getKey()))) {
......
......@@ -33,8 +33,10 @@ public class SpecialPositionStaffServiceImpl extends BaseService<SpecialPosition
* 分页查询
*/
public Page<SpecialPositionStaffDto> queryForSpecialPositionStaffPage(Page<SpecialPositionStaffDto> page,
@Condition(Operator.eq) Long companyId,
@Condition(Operator.eq) Boolean isDelete,
@Condition(Operator.eq) String positionNameCode) {
return this.queryForPage(page, null, false, positionNameCode);
return this.queryForPage(page, null, false, companyId, isDelete, positionNameCode);
}
/**
......@@ -59,11 +61,11 @@ public class SpecialPositionStaffServiceImpl extends BaseService<SpecialPosition
return update;
}
public HashMap<Object, Object> getSpecialPositionStaffList() throws Exception {
public HashMap<Object, Object> getSpecialPositionStaffList(Long companyId) throws Exception {
// 查询所有岗位类型
List<MenuFrom> menuList = dataDictionaryService.getGWMCDataDictionary("GWMC");
// 查询已有数据的岗位类型
List<Long> positionStaffCodeList = this.baseMapper.getPositionStaffCodeList(false);
List<Long> positionStaffCodeList = this.baseMapper.getPositionStaffCodeList(false,companyId);
// 排除已有数据的,返回
for (int i = 0; i < menuList.size(); i++) {
if (positionStaffCodeList.contains(Long.valueOf(menuList.get(i).getKey()))) {
......
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