Commit ae6375a0 authored by 刘林's avatar 刘林

fix(jg):管道工程装置新增接口修改

parent d564f664
......@@ -114,16 +114,16 @@ public class IdxBizJgProjectContraptionController extends BaseController {
}
/**
* 根据sequenceNbr查询
* 根据sequenceNbr查询详情
*
* @param sequenceNbr 主键
* @return
* @return ResponseModel
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "GET",value = "根据sequenceNbr查询单个管道工程装置表", notes = "根据sequenceNbr查询单个管道工程装置表")
public ResponseModel<IdxBizJgProjectContraptionDto> selectOne(@PathVariable Long sequenceNbr) {
return ResponseHelper.buildResponse(idxBizJgProjectContraptionServiceImpl.queryBySeq(sequenceNbr));
@GetMapping(value = "/details")
@ApiOperation(httpMethod = "GET", value = "根据sequenceNbr查询单个管道工程装置表", notes = "根据sequenceNbr查询单个管道工程装置表")
public ResponseModel<Map<String, Object>> selectOne(@RequestParam("sequenceNbr") Long sequenceNbr) {
return ResponseHelper.buildResponse(idxBizJgProjectContraptionServiceImpl.details(sequenceNbr));
}
/**
......
......@@ -3,6 +3,8 @@ package com.yeejoin.amos.boot.module.jg.biz.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgConstructionInfo;
import java.util.List;
/**
* 施工信息表接口类
*
......@@ -13,5 +15,7 @@ public interface IIdxBizJgConstructionInfoService extends IService<IdxBizJgConst
boolean saveOrUpdateData(IdxBizJgConstructionInfo constructionInfo);
boolean saveOrUpdateBatch(List<IdxBizJgConstructionInfo> constructionInfoList);
IdxBizJgConstructionInfo queryNewestDetailByRecord(String record);
}
......@@ -3,6 +3,8 @@ package com.yeejoin.amos.boot.module.jg.biz.service;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgDesignInfo;
import java.util.List;
/**
* 安全追溯-设计信息表接口类
*
......@@ -13,5 +15,7 @@ public interface IIdxBizJgDesignInfoService {
boolean saveOrUpdateData(IdxBizJgDesignInfo designInfo);
boolean saveOrUpdateBatch(List<IdxBizJgDesignInfo> designInfoList);
IdxBizJgDesignInfo getOneData(String record);
}
......@@ -3,6 +3,8 @@ package com.yeejoin.amos.boot.module.jg.biz.service;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgFactoryInfo;
import java.util.List;
/**
* 安全追溯-制造信息接口类
*
......@@ -14,4 +16,6 @@ public interface IIdxBizJgFactoryInfoService {
boolean saveOrUpdateData(IdxBizJgFactoryInfo factoryInfo);
IdxBizJgFactoryInfo getOneData(String record);
boolean saveOrUpdateBatch(List<IdxBizJgFactoryInfo> factoryInfoList);
}
......@@ -15,4 +15,6 @@ public interface IIdxBizJgInspectionDetectionInfoService {
IdxBizJgInspectionDetectionInfo queryNewestDetailByRecord(String record);
List<IdxBizJgInspectionDetectionInfo> checkInspectionInfo(List<String> records);
boolean saveOrUpdateBatch(List<IdxBizJgInspectionDetectionInfo> inspectionDetectionInfoList);
}
......@@ -17,4 +17,6 @@ public interface IIdxBizJgOtherInfoService {
IdxBizJgOtherInfo getOneData(String record);
void saveBatch(List<IdxBizJgOtherInfo> otherInfoList);
boolean saveOrUpdateBatch(List<IdxBizJgOtherInfo> otherInfoList);
}
......@@ -15,6 +15,7 @@ import java.util.Map;
* @date 2024-12-11
*/
public interface IIdxBizJgProjectContraptionService {
boolean saveOrUpdateData(IdxBizJgProjectContraption projectContraption);
Boolean deleteProjectAndEquInfoBySeq(Long sequenceNbr);
......
......@@ -3,6 +3,8 @@ package com.yeejoin.amos.boot.module.jg.biz.service;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgSupervisionInfo;
import java.util.List;
/**
* 监督管理信息表接口类
*
......@@ -14,4 +16,6 @@ public interface IIdxBizJgSupervisionInfoService {
boolean saveOrUpdateData(IdxBizJgSupervisionInfo supervisionInfo);
IdxBizJgSupervisionInfo getOneData(String record);
boolean saveOrUpdateBatch(List<IdxBizJgSupervisionInfo> supervisionInfoList);
}
......@@ -21,4 +21,6 @@ public interface IIdxBizJgUseInfoService extends IService<IdxBizJgUseInfo> {
List<IdxBizJgUseInfo> getUseInfoListByEquIds(List<String> equIds);
boolean saveBatch(List<IdxBizJgUseInfo> useInfoList);
boolean saveOrUpdateBatch(List<IdxBizJgUseInfo> useInfoList);
}
......@@ -25,6 +25,11 @@ public class IdxBizJgConstructionInfoServiceImpl extends BaseService<IdxBizJgCon
return this.saveOrUpdate(constructionInfo);
}
@Override
public boolean saveOrUpdateBatch(List<IdxBizJgConstructionInfo> constructionInfoList) {
return super.saveOrUpdateBatch(constructionInfoList);
}
//查询最新的记录
public IdxBizJgConstructionInfo queryNewestDetailByRecord(String record) {
IdxBizJgConstructionInfo result = new IdxBizJgConstructionInfo();
......
......@@ -24,6 +24,11 @@ public class IdxBizJgDesignInfoServiceImpl extends BaseService<IdxBizJgDesignInf
}
@Override
public boolean saveOrUpdateBatch(List<IdxBizJgDesignInfo> designInfoList) {
return super.saveOrUpdateBatch(designInfoList);
}
@Override
public IdxBizJgDesignInfo getOneData(String record) {
return this.getOne(new QueryWrapper<IdxBizJgDesignInfo>().eq("RECORD", record));
}
......
......@@ -27,4 +27,9 @@ public class IdxBizJgFactoryInfoServiceImpl extends BaseService<IdxBizJgFactoryI
public IdxBizJgFactoryInfo getOneData(String record) {
return this.getOne(new QueryWrapper<IdxBizJgFactoryInfo>().eq("RECORD", record));
}
@Override
public boolean saveOrUpdateBatch(List<IdxBizJgFactoryInfo> factoryInfoList) {
return super.saveOrUpdateBatch(factoryInfoList);
}
}
\ No newline at end of file
......@@ -52,4 +52,9 @@ public class IdxBizJgInspectionDetectionInfoServiceImpl extends BaseService<IdxB
}
return result;
}
@Override
public boolean saveOrUpdateBatch(List<IdxBizJgInspectionDetectionInfo> inspectionDetectionInfoList) {
return super.saveOrUpdateBatch(inspectionDetectionInfoList);
}
}
\ No newline at end of file
......@@ -32,4 +32,9 @@ public class IdxBizJgOtherInfoServiceImpl extends BaseService<IdxBizJgOtherInfoD
public void saveBatch(List<IdxBizJgOtherInfo> otherInfoList) {
super.saveBatch(otherInfoList);
}
@Override
public boolean saveOrUpdateBatch(List<IdxBizJgOtherInfo> otherInfoList) {
return super.saveOrUpdateBatch(otherInfoList);
}
}
\ No newline at end of file
package com.yeejoin.amos.boot.module.jg.biz.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.bo.CompanyBo;
......@@ -12,9 +13,9 @@ import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgUseInfo;
import com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgProjectContraptionMapper;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.ObjectUtils;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
......@@ -148,4 +149,19 @@ public class IdxBizJgProjectContraptionServiceImpl extends BaseService<IdxBizJgP
public List<IdxBizJgProjectContraptionDto> queryForIdxBizJgProjectContraptionList() {
return this.queryForList("", false);
}
public Map<String, Object> details(Long sequenceNbr) {
JSONObject result = new JSONObject();
if (!ObjectUtils.isEmpty(sequenceNbr)) {
Map<String, Object> projectContraptionMap = this.getBaseMapper().getDetail(sequenceNbr);
if (projectContraptionMap != null) {
List<Map<String, Object>> detailList = this.getBaseMapper().selectEquipList((Long) projectContraptionMap.get("sequenceNbr"));
result.putAll(projectContraptionMap);
result.put("detailList", detailList);
new DefaultUseRegisterResult(result).getData();
new FillingEditPermForCurrentUser(result).getData();
}
}
return result;
}
}
\ No newline at end of file
......@@ -7,6 +7,7 @@ import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgSupervisionInfo;
import com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgSupervisionInfoMapper;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import java.util.List;
/**
* 监督管理信息表服务实现类
......@@ -26,4 +27,8 @@ public class IdxBizJgSupervisionInfoServiceImpl extends BaseService<IdxBizJgSupe
return this.getOne(new QueryWrapper<IdxBizJgSupervisionInfo>().eq("RECORD", record));
}
@Override
public boolean saveOrUpdateBatch(List<IdxBizJgSupervisionInfo> supervisionInfoList) {
return super.saveOrUpdateBatch(supervisionInfoList);
}
}
\ No newline at end of file
......@@ -39,4 +39,9 @@ public class IdxBizJgUseInfoServiceImpl extends BaseService<IdxBizJgUseInfoDto,I
public boolean saveBatch(List<IdxBizJgUseInfo> useInfoList) {
return super.saveBatch(useInfoList);
}
@Override
public boolean saveOrUpdateBatch(List<IdxBizJgUseInfo> useInfoList) {
return super.saveOrUpdateBatch(useInfoList);
}
}
\ No newline at end of file
......@@ -2,6 +2,9 @@ package com.yeejoin.amos.boot.module.ymt.api.mapper;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectContraption;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
* 管道工程装置表 Mapper 接口
......@@ -11,4 +14,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/
public interface IdxBizJgProjectContraptionMapper extends BaseMapper<IdxBizJgProjectContraption> {
Map<String, Object> getDetail(@Param("sequenceNbr")Long sequenceNbr);
List<Map<String, Object>> selectEquipList(@Param("sequenceNbr")Long sequenceNbr);
}
......@@ -2,4 +2,82 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgProjectContraptionMapper">
<select id="getDetail" resultType="java.util.Map">
SELECT
SEQUENCE_NBR,
USE_UNIT_CREDIT_CODE,
EQU_DEFINE,
CITY,
COUNTY,
PRODUCT_QUALIFICATION_CERTIFICATE,
EQU_LIST_NAME,
CONTENT,
STREET_NAME,
OTHER_ACCESSORIES,
CITY_NAME,
PROVINCE,
STREET,
ORG_CODE,
USC_UNIT_CREDIT_CODE,
EQU_CATEGORY_NAME,
REC_USER_NAME,
COUNTY_NAME,
REC_USER_ID,
PROJECT_CONTRAPTION,
USE_REGISTRATION_CODE,
ADDRESS,
ORG_NAME,
PRODUCT_PHOTO,
IS_DELETE,
START_LATITUDE_LONGITUDE,
PIPELINE_LENGTH,
END_LATITUDE_LONGITUDE,
IS_INTO_MANAGEMENT,
REC_DATE,
EQU_CATEGORY,
PROJECT_CONTRAPTION_NO,
USC_UNIT_NAME,
SUPERVISORY_CODE,
EQU_LIST,
PROVINCE_NAME,
DATA_SOURCE,
EQU_DEFINE_NAME,
USE_UNIT_NAME
FROM
IDX_BIZ_JG_PROJECT_CONTRAPTION ibjpc
WHERE
ibjpc.SEQUENCE_NBR = #{sequenceNbr}
</select>
<select id="selectEquipList" resultType="java.util.Map">
SELECT
ibjtpp."PIPE_NAME" as productName,
ibjtpp."PIPELINE_NUMBER" as pipelineNumber,
ibjtpp."DEVICE_LEVEL" as deviceLevel,
ibjtpp."NOMINAL_DIAMETER" as nominalDiameter,
ibjtpp."WALL_THICKNESS" as wallThickness,
ibjtpp."PIPE_LENGTH" as pipeLength,
ibjtpp."PRESSURE" as pressure,
ibjtpp."TEMPERATURE" as temperature,
ibjtpp."MEDIUM" as medium,
ibjtpp."REMARKS" as remarks,
ibjidi."INSPECT_ORG_NAME" as inspectOrgName,
ibjidi."INSPECT_CONCLUSION" as inspectConclusion,
ibjidi."NEXT_INSPECT_DATE" as nextInspectDate,
ibjdi."DESIGN_UNIT_NAME" as designUnitName,
ibjci."USC_UNIT_NAME" as uscUnitName,
ibjci."USC_DATE" as uscDate,
ibjui."USE_DATE" as useDate
FROM
idx_biz_jg_use_info ibjui
LEFT JOIN idx_biz_jg_supervision_info ibjsi ON ibjui.RECORD = ibjsi.RECORD
LEFT JOIN idx_biz_jg_register_info ibjri ON ibjui.RECORD = ibjri.RECORD
LEFT JOIN idx_biz_jg_other_info ibjoi ON ibjui.RECORD = ibjoi.RECORD
LEFT JOIN idx_biz_jg_tech_params_pipeline ibjtpp ON ibjui.RECORD = ibjtpp.RECORD
LEFT JOIN idx_biz_jg_inspection_detection_info ibjidi ON ibjui.RECORD = ibjidi.RECORD
LEFT JOIN idx_biz_jg_design_info ibjdi ON ibjui.RECORD = ibjdi.RECORD
LEFT JOIN idx_biz_jg_construction_info ibjci on ibjui.RECORD = ibjci.RECORD
WHERE
ibjui.project_contraption_id = #{sequenceNbr}
</select>
</mapper>
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