Commit 53463d8a authored by 王果's avatar 王果

21125 监管业务已纳管设备列表无法查询到一码通修改数据后的设备

parent 8306103c
...@@ -62,6 +62,8 @@ public interface JgUseRegistrationMapper extends BaseMapper<JgUseRegistration> { ...@@ -62,6 +62,8 @@ public interface JgUseRegistrationMapper extends BaseMapper<JgUseRegistration> {
Page<JSONObject> queryForEquipUsedByVehiclePage(@Param("page") Page<JSONObject> page, @Param("jsonObject") JSONObject jsonObject); Page<JSONObject> queryForEquipUsedByVehiclePage(@Param("page") Page<JSONObject> page, @Param("jsonObject") JSONObject jsonObject);
Page<JSONObject> queryForEquipUsedByVehiclePageHistory(@Param("page") Page<JSONObject> page, @Param("jsonObject") JSONObject jsonObject);
@MapKey("records") @MapKey("records")
List<Map<String, Object>> queryForUnitVesselEquipment(@Param("records") List<String> records); List<Map<String, Object>> queryForUnitVesselEquipment(@Param("records") List<String> records);
......
...@@ -531,6 +531,47 @@ ...@@ -531,6 +531,47 @@
WHERE WHERE
ri."EQU_DEFINE" = '23T0' ri."EQU_DEFINE" = '23T0'
and ui."DATA_SOURCE" like 'jg%' and ui."DATA_SOURCE" like 'jg%'
and ui."DATA_SOURCE" not like 'jg_his%'
and ri.whether_vehicle_cylinder = 1
-- 保证使用单位选择设备时(record为null) 能选择到本单位的设备 并且 监管单位在查看时(record 不为null)可以匹配到所有的设备
<if test="jsonObject.useUnitCreditCode != null and jsonObject.useUnitCreditCode != '' and jsonObject.record == null">
and ui."USE_UNIT_CREDIT_CODE" = #{jsonObject.useUnitCreditCode}
</if>
<if test="jsonObject.record != null and jsonObject.record != ''">
and ui."RECORD" = #{jsonObject.record}
</if>
<if test="jsonObject.record == null">
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 !='使用单位已撤回' and v.status !='已作废' )
</if>
ORDER BY ui.REC_DATE DESC
</select>
<select id="queryForEquipUsedByVehiclePageHistory" resultType="com.alibaba.fastjson.JSONObject">
<include refid="page-list-vessel"/>
WHERE
ri."EQU_DEFINE" = '23T0'
and ui."DATA_SOURCE" like 'jg_his%'
and ri.whether_vehicle_cylinder = 1
-- 保证使用单位选择设备时(record为null) 能选择到本单位的设备 并且 监管单位在查看时(record 不为null)可以匹配到所有的设备
<if test="jsonObject.useUnitCreditCode != null and jsonObject.useUnitCreditCode != '' and jsonObject.record == null">
and ui."USE_UNIT_CREDIT_CODE" = #{jsonObject.useUnitCreditCode}
</if>
<if test="jsonObject.record != null and jsonObject.record != ''">
and ui."RECORD" = #{jsonObject.record}
</if>
<if test="jsonObject.record == null">
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 !='使用单位已撤回' and v.status !='已作废' )
</if>
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" like 'jg%'
and ri.whether_vehicle_cylinder = 1 and ri.whether_vehicle_cylinder = 1
-- 保证使用单位选择设备时(record为null) 能选择到本单位的设备 并且 监管单位在查看时(record 不为null)可以匹配到所有的设备 -- 保证使用单位选择设备时(record为null) 能选择到本单位的设备 并且 监管单位在查看时(record 不为null)可以匹配到所有的设备
<if test="jsonObject.useUnitCreditCode != null and jsonObject.useUnitCreditCode != '' and jsonObject.record == null"> <if test="jsonObject.useUnitCreditCode != null and jsonObject.useUnitCreditCode != '' and jsonObject.record == null">
...@@ -546,7 +587,6 @@ ...@@ -546,7 +587,6 @@
</if> </if>
ORDER BY ui.REC_DATE DESC ORDER BY ui.REC_DATE DESC
</select> </select>
<select id="queryForUnitVesselEquipment" resultType="java.util.Map"> <select id="queryForUnitVesselEquipment" resultType="java.util.Map">
<include refid="page-list-vessel"/> <include refid="page-list-vessel"/>
WHERE ri."EQU_CATEGORY" = '2300' and ui."DATA_SOURCE" like 'jg%' and (ri.whether_vehicle_cylinder is null or ri.whether_vehicle_cylinder != 1) WHERE ri."EQU_CATEGORY" = '2300' and ui."DATA_SOURCE" like 'jg%' and (ri.whether_vehicle_cylinder is null or ri.whether_vehicle_cylinder != 1)
......
...@@ -110,7 +110,19 @@ public class IdxBizJqEquipmentRegisterController extends BaseController { ...@@ -110,7 +110,19 @@ public class IdxBizJqEquipmentRegisterController extends BaseController {
JSONObject jsonObject = new JSONObject(map); JSONObject jsonObject = new JSONObject(map);
return ResponseHelper.buildResponse(idxBizJgRegisterInfoService.queryForEquipmentRegisterPage(jsonObject)); return ResponseHelper.buildResponse(idxBizJgRegisterInfoService.queryForEquipmentRegisterPage(jsonObject));
} }
/**
* 查询设备注册列表
*
* @param map
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/pageHistory")
@ApiOperation(httpMethod = "GET", value = "设备注册信息分页查询", notes = "设备注册信息分页查询")
public ResponseModel<Page<JSONObject>> queryForPageHistory(@RequestParam Map<String, Object> map) {
JSONObject jsonObject = new JSONObject(map);
return ResponseHelper.buildResponse(idxBizJgRegisterInfoService.queryForEquipmentRegisterPageHistory(jsonObject));
}
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/category/list") @GetMapping(value = "/category/list")
@ApiOperation(httpMethod = "GET", value = "查询不同单位类型可新增的设备种类列表", notes = "查询不同单位类型可新增的设备种类列表") @ApiOperation(httpMethod = "GET", value = "查询不同单位类型可新增的设备种类列表", notes = "查询不同单位类型可新增的设备种类列表")
...@@ -143,7 +155,13 @@ public class IdxBizJqEquipmentRegisterController extends BaseController { ...@@ -143,7 +155,13 @@ public class IdxBizJqEquipmentRegisterController extends BaseController {
JSONObject jsonObject = new JSONObject(queryMap); JSONObject jsonObject = new JSONObject(queryMap);
return ResponseHelper.buildResponse(idxBizJgRegisterInfoService.queryEquipCanUsedByVesselPage(jsonObject)); return ResponseHelper.buildResponse(idxBizJgRegisterInfoService.queryEquipCanUsedByVesselPage(jsonObject));
} }
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/equipCanUsedByVessel/pageHistory")
@ApiOperation(httpMethod = "GET", value = "查询车用气瓶可进行选择的设备列表", notes = "查询车用气瓶可进行选择的设备列表")
public ResponseModel<Page<JSONObject>> queryEquipCanUsedByVesselPageHistory(@RequestParam Map<String, Object> queryMap) {
JSONObject jsonObject = new JSONObject(queryMap);
return ResponseHelper.buildResponse(idxBizJgRegisterInfoService.queryEquipCanUsedByVesselPageHistory(jsonObject));
}
/** /**
* 压力容器设备批量导入 * 压力容器设备批量导入
*/ */
......
...@@ -25,6 +25,8 @@ public interface IIdxBizJgRegisterInfoService { ...@@ -25,6 +25,8 @@ public interface IIdxBizJgRegisterInfoService {
Page<JSONObject> queryForEquipmentRegisterPage(JSONObject jsonObject); Page<JSONObject> queryForEquipmentRegisterPage(JSONObject jsonObject);
Page<JSONObject> queryForEquipmentRegisterPageHistory(JSONObject jsonObject);
Map<String, Object> getDetailByRecord(String record); Map<String, Object> getDetailByRecord(String record);
Map<String, Object> getDetailFieldCamelCaseByRecord(String record); Map<String, Object> getDetailFieldCamelCaseByRecord(String record);
...@@ -35,6 +37,8 @@ public interface IIdxBizJgRegisterInfoService { ...@@ -35,6 +37,8 @@ public interface IIdxBizJgRegisterInfoService {
Page<JSONObject> queryEquipCanUsedByVesselPage(JSONObject jsonObject); Page<JSONObject> queryEquipCanUsedByVesselPage(JSONObject jsonObject);
Page<JSONObject> queryEquipCanUsedByVesselPageHistory(JSONObject jsonObject);
Object importPressureVesselData(Map<String, Object> paramMap, MultipartFile multipartFile); Object importPressureVesselData(Map<String, Object> paramMap, MultipartFile multipartFile);
Object importPressureData(MultipartFile multipartFile) throws Exception; Object importPressureData(MultipartFile multipartFile) throws Exception;
......
...@@ -153,6 +153,9 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg ...@@ -153,6 +153,9 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
@Autowired @Autowired
JgUseRegistrationManageServiceImpl useRegistrationManageService; JgUseRegistrationManageServiceImpl useRegistrationManageService;
@Autowired
private TzBaseEnterpriseInfoMapper tzBaseEnterpriseInfoMapper;
/** /**
* 根据sequenceNbr查询:1、查询单位变更信息,2、查询使用登记证列表 * 根据sequenceNbr查询:1、查询单位变更信息,2、查询使用登记证列表
* *
...@@ -1057,7 +1060,12 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg ...@@ -1057,7 +1060,12 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
registrationManage.setReceiveOrgName(registration.getReceiveOrgName()); registrationManage.setReceiveOrgName(registration.getReceiveOrgName());
registrationManage.setReceiveCompanyCode(registration.getReceiveOrgCode()); registrationManage.setReceiveCompanyCode(registration.getReceiveOrgCode());
registrationManage.setAuditPassDate(registration.getAuditPassDate()); registrationManage.setAuditPassDate(registration.getAuditPassDate());
// registrationManage.setUseUnitAddress(); todo 设备使用地址需要更新 if (!ObjectUtils.isEmpty(registration.getNewUseUnitCreditCode())) {
TzBaseEnterpriseInfo useCodeResult = tzBaseEnterpriseInfoMapper.selectOne(new QueryWrapper<TzBaseEnterpriseInfo>().eq("use_unit_code", registration.getNewUseUnitCreditCode()));
if (useCodeResult != null) {
registrationManage.setUseUnitAddress(useCodeResult.getAddress());
}
}
} }
useRegistrationManageService.updateBatchById(list); useRegistrationManageService.updateBatchById(list);
} else { } else {
......
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