Commit bc3b6040 authored by suhuiguang's avatar suhuiguang

1.车用气瓶设备选择分页接口

parent 30fe50b4
......@@ -46,6 +46,8 @@ public interface JgUseRegistrationMapper extends BaseMapper<JgUseRegistration> {
Page<JSONObject> queryForUnitVesselEquipmentPage(@Param("page") Page<JSONObject> page, @Param("jsonObject")JSONObject jsonObject);
Page<JSONObject> queryForEquipUsedByVehiclePage(@Param("page") Page<JSONObject> page, @Param("jsonObject")JSONObject jsonObject);
@MapKey("records")
List<Map<String, Object>> queryForUnitVesselEquipment(@Param("records")List<String> records);
......
......@@ -453,6 +453,19 @@
ORDER BY ui.REC_DATE DESC
</select>
<select id="queryForEquipUsedByVehiclePage" resultType="com.alibaba.fastjson.JSONObject">
<include refid="page-list-vessel"/>
WHERE
ri."EQU_DEFINE" = '23T0'
and ui."DATA_SOURCE" = 'jg'
and ri.whether_vehicle_cylinder = 1
<if test="jsonObject.useUnitCreditCode != null and jsonObject.useUnitCreditCode != ''">
and ui."USE_UNIT_CREDIT_CODE" = #{jsonObject.useUnitCreditCode}
</if>
and not exists(SELECT 1 FROM tzs_jg_vehicle_information v, tzs_jg_vehicle_information_eq ve WHERE v.sequence_nbr = ve.vehicle_id AND ve.equ_id = ui."RECORD" and v.status !='使用单位待提交' and v.status !='一级受理已驳回' and v.status !='使用单位已撤回' )
ORDER BY ui.REC_DATE DESC
</select>
<select id="queryForUnitVesselEquipment" resultType="java.util.Map">
<include refid="page-list-vessel"/>
WHERE ri."EQU_CATEGORY" = '2300' and ui."DATA_SOURCE" = 'jg' and (ri.whether_vehicle_cylinder is null or ri.whether_vehicle_cylinder != 1)
......
......@@ -127,4 +127,13 @@ public class IdxBizJqEquipmentRegisterController extends BaseController {
JSONObject jsonObject = new JSONObject(queryMap);
return ResponseHelper.buildResponse(idxBizJgRegisterInfoService.queryForUnitEquipmentPage(jsonObject));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/equipCanUsedByVessel/page")
@ApiOperation(httpMethod = "GET", value = "车用气瓶设备列表查询", notes = "车用气瓶设备列表查询")
public ResponseModel<Page<JSONObject>>queryEquipCanUsedByVesselPage(@RequestParam Map<String, Object> queryMap) {
JSONObject jsonObject = new JSONObject(queryMap);
return ResponseHelper.buildResponse(idxBizJgRegisterInfoService.queryEquipCanUsedByVesselPage(jsonObject));
}
}
......@@ -33,4 +33,6 @@ public interface IIdxBizJgRegisterInfoService {
List<DictionarieValueModel> equCategoryListByCompanyType(ReginParams selectedOrgInfo, String equList);
Page<JSONObject> queryForUnitEquipmentPage(JSONObject jsonObject);
Page<JSONObject> queryEquipCanUsedByVesselPage(JSONObject jsonObject);
}
......@@ -1841,4 +1841,13 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
}
return page;
}
@Override
public Page<JSONObject> queryEquipCanUsedByVesselPage(JSONObject jsonObject) {
ReginParams reginParams = JSON.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class);
String useUnitCreditCode = reginParams.getCompany().getCompanyCode();
jsonObject.put("useUnitCreditCode", useUnitCreditCode);
Page<JSONObject> page = new Page<>(jsonObject.getLong("number"),jsonObject.getLong("size"));
return jgUseRegistrationMapper.queryForEquipUsedByVehiclePage(page, jsonObject);
}
}
\ No newline at end of file
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