Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zjsgfa_mysql
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
jiangyun
zjsgfa_mysql
Commits
544c564e
Commit
544c564e
authored
Dec 05, 2025
by
jiang'yun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
56320802
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
1229 additions
and
0 deletions
+1229
-0
src/main/java/com/zjsgfa/framework/util/HttpsPostUtil.java
+175
-0
src/main/java/com/zjsgfa/project/zjsgfa/controller/SjFdsgcsDcylZjymdsjbController.java
+104
-0
src/main/java/com/zjsgfa/project/zjsgfa/controller/SjFdsgcsDcylZjymdtjbController.java
+104
-0
src/main/java/com/zjsgfa/project/zjsgfa/domain/SjFdsgcsDcylZjymdsjb.java
+45
-0
src/main/java/com/zjsgfa/project/zjsgfa/domain/SjFdsgcsDcylZjymdtjb.java
+50
-0
src/main/java/com/zjsgfa/project/zjsgfa/mapper/SjFdsgcsDcylZjymdsjbMapper.java
+66
-0
src/main/java/com/zjsgfa/project/zjsgfa/mapper/SjFdsgcsDcylZjymdtjbMapper.java
+66
-0
src/main/java/com/zjsgfa/project/zjsgfa/service/ISjFdsgcsDcylZjymdsjbService.java
+61
-0
src/main/java/com/zjsgfa/project/zjsgfa/service/ISjFdsgcsDcylZjymdtjbService.java
+61
-0
src/main/java/com/zjsgfa/project/zjsgfa/service/impl/SjDjjcServiceImpl.java
+112
-0
src/main/java/com/zjsgfa/project/zjsgfa/service/impl/SjFdsgcsDcylZjymdsjbServiceImpl.java
+95
-0
src/main/java/com/zjsgfa/project/zjsgfa/service/impl/SjFdsgcsDcylZjymdtjbServiceImpl.java
+95
-0
src/main/resources/mybatis/zjsgfa/SjFdsgcsDcylZjymdsjbMapper.xml
+95
-0
src/main/resources/mybatis/zjsgfa/SjFdsgcsDcylZjymdtjbMapper.xml
+100
-0
No files found.
src/main/java/com/zjsgfa/framework/util/HttpsPostUtil.java
0 → 100644
View file @
544c564e
package
com
.
zjsgfa
.
framework
.
util
;
import
org.apache.hc.client5.http.classic.methods.HttpPost
;
import
org.apache.hc.client5.http.config.RequestConfig
;
import
org.apache.hc.client5.http.impl.classic.CloseableHttpClient
;
import
org.apache.hc.client5.http.impl.classic.CloseableHttpResponse
;
import
org.apache.hc.client5.http.impl.classic.HttpClients
;
import
org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManagerBuilder
;
import
org.apache.hc.client5.http.ssl.NoopHostnameVerifier
;
import
org.apache.hc.client5.http.ssl.SSLConnectionSocketFactory
;
import
org.apache.hc.core5.http.ContentType
;
import
org.apache.hc.core5.http.HttpEntity
;
import
org.apache.hc.core5.http.ParseException
;
import
org.apache.hc.core5.http.io.entity.EntityUtils
;
import
org.apache.hc.core5.http.io.entity.StringEntity
;
import
org.apache.hc.core5.ssl.SSLContexts
;
import
org.apache.hc.core5.ssl.TrustStrategy
;
import
javax.net.ssl.SSLContext
;
import
java.io.File
;
import
java.io.FileInputStream
;
import
java.io.IOException
;
import
java.security.KeyManagementException
;
import
java.security.KeyStore
;
import
java.security.KeyStoreException
;
import
java.security.NoSuchAlgorithmException
;
import
java.security.cert.CertificateException
;
import
java.security.cert.X509Certificate
;
/**
* Spring Boot HTTPS POST 请求工具类(管理 SSL 证书验证)
*/
public
class
HttpsPostUtil
{
// 超时时间配置(单位:毫秒)
private
static
final
int
CONNECT_TIMEOUT
=
5000
;
private
static
final
int
READ_TIMEOUT
=
5000
;
/**
* 场景1:跳过 SSL 证书验证(测试环境使用)
* @param url 请求地址
* @param jsonParam 请求体(JSON 字符串)
* @return 响应结果
*/
public
static
String
doPostWithoutSslVerify
(
String
url
,
String
jsonParam
)
{
// 1. 创建忽略证书验证的 SSLContext
SSLContext
sslContext
;
try
{
sslContext
=
SSLContexts
.
custom
()
// 信任所有证书
.
loadTrustMaterial
((
TrustStrategy
)
(
chain
,
authType
)
->
true
)
.
build
();
}
catch
(
KeyManagementException
|
NoSuchAlgorithmException
|
KeyStoreException
e
)
{
throw
new
RuntimeException
(
"创建 SSL 上下文失败"
,
e
);
}
// 2. 创建 SSL 连接工厂(忽略主机名验证)
SSLConnectionSocketFactory
sslSocketFactory
=
new
SSLConnectionSocketFactory
(
sslContext
,
NoopHostnameVerifier
.
INSTANCE
// 忽略主机名与证书的匹配验证
);
// 3. 构建 HttpClient
try
(
CloseableHttpClient
httpClient
=
HttpClients
.
custom
()
.
setConnectionManager
(
PoolingHttpClientConnectionManagerBuilder
.
create
()
.
setSSLSocketFactory
(
sslSocketFactory
)
.
build
())
.
setDefaultRequestConfig
(
RequestConfig
.
custom
()
// .setConnectTimeout(CONNECT_TIMEOUT)
// .setResponseTimeout(READ_TIMEOUT)
.
build
())
.
build
())
{
// 4. 构建 POST 请求
HttpPost
httpPost
=
new
HttpPost
(
url
);
httpPost
.
setHeader
(
"Content-Type"
,
"application/json;charset=UTF-8"
);
// 设置请求体
StringEntity
entity
=
new
StringEntity
(
jsonParam
,
ContentType
.
APPLICATION_JSON
);
httpPost
.
setEntity
(
entity
);
// 5. 执行请求
try
(
CloseableHttpResponse
response
=
httpClient
.
execute
(
httpPost
))
{
HttpEntity
responseEntity
=
response
.
getEntity
();
if
(
responseEntity
!=
null
)
{
return
EntityUtils
.
toString
(
responseEntity
,
"UTF-8"
);
}
}
catch
(
ParseException
e
)
{
throw
new
RuntimeException
(
"解析响应结果失败"
,
e
);
}
}
catch
(
IOException
e
)
{
throw
new
RuntimeException
(
"发送 HTTPS POST 请求失败"
,
e
);
}
return
null
;
}
/**
* 场景2:加载自定义 SSL 证书(生产环境使用)
* @param url 请求地址
* @param jsonParam 请求体(JSON 字符串)
* @param certPath 证书文件路径(如 .jks/.p12 格式)
* @param certPassword 证书密码
* @return 响应结果
*/
public
static
String
doPostWithCustomCert
(
String
url
,
String
jsonParam
,
String
certPath
,
String
certPassword
)
{
// 1. 加载自定义证书到 KeyStore
KeyStore
keyStore
;
try
{
keyStore
=
KeyStore
.
getInstance
(
KeyStore
.
getDefaultType
());
try
(
FileInputStream
instream
=
new
FileInputStream
(
new
File
(
certPath
)))
{
keyStore
.
load
(
instream
,
certPassword
.
toCharArray
());
}
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
"加载证书失败"
,
e
);
}
// 2. 创建自定义 SSLContext
SSLContext
sslContext
;
try
{
sslContext
=
SSLContexts
.
custom
()
.
loadTrustMaterial
(
keyStore
,
(
X509Certificate
[]
chain
,
String
authType
)
->
{
// 自定义证书验证逻辑(默认信任该证书库中的证书)
return
true
;
})
.
build
();
}
catch
(
KeyManagementException
|
NoSuchAlgorithmException
|
KeyStoreException
e
)
{
throw
new
RuntimeException
(
"创建 SSL 上下文失败"
,
e
);
}
// 3. 构建 SSL 连接工厂
SSLConnectionSocketFactory
sslSocketFactory
=
new
SSLConnectionSocketFactory
(
sslContext
);
// 4. 构建 HttpClient 并执行请求(逻辑同场景1)
try
(
CloseableHttpClient
httpClient
=
HttpClients
.
custom
()
.
setConnectionManager
(
PoolingHttpClientConnectionManagerBuilder
.
create
()
.
setSSLSocketFactory
(
sslSocketFactory
)
.
build
())
.
setDefaultRequestConfig
(
RequestConfig
.
custom
()
// .setConnectTimeout(CONNECT_TIMEOUT)
// .setResponseTimeout(READ_TIMEOUT)
.
build
())
.
build
())
{
HttpPost
httpPost
=
new
HttpPost
(
url
);
httpPost
.
setHeader
(
"Content-Type"
,
"application/json;charset=UTF-8"
);
StringEntity
entity
=
new
StringEntity
(
jsonParam
,
ContentType
.
APPLICATION_JSON
);
httpPost
.
setEntity
(
entity
);
try
(
CloseableHttpResponse
response
=
httpClient
.
execute
(
httpPost
))
{
HttpEntity
responseEntity
=
response
.
getEntity
();
if
(
responseEntity
!=
null
)
{
return
EntityUtils
.
toString
(
responseEntity
,
"UTF-8"
);
}
}
catch
(
ParseException
e
)
{
throw
new
RuntimeException
(
"解析响应结果失败"
,
e
);
}
}
catch
(
IOException
e
)
{
throw
new
RuntimeException
(
"发送 HTTPS POST 请求失败"
,
e
);
}
return
null
;
}
// 测试示例
public
static
void
main
(
String
[]
args
)
{
// 场景1测试:跳过证书验证发送 POST 请求
String
testUrl
=
"https://localhost:8443/api/test"
;
String
testParam
=
"{\"name\":\"test\",\"age\":18}"
;
String
result1
=
doPostWithoutSslVerify
(
testUrl
,
testParam
);
System
.
out
.
println
(
"跳过证书验证的响应结果:"
+
result1
);
// 场景2测试:使用自定义证书发送 POST 请求
// String result2 = doPostWithCustomCert(testUrl, testParam, "D:/cert/test.jks", "123456");
// System.out.println("自定义证书的响应结果:" + result2);
}
}
\ No newline at end of file
src/main/java/com/zjsgfa/project/zjsgfa/controller/SjFdsgcsDcylZjymdsjbController.java
0 → 100644
View file @
544c564e
package
com
.
zjsgfa
.
project
.
zjsgfa
.
controller
;
import
java.util.List
;
import
javax.servlet.http.HttpServletResponse
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.zjsgfa.framework.aspectj.lang.annotation.Log
;
import
com.zjsgfa.framework.aspectj.lang.enums.BusinessType
;
import
com.zjsgfa.project.zjsgfa.domain.SjFdsgcsDcylZjymdsjb
;
import
com.zjsgfa.project.zjsgfa.service.ISjFdsgcsDcylZjymdsjbService
;
import
com.zjsgfa.framework.web.controller.BaseController
;
import
com.zjsgfa.framework.web.domain.AjaxResult
;
import
com.zjsgfa.common.utils.poi.ExcelUtil
;
import
com.zjsgfa.framework.web.page.TableDataInfo
;
/**
* 邻井钻井液密度数据Controller
*
* @author ruoyi
* @date 2025-12-04
*/
@RestController
@RequestMapping
(
"/system/sjFdsgcsDcylZjymdsjb"
)
public
class
SjFdsgcsDcylZjymdsjbController
extends
BaseController
{
@Autowired
private
ISjFdsgcsDcylZjymdsjbService
sjFdsgcsDcylZjymdsjbService
;
/**
* 查询邻井钻井液密度数据列表
*/
@PreAuthorize
(
"@ss.hasPermi('system:sjFdsgcsDcylZjymdsjb:list')"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
SjFdsgcsDcylZjymdsjb
sjFdsgcsDcylZjymdsjb
)
{
startPage
();
List
<
SjFdsgcsDcylZjymdsjb
>
list
=
sjFdsgcsDcylZjymdsjbService
.
selectSjFdsgcsDcylZjymdsjbList
(
sjFdsgcsDcylZjymdsjb
);
return
getDataTable
(
list
);
}
/**
* 导出邻井钻井液密度数据列表
*/
@PreAuthorize
(
"@ss.hasPermi('system:sjFdsgcsDcylZjymdsjb:export')"
)
@Log
(
title
=
"邻井钻井液密度数据"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
SjFdsgcsDcylZjymdsjb
sjFdsgcsDcylZjymdsjb
)
{
List
<
SjFdsgcsDcylZjymdsjb
>
list
=
sjFdsgcsDcylZjymdsjbService
.
selectSjFdsgcsDcylZjymdsjbList
(
sjFdsgcsDcylZjymdsjb
);
ExcelUtil
<
SjFdsgcsDcylZjymdsjb
>
util
=
new
ExcelUtil
<
SjFdsgcsDcylZjymdsjb
>(
SjFdsgcsDcylZjymdsjb
.
class
);
util
.
exportExcel
(
response
,
list
,
"邻井钻井液密度数据数据"
);
}
/**
* 获取邻井钻井液密度数据详细信息
*/
@PreAuthorize
(
"@ss.hasPermi('system:sjFdsgcsDcylZjymdsjb:query')"
)
@GetMapping
(
value
=
"/{id}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
{
return
success
(
sjFdsgcsDcylZjymdsjbService
.
selectSjFdsgcsDcylZjymdsjbById
(
id
));
}
/**
* 新增邻井钻井液密度数据
*/
@PreAuthorize
(
"@ss.hasPermi('system:sjFdsgcsDcylZjymdsjb:add')"
)
@Log
(
title
=
"邻井钻井液密度数据"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
SjFdsgcsDcylZjymdsjb
sjFdsgcsDcylZjymdsjb
)
{
return
toAjax
(
sjFdsgcsDcylZjymdsjbService
.
insertSjFdsgcsDcylZjymdsjb
(
sjFdsgcsDcylZjymdsjb
));
}
/**
* 修改邻井钻井液密度数据
*/
@PreAuthorize
(
"@ss.hasPermi('system:sjFdsgcsDcylZjymdsjb:edit')"
)
@Log
(
title
=
"邻井钻井液密度数据"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
SjFdsgcsDcylZjymdsjb
sjFdsgcsDcylZjymdsjb
)
{
return
toAjax
(
sjFdsgcsDcylZjymdsjbService
.
updateSjFdsgcsDcylZjymdsjb
(
sjFdsgcsDcylZjymdsjb
));
}
/**
* 删除邻井钻井液密度数据
*/
@PreAuthorize
(
"@ss.hasPermi('system:sjFdsgcsDcylZjymdsjb:remove')"
)
@Log
(
title
=
"邻井钻井液密度数据"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{ids}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
ids
)
{
return
toAjax
(
sjFdsgcsDcylZjymdsjbService
.
deleteSjFdsgcsDcylZjymdsjbByIds
(
ids
));
}
}
src/main/java/com/zjsgfa/project/zjsgfa/controller/SjFdsgcsDcylZjymdtjbController.java
0 → 100644
View file @
544c564e
package
com
.
zjsgfa
.
project
.
zjsgfa
.
controller
;
import
java.util.List
;
import
javax.servlet.http.HttpServletResponse
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.zjsgfa.framework.aspectj.lang.annotation.Log
;
import
com.zjsgfa.framework.aspectj.lang.enums.BusinessType
;
import
com.zjsgfa.project.zjsgfa.domain.SjFdsgcsDcylZjymdtjb
;
import
com.zjsgfa.project.zjsgfa.service.ISjFdsgcsDcylZjymdtjbService
;
import
com.zjsgfa.framework.web.controller.BaseController
;
import
com.zjsgfa.framework.web.domain.AjaxResult
;
import
com.zjsgfa.common.utils.poi.ExcelUtil
;
import
com.zjsgfa.framework.web.page.TableDataInfo
;
/**
* 邻井钻井液密度统计Controller
*
* @author ruoyi
* @date 2025-12-04
*/
@RestController
@RequestMapping
(
"/system/sjFdsgcsDcylZjymdtjb"
)
public
class
SjFdsgcsDcylZjymdtjbController
extends
BaseController
{
@Autowired
private
ISjFdsgcsDcylZjymdtjbService
sjFdsgcsDcylZjymdtjbService
;
/**
* 查询邻井钻井液密度统计列表
*/
@PreAuthorize
(
"@ss.hasPermi('system:sjFdsgcsDcylZjymdtjb:list')"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
SjFdsgcsDcylZjymdtjb
sjFdsgcsDcylZjymdtjb
)
{
startPage
();
List
<
SjFdsgcsDcylZjymdtjb
>
list
=
sjFdsgcsDcylZjymdtjbService
.
selectSjFdsgcsDcylZjymdtjbList
(
sjFdsgcsDcylZjymdtjb
);
return
getDataTable
(
list
);
}
/**
* 导出邻井钻井液密度统计列表
*/
@PreAuthorize
(
"@ss.hasPermi('system:sjFdsgcsDcylZjymdtjb:export')"
)
@Log
(
title
=
"邻井钻井液密度统计"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
SjFdsgcsDcylZjymdtjb
sjFdsgcsDcylZjymdtjb
)
{
List
<
SjFdsgcsDcylZjymdtjb
>
list
=
sjFdsgcsDcylZjymdtjbService
.
selectSjFdsgcsDcylZjymdtjbList
(
sjFdsgcsDcylZjymdtjb
);
ExcelUtil
<
SjFdsgcsDcylZjymdtjb
>
util
=
new
ExcelUtil
<
SjFdsgcsDcylZjymdtjb
>(
SjFdsgcsDcylZjymdtjb
.
class
);
util
.
exportExcel
(
response
,
list
,
"邻井钻井液密度统计数据"
);
}
/**
* 获取邻井钻井液密度统计详细信息
*/
@PreAuthorize
(
"@ss.hasPermi('system:sjFdsgcsDcylZjymdtjb:query')"
)
@GetMapping
(
value
=
"/{id}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
{
return
success
(
sjFdsgcsDcylZjymdtjbService
.
selectSjFdsgcsDcylZjymdtjbById
(
id
));
}
/**
* 新增邻井钻井液密度统计
*/
@PreAuthorize
(
"@ss.hasPermi('system:sjFdsgcsDcylZjymdtjb:add')"
)
@Log
(
title
=
"邻井钻井液密度统计"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
SjFdsgcsDcylZjymdtjb
sjFdsgcsDcylZjymdtjb
)
{
return
toAjax
(
sjFdsgcsDcylZjymdtjbService
.
insertSjFdsgcsDcylZjymdtjb
(
sjFdsgcsDcylZjymdtjb
));
}
/**
* 修改邻井钻井液密度统计
*/
@PreAuthorize
(
"@ss.hasPermi('system:sjFdsgcsDcylZjymdtjb:edit')"
)
@Log
(
title
=
"邻井钻井液密度统计"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
SjFdsgcsDcylZjymdtjb
sjFdsgcsDcylZjymdtjb
)
{
return
toAjax
(
sjFdsgcsDcylZjymdtjbService
.
updateSjFdsgcsDcylZjymdtjb
(
sjFdsgcsDcylZjymdtjb
));
}
/**
* 删除邻井钻井液密度统计
*/
@PreAuthorize
(
"@ss.hasPermi('system:sjFdsgcsDcylZjymdtjb:remove')"
)
@Log
(
title
=
"邻井钻井液密度统计"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{ids}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
ids
)
{
return
toAjax
(
sjFdsgcsDcylZjymdtjbService
.
deleteSjFdsgcsDcylZjymdtjbByIds
(
ids
));
}
}
src/main/java/com/zjsgfa/project/zjsgfa/domain/SjFdsgcsDcylZjymdsjb.java
0 → 100644
View file @
544c564e
package
com
.
zjsgfa
.
project
.
zjsgfa
.
domain
;
import
com.zjsgfa.framework.aspectj.lang.annotation.Excel
;
import
com.zjsgfa.framework.web.domain.BaseEntity
;
import
lombok.Data
;
/**
* 邻井钻井液密度数据对象 sj_fdsgcs_dcyl_zjymdsjb
*
* @author ruoyi
* @date 2025-12-04
*/
@Data
public
class
SjFdsgcsDcylZjymdsjb
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** 主键ID */
private
Long
id
;
/** 井号 */
@Excel
(
name
=
"井号"
)
private
String
jh
;
/** 邻井井号 */
@Excel
(
name
=
"邻井井号"
)
private
String
ljjh
;
/** 取样井深 */
@Excel
(
name
=
"取样井深"
)
private
Double
qyjs
;
/** 密度 */
@Excel
(
name
=
"密度"
)
private
Double
md
;
/** 对应垂深 */
@Excel
(
name
=
"对应垂深"
)
private
Double
dycs
;
/** 对应层位 */
@Excel
(
name
=
"对应层位"
)
private
String
dycw
;
}
src/main/java/com/zjsgfa/project/zjsgfa/domain/SjFdsgcsDcylZjymdtjb.java
0 → 100644
View file @
544c564e
package
com
.
zjsgfa
.
project
.
zjsgfa
.
domain
;
import
com.zjsgfa.framework.aspectj.lang.annotation.Excel
;
import
com.zjsgfa.framework.web.domain.BaseEntity
;
import
lombok.Data
;
/**
* 邻井钻井液密度统计对象 sj_fdsgcs_dcyl_zjymdtjb
*
* @author ruoyi
* @date 2025-12-04
*/
@Data
public
class
SjFdsgcsDcylZjymdtjb
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** 主键ID */
private
Long
id
;
/** 井号 */
@Excel
(
name
=
"井号"
)
private
String
jh
;
/** 邻井井号 */
@Excel
(
name
=
"邻井井号"
)
private
String
ljjh
;
/** 层位 */
@Excel
(
name
=
"层位"
)
private
String
cw
;
/** 密度最小值 */
@Excel
(
name
=
"密度最小值"
)
private
Double
mdMin
;
/** 密度最大值 */
@Excel
(
name
=
"密度最大值"
)
private
Double
mdMax
;
/** 取样垂深最小值 */
@Excel
(
name
=
"取样垂深最小值"
)
private
Double
qycsMin
;
/** 取样垂深最大值 */
@Excel
(
name
=
"取样垂深最大值"
)
private
Double
qycsMax
;
}
src/main/java/com/zjsgfa/project/zjsgfa/mapper/SjFdsgcsDcylZjymdsjbMapper.java
0 → 100644
View file @
544c564e
package
com
.
zjsgfa
.
project
.
zjsgfa
.
mapper
;
import
java.util.List
;
import
com.zjsgfa.project.zjsgfa.domain.SjFdsgcsDcylZjymdsjb
;
/**
* 邻井钻井液密度数据Mapper接口
*
* @author ruoyi
* @date 2025-12-04
*/
public
interface
SjFdsgcsDcylZjymdsjbMapper
{
/**
* 查询邻井钻井液密度数据
*
* @param id 邻井钻井液密度数据主键
* @return 邻井钻井液密度数据
*/
public
SjFdsgcsDcylZjymdsjb
selectSjFdsgcsDcylZjymdsjbById
(
Long
id
);
/**
* 查询邻井钻井液密度数据列表
*
* @param sjFdsgcsDcylZjymdsjb 邻井钻井液密度数据
* @return 邻井钻井液密度数据集合
*/
public
List
<
SjFdsgcsDcylZjymdsjb
>
selectSjFdsgcsDcylZjymdsjbList
(
SjFdsgcsDcylZjymdsjb
sjFdsgcsDcylZjymdsjb
);
/**
* 新增邻井钻井液密度数据
*
* @param sjFdsgcsDcylZjymdsjb 邻井钻井液密度数据
* @return 结果
*/
public
int
insertSjFdsgcsDcylZjymdsjb
(
SjFdsgcsDcylZjymdsjb
sjFdsgcsDcylZjymdsjb
);
/**
* 修改邻井钻井液密度数据
*
* @param sjFdsgcsDcylZjymdsjb 邻井钻井液密度数据
* @return 结果
*/
public
int
updateSjFdsgcsDcylZjymdsjb
(
SjFdsgcsDcylZjymdsjb
sjFdsgcsDcylZjymdsjb
);
/**
* 删除邻井钻井液密度数据
*
* @param id 邻井钻井液密度数据主键
* @return 结果
*/
public
int
deleteSjFdsgcsDcylZjymdsjbById
(
Long
id
);
/**
* 批量删除邻井钻井液密度数据
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public
int
deleteSjFdsgcsDcylZjymdsjbByIds
(
Long
[]
ids
);
int
deleteSjFdsgcsDcylZjymdsjbByjh
(
String
jh
);
int
insertSjFdsgcsDcylZjymdsjbBatch
(
List
<
SjFdsgcsDcylZjymdsjb
>
zjymdsjbList
);
}
src/main/java/com/zjsgfa/project/zjsgfa/mapper/SjFdsgcsDcylZjymdtjbMapper.java
0 → 100644
View file @
544c564e
package
com
.
zjsgfa
.
project
.
zjsgfa
.
mapper
;
import
java.util.List
;
import
com.zjsgfa.project.zjsgfa.domain.SjFdsgcsDcylZjymdtjb
;
/**
* 邻井钻井液密度统计Mapper接口
*
* @author ruoyi
* @date 2025-12-04
*/
public
interface
SjFdsgcsDcylZjymdtjbMapper
{
/**
* 查询邻井钻井液密度统计
*
* @param id 邻井钻井液密度统计主键
* @return 邻井钻井液密度统计
*/
public
SjFdsgcsDcylZjymdtjb
selectSjFdsgcsDcylZjymdtjbById
(
Long
id
);
/**
* 查询邻井钻井液密度统计列表
*
* @param sjFdsgcsDcylZjymdtjb 邻井钻井液密度统计
* @return 邻井钻井液密度统计集合
*/
public
List
<
SjFdsgcsDcylZjymdtjb
>
selectSjFdsgcsDcylZjymdtjbList
(
SjFdsgcsDcylZjymdtjb
sjFdsgcsDcylZjymdtjb
);
/**
* 新增邻井钻井液密度统计
*
* @param sjFdsgcsDcylZjymdtjb 邻井钻井液密度统计
* @return 结果
*/
public
int
insertSjFdsgcsDcylZjymdtjb
(
SjFdsgcsDcylZjymdtjb
sjFdsgcsDcylZjymdtjb
);
/**
* 修改邻井钻井液密度统计
*
* @param sjFdsgcsDcylZjymdtjb 邻井钻井液密度统计
* @return 结果
*/
public
int
updateSjFdsgcsDcylZjymdtjb
(
SjFdsgcsDcylZjymdtjb
sjFdsgcsDcylZjymdtjb
);
/**
* 删除邻井钻井液密度统计
*
* @param id 邻井钻井液密度统计主键
* @return 结果
*/
public
int
deleteSjFdsgcsDcylZjymdtjbById
(
Long
id
);
/**
* 批量删除邻井钻井液密度统计
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public
int
deleteSjFdsgcsDcylZjymdtjbByIds
(
Long
[]
ids
);
int
deleteSjFdsgcsDcylZjymdtjbByJh
(
String
jh
);
int
insertSjFdsgcsDcylZjymdtjbBatch
(
List
<
SjFdsgcsDcylZjymdtjb
>
zjymdtjbList
);
}
src/main/java/com/zjsgfa/project/zjsgfa/service/ISjFdsgcsDcylZjymdsjbService.java
0 → 100644
View file @
544c564e
package
com
.
zjsgfa
.
project
.
zjsgfa
.
service
;
import
java.util.List
;
import
com.zjsgfa.project.zjsgfa.domain.SjFdsgcsDcylZjymdsjb
;
/**
* 邻井钻井液密度数据Service接口
*
* @author ruoyi
* @date 2025-12-04
*/
public
interface
ISjFdsgcsDcylZjymdsjbService
{
/**
* 查询邻井钻井液密度数据
*
* @param id 邻井钻井液密度数据主键
* @return 邻井钻井液密度数据
*/
public
SjFdsgcsDcylZjymdsjb
selectSjFdsgcsDcylZjymdsjbById
(
Long
id
);
/**
* 查询邻井钻井液密度数据列表
*
* @param sjFdsgcsDcylZjymdsjb 邻井钻井液密度数据
* @return 邻井钻井液密度数据集合
*/
public
List
<
SjFdsgcsDcylZjymdsjb
>
selectSjFdsgcsDcylZjymdsjbList
(
SjFdsgcsDcylZjymdsjb
sjFdsgcsDcylZjymdsjb
);
/**
* 新增邻井钻井液密度数据
*
* @param sjFdsgcsDcylZjymdsjb 邻井钻井液密度数据
* @return 结果
*/
public
int
insertSjFdsgcsDcylZjymdsjb
(
SjFdsgcsDcylZjymdsjb
sjFdsgcsDcylZjymdsjb
);
/**
* 修改邻井钻井液密度数据
*
* @param sjFdsgcsDcylZjymdsjb 邻井钻井液密度数据
* @return 结果
*/
public
int
updateSjFdsgcsDcylZjymdsjb
(
SjFdsgcsDcylZjymdsjb
sjFdsgcsDcylZjymdsjb
);
/**
* 批量删除邻井钻井液密度数据
*
* @param ids 需要删除的邻井钻井液密度数据主键集合
* @return 结果
*/
public
int
deleteSjFdsgcsDcylZjymdsjbByIds
(
Long
[]
ids
);
/**
* 删除邻井钻井液密度数据信息
*
* @param id 邻井钻井液密度数据主键
* @return 结果
*/
public
int
deleteSjFdsgcsDcylZjymdsjbById
(
Long
id
);
}
src/main/java/com/zjsgfa/project/zjsgfa/service/ISjFdsgcsDcylZjymdtjbService.java
0 → 100644
View file @
544c564e
package
com
.
zjsgfa
.
project
.
zjsgfa
.
service
;
import
java.util.List
;
import
com.zjsgfa.project.zjsgfa.domain.SjFdsgcsDcylZjymdtjb
;
/**
* 邻井钻井液密度统计Service接口
*
* @author ruoyi
* @date 2025-12-04
*/
public
interface
ISjFdsgcsDcylZjymdtjbService
{
/**
* 查询邻井钻井液密度统计
*
* @param id 邻井钻井液密度统计主键
* @return 邻井钻井液密度统计
*/
public
SjFdsgcsDcylZjymdtjb
selectSjFdsgcsDcylZjymdtjbById
(
Long
id
);
/**
* 查询邻井钻井液密度统计列表
*
* @param sjFdsgcsDcylZjymdtjb 邻井钻井液密度统计
* @return 邻井钻井液密度统计集合
*/
public
List
<
SjFdsgcsDcylZjymdtjb
>
selectSjFdsgcsDcylZjymdtjbList
(
SjFdsgcsDcylZjymdtjb
sjFdsgcsDcylZjymdtjb
);
/**
* 新增邻井钻井液密度统计
*
* @param sjFdsgcsDcylZjymdtjb 邻井钻井液密度统计
* @return 结果
*/
public
int
insertSjFdsgcsDcylZjymdtjb
(
SjFdsgcsDcylZjymdtjb
sjFdsgcsDcylZjymdtjb
);
/**
* 修改邻井钻井液密度统计
*
* @param sjFdsgcsDcylZjymdtjb 邻井钻井液密度统计
* @return 结果
*/
public
int
updateSjFdsgcsDcylZjymdtjb
(
SjFdsgcsDcylZjymdtjb
sjFdsgcsDcylZjymdtjb
);
/**
* 批量删除邻井钻井液密度统计
*
* @param ids 需要删除的邻井钻井液密度统计主键集合
* @return 结果
*/
public
int
deleteSjFdsgcsDcylZjymdtjbByIds
(
Long
[]
ids
);
/**
* 删除邻井钻井液密度统计信息
*
* @param id 邻井钻井液密度统计主键
* @return 结果
*/
public
int
deleteSjFdsgcsDcylZjymdtjbById
(
Long
id
);
}
src/main/java/com/zjsgfa/project/zjsgfa/service/impl/SjDjjcServiceImpl.java
View file @
544c564e
...
...
@@ -11,10 +11,15 @@ import cn.hutool.http.HttpUtil;
import
com.fasterxml.jackson.core.JsonProcessingException
;
import
com.fasterxml.jackson.core.type.TypeReference
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.google.gson.Gson
;
import
com.google.gson.GsonBuilder
;
import
com.google.gson.JsonArray
;
import
com.google.gson.JsonObject
;
import
com.zjsgfa.common.utils.DateUtils
;
import
com.zjsgfa.common.utils.SecurityUtils
;
import
com.zjsgfa.common.utils.StringUtils
;
import
com.zjsgfa.common.utils.bean.BeanUtils
;
import
com.zjsgfa.framework.util.HttpsPostUtil
;
import
com.zjsgfa.framework.web.domain.AjaxResult
;
import
com.zjsgfa.project.zjsgfa.domain.*
;
import
com.zjsgfa.project.zjsgfa.mapper.*
;
...
...
@@ -119,6 +124,12 @@ public class SjDjjcServiceImpl implements ISjDjjcService
@Autowired
private
SjFlMapper
sjFlMapper
;
@Autowired
private
SjFdsgcsDcylZjymdsjbMapper
sjFdsgcsDcylZjymdsjbMapper
;
@Autowired
private
SjFdsgcsDcylZjymdtjbMapper
sjFdsgcsDcylZjymdtjbMapper
;
...
...
@@ -711,6 +722,8 @@ public class SjDjjcServiceImpl implements ISjDjjcService
param
.
setJdzzb
(
sjDjjc
.
getJdzzb
());
param
.
setJh
(
null
);
String
[]
jh_list
=
ljjh
.
split
(
","
);
CommonParam
param1
=
new
CommonParam
();
param1
.
setJh
(
ljjh
);
param1
.
setQk
(
sjDjjc
.
getQk
());
...
...
@@ -878,9 +891,59 @@ public class SjDjjcServiceImpl implements ISjDjjcService
sjSzfxjgMapper
.
deleteSjSzfxjgByJh
(
jh
);
sjSzfxjgMapper
.
insertSjSzfxjgBatch
(
sjSzfxjgList
);
}
//获取地层压力数据
Map
map
=
new
HashMap
<>();
map
.
put
(
"jh_list"
,
jh_list
);
Gson
gson
=
new
GsonBuilder
().
setPrettyPrinting
().
create
();
String
json
=
gson
.
toJson
(
map
);
//调用httpsPost请求获取数据
String
url
=
"https://10.68.249.59:12001/api/ljzjymd"
;
String
result
=
HttpsPostUtil
.
doPostWithoutSslVerify
(
url
,
json
);
JsonObject
root
=
gson
.
fromJson
(
result
,
JsonObject
.
class
);
JsonObject
outerData
=
root
.
getAsJsonObject
(
"data"
);
List
<
String
>
dcylmsList
=
new
ArrayList
<>();
List
<
SjFdsgcsDcylZjymdsjb
>
zjymdsjbList
=
new
ArrayList
<>();
List
<
SjFdsgcsDcylZjymdtjb
>
zjymdtjbList
=
new
ArrayList
<>();
for
(
String
ljh:
jh_list
){
JsonObject
innerData
=
outerData
.
getAsJsonObject
(
ljh
);
if
(
innerData
!=
null
){
//邻井钻井液密度数据表
JsonArray
zjymdsjb
=
innerData
.
getAsJsonArray
(
"邻井钻井液密度数据表"
);
List
<
SjFdsgcsDcylZjymdsjb
>
list
=
getZjymdsjbList
(
zjymdsjb
,
jh
);
zjymdsjbList
.
addAll
(
list
);
//邻井钻井液密度统计表
JsonArray
zjymdtjb
=
innerData
.
getAsJsonArray
(
"邻井钻井液密度统计表"
);
zjymdtjbList
.
addAll
(
getZjymdtjbList
(
zjymdtjb
,
ljh
,
jh
));
//地层压力描述文本
String
dcylms
=
innerData
.
get
(
"地层压力描述文本"
).
toString
();
dcylmsList
.
add
(
"邻井"
+
ljh
+
dcylms
);
}
}
if
(
zjymdsjbList
.
size
()>
0
){
sjFdsgcsDcylZjymdsjbMapper
.
deleteSjFdsgcsDcylZjymdsjbByjh
(
jh
);
sjFdsgcsDcylZjymdsjbMapper
.
insertSjFdsgcsDcylZjymdsjbBatch
(
zjymdsjbList
);
}
if
(
zjymdtjbList
.
size
()>
0
){
sjFdsgcsDcylZjymdtjbMapper
.
deleteSjFdsgcsDcylZjymdtjbByJh
(
jh
);
sjFdsgcsDcylZjymdtjbMapper
.
insertSjFdsgcsDcylZjymdtjbBatch
(
zjymdtjbList
);
}
return
AjaxResult
.
success
();
}
@Override
public
AjaxResult
saveZtxh
(
CommonParam
param
)
{
String
jh
=
param
.
getSjjh
();
...
...
@@ -1325,4 +1388,53 @@ public class SjDjjcServiceImpl implements ISjDjjcService
}
public
List
<
SjFdsgcsDcylZjymdsjb
>
getZjymdsjbList
(
JsonArray
data
,
String
jh
)
{
List
<
SjFdsgcsDcylZjymdsjb
>
list
=
new
ArrayList
<>();
data
.
forEach
(
item
->
{
SjFdsgcsDcylZjymdsjb
sjFdsgcsDcylZjymdsjb
=
new
SjFdsgcsDcylZjymdsjb
();
JsonObject
jsonObject
=
item
.
getAsJsonObject
();
String
ljjh
=
jsonObject
.
get
(
"井号"
).
getAsString
();
Double
qyjs
=
jsonObject
.
get
(
"取样井深"
).
getAsDouble
();
Double
md
=
jsonObject
.
get
(
"密度"
).
getAsDouble
();
Double
dycs
=
jsonObject
.
get
(
"对应垂深"
).
getAsDouble
();
String
dycw
=
jsonObject
.
get
(
"对应层位"
).
getAsString
();
sjFdsgcsDcylZjymdsjb
.
setJh
(
jh
);
sjFdsgcsDcylZjymdsjb
.
setLjjh
(
ljjh
);
sjFdsgcsDcylZjymdsjb
.
setQyjs
(
qyjs
);
sjFdsgcsDcylZjymdsjb
.
setMd
(
md
);
sjFdsgcsDcylZjymdsjb
.
setDycs
(
dycs
);
sjFdsgcsDcylZjymdsjb
.
setDycw
(
dycw
);
list
.
add
(
sjFdsgcsDcylZjymdsjb
);
});
return
list
;
}
public
List
<
SjFdsgcsDcylZjymdtjb
>
getZjymdtjbList
(
JsonArray
data
,
String
ljjh
,
String
jh
)
{
List
<
SjFdsgcsDcylZjymdtjb
>
list
=
new
ArrayList
<>();
data
.
forEach
(
item
->
{
SjFdsgcsDcylZjymdtjb
sjFdsgcsDcylZjymdtjb
=
new
SjFdsgcsDcylZjymdtjb
();
JsonObject
jsonObject
=
item
.
getAsJsonObject
();
String
cw
=
jsonObject
.
get
(
"层位"
).
getAsString
();
Double
mdMin
=
jsonObject
.
get
(
"密度最小值"
).
getAsDouble
();
Double
mdMax
=
jsonObject
.
get
(
"密度最大值"
).
getAsDouble
();
Double
qycsMin
=
jsonObject
.
get
(
"取样垂深最小值"
).
getAsDouble
();
Double
qycsMax
=
jsonObject
.
get
(
"取样垂深最大值"
).
getAsDouble
();
sjFdsgcsDcylZjymdtjb
.
setLjjh
(
ljjh
);
sjFdsgcsDcylZjymdtjb
.
setJh
(
jh
);
sjFdsgcsDcylZjymdtjb
.
setCw
(
cw
);
sjFdsgcsDcylZjymdtjb
.
setMdMin
(
mdMin
);
sjFdsgcsDcylZjymdtjb
.
setMdMax
(
mdMax
);
sjFdsgcsDcylZjymdtjb
.
setQycsMin
(
qycsMin
);
sjFdsgcsDcylZjymdtjb
.
setQycsMax
(
qycsMax
);
list
.
add
(
sjFdsgcsDcylZjymdtjb
);
});
return
list
;
}
}
src/main/java/com/zjsgfa/project/zjsgfa/service/impl/SjFdsgcsDcylZjymdsjbServiceImpl.java
0 → 100644
View file @
544c564e
package
com
.
zjsgfa
.
project
.
zjsgfa
.
service
.
impl
;
import
java.util.List
;
import
com.zjsgfa.common.utils.DateUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.zjsgfa.project.zjsgfa.mapper.SjFdsgcsDcylZjymdsjbMapper
;
import
com.zjsgfa.project.zjsgfa.domain.SjFdsgcsDcylZjymdsjb
;
import
com.zjsgfa.project.zjsgfa.service.ISjFdsgcsDcylZjymdsjbService
;
/**
* 邻井钻井液密度数据Service业务层处理
*
* @author ruoyi
* @date 2025-12-04
*/
@Service
public
class
SjFdsgcsDcylZjymdsjbServiceImpl
implements
ISjFdsgcsDcylZjymdsjbService
{
@Autowired
private
SjFdsgcsDcylZjymdsjbMapper
sjFdsgcsDcylZjymdsjbMapper
;
/**
* 查询邻井钻井液密度数据
*
* @param id 邻井钻井液密度数据主键
* @return 邻井钻井液密度数据
*/
@Override
public
SjFdsgcsDcylZjymdsjb
selectSjFdsgcsDcylZjymdsjbById
(
Long
id
)
{
return
sjFdsgcsDcylZjymdsjbMapper
.
selectSjFdsgcsDcylZjymdsjbById
(
id
);
}
/**
* 查询邻井钻井液密度数据列表
*
* @param sjFdsgcsDcylZjymdsjb 邻井钻井液密度数据
* @return 邻井钻井液密度数据
*/
@Override
public
List
<
SjFdsgcsDcylZjymdsjb
>
selectSjFdsgcsDcylZjymdsjbList
(
SjFdsgcsDcylZjymdsjb
sjFdsgcsDcylZjymdsjb
)
{
return
sjFdsgcsDcylZjymdsjbMapper
.
selectSjFdsgcsDcylZjymdsjbList
(
sjFdsgcsDcylZjymdsjb
);
}
/**
* 新增邻井钻井液密度数据
*
* @param sjFdsgcsDcylZjymdsjb 邻井钻井液密度数据
* @return 结果
*/
@Override
public
int
insertSjFdsgcsDcylZjymdsjb
(
SjFdsgcsDcylZjymdsjb
sjFdsgcsDcylZjymdsjb
)
{
sjFdsgcsDcylZjymdsjb
.
setCreateTime
(
DateUtils
.
getNowDate
());
return
sjFdsgcsDcylZjymdsjbMapper
.
insertSjFdsgcsDcylZjymdsjb
(
sjFdsgcsDcylZjymdsjb
);
}
/**
* 修改邻井钻井液密度数据
*
* @param sjFdsgcsDcylZjymdsjb 邻井钻井液密度数据
* @return 结果
*/
@Override
public
int
updateSjFdsgcsDcylZjymdsjb
(
SjFdsgcsDcylZjymdsjb
sjFdsgcsDcylZjymdsjb
)
{
return
sjFdsgcsDcylZjymdsjbMapper
.
updateSjFdsgcsDcylZjymdsjb
(
sjFdsgcsDcylZjymdsjb
);
}
/**
* 批量删除邻井钻井液密度数据
*
* @param ids 需要删除的邻井钻井液密度数据主键
* @return 结果
*/
@Override
public
int
deleteSjFdsgcsDcylZjymdsjbByIds
(
Long
[]
ids
)
{
return
sjFdsgcsDcylZjymdsjbMapper
.
deleteSjFdsgcsDcylZjymdsjbByIds
(
ids
);
}
/**
* 删除邻井钻井液密度数据信息
*
* @param id 邻井钻井液密度数据主键
* @return 结果
*/
@Override
public
int
deleteSjFdsgcsDcylZjymdsjbById
(
Long
id
)
{
return
sjFdsgcsDcylZjymdsjbMapper
.
deleteSjFdsgcsDcylZjymdsjbById
(
id
);
}
}
src/main/java/com/zjsgfa/project/zjsgfa/service/impl/SjFdsgcsDcylZjymdtjbServiceImpl.java
0 → 100644
View file @
544c564e
package
com
.
zjsgfa
.
project
.
zjsgfa
.
service
.
impl
;
import
java.util.List
;
import
com.zjsgfa.common.utils.DateUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.zjsgfa.project.zjsgfa.mapper.SjFdsgcsDcylZjymdtjbMapper
;
import
com.zjsgfa.project.zjsgfa.domain.SjFdsgcsDcylZjymdtjb
;
import
com.zjsgfa.project.zjsgfa.service.ISjFdsgcsDcylZjymdtjbService
;
/**
* 邻井钻井液密度统计Service业务层处理
*
* @author ruoyi
* @date 2025-12-04
*/
@Service
public
class
SjFdsgcsDcylZjymdtjbServiceImpl
implements
ISjFdsgcsDcylZjymdtjbService
{
@Autowired
private
SjFdsgcsDcylZjymdtjbMapper
sjFdsgcsDcylZjymdtjbMapper
;
/**
* 查询邻井钻井液密度统计
*
* @param id 邻井钻井液密度统计主键
* @return 邻井钻井液密度统计
*/
@Override
public
SjFdsgcsDcylZjymdtjb
selectSjFdsgcsDcylZjymdtjbById
(
Long
id
)
{
return
sjFdsgcsDcylZjymdtjbMapper
.
selectSjFdsgcsDcylZjymdtjbById
(
id
);
}
/**
* 查询邻井钻井液密度统计列表
*
* @param sjFdsgcsDcylZjymdtjb 邻井钻井液密度统计
* @return 邻井钻井液密度统计
*/
@Override
public
List
<
SjFdsgcsDcylZjymdtjb
>
selectSjFdsgcsDcylZjymdtjbList
(
SjFdsgcsDcylZjymdtjb
sjFdsgcsDcylZjymdtjb
)
{
return
sjFdsgcsDcylZjymdtjbMapper
.
selectSjFdsgcsDcylZjymdtjbList
(
sjFdsgcsDcylZjymdtjb
);
}
/**
* 新增邻井钻井液密度统计
*
* @param sjFdsgcsDcylZjymdtjb 邻井钻井液密度统计
* @return 结果
*/
@Override
public
int
insertSjFdsgcsDcylZjymdtjb
(
SjFdsgcsDcylZjymdtjb
sjFdsgcsDcylZjymdtjb
)
{
return
sjFdsgcsDcylZjymdtjbMapper
.
insertSjFdsgcsDcylZjymdtjb
(
sjFdsgcsDcylZjymdtjb
);
}
/**
* 修改邻井钻井液密度统计
*
* @param sjFdsgcsDcylZjymdtjb 邻井钻井液密度统计
* @return 结果
*/
@Override
public
int
updateSjFdsgcsDcylZjymdtjb
(
SjFdsgcsDcylZjymdtjb
sjFdsgcsDcylZjymdtjb
)
{
sjFdsgcsDcylZjymdtjb
.
setUpdateTime
(
DateUtils
.
getNowDate
());
return
sjFdsgcsDcylZjymdtjbMapper
.
updateSjFdsgcsDcylZjymdtjb
(
sjFdsgcsDcylZjymdtjb
);
}
/**
* 批量删除邻井钻井液密度统计
*
* @param ids 需要删除的邻井钻井液密度统计主键
* @return 结果
*/
@Override
public
int
deleteSjFdsgcsDcylZjymdtjbByIds
(
Long
[]
ids
)
{
return
sjFdsgcsDcylZjymdtjbMapper
.
deleteSjFdsgcsDcylZjymdtjbByIds
(
ids
);
}
/**
* 删除邻井钻井液密度统计信息
*
* @param id 邻井钻井液密度统计主键
* @return 结果
*/
@Override
public
int
deleteSjFdsgcsDcylZjymdtjbById
(
Long
id
)
{
return
sjFdsgcsDcylZjymdtjbMapper
.
deleteSjFdsgcsDcylZjymdtjbById
(
id
);
}
}
src/main/resources/mybatis/zjsgfa/SjFdsgcsDcylZjymdsjbMapper.xml
0 → 100644
View file @
544c564e
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.zjsgfa.project.zjsgfa.mapper.SjFdsgcsDcylZjymdsjbMapper"
>
<resultMap
type=
"SjFdsgcsDcylZjymdsjb"
id=
"SjFdsgcsDcylZjymdsjbResult"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"jh"
column=
"jh"
/>
<result
property=
"ljjh"
column=
"ljjh"
/>
<result
property=
"qyjs"
column=
"qyjs"
/>
<result
property=
"md"
column=
"md"
/>
<result
property=
"dycs"
column=
"dycs"
/>
<result
property=
"dycw"
column=
"dycw"
/>
<result
property=
"createTime"
column=
"create_time"
/>
</resultMap>
<sql
id=
"selectSjFdsgcsDcylZjymdsjbVo"
>
select id, jh, ljjh, qyjs, md, dycs, dycw, create_time from sj_fdsgcs_dcyl_zjymdsjb
</sql>
<select
id=
"selectSjFdsgcsDcylZjymdsjbList"
parameterType=
"SjFdsgcsDcylZjymdsjb"
resultMap=
"SjFdsgcsDcylZjymdsjbResult"
>
<include
refid=
"selectSjFdsgcsDcylZjymdsjbVo"
/>
<where>
<if
test=
"jh != null and jh != ''"
>
and jh = #{jh}
</if>
<if
test=
"ljjh != null and ljjh != ''"
>
and ljjh = #{ljjh}
</if>
<if
test=
"qyjs != null "
>
and qyjs = #{qyjs}
</if>
<if
test=
"md != null "
>
and md = #{md}
</if>
<if
test=
"dycs != null "
>
and dycs = #{dycs}
</if>
<if
test=
"dycw != null and dycw != ''"
>
and dycw = #{dycw}
</if>
</where>
</select>
<select
id=
"selectSjFdsgcsDcylZjymdsjbById"
parameterType=
"Long"
resultMap=
"SjFdsgcsDcylZjymdsjbResult"
>
<include
refid=
"selectSjFdsgcsDcylZjymdsjbVo"
/>
where id = #{id}
</select>
<insert
id=
"insertSjFdsgcsDcylZjymdsjb"
parameterType=
"SjFdsgcsDcylZjymdsjb"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into sj_fdsgcs_dcyl_zjymdsjb
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"jh != null and jh != ''"
>
jh,
</if>
<if
test=
"ljjh != null and ljjh != ''"
>
ljjh,
</if>
<if
test=
"qyjs != null"
>
qyjs,
</if>
<if
test=
"md != null"
>
md,
</if>
<if
test=
"dycs != null"
>
dycs,
</if>
<if
test=
"dycw != null and dycw != ''"
>
dycw,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"jh != null and jh != ''"
>
#{jh},
</if>
<if
test=
"ljjh != null and ljjh != ''"
>
#{ljjh},
</if>
<if
test=
"qyjs != null"
>
#{qyjs},
</if>
<if
test=
"md != null"
>
#{md},
</if>
<if
test=
"dycs != null"
>
#{dycs},
</if>
<if
test=
"dycw != null and dycw != ''"
>
#{dycw},
</if>
<if
test=
"createTime != null"
>
#{createTime},
</if>
</trim>
</insert>
<insert
id=
"insertSjFdsgcsDcylZjymdsjbBatch"
>
insert into sj_fdsgcs_dcyl_zjymdsjb (jh,ljjh,qyjs,md,dycs,dycw) values
<foreach
item=
"item"
index=
"index"
collection=
"list"
separator=
","
>
(#{item.jh},#{item.ljjh},#{item.qyjs},#{item.md},#{item.dycs},#{item.dycw})
</foreach>
</insert>
<update
id=
"updateSjFdsgcsDcylZjymdsjb"
parameterType=
"SjFdsgcsDcylZjymdsjb"
>
update sj_fdsgcs_dcyl_zjymdsjb
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"jh != null and jh != ''"
>
jh = #{jh},
</if>
<if
test=
"ljjh != null and ljjh != ''"
>
ljjh = #{ljjh},
</if>
<if
test=
"qyjs != null"
>
qyjs = #{qyjs},
</if>
<if
test=
"md != null"
>
md = #{md},
</if>
<if
test=
"dycs != null"
>
dycs = #{dycs},
</if>
<if
test=
"dycw != null and dycw != ''"
>
dycw = #{dycw},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime},
</if>
</trim>
where id = #{id}
</update>
<delete
id=
"deleteSjFdsgcsDcylZjymdsjbById"
parameterType=
"Long"
>
delete from sj_fdsgcs_dcyl_zjymdsjb where id = #{id}
</delete>
<delete
id=
"deleteSjFdsgcsDcylZjymdsjbByIds"
parameterType=
"String"
>
delete from sj_fdsgcs_dcyl_zjymdsjb where id in
<foreach
item=
"id"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</delete>
<delete
id=
"deleteSjFdsgcsDcylZjymdsjbByjh"
>
delete from sj_fdsgcs_dcyl_zjymdsjb where jh = #{jh}
</delete>
</mapper>
\ No newline at end of file
src/main/resources/mybatis/zjsgfa/SjFdsgcsDcylZjymdtjbMapper.xml
0 → 100644
View file @
544c564e
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.zjsgfa.project.zjsgfa.mapper.SjFdsgcsDcylZjymdtjbMapper"
>
<resultMap
type=
"SjFdsgcsDcylZjymdtjb"
id=
"SjFdsgcsDcylZjymdtjbResult"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"jh"
column=
"jh"
/>
<result
property=
"ljjh"
column=
"ljjh"
/>
<result
property=
"cw"
column=
"cw"
/>
<result
property=
"mdMin"
column=
"md_min"
/>
<result
property=
"mdMax"
column=
"md_max"
/>
<result
property=
"qycsMin"
column=
"qycs_min"
/>
<result
property=
"qycsMax"
column=
"qycs_max"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
</resultMap>
<sql
id=
"selectSjFdsgcsDcylZjymdtjbVo"
>
select id, jh, ljjh, cw, md_min, md_max, qycs_min, qycs_max, update_time from sj_fdsgcs_dcyl_zjymdtjb
</sql>
<select
id=
"selectSjFdsgcsDcylZjymdtjbList"
parameterType=
"SjFdsgcsDcylZjymdtjb"
resultMap=
"SjFdsgcsDcylZjymdtjbResult"
>
<include
refid=
"selectSjFdsgcsDcylZjymdtjbVo"
/>
<where>
<if
test=
"jh != null and jh != ''"
>
and jh = #{jh}
</if>
<if
test=
"ljjh != null and ljjh != ''"
>
and ljjh = #{ljjh}
</if>
<if
test=
"cw != null and cw != ''"
>
and cw = #{cw}
</if>
<if
test=
"mdMin != null "
>
and md_min = #{mdMin}
</if>
<if
test=
"mdMax != null "
>
and md_max = #{mdMax}
</if>
<if
test=
"qycsMin != null "
>
and qycs_min = #{qycsMin}
</if>
<if
test=
"qycsMax != null "
>
and qycs_max = #{qycsMax}
</if>
</where>
</select>
<select
id=
"selectSjFdsgcsDcylZjymdtjbById"
parameterType=
"Long"
resultMap=
"SjFdsgcsDcylZjymdtjbResult"
>
<include
refid=
"selectSjFdsgcsDcylZjymdtjbVo"
/>
where id = #{id}
</select>
<insert
id=
"insertSjFdsgcsDcylZjymdtjb"
parameterType=
"SjFdsgcsDcylZjymdtjb"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into sj_fdsgcs_dcyl_zjymdtjb
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"jh != null and jh != ''"
>
jh,
</if>
<if
test=
"ljjh != null and ljjh != ''"
>
ljjh,
</if>
<if
test=
"cw != null and cw != ''"
>
cw,
</if>
<if
test=
"mdMin != null"
>
md_min,
</if>
<if
test=
"mdMax != null"
>
md_max,
</if>
<if
test=
"qycsMin != null"
>
qycs_min,
</if>
<if
test=
"qycsMax != null"
>
qycs_max,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"jh != null and jh != ''"
>
#{jh},
</if>
<if
test=
"ljjh != null and ljjh != ''"
>
#{ljjh},
</if>
<if
test=
"cw != null and cw != ''"
>
#{cw},
</if>
<if
test=
"mdMin != null"
>
#{mdMin},
</if>
<if
test=
"mdMax != null"
>
#{mdMax},
</if>
<if
test=
"qycsMin != null"
>
#{qycsMin},
</if>
<if
test=
"qycsMax != null"
>
#{qycsMax},
</if>
<if
test=
"updateTime != null"
>
#{updateTime},
</if>
</trim>
</insert>
<insert
id=
"insertSjFdsgcsDcylZjymdtjbBatch"
>
insert into sj_fdsgcs_dcyl_zjymdtjb (jh,ljjh,cw,mdMin,mdMax,qycsMin,qycsMax) values
<foreach
item=
"item"
index=
"index"
collection=
"list"
separator=
","
>
(#{item.jh},#{item.ljjh},#{item.cw},#{item.mdMin},#{item.mdMax},#{item.qycsMin},#{item.qycsMax})
</foreach>
</insert>
<update
id=
"updateSjFdsgcsDcylZjymdtjb"
parameterType=
"SjFdsgcsDcylZjymdtjb"
>
update sj_fdsgcs_dcyl_zjymdtjb
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"jh != null and jh != ''"
>
jh = #{jh},
</if>
<if
test=
"ljjh != null and ljjh != ''"
>
ljjh = #{ljjh},
</if>
<if
test=
"cw != null and cw != ''"
>
cw = #{cw},
</if>
<if
test=
"mdMin != null"
>
md_min = #{mdMin},
</if>
<if
test=
"mdMax != null"
>
md_max = #{mdMax},
</if>
<if
test=
"qycsMin != null"
>
qycs_min = #{qycsMin},
</if>
<if
test=
"qycsMax != null"
>
qycs_max = #{qycsMax},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime},
</if>
</trim>
where id = #{id}
</update>
<delete
id=
"deleteSjFdsgcsDcylZjymdtjbById"
parameterType=
"Long"
>
delete from sj_fdsgcs_dcyl_zjymdtjb where id = #{id}
</delete>
<delete
id=
"deleteSjFdsgcsDcylZjymdtjbByIds"
parameterType=
"String"
>
delete from sj_fdsgcs_dcyl_zjymdtjb where id in
<foreach
item=
"id"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</delete>
<delete
id=
"deleteSjFdsgcsDcylZjymdtjbByJh"
>
delete from sj_fdsgcs_dcyl_zjymdtjb where jh = #{jh}
</delete>
</mapper>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment