Commit 1aa9179c authored by 刘林's avatar 刘林

fix(JG):使用登记按单位办理代码提交

parent 1e2406d4
...@@ -44,8 +44,14 @@ public interface JgUseRegistrationMapper extends BaseMapper<JgUseRegistration> { ...@@ -44,8 +44,14 @@ public interface JgUseRegistrationMapper extends BaseMapper<JgUseRegistration> {
Page<JSONObject> queryForUnitVesselEquipmentPage(@Param("page") Page<JSONObject> page, @Param("jsonObject")JSONObject jsonObject); Page<JSONObject> queryForUnitVesselEquipmentPage(@Param("page") Page<JSONObject> page, @Param("jsonObject")JSONObject jsonObject);
@MapKey("records")
List<Map<String, Object>> queryForUnitVesselEquipment(@Param("records")List<String> records);
Page<JSONObject> queryForUnitPipelineEquipmentPage(@Param("page") Page<JSONObject> page, @Param("jsonObject")JSONObject jsonObject); Page<JSONObject> queryForUnitPipelineEquipmentPage(@Param("page") Page<JSONObject> page, @Param("jsonObject")JSONObject jsonObject);
@MapKey("records")
List<Map<String, Object>> queryForUnitPipelineEquipment(@Param("records")List<String> records);
@MapKey("id") @MapKey("id")
List<Map<String, Object>> selectEquipList(@Param("id")Long id); List<Map<String, Object>> selectEquipList(@Param("id")Long id);
} }
...@@ -165,9 +165,8 @@ public class JgUseRegistrationController extends BaseController { ...@@ -165,9 +165,8 @@ public class JgUseRegistrationController extends BaseController {
@GetMapping(value = "/export") @GetMapping(value = "/export")
@ApiOperation(httpMethod = "GET", value = "导出使用登记证", notes = "导出使用登记证") @ApiOperation(httpMethod = "GET", value = "导出使用登记证", notes = "导出使用登记证")
public void exportImageZip(HttpServletResponse response, @RequestParam("sequenceNbr") String sequenceNbr, public void exportImageZip(HttpServletResponse response, @RequestParam("sequenceNbr") String sequenceNbr,
@RequestParam(value = "printType", defaultValue = "0") String printType, @RequestParam(value = "printType", defaultValue = "0") String printType) {
@RequestParam(value = "manageType", defaultValue = "") String manageType) { jgUseRegistrationServiceImpl.exportUseRegistrationCertificate(sequenceNbr, response, printType);
jgUseRegistrationServiceImpl.exportUseRegistrationCertificate(sequenceNbr, response, printType, manageType);
} }
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
......
...@@ -132,6 +132,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD ...@@ -132,6 +132,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
private JgUseRegistrationEqServiceImpl jgUseRegistrationEqService; private JgUseRegistrationEqServiceImpl jgUseRegistrationEqService;
@Autowired @Autowired
private IdxBizJgInspectionDetectionInfoServiceImpl idxBizJgInspectionDetectionInfoService; private IdxBizJgInspectionDetectionInfoServiceImpl idxBizJgInspectionDetectionInfoService;
@Autowired
private JgUseRegistrationMapper jgUseRegistrationMapper;
/** /**
* @param auditPassDate 通过时间 * @param auditPassDate 通过时间
...@@ -1166,6 +1168,15 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD ...@@ -1166,6 +1168,15 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
LambdaQueryWrapper<IdxBizJgRegisterInfo> wrapper = new QueryWrapper<IdxBizJgRegisterInfo>().lambda().eq(IdxBizJgRegisterInfo::getRecord, record); LambdaQueryWrapper<IdxBizJgRegisterInfo> wrapper = new QueryWrapper<IdxBizJgRegisterInfo>().lambda().eq(IdxBizJgRegisterInfo::getRecord, record);
IdxBizJgRegisterInfo idxBizJgRegisterInfo = idxBizJgRegisterInfoMapper.selectOne(wrapper); IdxBizJgRegisterInfo idxBizJgRegisterInfo = idxBizJgRegisterInfoMapper.selectOne(wrapper);
jsonObject.put("carNumber", idxBizJgRegisterInfo.getCarNumber()); jsonObject.put("carNumber", idxBizJgRegisterInfo.getCarNumber());
} else {
List<Map<String, Object>> equipmentLists = (List<Map<String, Object>>) jsonObject.get("equipmentLists");
List<String> records = equipmentLists.stream().map(v -> (String) v.get("record")).collect(Collectors.toList());
jsonObject.remove("equipmentLists");
if ("2300".equals(jsonObject.get("EQU_CATEGORY_CODE"))){
jsonObject.put("equipmentLists",jgUseRegistrationMapper.queryForUnitVesselEquipment(records));
}else {
jsonObject.put("equipmentLists",jgUseRegistrationMapper.queryForUnitPipelineEquipment(records));
}
} }
// 转化 附件 字段 // 转化 附件 字段
commonServiceImpl.convertStringToJsonobject(jsonObject, jsonFields); commonServiceImpl.convertStringToJsonobject(jsonObject, jsonFields);
...@@ -1295,11 +1306,11 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD ...@@ -1295,11 +1306,11 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
return null; return null;
} }
public void exportUseRegistrationCertificate(String sequenceNbr, HttpServletResponse response, String printType, String manageType) { public void exportUseRegistrationCertificate(String sequenceNbr, HttpServletResponse response, String printType) {
Map<String, Object> exportParamsMap = new HashMap<>(); Map<String, Object> exportParamsMap = new HashMap<>();
exportParamsMap.put("manageType", manageType);
// 查询使用登记详情 // 查询使用登记详情
JgUseRegistration useRegistration = this.getById(sequenceNbr); JgUseRegistration useRegistration = this.getById(sequenceNbr);
exportParamsMap.put("manageType", useRegistration.getManageType());
LambdaQueryWrapper<JgUseRegistrationEq> useEqLambda = new QueryWrapper<JgUseRegistrationEq>().lambda(); LambdaQueryWrapper<JgUseRegistrationEq> useEqLambda = new QueryWrapper<JgUseRegistrationEq>().lambda();
useEqLambda.eq(JgUseRegistrationEq::getEquipTransferId, sequenceNbr); useEqLambda.eq(JgUseRegistrationEq::getEquipTransferId, sequenceNbr);
JgUseRegistrationEq useRegistrationEq = jgRelationEquipMapper.selectOne(useEqLambda); JgUseRegistrationEq useRegistrationEq = jgRelationEquipMapper.selectOne(useEqLambda);
......
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