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
3782f9ff
Commit
3782f9ff
authored
Aug 06, 2025
by
jiang'yun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
ede01d30
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
795 additions
and
41 deletions
+795
-41
src/main/java/com/ruoyi/project/zjsgfa/controller/SjDjjcController.java
+3
-41
src/main/java/com/ruoyi/project/zjsgfa/controller/SjFdsgcsController.java
+112
-0
src/main/java/com/ruoyi/project/zjsgfa/controller/SjLjjwController.java
+4
-0
src/main/java/com/ruoyi/project/zjsgfa/domain/SjFdsgcs.java
+172
-0
src/main/java/com/ruoyi/project/zjsgfa/domain/SjFdsgcsDcyx.java
+3
-0
src/main/java/com/ruoyi/project/zjsgfa/mapper/SjFdsgcsDcyxMapper.java
+2
-0
src/main/java/com/ruoyi/project/zjsgfa/mapper/SjFdsgcsMapper.java
+65
-0
src/main/java/com/ruoyi/project/zjsgfa/service/ISjFdsgcsService.java
+65
-0
src/main/java/com/ruoyi/project/zjsgfa/service/impl/SjDjjcServiceImpl.java
+2
-0
src/main/java/com/ruoyi/project/zjsgfa/service/impl/SjFdsgcsServiceImpl.java
+183
-0
src/main/java/com/ruoyi/project/zjsgfa/util/CxszhUtil.java
+49
-0
src/main/java/com/ruoyi/project/zt/domain/Jsqa.java
+3
-0
src/main/java/com/ruoyi/project/zt/mapper/JsqaMapper.java
+2
-0
src/main/resources/mybatis/zjsgfa/SjFdsgcsDcyxMapper.xml
+16
-0
src/main/resources/mybatis/zjsgfa/SjFdsgcsMapper.xml
+100
-0
src/main/resources/mybatis/zt/JsqaMapper.xml
+14
-0
No files found.
src/main/java/com/ruoyi/project/zjsgfa/controller/SjDjjcController.java
View file @
3782f9ff
...
@@ -18,6 +18,7 @@ import com.ruoyi.project.zjsgfa.domain.*;
...
@@ -18,6 +18,7 @@ import com.ruoyi.project.zjsgfa.domain.*;
import
com.ruoyi.project.zjsgfa.domain.Vo.DrillingFluidConstant
;
import
com.ruoyi.project.zjsgfa.domain.Vo.DrillingFluidConstant
;
import
com.ruoyi.project.zjsgfa.mapper.*
;
import
com.ruoyi.project.zjsgfa.mapper.*
;
import
com.ruoyi.project.zjsgfa.util.CxszhUtil
;
import
com.ruoyi.project.zt.domain.CommonParam
;
import
com.ruoyi.project.zt.domain.CommonParam
;
import
com.ruoyi.project.zt.domain.LjDzfc
;
import
com.ruoyi.project.zt.domain.LjDzfc
;
import
com.ruoyi.project.zt.domain.Ljjw
;
import
com.ruoyi.project.zt.domain.Ljjw
;
...
@@ -1512,7 +1513,7 @@ public class SjDjjcController extends BaseController
...
@@ -1512,7 +1513,7 @@ public class SjDjjcController extends BaseController
previousDepth
=
csaa
;
previousDepth
=
csaa
;
}
}
//计算垂深
//计算垂深
double
targetCs
=
getCs
(
sjJygjGdsjgdcsList
,
sjJsjg
.
getJs
());
double
targetCs
=
CxszhUtil
.
getCs
(
sjJygjGdsjgdcsList
,
sjJsjg
.
getJs
());
csaa
=
targetCs
;
csaa
=
targetCs
;
...
@@ -1523,7 +1524,6 @@ public class SjDjjcController extends BaseController
...
@@ -1523,7 +1524,6 @@ public class SjDjjcController extends BaseController
sjFdsgcsDcyxMapper
.
insertSjFdsgcsDcyxBatch
(
sjFdsgcsDcyxList
);
sjFdsgcsDcyxMapper
.
insertSjFdsgcsDcyxBatch
(
sjFdsgcsDcyxList
);
}
}
}
}
...
@@ -1544,43 +1544,7 @@ public class SjDjjcController extends BaseController
...
@@ -1544,43 +1544,7 @@ public class SjDjjcController extends BaseController
private
static
List
<
SjFdsgcsDcyx
>
processAndDisplay
(
List
<
SjDcfxDzfc
>
stratumList
,
double
kscs
,
double
targetCs
,
String
jh
,
String
kc
)
{
private
static
List
<
SjFdsgcsDcyx
>
processAndDisplay
(
List
<
SjDcfxDzfc
>
stratumList
,
double
kscs
,
double
targetCs
,
String
jh
,
String
kc
)
{
List
<
SjFdsgcsDcyx
>
list
=
new
ArrayList
<>();
List
<
SjFdsgcsDcyx
>
list
=
new
ArrayList
<>();
// System.out.println("名称\t井段垂深 / m");
//
// for (SjDcfxDzfc stratum : stratumList) {
// SjFdsgcsDcyx sjFdsgcsDcyx=new SjFdsgcsDcyx();
// sjFdsgcsDcyx.setJh(jh);
// sjFdsgcsDcyx.setKc(kc);
// double currentDepth = stratum.getCs();
//
// // 如果当前深度小于等于目标深度,直接显示完整范围
// if (currentDepth <= targetCs && currentDepth >= previousDepth) {
// System.out.printf("%s\t%.0f-%.0f%n",
// stratum.getDzfc(), previousDepth, currentDepth);
// sjFdsgcsDcyx.setDcmc(stratum.getDzfc());
// sjFdsgcsDcyx.setJdcs(previousDepth+"-"+currentDepth);
// sjFdsgcsDcyx.setYx(stratum.getYxts());
// previousDepth = currentDepth;
// list.add(sjFdsgcsDcyx);
// }else if (previousDepth < targetCs) {
// // 如果当前深度大于目标深度,但前一个深度小于目标深度,显示到目标深度的范围
// System.out.printf("%s\t%.0f-%.0f%n",
// stratum.getDzfc(), previousDepth, targetCs);
// sjFdsgcsDcyx.setDcmc(stratum.getDzfc());
// sjFdsgcsDcyx.setJdcs(previousDepth+"-"+targetCs);
// sjFdsgcsDcyx.setYx(stratum.getYxts());
// list.add(sjFdsgcsDcyx);
// break; // 后续地层超出范围,无需再处理
// }
// // 如果前一个深度已经大于等于目标深度,直接退出循环
// else {
// break;
// }
//
//
//
// }
// double previousDepth = 0;
System
.
out
.
println
(
"名称\t井段垂深 / m"
);
System
.
out
.
println
(
"名称\t井段垂深 / m"
);
...
@@ -1670,13 +1634,11 @@ public class SjDjjcController extends BaseController
...
@@ -1670,13 +1634,11 @@ public class SjDjjcController extends BaseController
*/
*/
@PostMapping
(
"/saveLjzl"
)
@PostMapping
(
"/saveLjzl"
)
public
AjaxResult
saveLjzl
(
@RequestBody
CommonParam
param
)
throws
Exception
{
public
AjaxResult
saveLjzl
(
@RequestBody
CommonParam
param
)
throws
Exception
{
return
sjDjjcService
.
saveLjzl
(
param
);
return
sjDjjcService
.
saveLjzl
(
param
);
}
}
/**
/**
* 计算指定方向上的视平移
* 计算指定方向上的视平移
* @param closureAzimuth 闭合方位角(度)
* @param closureAzimuth 闭合方位角(度)
...
...
src/main/java/com/ruoyi/project/zjsgfa/controller/SjFdsgcsController.java
0 → 100644
View file @
3782f9ff
package
com
.
ruoyi
.
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.ruoyi.framework.aspectj.lang.annotation.Log
;
import
com.ruoyi.framework.aspectj.lang.enums.BusinessType
;
import
com.ruoyi.project.zjsgfa.domain.SjFdsgcs
;
import
com.ruoyi.project.zjsgfa.service.ISjFdsgcsService
;
import
com.ruoyi.framework.web.controller.BaseController
;
import
com.ruoyi.framework.web.domain.AjaxResult
;
import
com.ruoyi.common.utils.poi.ExcelUtil
;
import
com.ruoyi.framework.web.page.TableDataInfo
;
/**
* 设计-分段施工措施Controller
*
* @author ruoyi
* @date 2025-08-06
*/
@RestController
@RequestMapping
(
"/system/sjFdsgcs"
)
public
class
SjFdsgcsController
extends
BaseController
{
@Autowired
private
ISjFdsgcsService
sjFdsgcsService
;
/**
* 查询设计-分段施工措施列表
*/
//@PreAuthorize("@ss.hasPermi('system:sjFdsgcs:list')")
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
SjFdsgcs
sjFdsgcs
)
{
startPage
();
List
<
SjFdsgcs
>
list
=
sjFdsgcsService
.
selectSjFdsgcsList
(
sjFdsgcs
);
return
getDataTable
(
list
);
}
/**
* 导出设计-分段施工措施列表
*/
//@PreAuthorize("@ss.hasPermi('system:sjFdsgcs:export')")
@Log
(
title
=
"设计-分段施工措施"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
SjFdsgcs
sjFdsgcs
)
{
List
<
SjFdsgcs
>
list
=
sjFdsgcsService
.
selectSjFdsgcsList
(
sjFdsgcs
);
ExcelUtil
<
SjFdsgcs
>
util
=
new
ExcelUtil
<
SjFdsgcs
>(
SjFdsgcs
.
class
);
util
.
exportExcel
(
response
,
list
,
"设计-分段施工措施数据"
);
}
/**
* 获取设计-分段施工措施详细信息
*/
//@PreAuthorize("@ss.hasPermi('system:sjFdsgcs:query')")
@GetMapping
(
value
=
"/{id}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
{
return
success
(
sjFdsgcsService
.
selectSjFdsgcsById
(
id
));
}
/**
* 新增设计-分段施工措施
*/
//@PreAuthorize("@ss.hasPermi('system:sjFdsgcs:add')")
@Log
(
title
=
"设计-分段施工措施"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
SjFdsgcs
sjFdsgcs
)
{
return
toAjax
(
sjFdsgcsService
.
insertSjFdsgcs
(
sjFdsgcs
));
}
/**
* 修改设计-分段施工措施
*/
//@PreAuthorize("@ss.hasPermi('system:sjFdsgcs:edit')")
@Log
(
title
=
"设计-分段施工措施"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
SjFdsgcs
sjFdsgcs
)
{
return
toAjax
(
sjFdsgcsService
.
updateSjFdsgcs
(
sjFdsgcs
));
}
/**
* 删除设计-分段施工措施
*/
//@PreAuthorize("@ss.hasPermi('system:sjFdsgcs:remove')")
@Log
(
title
=
"设计-分段施工措施"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{ids}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
ids
)
{
return
toAjax
(
sjFdsgcsService
.
deleteSjFdsgcsByIds
(
ids
));
}
@GetMapping
(
"/jsfdsgcs"
)
public
void
jsfdsgcs
(
SjFdsgcs
sjFdsgcs
)
{
sjFdsgcsService
.
jsfdsgcs
(
sjFdsgcs
);
}
}
src/main/java/com/ruoyi/project/zjsgfa/controller/SjLjjwController.java
View file @
3782f9ff
...
@@ -118,4 +118,8 @@ public class SjLjjwController extends BaseController
...
@@ -118,4 +118,8 @@ public class SjLjjwController extends BaseController
return
toAjax
(
sjLjjwService
.
insertSjLjjwBatch
(
list
));
return
toAjax
(
sjLjjwService
.
insertSjLjjwBatch
(
list
));
}
}
}
}
src/main/java/com/ruoyi/project/zjsgfa/domain/SjFdsgcs.java
0 → 100644
View file @
3782f9ff
package
com
.
ruoyi
.
project
.
zjsgfa
.
domain
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
com.ruoyi.framework.aspectj.lang.annotation.Excel
;
import
com.ruoyi.framework.web.domain.BaseEntity
;
/**
* 设计-分段施工措施对象 sj_fdsgcs
*
* @author ruoyi
* @date 2025-08-06
*/
public
class
SjFdsgcs
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** 主键 */
private
Long
id
;
/** 井号 */
@Excel
(
name
=
"井号"
)
private
String
jh
;
/** 开次 */
@Excel
(
name
=
"开次"
)
private
String
kc
;
/** 一趟钻情况 */
@Excel
(
name
=
"一趟钻情况"
)
private
String
tzqk
;
/** 井段情况 */
@Excel
(
name
=
"井段情况"
)
private
String
jdqk
;
/** 轨迹分析 */
@Excel
(
name
=
"轨迹分析"
)
private
String
gjfx
;
/** 轨迹优化 */
@Excel
(
name
=
"轨迹优化"
)
private
String
gjyh
;
/** 地层压力 */
@Excel
(
name
=
"地层压力"
)
private
String
dcyl
;
/** 主要风险 */
@Excel
(
name
=
"主要风险"
)
private
String
zyfx
;
/** 风险管控措施 */
@Excel
(
name
=
"风险管控措施"
)
private
String
fxgkcs
;
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
Long
getId
()
{
return
id
;
}
public
void
setJh
(
String
jh
)
{
this
.
jh
=
jh
;
}
public
String
getJh
()
{
return
jh
;
}
public
void
setKc
(
String
kc
)
{
this
.
kc
=
kc
;
}
public
String
getKc
()
{
return
kc
;
}
public
void
setTzqk
(
String
tzqk
)
{
this
.
tzqk
=
tzqk
;
}
public
String
getTzqk
()
{
return
tzqk
;
}
public
void
setJdqk
(
String
jdqk
)
{
this
.
jdqk
=
jdqk
;
}
public
String
getJdqk
()
{
return
jdqk
;
}
public
void
setGjfx
(
String
gjfx
)
{
this
.
gjfx
=
gjfx
;
}
public
String
getGjfx
()
{
return
gjfx
;
}
public
void
setGjyh
(
String
gjyh
)
{
this
.
gjyh
=
gjyh
;
}
public
String
getGjyh
()
{
return
gjyh
;
}
public
void
setDcyl
(
String
dcyl
)
{
this
.
dcyl
=
dcyl
;
}
public
String
getDcyl
()
{
return
dcyl
;
}
public
void
setZyfx
(
String
zyfx
)
{
this
.
zyfx
=
zyfx
;
}
public
String
getZyfx
()
{
return
zyfx
;
}
public
void
setFxgkcs
(
String
fxgkcs
)
{
this
.
fxgkcs
=
fxgkcs
;
}
public
String
getFxgkcs
()
{
return
fxgkcs
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"id"
,
getId
())
.
append
(
"jh"
,
getJh
())
.
append
(
"kc"
,
getKc
())
.
append
(
"tzqk"
,
getTzqk
())
.
append
(
"jdqk"
,
getJdqk
())
.
append
(
"gjfx"
,
getGjfx
())
.
append
(
"gjyh"
,
getGjyh
())
.
append
(
"dcyl"
,
getDcyl
())
.
append
(
"zyfx"
,
getZyfx
())
.
append
(
"fxgkcs"
,
getFxgkcs
())
.
toString
();
}
}
src/main/java/com/ruoyi/project/zjsgfa/domain/SjFdsgcsDcyx.java
View file @
3782f9ff
...
@@ -43,6 +43,9 @@ public class SjFdsgcsDcyx extends BaseEntity
...
@@ -43,6 +43,9 @@ public class SjFdsgcsDcyx extends BaseEntity
@Excel
(
name
=
"备注"
)
@Excel
(
name
=
"备注"
)
private
String
bz
;
private
String
bz
;
private
Double
kscs
;
private
Double
jscs
;
public
void
setId
(
Long
id
)
public
void
setId
(
Long
id
)
{
{
this
.
id
=
id
;
this
.
id
=
id
;
...
...
src/main/java/com/ruoyi/project/zjsgfa/mapper/SjFdsgcsDcyxMapper.java
View file @
3782f9ff
...
@@ -63,4 +63,6 @@ public interface SjFdsgcsDcyxMapper
...
@@ -63,4 +63,6 @@ public interface SjFdsgcsDcyxMapper
int
insertSjFdsgcsDcyxBatch
(
List
<
SjFdsgcsDcyx
>
sjFdsgcsDcyxList
);
int
insertSjFdsgcsDcyxBatch
(
List
<
SjFdsgcsDcyx
>
sjFdsgcsDcyxList
);
List
<
SjFdsgcsDcyx
>
getListByJh
(
SjFdsgcsDcyx
sjFdsgcsDcyx
);
}
}
src/main/java/com/ruoyi/project/zjsgfa/mapper/SjFdsgcsMapper.java
0 → 100644
View file @
3782f9ff
package
com
.
ruoyi
.
project
.
zjsgfa
.
mapper
;
import
java.util.List
;
import
com.ruoyi.project.zjsgfa.domain.SjFdsgcs
;
/**
* 设计-分段施工措施Mapper接口
*
* @author ruoyi
* @date 2025-08-06
*/
public
interface
SjFdsgcsMapper
{
/**
* 查询设计-分段施工措施
*
* @param id 设计-分段施工措施主键
* @return 设计-分段施工措施
*/
public
SjFdsgcs
selectSjFdsgcsById
(
Long
id
);
/**
* 查询设计-分段施工措施列表
*
* @param sjFdsgcs 设计-分段施工措施
* @return 设计-分段施工措施集合
*/
public
List
<
SjFdsgcs
>
selectSjFdsgcsList
(
SjFdsgcs
sjFdsgcs
);
/**
* 新增设计-分段施工措施
*
* @param sjFdsgcs 设计-分段施工措施
* @return 结果
*/
public
int
insertSjFdsgcs
(
SjFdsgcs
sjFdsgcs
);
/**
* 修改设计-分段施工措施
*
* @param sjFdsgcs 设计-分段施工措施
* @return 结果
*/
public
int
updateSjFdsgcs
(
SjFdsgcs
sjFdsgcs
);
/**
* 删除设计-分段施工措施
*
* @param id 设计-分段施工措施主键
* @return 结果
*/
public
int
deleteSjFdsgcsById
(
Long
id
);
/**
* 批量删除设计-分段施工措施
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public
int
deleteSjFdsgcsByIds
(
Long
[]
ids
);
SjFdsgcs
selectSjFdsgcsByJhAndKc
(
SjFdsgcs
sjFdsgcs
);
}
src/main/java/com/ruoyi/project/zjsgfa/service/ISjFdsgcsService.java
0 → 100644
View file @
3782f9ff
package
com
.
ruoyi
.
project
.
zjsgfa
.
service
;
import
java.util.List
;
import
com.ruoyi.project.zjsgfa.domain.SjFdsgcs
;
/**
* 设计-分段施工措施Service接口
*
* @author ruoyi
* @date 2025-08-06
*/
public
interface
ISjFdsgcsService
{
/**
* 查询设计-分段施工措施
*
* @param id 设计-分段施工措施主键
* @return 设计-分段施工措施
*/
public
SjFdsgcs
selectSjFdsgcsById
(
Long
id
);
/**
* 查询设计-分段施工措施列表
*
* @param sjFdsgcs 设计-分段施工措施
* @return 设计-分段施工措施集合
*/
public
List
<
SjFdsgcs
>
selectSjFdsgcsList
(
SjFdsgcs
sjFdsgcs
);
/**
* 新增设计-分段施工措施
*
* @param sjFdsgcs 设计-分段施工措施
* @return 结果
*/
public
int
insertSjFdsgcs
(
SjFdsgcs
sjFdsgcs
);
/**
* 修改设计-分段施工措施
*
* @param sjFdsgcs 设计-分段施工措施
* @return 结果
*/
public
int
updateSjFdsgcs
(
SjFdsgcs
sjFdsgcs
);
/**
* 批量删除设计-分段施工措施
*
* @param ids 需要删除的设计-分段施工措施主键集合
* @return 结果
*/
public
int
deleteSjFdsgcsByIds
(
Long
[]
ids
);
/**
* 删除设计-分段施工措施信息
*
* @param id 设计-分段施工措施主键
* @return 结果
*/
public
int
deleteSjFdsgcsById
(
Long
id
);
void
jsfdsgcs
(
SjFdsgcs
sjFdsgcs
);
}
src/main/java/com/ruoyi/project/zjsgfa/service/impl/SjDjjcServiceImpl.java
View file @
3782f9ff
...
@@ -235,4 +235,6 @@ public class SjDjjcServiceImpl implements ISjDjjcService
...
@@ -235,4 +235,6 @@ public class SjDjjcServiceImpl implements ISjDjjcService
}
}
return
AjaxResult
.
success
();
return
AjaxResult
.
success
();
}
}
}
}
src/main/java/com/ruoyi/project/zjsgfa/service/impl/SjFdsgcsServiceImpl.java
0 → 100644
View file @
3782f9ff
package
com
.
ruoyi
.
project
.
zjsgfa
.
service
.
impl
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
com.ruoyi.project.zjsgfa.domain.*
;
import
com.ruoyi.project.zjsgfa.mapper.*
;
import
com.ruoyi.project.zjsgfa.util.CxszhUtil
;
import
com.ruoyi.project.zt.domain.Jsqa
;
import
com.ruoyi.project.zt.mapper.DjdcInfoMapper
;
import
com.ruoyi.project.zt.mapper.JsqaMapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.ruoyi.project.zjsgfa.service.ISjFdsgcsService
;
/**
* 设计-分段施工措施Service业务层处理
*
* @author ruoyi
* @date 2025-08-06
*/
@Service
public
class
SjFdsgcsServiceImpl
implements
ISjFdsgcsService
{
@Autowired
private
SjFdsgcsMapper
sjFdsgcsMapper
;
@Autowired
private
SjJsjgMapper
sjJsjgMapper
;
@Autowired
private
SjLjjwMapper
sjLjjwMapper
;
@Autowired
private
SjFdsgcsDcyxMapper
sjFdsgcsDcyxMapper
;
@Autowired
private
SjJygjGdsjgdcsMapper
sjJygjGdsjgdcsMapper
;
@Autowired
private
JsqaMapper
jsqaMapper
;
/**
* 查询设计-分段施工措施
*
* @param id 设计-分段施工措施主键
* @return 设计-分段施工措施
*/
@Override
public
SjFdsgcs
selectSjFdsgcsById
(
Long
id
)
{
return
sjFdsgcsMapper
.
selectSjFdsgcsById
(
id
);
}
/**
* 查询设计-分段施工措施列表
*
* @param sjFdsgcs 设计-分段施工措施
* @return 设计-分段施工措施
*/
@Override
public
List
<
SjFdsgcs
>
selectSjFdsgcsList
(
SjFdsgcs
sjFdsgcs
)
{
return
sjFdsgcsMapper
.
selectSjFdsgcsList
(
sjFdsgcs
);
}
/**
* 新增设计-分段施工措施
*
* @param sjFdsgcs 设计-分段施工措施
* @return 结果
*/
@Override
public
int
insertSjFdsgcs
(
SjFdsgcs
sjFdsgcs
)
{
return
sjFdsgcsMapper
.
insertSjFdsgcs
(
sjFdsgcs
);
}
/**
* 修改设计-分段施工措施
*
* @param sjFdsgcs 设计-分段施工措施
* @return 结果
*/
@Override
public
int
updateSjFdsgcs
(
SjFdsgcs
sjFdsgcs
)
{
return
sjFdsgcsMapper
.
updateSjFdsgcs
(
sjFdsgcs
);
}
/**
* 批量删除设计-分段施工措施
*
* @param ids 需要删除的设计-分段施工措施主键
* @return 结果
*/
@Override
public
int
deleteSjFdsgcsByIds
(
Long
[]
ids
)
{
return
sjFdsgcsMapper
.
deleteSjFdsgcsByIds
(
ids
);
}
/**
* 删除设计-分段施工措施信息
*
* @param id 设计-分段施工措施主键
* @return 结果
*/
@Override
public
int
deleteSjFdsgcsById
(
Long
id
)
{
return
sjFdsgcsMapper
.
deleteSjFdsgcsById
(
id
);
}
@Override
public
void
jsfdsgcs
(
SjFdsgcs
sjFdsgcs
)
{
SjJsjg
sjJsjg
=
new
SjJsjg
();
sjJsjg
.
setJh
(
sjFdsgcs
.
getJh
());
List
<
SjJsjg
>
sjJsjgList
=
sjJsjgMapper
.
selectSjJsjgList
(
sjJsjg
);
SjLjjw
sjLjjw
=
new
SjLjjw
();
sjLjjw
.
setJh
(
sjFdsgcs
.
getJh
());
List
<
SjLjjw
>
sjLjjwList
=
sjLjjwMapper
.
selectSjLjjwList
(
sjLjjw
);
SjJygjGdsjgdcs
sjJygjGdsjgdcs
=
new
SjJygjGdsjgdcs
();
sjJygjGdsjgdcs
.
setJh
(
sjFdsgcs
.
getJh
());
List
<
SjJygjGdsjgdcs
>
sjJygjGdsjgdcsList
=
sjJygjGdsjgdcsMapper
.
selectSjJygjGdsjgdcsList
(
sjJygjGdsjgdcs
);
List
<
String
>
collect
=
sjLjjwList
.
stream
().
map
(
SjLjjw:
:
getLjjh
).
collect
(
Collectors
.
toList
());
double
previousDepth
=
0
;
double
csaa
=
0
;
for
(
int
i
=
0
;
i
<
sjJsjgList
.
size
();
i
++)
{
SjJsjg
sjJsjg1
=
sjJsjgList
.
get
(
i
);
if
(
i
==
0
)
{
previousDepth
=
0
;
}
else
{
//上一次的垂深
previousDepth
=
csaa
;
}
String
kc
=
sjJsjg1
.
getKc
();
sjFdsgcs
.
setKc
(
kc
);
SjFdsgcs
sjFdsgcs1
=
sjFdsgcsMapper
.
selectSjFdsgcsByJhAndKc
(
sjFdsgcs
);
if
(
sjFdsgcs1
==
null
){
//查询是否有复杂情况
if
(
collect
.
size
()>
0
){
Jsqa
jsqa
=
new
Jsqa
();
jsqa
.
setJhs
(
collect
);
jsqa
.
setJs
(
sjJsjg1
.
getJs
());
List
<
Jsqa
>
jsqaList
=
jsqaMapper
.
getJsqaByjhAndJs
(
jsqa
);
if
(
jsqaList
.
size
()>
0
){
List
<
String
>
fzqk
=
new
ArrayList
<>();
jsqaList
.
forEach
(
item
->{
fzqk
.
add
(
item
.
getJh
()+
"在"
+
item
.
getJs
()+
"时发生"
+
item
.
getFzqk
());
});
sjFdsgcs
.
setTzqk
(
String
.
join
(
";"
,
fzqk
));
}
else
{
sjFdsgcs
.
setTzqk
(
"结合邻井一开无复杂数据,可实现一趟钻完成"
);
}
}
//井段情况
double
cs
=
CxszhUtil
.
getCs
(
sjJygjGdsjgdcsList
,
sjJsjg1
.
getJs
());
SjFdsgcsDcyx
sjFdsgcsDcyx
=
new
SjFdsgcsDcyx
();
sjFdsgcsDcyx
.
setJh
(
sjFdsgcs
.
getJh
());
sjFdsgcsDcyx
.
setKscs
(
previousDepth
);
sjFdsgcsDcyx
.
setJscs
(
cs
);
List
<
SjFdsgcsDcyx
>
sjFdsgcsDcyxList
=
sjFdsgcsDcyxMapper
.
getListByJh
(
sjFdsgcsDcyx
);
if
(
sjFdsgcsDcyxList
.
size
()>
0
){
if
(
sjFdsgcsDcyxList
.
size
()==
1
){
sjFdsgcs
.
setJdqk
(
previousDepth
+
"-"
+
cs
+
","
+
sjFdsgcsDcyxList
.
get
(
0
).
getDcmc
());
}
else
{
sjFdsgcs
.
setJdqk
(
previousDepth
+
"-"
+
cs
+
","
+
sjFdsgcsDcyxList
.
get
(
0
).
getDcmc
()+
"-"
+
sjFdsgcsDcyxList
.
get
(
sjFdsgcsDcyxList
.
size
()-
1
).
getDcmc
());
}
}
sjFdsgcsMapper
.
insertSjFdsgcs
(
sjFdsgcs
);
}
}
}
}
src/main/java/com/ruoyi/project/zjsgfa/util/CxszhUtil.java
0 → 100644
View file @
3782f9ff
package
com
.
ruoyi
.
project
.
zjsgfa
.
util
;
import
com.ruoyi.project.zjsgfa.domain.SjJygjGdsjgdcs
;
import
java.text.DecimalFormat
;
import
java.util.List
;
/**
* 垂斜深转换
*/
public
class
CxszhUtil
{
public
static
double
getCs
(
List
<
SjJygjGdsjgdcs
>
yjMnJygjJgList
,
double
js
){
DecimalFormat
df
=
new
DecimalFormat
(
"#.00"
);
double
cs
=
0
;
for
(
int
i
=
0
;
i
<
yjMnJygjJgList
.
size
();
i
++){
SjJygjGdsjgdcs
jg
=
yjMnJygjJgList
.
get
(
i
);
double
sd
=
jg
.
getJs
();
if
(
sd
>=
js
){
if
(
i
==
0
){
cs
=
yjMnJygjJgList
.
get
(
i
).
getJs
();
break
;
}
else
{
// 找到md所在的区间
// SurveyPoint prev = surveyPoints.get(i-1);
// SurveyPoint curr = surveyPoints.get(i);
// double md; // 斜深(Measured Depth),单位:米
// double inc; // 井斜角(Inclination),单位:度
// double azim; // 方位角(Azimuth),单位:度
// double tvd; // 垂深(True Vertical Depth),单位:米
// double northing; // 北向坐标
// double easting; // 东向坐标
// 线性插值计算垂深
double
ratio
=
(
js
-
yjMnJygjJgList
.
get
(
i
-
1
).
getJs
())
/
(
yjMnJygjJgList
.
get
(
i
).
getJs
()
-
yjMnJygjJgList
.
get
(
i
-
1
).
getJs
());
cs
=
yjMnJygjJgList
.
get
(
i
-
1
).
getCs
()
+
ratio
*
(
yjMnJygjJgList
.
get
(
i
).
getCs
()
-
yjMnJygjJgList
.
get
(
i
-
1
).
getCs
());
break
;
}
}
}
return
Double
.
parseDouble
(
df
.
format
(
cs
));
}
}
src/main/java/com/ruoyi/project/zt/domain/Jsqa.java
View file @
3782f9ff
...
@@ -3,6 +3,7 @@ package com.ruoyi.project.zt.domain;
...
@@ -3,6 +3,7 @@ package com.ruoyi.project.zt.domain;
import
lombok.Data
;
import
lombok.Data
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
@Data
@Data
public
class
Jsqa
{
public
class
Jsqa
{
...
@@ -19,4 +20,6 @@ public class Jsqa {
...
@@ -19,4 +20,6 @@ public class Jsqa {
private
String
clgk
;
private
String
clgk
;
private
Double
zjjjss
;
private
Double
zjjjss
;
private
Double
js
;
private
Double
js
;
private
List
<
String
>
jhs
;
}
}
src/main/java/com/ruoyi/project/zt/mapper/JsqaMapper.java
View file @
3782f9ff
...
@@ -12,4 +12,6 @@ public interface JsqaMapper {
...
@@ -12,4 +12,6 @@ public interface JsqaMapper {
List
<
Jsqa
>
getJsqaList
(
CommonParam
param
);
List
<
Jsqa
>
getJsqaList
(
CommonParam
param
);
List
<
Jsqa
>
getJsqaByjhAndJs
(
Jsqa
jsqa
);
}
}
src/main/resources/mybatis/zjsgfa/SjFdsgcsDcyxMapper.xml
View file @
3782f9ff
...
@@ -34,6 +34,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -34,6 +34,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include
refid=
"selectSjFdsgcsDcyxVo"
/>
<include
refid=
"selectSjFdsgcsDcyxVo"
/>
where id = #{id}
where id = #{id}
</select>
</select>
<select
id=
"getListByJh"
resultType=
"com.ruoyi.project.zjsgfa.domain.SjFdsgcsDcyx"
>
select * from (
SELECT
id,
jh,
kc,
dcmc,
-- 截取 - 左边的部分作为起始深度
SUBSTRING_INDEX(jdcs, '-', 1) AS start_depth,
-- 截取 - 右边的部分作为结束深度,先从右往左取 1 个分隔符,再取结果中 - 右边(实际就是原字符串 - 右边部分 )
SUBSTRING_INDEX(SUBSTRING_INDEX(jdcs, '-', -1), '-', 1) AS end_depth,
yx,
bz
FROM
sj_fdsgcs_dcyx) a where jh=#{jh} and start_depth>=#{kscs} and end_depth
<
#{jscs}
</select>
<insert
id=
"insertSjFdsgcsDcyx"
parameterType=
"SjFdsgcsDcyx"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
<insert
id=
"insertSjFdsgcsDcyx"
parameterType=
"SjFdsgcsDcyx"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into sj_fdsgcs_dcyx
insert into sj_fdsgcs_dcyx
...
...
src/main/resources/mybatis/zjsgfa/SjFdsgcsMapper.xml
0 → 100644
View file @
3782f9ff
<?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.ruoyi.project.zjsgfa.mapper.SjFdsgcsMapper"
>
<resultMap
type=
"SjFdsgcs"
id=
"SjFdsgcsResult"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"jh"
column=
"jh"
/>
<result
property=
"kc"
column=
"kc"
/>
<result
property=
"tzqk"
column=
"tzqk"
/>
<result
property=
"jdqk"
column=
"jdqk"
/>
<result
property=
"gjfx"
column=
"gjfx"
/>
<result
property=
"gjyh"
column=
"gjyh"
/>
<result
property=
"dcyl"
column=
"dcyl"
/>
<result
property=
"zyfx"
column=
"zyfx"
/>
<result
property=
"fxgkcs"
column=
"fxgkcs"
/>
</resultMap>
<sql
id=
"selectSjFdsgcsVo"
>
select id, jh, kc, tzqk, jdqk, gjfx, gjyh, dcyl, zyfx, fxgkcs from sj_fdsgcs
</sql>
<select
id=
"selectSjFdsgcsList"
parameterType=
"SjFdsgcs"
resultMap=
"SjFdsgcsResult"
>
<include
refid=
"selectSjFdsgcsVo"
/>
<where>
<if
test=
"jh != null and jh != ''"
>
and jh = #{jh}
</if>
<if
test=
"kc != null and kc != ''"
>
and kc = #{kc}
</if>
<if
test=
"tzqk != null and tzqk != ''"
>
and tzqk = #{tzqk}
</if>
<if
test=
"jdqk != null and jdqk != ''"
>
and jdqk = #{jdqk}
</if>
<if
test=
"gjfx != null and gjfx != ''"
>
and gjfx = #{gjfx}
</if>
<if
test=
"gjyh != null and gjyh != ''"
>
and gjyh = #{gjyh}
</if>
<if
test=
"dcyl != null and dcyl != ''"
>
and dcyl = #{dcyl}
</if>
<if
test=
"zyfx != null and zyfx != ''"
>
and zyfx = #{zyfx}
</if>
<if
test=
"fxgkcs != null and fxgkcs != ''"
>
and fxgkcs = #{fxgkcs}
</if>
</where>
</select>
<select
id=
"selectSjFdsgcsById"
parameterType=
"Long"
resultMap=
"SjFdsgcsResult"
>
<include
refid=
"selectSjFdsgcsVo"
/>
where id = #{id}
</select>
<select
id=
"selectSjFdsgcsByJhAndKc"
resultType=
"com.ruoyi.project.zjsgfa.domain.SjFdsgcs"
>
select id, jh, kc, tzqk, jdqk, gjfx, gjyh, dcyl, zyfx, fxgkcs from sj_fdsgcs where jh = #{jh} and kc = #{kc}
</select>
<insert
id=
"insertSjFdsgcs"
parameterType=
"SjFdsgcs"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into sj_fdsgcs
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"jh != null"
>
jh,
</if>
<if
test=
"kc != null"
>
kc,
</if>
<if
test=
"tzqk != null"
>
tzqk,
</if>
<if
test=
"jdqk != null"
>
jdqk,
</if>
<if
test=
"gjfx != null"
>
gjfx,
</if>
<if
test=
"gjyh != null"
>
gjyh,
</if>
<if
test=
"dcyl != null"
>
dcyl,
</if>
<if
test=
"zyfx != null"
>
zyfx,
</if>
<if
test=
"fxgkcs != null"
>
fxgkcs,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"jh != null"
>
#{jh},
</if>
<if
test=
"kc != null"
>
#{kc},
</if>
<if
test=
"tzqk != null"
>
#{tzqk},
</if>
<if
test=
"jdqk != null"
>
#{jdqk},
</if>
<if
test=
"gjfx != null"
>
#{gjfx},
</if>
<if
test=
"gjyh != null"
>
#{gjyh},
</if>
<if
test=
"dcyl != null"
>
#{dcyl},
</if>
<if
test=
"zyfx != null"
>
#{zyfx},
</if>
<if
test=
"fxgkcs != null"
>
#{fxgkcs},
</if>
</trim>
</insert>
<update
id=
"updateSjFdsgcs"
parameterType=
"SjFdsgcs"
>
update sj_fdsgcs
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"jh != null"
>
jh = #{jh},
</if>
<if
test=
"kc != null"
>
kc = #{kc},
</if>
<if
test=
"tzqk != null"
>
tzqk = #{tzqk},
</if>
<if
test=
"jdqk != null"
>
jdqk = #{jdqk},
</if>
<if
test=
"gjfx != null"
>
gjfx = #{gjfx},
</if>
<if
test=
"gjyh != null"
>
gjyh = #{gjyh},
</if>
<if
test=
"dcyl != null"
>
dcyl = #{dcyl},
</if>
<if
test=
"zyfx != null"
>
zyfx = #{zyfx},
</if>
<if
test=
"fxgkcs != null"
>
fxgkcs = #{fxgkcs},
</if>
</trim>
where id = #{id}
</update>
<delete
id=
"deleteSjFdsgcsById"
parameterType=
"Long"
>
delete from sj_fdsgcs where id = #{id}
</delete>
<delete
id=
"deleteSjFdsgcsByIds"
parameterType=
"String"
>
delete from sj_fdsgcs where id in
<foreach
item=
"id"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
src/main/resources/mybatis/zt/JsqaMapper.xml
View file @
3782f9ff
...
@@ -19,4 +19,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -19,4 +19,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</if>
</if>
order by jh
order by jh
</select>
</select>
<select
id=
"getJsqaByjhAndJs"
resultType=
"com.ruoyi.project.zt.domain.Jsqa"
>
select jh,js, FZQK from JSQA where 1=1
<if
test=
"jhs.size()>0"
>
and jh in
<foreach
item=
"jh"
collection=
"jhs"
open=
"("
separator=
","
close=
")"
>
#{jh}
</foreach>
</if>
and JS
<
=#{js}
</select>
</mapper>
</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