Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
data-acquisition
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
竹天卫
data-acquisition
Commits
f46bda85
Commit
f46bda85
authored
May 08, 2021
by
renchao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
生产工序业务修改
parent
cae36f9e
Show whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
482 additions
and
121 deletions
+482
-121
TAnnouncementController.java
...uisition/business/controller/TAnnouncementController.java
+4
-4
TProcessesBlastController.java
...sition/business/controller/TProcessesBlastController.java
+21
-9
TProcessesBlastdesignHoleController.java
...iness/controller/TProcessesBlastdesignHoleController.java
+5
-10
TProcessesDrillingController.java
...ion/business/controller/TProcessesDrillingController.java
+21
-9
TSampleLaboratorysheetController.java
...business/controller/TSampleLaboratorysheetController.java
+4
-10
TSampleListController.java
...cquisition/business/controller/TSampleListController.java
+3
-5
TProcessesBlast.java
.../wise/sc/acquisition/business/entity/TProcessesBlast.java
+2
-1
ProjectEnum.java
...n/wise/sc/acquisition/business/enumation/ProjectEnum.java
+106
-5
TProcessesBlastdesignHoleMapper.java
...tion/business/mapper/TProcessesBlastdesignHoleMapper.java
+2
-2
TProcessesDrillingMapper.java
...acquisition/business/mapper/TProcessesDrillingMapper.java
+2
-0
TProcessesBlastMapper.xml
...acquisition/business/mapper/xml/TProcessesBlastMapper.xml
+2
-2
TProcessesDrillingMapper.xml
...uisition/business/mapper/xml/TProcessesDrillingMapper.xml
+30
-16
TProcessesBlastdesignHoleQuery.java
.../business/model/query/TProcessesBlastdesignHoleQuery.java
+11
-0
TProcessesBlastVo.java
...e/sc/acquisition/business/model/vo/TProcessesBlastVo.java
+2
-0
TProcessesBlastdesignHoleVo.java
...sition/business/model/vo/TProcessesBlastdesignHoleVo.java
+14
-1
TProcessesCrusherVo.java
...sc/acquisition/business/model/vo/TProcessesCrusherVo.java
+1
-1
TProcessesDrillingVo.java
...c/acquisition/business/model/vo/TProcessesDrillingVo.java
+24
-0
ITProcessesBlastService.java
...acquisition/business/service/ITProcessesBlastService.java
+2
-0
ITProcessesDrillingService.java
...uisition/business/service/ITProcessesDrillingService.java
+4
-0
TMineStopeServiceImpl.java
...uisition/business/service/impl/TMineStopeServiceImpl.java
+8
-7
TProcessesBlastServiceImpl.java
...ion/business/service/impl/TProcessesBlastServiceImpl.java
+39
-3
TProcessesBlastdesignHoleServiceImpl.java
...ss/service/impl/TProcessesBlastdesignHoleServiceImpl.java
+76
-7
TProcessesBlastdesignVolumeServiceImpl.java
.../service/impl/TProcessesBlastdesignVolumeServiceImpl.java
+11
-7
TProcessesCrusherServiceImpl.java
...n/business/service/impl/TProcessesCrusherServiceImpl.java
+1
-1
TProcessesDrillingServiceImpl.java
.../business/service/impl/TProcessesDrillingServiceImpl.java
+55
-3
TProcessesBlastMapper.xml
.../sc/acquisition/business/mapper/TProcessesBlastMapper.xml
+2
-2
TProcessesDrillingMapper.xml
.../acquisition/business/mapper/TProcessesDrillingMapper.xml
+30
-16
No files found.
acquisition-business/src/main/java/cn/wise/sc/acquisition/business/controller/TAnnouncementController.java
View file @
f46bda85
...
...
@@ -32,11 +32,11 @@ public class TAnnouncementController {
private
ITAnnouncementService
itAnnouncementService
;
/**
* 根据条件查询
送验单
分页
* 根据条件查询
广告通知
分页
*
* @return
*/
@ApiOperation
(
value
=
"
获取送验单列表 可分页模糊查询
"
)
@ApiOperation
(
value
=
"
根据条件查询广告通知
"
)
@RequestMapping
(
value
=
"/getPage"
,
method
=
RequestMethod
.
GET
)
public
R
getPage
(
Query
query
)
{
TAnnouncementQuery
param
=
new
TAnnouncementQuery
();
...
...
@@ -45,11 +45,11 @@ public class TAnnouncementController {
/**
* 根据
条件查询送验单 分页
* 根据
uid获取广告
*
* @return
*/
@ApiOperation
(
value
=
"
获取送验单列表 可分页模糊查询
"
)
@ApiOperation
(
value
=
"
根据uid获取广告
"
)
@ApiImplicitParams
(
value
=
{
@ApiImplicitParam
(
name
=
"uid"
,
value
=
"uid"
,
paramType
=
"query"
,
dataType
=
"String"
)
})
...
...
acquisition-business/src/main/java/cn/wise/sc/acquisition/business/controller/TProcessesBlastController.java
View file @
f46bda85
...
...
@@ -12,11 +12,9 @@ import io.swagger.annotations.ApiImplicitParams;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.validation.constraints.NotBlank
;
/**
* <p>
...
...
@@ -33,6 +31,7 @@ public class TProcessesBlastController {
@Autowired
ITProcessesBlastService
itProcessesBlastService
;
/**
* 根据条件查询爆破工序 分页
*
...
...
@@ -45,7 +44,7 @@ public class TProcessesBlastController {
@RequestMapping
(
value
=
"/getPage"
,
method
=
RequestMethod
.
GET
)
public
R
getPage
(
Query
query
,
String
blastDate
)
{
TProcessesBlastQuery
param
=
new
TProcessesBlastQuery
();
if
(
StringUtils
.
isNotBlank
(
blastDate
)){
if
(
StringUtils
.
isNotBlank
(
blastDate
))
{
param
.
setBlastDate
(
DateUtil
.
strToTime
(
blastDate
));
}
return
itProcessesBlastService
.
getPage
(
param
,
query
);
...
...
@@ -54,16 +53,29 @@ public class TProcessesBlastController {
/**
* 根据uid修改爆破工序
*
* @param tProcessesBlast
designHole
Query
* @param tProcessesBlastQuery
* @return
*/
@ApiOperation
(
value
=
"根据uid修改爆破工序"
)
@RequestMapping
(
value
=
"/updateByUid"
,
method
=
RequestMethod
.
POST
)
public
R
updateByUid
(
@RequestBody
TProcessesBlastQuery
tProcessesBlast
designHole
Query
)
{
return
itProcessesBlastService
.
updateByUid
(
tProcessesBlast
designHole
Query
);
public
R
updateByUid
(
@RequestBody
TProcessesBlastQuery
tProcessesBlastQuery
)
{
return
itProcessesBlastService
.
updateByUid
(
tProcessesBlastQuery
);
}
/**
* 根据uid查询爆破工序
*
* @param uid
* @return
*/
@ApiOperation
(
value
=
"根据uid查询爆破工序"
)
@GetMapping
(
value
=
"/getByUid/{uid}"
)
public
R
getByUid
(
@PathVariable
@NotBlank
String
uid
)
{
TProcessesBlastQuery
param
=
new
TProcessesBlastQuery
();
param
.
setUid
(
uid
);
return
itProcessesBlastService
.
getByUid
(
param
);
}
}
acquisition-business/src/main/java/cn/wise/sc/acquisition/business/controller/TProcessesBlastdesignHoleController.java
View file @
f46bda85
...
...
@@ -12,11 +12,9 @@ import io.swagger.annotations.ApiImplicitParams;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.validation.constraints.NotBlank
;
/**
...
...
@@ -47,7 +45,7 @@ public class TProcessesBlastdesignHoleController {
@RequestMapping
(
value
=
"/getPage"
,
method
=
RequestMethod
.
GET
)
public
R
getPage
(
String
designDate
,
Query
query
)
{
TProcessesBlastdesignHoleQuery
param
=
new
TProcessesBlastdesignHoleQuery
();
if
(
StringUtils
.
isNotBlank
(
designDate
)){
if
(
StringUtils
.
isNotBlank
(
designDate
))
{
param
.
setDesignDate
(
DateUtil
.
strToTime
(
designDate
));
}
return
itProcessesBlastdesignHoleService
.
getPage
(
param
,
query
);
...
...
@@ -99,11 +97,8 @@ public class TProcessesBlastdesignHoleController {
* @return
*/
@ApiOperation
(
value
=
"根据uid查询炮孔设计"
)
@ApiImplicitParams
(
value
=
{
@ApiImplicitParam
(
name
=
"uid"
,
value
=
"uid"
,
paramType
=
"query"
,
dataType
=
"String"
)
})
@RequestMapping
(
value
=
"/getByUid"
,
method
=
RequestMethod
.
GET
)
public
R
getByUid
(
String
uid
)
{
@GetMapping
(
value
=
"/getByUid/{uid}"
)
public
R
getByUid
(
@PathVariable
@NotBlank
String
uid
)
{
TProcessesBlastdesignHoleQuery
param
=
new
TProcessesBlastdesignHoleQuery
();
param
.
setUid
(
uid
);
return
itProcessesBlastdesignHoleService
.
getByUid
(
param
);
...
...
acquisition-business/src/main/java/cn/wise/sc/acquisition/business/controller/TProcessesDrillingController.java
View file @
f46bda85
...
...
@@ -12,11 +12,9 @@ import io.swagger.annotations.ApiImplicitParams;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.validation.constraints.NotBlank
;
/**
* <p>
...
...
@@ -36,6 +34,7 @@ public class TProcessesDrillingController {
/**
* 根据条件查询穿孔工序 分页
*
* @return
*/
@ApiOperation
(
value
=
"根据条件查询穿孔工序 可分页模糊查询"
)
...
...
@@ -45,7 +44,7 @@ public class TProcessesDrillingController {
@RequestMapping
(
value
=
"/getPage"
,
method
=
RequestMethod
.
GET
)
public
R
getPage
(
Query
query
,
String
drillingDate
)
{
TProcessesDrillingQuery
param
=
new
TProcessesDrillingQuery
();
if
(
StringUtils
.
isNotBlank
(
drillingDate
)){
if
(
StringUtils
.
isNotBlank
(
drillingDate
))
{
param
.
setDrillingDate
(
DateUtil
.
strToTime
(
drillingDate
));
}
return
itProcessesDrillingService
.
getPage
(
param
,
query
);
...
...
@@ -55,16 +54,29 @@ public class TProcessesDrillingController {
/**
* 根据uid修改穿孔工序
*
* @param tProcesses
BlastdesignHole
Query
* @param tProcesses
Drilling
Query
* @return
*/
@ApiOperation
(
value
=
"根据uid修改穿孔工序"
)
@RequestMapping
(
value
=
"/updateByUid"
,
method
=
RequestMethod
.
POST
)
public
R
updateByUid
(
@RequestBody
TProcessesDrillingQuery
tProcesses
BlastdesignHole
Query
)
{
return
itProcessesDrillingService
.
updateByUid
(
tProcesses
BlastdesignHole
Query
);
public
R
updateByUid
(
@RequestBody
TProcessesDrillingQuery
tProcesses
Drilling
Query
)
{
return
itProcessesDrillingService
.
updateByUid
(
tProcesses
Drilling
Query
);
}
/**
* 根据uid获取详细信息
*
* @param uid
* @return
*/
@ApiOperation
(
value
=
"根据uid获取穿孔工序"
)
@GetMapping
(
value
=
"/getByUid/{uid}"
)
public
R
getByUid
(
@PathVariable
@NotBlank
String
uid
)
{
TProcessesDrillingQuery
tProcessesDrillingQuery
=
new
TProcessesDrillingQuery
();
tProcessesDrillingQuery
.
setUid
(
uid
);
return
itProcessesDrillingService
.
getByUid
(
tProcessesDrillingQuery
);
}
}
...
...
acquisition-business/src/main/java/cn/wise/sc/acquisition/business/controller/TSampleLaboratorysheetController.java
View file @
f46bda85
...
...
@@ -9,13 +9,10 @@ import io.swagger.annotations.ApiImplicitParam;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.validation.constraints.NotBlank
;
/**
* <p>
...
...
@@ -40,11 +37,8 @@ public class TSampleLaboratorysheetController {
* @return
*/
@ApiOperation
(
value
=
"根据样号查看分析结果"
)
@RequestMapping
(
value
=
"/getByYh"
,
method
=
RequestMethod
.
GET
)
@ApiImplicitParam
(
name
=
"yh"
,
value
=
"样号"
,
required
=
true
,
dataType
=
"String"
)
public
R
getByYh
(
String
yh
)
{
@GetMapping
(
value
=
"/getByYh/{yh}"
)
public
R
getByYh
(
@PathVariable
@NotBlank
String
yh
)
{
TSampleLaboratorysheetQuery
param
=
new
TSampleLaboratorysheetQuery
();
param
.
setYh
(
yh
);
return
itSampleLaboratorysheetService
.
getByYh
(
param
);
...
...
acquisition-business/src/main/java/cn/wise/sc/acquisition/business/controller/TSampleListController.java
View file @
f46bda85
...
...
@@ -15,6 +15,7 @@ import org.springframework.web.bind.annotation.*;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.validation.constraints.NotBlank
;
/**
* <p>
...
...
@@ -104,11 +105,8 @@ public class TSampleListController {
* @return
*/
@ApiOperation
(
value
=
"下载图片"
)
@ApiImplicitParams
(
value
=
{
@ApiImplicitParam
(
name
=
"yh"
,
value
=
"样号"
,
paramType
=
"query"
,
dataType
=
"String"
)
})
@RequestMapping
(
value
=
"/getImage"
,
method
=
RequestMethod
.
GET
)
public
R
getImage
(
String
yh
,
final
HttpServletResponse
response
)
{
@GetMapping
(
value
=
"/getImage/{yh}"
)
public
R
getImage
(
@PathVariable
@NotBlank
String
yh
,
final
HttpServletResponse
response
)
{
TSampleListQuery
param
=
new
TSampleListQuery
();
param
.
setYh
(
yh
);
return
itSampleListService
.
getImage
(
param
,
response
);
...
...
acquisition-business/src/main/java/cn/wise/sc/acquisition/business/entity/TProcessesBlast.java
View file @
f46bda85
package
cn
.
wise
.
sc
.
acquisition
.
business
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
java.time.LocalDateTime
;
...
...
@@ -28,7 +29,7 @@ public class TProcessesBlast implements Serializable {
/**
* ID号
*/
@TableId
(
value
=
"Uid"
)
@TableId
(
value
=
"Uid"
,
type
=
IdType
.
ASSIGN_UUID
)
private
String
Uid
;
/**
...
...
acquisition-business/src/main/java/cn/wise/sc/acquisition/business/enumation/ProjectEnum.java
View file @
f46bda85
...
...
@@ -314,15 +314,109 @@ public class ProjectEnum {
}
/**
* 炮孔设计模块业务枚举
*/
public
enum
TMineStope
{
STOPE_NAME
(
1
,
"StopeName"
,
"采区名称"
),
STEP_NAME
(
2
,
"StepName"
,
"平台名称"
),
BLAST_AREA_NAME
(
3
,
"BlastAreaName"
,
"爆区名称"
),
IS_USING
(
4
,
"IsUsing"
,
"是否使用"
),
USING
(
5
,
"1"
,
"使用"
),
NOT_USING
(
6
,
"0"
,
"未使用"
);
// 成员变量
private
int
value
;
private
String
label
;
private
String
explain
;
// 构造方法
TMineStope
(
int
value
,
String
label
,
String
explain
)
{
this
.
value
=
value
;
this
.
label
=
label
;
this
.
explain
=
explain
;
}
/**
* 根据value,获取label
*/
public
static
String
getLabel
(
int
value
)
{
for
(
TMineStope
c
:
TMineStope
.
values
())
{
if
(
c
.
value
==
value
)
{
return
c
.
label
;
}
}
return
TMineStope
.
STOPE_NAME
.
label
;
}
/**
* 根据value,获取tableAlias
*/
public
static
String
getExplain
(
int
value
)
{
for
(
TMineStope
c
:
TMineStope
.
values
())
{
if
(
c
.
value
==
value
)
{
return
c
.
explain
;
}
}
return
TMineStope
.
STOPE_NAME
.
label
;
}
/**
* 根据label,获取value
*/
public
static
int
getValue
(
String
label
)
{
for
(
TMineStope
c
:
TMineStope
.
values
())
{
if
(
StringUtils
.
equalsIgnoreCase
(
label
,
c
.
label
))
{
return
c
.
value
;
}
}
return
TMineStope
.
STOPE_NAME
.
value
;
}
public
int
getValue
()
{
return
value
;
}
public
String
getLabel
()
{
return
label
;
}
public
String
getexplain
()
{
return
explain
;
}
}
/**
* 炮孔设计模块业务枚举
*/
public
enum
TProcessesBlastdesignHole
{
UID
(
1
,
"Uid"
,
"炮孔设计id"
),
UID
(
1
,
"StopeName"
,
"采区名称"
),
STEP_NAME
(
2
,
"StepName"
,
"平台名称"
),
Blast_Area_Name
(
3
,
"BlastAreaName"
,
"爆区名称"
),
BLAST_HOLE_ID
(
4
,
"BlastHoleID"
,
"炮孔编号"
),
DEPTH
(
5
,
"Depth"
,
"孔深(m)"
),
ROW_SPACE
(
6
,
"RowSpace"
,
"排距(m)"
),
HOLE_SPACE
(
7
,
"HoleSpace"
,
"孔距(m)"
),
AZIMUTH
(
8
,
"Azimuth"
,
"方位角"
),
INCLINATION
(
9
,
"Inclination"
,
"倾角"
),
APERTURE
(
10
,
"Aperture"
,
"孔径(m)"
),
X
(
11
,
"x"
,
"开孔坐标X"
),
Y
(
12
,
"y"
,
"开孔坐标Y"
),
Z
(
13
,
"z"
,
"开孔坐标Z"
),
STEP_HEIGHT
(
14
,
"StepHeight"
,
"台阶高度"
),
HOLE_BLAST_VOLUME
(
15
,
"HoleBlastVolume"
,
"单孔爆破量(m3)=孔距*排距*台阶高度"
),
DRILLING_DATE
(
16
,
"DrillingDate"
,
"穿孔日期"
),
BLAST_DATE
(
17
,
"BlastDate"
,
"爆破日期"
),
BLAST_VOLUME
(
18
,
"BlastVolume"
,
"设计爆区爆破量(m3)"
),
DESIGN_DATE
(
19
,
"DesignDate"
,
"设计日期"
);
BLASET_HOLE_ID
(
2
,
"BlastHoleID"
,
"炮孔编号"
);
// 成员变量
private
int
value
;
...
...
@@ -456,9 +550,16 @@ public class ProjectEnum {
*/
public
enum
TProcessesDrilling
{
DRILLING_DATE
(
1
,
"DrillingDate"
,
"穿孔日期"
),
DEPTH
(
5
,
"Depth"
,
"孔深"
);
UID
(
1
,
"Uid"
,
"uid"
),
DRILLING_DATE
(
2
,
"DrillingDate"
,
"穿孔日期"
),
DEPTH
(
3
,
"Depth"
,
"孔深"
),
ROW_SPACE
(
4
,
"RowSpace"
,
"排距(m)"
),
HOLE_SPACE
(
5
,
"HoleSpace"
,
"孔距(m)"
),
DESIGN_DEPTH
(
6
,
"DesignDepth"
,
"设计孔深(m)"
),
DESIGN_ROW_SPACE
(
7
,
"DesignRowSpace"
,
"设计排距(m)"
),
DESIGN_HOLE_SPACE
(
8
,
"DesignHoleSpace"
,
"设计孔距(m)"
),
STEP_HEIGHT
(
9
,
"StepHeight"
,
"台阶高度"
),
HOLE_BLAST_VOLUME
(
10
,
"HoleBlastVolume"
,
"单孔爆破量"
);
// 成员变量
private
int
value
;
...
...
acquisition-business/src/main/java/cn/wise/sc/acquisition/business/mapper/TProcessesBlastdesignHoleMapper.java
View file @
f46bda85
...
...
@@ -6,9 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
import
java.util.List
;
/**
* <p>
...
...
@@ -22,6 +20,8 @@ public interface TProcessesBlastdesignHoleMapper extends BaseMapper<TProcessesBl
Page
<
TProcessesBlastdesignHoleVo
>
getPage
(
Page
<
TProcessesBlastdesignHole
>
page
,
@Param
(
"ew"
)
QueryWrapper
<
TProcessesBlastdesignHole
>
queryWrapper
);
TProcessesBlastdesignHoleVo
getByUId
(
@Param
(
"ew"
)
QueryWrapper
<
TProcessesBlastdesignHole
>
queryWrapper
);
Double
getSumByCondition
(
@Param
(
"condition"
)
String
condition
,
@Param
(
"ew"
)
QueryWrapper
<
TProcessesBlastdesignHole
>
queryWrapper
);
}
acquisition-business/src/main/java/cn/wise/sc/acquisition/business/mapper/TProcessesDrillingMapper.java
View file @
f46bda85
...
...
@@ -20,6 +20,8 @@ public interface TProcessesDrillingMapper extends BaseMapper<TProcessesDrilling>
Page
<
TProcessesDrillingVo
>
getPage
(
Page
<
TProcessesDrilling
>
page
,
@Param
(
"ew"
)
QueryWrapper
<
TProcessesDrilling
>
queryWrapper
);
TProcessesDrillingVo
getByUid
(
@Param
(
"ew"
)
QueryWrapper
<
TProcessesDrilling
>
queryWrapper
);
Double
getSumByCondition
(
@Param
(
"condition"
)
String
condition
,
@Param
(
"ew"
)
QueryWrapper
<
TProcessesDrilling
>
queryWrapper
);
}
acquisition-business/src/main/java/cn/wise/sc/acquisition/business/mapper/xml/TProcessesBlastMapper.xml
View file @
f46bda85
...
...
@@ -18,13 +18,13 @@
a.Supervisor,
a.TechDepart,
a.Tabulator,
a.Depth,
a.Bz,
a.Tag
</sql>
<sql
id=
"TProcessesDiggingHoleColumns"
>
b.HoleBlastVolume,
b.depth ,
<!-- 设计孔深,将爆破工序里的depth去掉,用设计炮孔里的替代 -->
</sql>
<sql
id=
"TProcessesDrillingColumns"
>
...
...
acquisition-business/src/main/java/cn/wise/sc/acquisition/business/mapper/xml/TProcessesDrillingMapper.xml
View file @
f46bda85
...
...
@@ -20,7 +20,7 @@
a.StartTime,
a.EndTime,
a.WorkTime,
<!--
a.Depth,
a.RowSpace,
a.HoleSpace,
...
...
@@ -30,32 +30,32 @@
a.x,
a.y,
a.z,
a.HoleBlastVolume,
a.BlastDate,-->
-- a.HoleBlastVolume, /* 用炮孔设计的爆破量 */
a.BlastDate,
a.Operator,
a.Accepter,
a.Bz,
a.Tag
,
a.Tag
</sql>
<sql
id=
"TProcessesDiggingHoleColumns"
>
b.Depth
;
/*孔深(m)*/
b.RowSpace
;
/*排距(m)*/
b.HoleSpace
;
/*孔距(m)*/
b.Azimuth
;
/*方位角*/
b.Inclination
;
/*倾角*/
b.Aperture
;
/*孔径(m)*/
b.x;/*开孔坐标X*/
b.y;/*开孔坐标Y*/
b.z;/*开孔坐标Z*/
b.HoleBlastVolume
;
/* 单孔爆破量(m3)=孔距*排距*台阶高度*/
b.Depth
AS DesignDepth,
/*孔深(m)*/
b.RowSpace
AS DesignRowSpace,
/*排距(m)*/
b.HoleSpace
AS DesignHoleSpace,
/*孔距(m)*/
b.Azimuth
AS DesignAzimuth,
/*方位角*/
b.Inclination
AS DesignInclination,
/*倾角*/
b.Aperture
AS DesignAperture,
/*孔径(m)*/
--
b.x;/*开孔坐标X*/
--
b.y;/*开孔坐标Y*/
--
b.z;/*开孔坐标Z*/
b.HoleBlastVolume
,
/* 单孔爆破量(m3)=孔距*排距*台阶高度*/
</sql>
<sql
id=
"TProcessesBlastColumns"
>
c.BlastDate
</sql>
<sql
id=
"TProcessesBlastdesignHoleJoins"
>
left join T_Processes_BlastDesign_Hole b on a.HoleID = b.BlastHoleID
left join T_Processes_Blast c on a.HoleID = c.HoleID
...
...
@@ -74,7 +74,21 @@
</where>
</select>
<!-- 获取所有getByQuery列表 -->
<!-- 获取所有getPage列表 -->
<select
id=
"getByUid"
resultType=
"cn.wise.sc.acquisition.business.model.vo.TProcessesDrillingVo"
>
SELECT
<include
refid=
"TProcessesDiggingHoleColumns"
/>
<include
refid=
"TProcessesDrillingColumns"
/>
<include
refid=
"TProcessesBlastColumns"
/>
FROM T_Processes_Blast a
<include
refid=
"TProcessesBlastdesignHoleJoins"
/>
<where>
${ew.sqlSegment}
</where>
</select>
<!-- 根据条件求和某字段 -->
<select
id=
"getSumByCondition"
resultType=
"Double"
>
SELECT
sum(${condition})
...
...
acquisition-business/src/main/java/cn/wise/sc/acquisition/business/model/query/TProcessesBlastdesignHoleQuery.java
View file @
f46bda85
...
...
@@ -125,5 +125,16 @@ public class TProcessesBlastdesignHoleQuery extends TProcessesBlastdesignVolume
@ApiModelProperty
(
"爆破日期"
)
private
LocalDateTime
BlastDate
;
//以下为增加字段
/**
* 设计爆区爆破量(m3)
*/
@ApiModelProperty
(
"设计爆区爆破量(m3)"
)
private
Double
BlastVolume
;
/**
* 设计日期
*/
@ApiModelProperty
(
"设计日期"
)
private
LocalDateTime
DesignDate
;
}
acquisition-business/src/main/java/cn/wise/sc/acquisition/business/model/vo/TProcessesBlastVo.java
View file @
f46bda85
...
...
@@ -115,6 +115,8 @@ public class TProcessesBlastVo {
@ApiModelProperty
(
"Depth"
)
private
Double
Depth
;
//以下是增加的字段
/**
* 设计孔深
*/
...
...
acquisition-business/src/main/java/cn/wise/sc/acquisition/business/model/vo/TProcessesBlastdesignHoleVo.java
View file @
f46bda85
...
...
@@ -20,7 +20,7 @@ import java.time.LocalDateTime;
*/
@Data
@ApiModel
(
"爆破设计表"
)
public
class
TProcessesBlastdesignHoleVo
extends
TProcessesBlastdesignVolumeVo
{
public
class
TProcessesBlastdesignHoleVo
{
/**
* ID号
...
...
@@ -131,4 +131,17 @@ public class TProcessesBlastdesignHoleVo extends TProcessesBlastdesignVolumeVo {
private
LocalDateTime
BlastDate
;
//以下为增加字段
/**
* 设计爆区爆破量(m3)
*/
@ApiModelProperty
(
"设计爆区爆破量(m3)"
)
private
Double
BlastVolume
;
/**
* 设计日期
*/
@ApiModelProperty
(
"设计日期"
)
private
LocalDateTime
DesignDate
;
}
acquisition-business/src/main/java/cn/wise/sc/acquisition/business/model/vo/TProcessesCrusherVo.java
View file @
f46bda85
...
...
@@ -16,7 +16,7 @@ import java.time.LocalDateTime;
*/
@Data
@ApiModel
(
"破碎工序"
)
public
class
TProcessesCrusherVo
{
public
class
TProcessesCrusherVo
extends
TWeightVo
{
/**
...
...
acquisition-business/src/main/java/cn/wise/sc/acquisition/business/model/vo/TProcessesDrillingVo.java
View file @
f46bda85
...
...
@@ -200,4 +200,28 @@ public class TProcessesDrillingVo {
private
String
Tag
;
//以下是增加字段 需要表连接的字段
@ApiModelProperty
(
"孔深(m)"
)
private
Double
DesignDepth
;
@ApiModelProperty
(
"排距(m)"
)
private
Double
DesignRowSpace
;
@ApiModelProperty
(
"孔距(m)"
)
private
Double
DesignHoleSpace
;
@ApiModelProperty
(
"设计方位角"
)
private
Double
DesignAzimuth
;
@ApiModelProperty
(
"设计倾角"
)
private
Double
DesignInclination
;
@ApiModelProperty
(
"设计孔径"
)
private
Double
DesignAperture
;
@ApiModelProperty
(
"台阶高度"
)
private
Double
StepHeight
;
}
acquisition-business/src/main/java/cn/wise/sc/acquisition/business/service/ITProcessesBlastService.java
View file @
f46bda85
...
...
@@ -20,5 +20,7 @@ public interface ITProcessesBlastService extends IService<TProcessesBlast> {
R
updateByUid
(
TProcessesBlastQuery
query
);
R
insertTProcessesBlast
(
TProcessesBlastQuery
query
);
R
getByUid
(
TProcessesBlastQuery
query
);
}
acquisition-business/src/main/java/cn/wise/sc/acquisition/business/service/ITProcessesDrillingService.java
View file @
f46bda85
...
...
@@ -18,6 +18,10 @@ public interface ITProcessesDrillingService extends IService<TProcessesDrilling>
R
getPage
(
TProcessesDrillingQuery
tProcessesDrillingQuery
,
Query
query
);
R
insertTProcessesDrilling
(
TProcessesDrillingQuery
query
);
R
updateByUid
(
TProcessesDrillingQuery
query
);
R
getByUid
(
TProcessesDrillingQuery
query
);
}
acquisition-business/src/main/java/cn/wise/sc/acquisition/business/service/impl/TMineStopeServiceImpl.java
View file @
f46bda85
...
...
@@ -36,9 +36,9 @@ public class TMineStopeServiceImpl extends ServiceImpl<TMineStopeMapper, TMineSt
//封装
QueryWrapper
<
TMineStope
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
ProjectEnum
.
TProcessesBlastdesignVolume
.
STOPE_NAME
.
getLabel
(),
query
.
getStopeName
())
.
eq
(
ProjectEnum
.
TProcessesBlastdesignVolume
.
STEP_NAME
.
getLabel
(),
query
.
getStepName
())
.
eq
(
ProjectEnum
.
TProcessesBlastdesignVolume
.
BLAST_AREA_NAME
.
getLabel
(),
query
.
getBlastAreaName
());
.
eq
(
ProjectEnum
.
TProcessesBlastdesignVolume
.
STOPE_NAME
.
getLabel
(),
query
.
getStopeName
())
.
eq
(
ProjectEnum
.
TProcessesBlastdesignVolume
.
STEP_NAME
.
getLabel
(),
query
.
getStepName
())
.
eq
(
ProjectEnum
.
TProcessesBlastdesignVolume
.
BLAST_AREA_NAME
.
getLabel
(),
query
.
getBlastAreaName
());
//查询并且返回
return
R
.
ok
(
baseMapper
.
selectOne
(
queryWrapper
));
}
...
...
@@ -54,9 +54,10 @@ public class TMineStopeServiceImpl extends ServiceImpl<TMineStopeMapper, TMineSt
//封装
QueryWrapper
<
TMineStope
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
ProjectEnum
.
TProcessesBlastdesignVolume
.
STOPE_NAME
.
getLabel
(),
query
.
getStopeName
())
.
eq
(
ProjectEnum
.
TProcessesBlastdesignVolume
.
STEP_NAME
.
getLabel
(),
query
.
getStepName
())
.
eq
(
ProjectEnum
.
TProcessesBlastdesignVolume
.
BLAST_AREA_NAME
.
getLabel
(),
query
.
getBlastAreaName
());
.
eq
(
ProjectEnum
.
TMineStope
.
IS_USING
.
getLabel
(),
ProjectEnum
.
TMineStope
.
USING
.
getLabel
())
.
eq
(
ProjectEnum
.
TMineStope
.
STOPE_NAME
.
getLabel
(),
query
.
getStopeName
())
.
eq
(
ProjectEnum
.
TMineStope
.
STEP_NAME
.
getLabel
(),
query
.
getStepName
())
.
eq
(
ProjectEnum
.
TMineStope
.
BLAST_AREA_NAME
.
getLabel
(),
query
.
getBlastAreaName
());
//查询并且返回
return
R
.
ok
(
baseMapper
.
selectOne
(
queryWrapper
));
}
...
...
acquisition-business/src/main/java/cn/wise/sc/acquisition/business/service/impl/TProcessesBlastServiceImpl.java
View file @
f46bda85
...
...
@@ -25,7 +25,7 @@ import org.springframework.stereotype.Service;
/**
* <p>
*
服务实现类
*
服务实现类 爆破工序
* </p>
*
* @author renchao
...
...
@@ -78,7 +78,7 @@ public class TProcessesBlastServiceImpl extends ServiceImpl<TProcessesBlastMappe
//判断矿山爆区表是否存在数据 不存在不能修改
//query里不一定StopeName,StepName,BlastAreaName都有,需要从temp中拿query没有的,
// 所以将query有的更新到temp中,再把temp中的复制到tMineStopeQuery
BeanUtilsNewCopy
.
copyPropertiesIgnoreNull
(
query
,
temp
);
BeanUtilsNewCopy
.
copyPropertiesIgnoreNull
(
query
,
temp
);
TMineStopeQuery
tMineStopeQuery
=
new
TMineStopeQuery
();
BeanUtils
.
copyProperties
(
temp
,
tMineStopeQuery
);
R
volume
=
itMineStopeService
.
getByQuery
(
tMineStopeQuery
);
...
...
@@ -88,7 +88,7 @@ public class TProcessesBlastServiceImpl extends ServiceImpl<TProcessesBlastMappe
}
//条件封装
TProcessesBlast
tProcessesBlast
=
new
TProcessesBlast
();
BeanUtils
.
copyProperties
(
query
,
tProcessesBlast
);
BeanUtils
.
copyProperties
(
query
,
tProcessesBlast
);
QueryWrapper
<
TProcessesBlast
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
ProjectEnum
.
TProcessesBlast
.
UID
.
getLabel
(),
query
.
getUid
());
...
...
@@ -101,4 +101,40 @@ public class TProcessesBlastServiceImpl extends ServiceImpl<TProcessesBlastMappe
return
R
.
failed
(
"修改失败"
);
}
}
@Override
public
R
insertTProcessesBlast
(
TProcessesBlastQuery
query
)
{
log
.
info
(
JSON
.
toJSONString
(
query
));
//参数校验
Rcode
.
NOT_PARAM
.
assertNotNull
(
query
);
Rcode
.
NOT_PARAM
.
assertNotEmpty
(
query
.
getStopeName
());
Rcode
.
NOT_PARAM
.
assertNotEmpty
(
query
.
getStepName
());
Rcode
.
NOT_PARAM
.
assertNotEmpty
(
query
.
getBlastAreaName
());
Rcode
.
NOT_PARAM
.
assertNotEmpty
(
query
.
getHoleID
());
//uid自动生成 不能手动设置
if
(
query
.
getUid
()
!=
null
)
{
return
R
.
failed
(
"uid自动生成 不能手动设置"
);
}
//条件封装
TProcessesBlast
tProcessesDrilling
=
new
TProcessesBlast
();
BeanUtils
.
copyProperties
(
query
,
tProcessesDrilling
);
//增加
int
insert
=
baseMapper
.
insert
(
tProcessesDrilling
);
if
(
insert
>
0
)
{
return
R
.
ok
(
"增加成功"
);
}
else
{
log
.
info
(
JSON
.
toJSONString
(
tProcessesDrilling
));
return
R
.
failed
(
"增加失败"
);
}
}
@Override
public
R
getByUid
(
TProcessesBlastQuery
query
)
{
log
.
info
(
JSON
.
toJSONString
(
query
));
//参数校验
Rcode
.
NOT_PARAM
.
assertNotNull
(
query
);
Rcode
.
NOT_PARAM
.
assertNotEmpty
(
query
.
getUid
());
//查询并且返回
return
R
.
ok
(
baseMapper
.
selectById
(
query
.
getUid
()));
}
}
acquisition-business/src/main/java/cn/wise/sc/acquisition/business/service/impl/TProcessesBlastdesignHoleServiceImpl.java
View file @
f46bda85
...
...
@@ -4,12 +4,13 @@ import cn.wise.sc.acquisition.business.constant.Rcode;
import
cn.wise.sc.acquisition.business.entity.TProcessesBlastdesignHole
;
import
cn.wise.sc.acquisition.business.enumation.ProjectEnum
;
import
cn.wise.sc.acquisition.business.mapper.TProcessesBlastdesignHoleMapper
;
import
cn.wise.sc.acquisition.business.model.query.TProcessesBlastQuery
;
import
cn.wise.sc.acquisition.business.model.query.TProcessesBlastdesignHoleQuery
;
import
cn.wise.sc.acquisition.business.model.query.TProcessesBlastdesignVolumeQuery
;
import
cn.wise.sc.acquisition.business.model.query.TProcessesDrillingQuery
;
import
cn.wise.sc.acquisition.business.model.vo.TProcessesProductVo
;
import
cn.wise.sc.acquisition.business.model.vo.TProcessesBlastdesignHoleVo
;
import
cn.wise.sc.acquisition.business.service.ITProcessesBlastdesignHoleService
;
import
cn.wise.sc.acquisition.business.service.ITProcessesBlastdesignVolumeService
;
import
cn.wise.sc.acquisition.business.service.*
;
import
cn.wise.sc.acquisition.business.util.BeanUtilsNewCopy
;
import
cn.wise.sc.acquisition.business.util.DateUtil
;
import
cn.wise.sc.acquisition.business.wrapper.page.Query
;
...
...
@@ -23,6 +24,9 @@ import org.apache.commons.lang3.StringUtils;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.time.LocalDateTime
;
/**
...
...
@@ -40,6 +44,12 @@ public class TProcessesBlastdesignHoleServiceImpl extends ServiceImpl<TProcesses
@Autowired
private
ITProcessesBlastdesignVolumeService
itProcessesBlastdesignVolumeService
;
@Autowired
private
ITProcessesDrillingService
itProcessesDrillingService
;
@Autowired
private
ITProcessesBlastService
itProcessesBlastService
;
@Override
public
R
getPage
(
TProcessesBlastdesignHoleQuery
tProcessesBlastdesignHoleQuery
,
Query
query
)
{
log
.
info
(
JSON
.
toJSONString
(
tProcessesBlastdesignHoleQuery
));
...
...
@@ -48,6 +58,20 @@ public class TProcessesBlastdesignHoleServiceImpl extends ServiceImpl<TProcesses
Page
<
TProcessesBlastdesignHole
>
page
=
new
Page
<>(
query
.
getPageNum
(),
query
.
getPageSize
());
//条件封装
QueryWrapper
<
TProcessesBlastdesignHole
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
select
(
ProjectEnum
.
TProcessesBlastdesignHole
.
DEPTH
.
getLabel
(),
ProjectEnum
.
TProcessesBlastdesignHole
.
DRILLING_DATE
.
getLabel
(),
ProjectEnum
.
TProcessesBlastdesignHole
.
BLAST_DATE
.
getLabel
(),
ProjectEnum
.
TProcessesBlastdesignHole
.
HOLE_SPACE
.
getLabel
(),
ProjectEnum
.
TProcessesBlastdesignHole
.
ROW_SPACE
.
getLabel
(),
ProjectEnum
.
TProcessesBlastdesignHole
.
STEP_HEIGHT
.
getLabel
(),
ProjectEnum
.
TProcessesBlastdesignHole
.
AZIMUTH
.
getLabel
(),
ProjectEnum
.
TProcessesBlastdesignHole
.
INCLINATION
.
getLabel
(),
ProjectEnum
.
TProcessesBlastdesignHole
.
APERTURE
.
getLabel
(),
ProjectEnum
.
TProcessesBlastdesignHole
.
X
.
getLabel
(),
ProjectEnum
.
TProcessesBlastdesignHole
.
Y
.
getLabel
(),
ProjectEnum
.
TProcessesBlastdesignHole
.
Z
.
getLabel
()
);
//如果设计时间不为空 因为涉及到表连接,需要创建字段别名
if
(
tProcessesBlastdesignHoleQuery
.
getDesignDate
()
!=
null
)
{
StringBuilder
stringBuilder
=
new
StringBuilder
();
...
...
@@ -73,7 +97,7 @@ public class TProcessesBlastdesignHoleServiceImpl extends ServiceImpl<TProcesses
//参数校验
Rcode
.
NOT_PARAM
.
assertNotNull
(
query
);
Rcode
.
NOT_PARAM
.
assertNotEmpty
(
query
.
getUid
());
//判断数据是否存在
//判断数据
炮孔设计
是否存在
TProcessesBlastdesignHole
temp
=
baseMapper
.
selectById
(
query
.
getUid
());
if
(
temp
==
null
)
{
return
R
.
failed
(
"数据不存在,uid:"
+
query
.
getUid
());
...
...
@@ -85,7 +109,7 @@ public class TProcessesBlastdesignHoleServiceImpl extends ServiceImpl<TProcesses
//判断设计爆区爆破量是否存在数据 不存在不能修改
//query里不一定StopeName,StepName,BlastAreaName都有,需要从temp中拿query没有的,
// 所以将query有的更新到temp中,再把temp中的复制到tMineStopeQuery
BeanUtilsNewCopy
.
copyPropertiesIgnoreNull
(
query
,
temp
);
BeanUtilsNewCopy
.
copyPropertiesIgnoreNull
(
query
,
temp
);
TProcessesBlastdesignVolumeQuery
tProcessesBlastdesignVolumeQuery
=
new
TProcessesBlastdesignHoleQuery
();
BeanUtils
.
copyProperties
(
temp
,
tProcessesBlastdesignVolumeQuery
);
R
volume
=
itProcessesBlastdesignVolumeService
.
getByQuery
(
tProcessesBlastdesignVolumeQuery
);
...
...
@@ -93,11 +117,25 @@ public class TProcessesBlastdesignHoleServiceImpl extends ServiceImpl<TProcesses
return
R
.
failed
(
"设计爆区爆破量表数据不存在,StopeName,StepName,BlastAreaName"
);
}
}
//条件封装
//如果修改了孔距,排距,台阶高度 需要重新计算单孔爆破量, 单孔爆破量(m3)=孔距*排距*台阶高度
//所以直接copy上面根据uid查出来的数据 copy ->非空值<- 将query的值更新到查出来的对象上 进行计算并更新到数据库即可
BeanUtilsNewCopy
.
copyPropertiesIgnoreNull
(
query
,
temp
);
//判断是否修改设计爆区爆破量 的设计日期,或者设计爆区爆破量(m3) TAT
if
(
query
.
getDesignDate
()
!=
null
||
query
.
getBlastVolume
()
!=
null
)
{
TProcessesBlastdesignVolumeQuery
tProcessesBlastdesignVolumeQuery
=
new
TProcessesBlastdesignHoleQuery
();
tProcessesBlastdesignVolumeQuery
.
setStopeName
(
temp
.
getStopeName
());
tProcessesBlastdesignVolumeQuery
.
setStepName
(
temp
.
getStepName
());
tProcessesBlastdesignVolumeQuery
.
setBlastAreaName
(
temp
.
getBlastAreaName
());
tProcessesBlastdesignVolumeQuery
.
setDesignDate
(
query
.
getDesignDate
());
tProcessesBlastdesignVolumeQuery
.
setBlastVolume
(
query
.
getBlastVolume
());
R
r
=
itProcessesBlastdesignVolumeService
.
updateByQuery
(
tProcessesBlastdesignVolumeQuery
);
if
(
r
.
getCode
()
!=
0
)
{
log
.
info
(
"修改设计爆区爆破量失败:"
+
JSON
.
toJSONString
(
tProcessesBlastdesignVolumeQuery
));
return
R
.
failed
(
r
.
getMsg
());
}
}
//计算单孔爆破量
calculateHoleBlastVolume
(
temp
);
QueryWrapper
<
TProcessesBlastdesignHole
>
queryWrapper
=
new
QueryWrapper
<>();
...
...
@@ -134,6 +172,7 @@ public class TProcessesBlastdesignHoleServiceImpl extends ServiceImpl<TProcesses
}
@Override
@Transactional
public
R
insertTProcessesBlastdesignHole
(
TProcessesBlastdesignHoleQuery
query
)
{
log
.
info
(
JSON
.
toJSONString
(
query
));
//参数校验
...
...
@@ -164,6 +203,7 @@ public class TProcessesBlastdesignHoleServiceImpl extends ServiceImpl<TProcesses
if
(
volume
.
getData
()
==
null
)
{
return
R
.
failed
(
"设计爆区爆破量表数据不存在,StopeName,StepName,BlastAreaName"
);
}
//条件封装
TProcessesBlastdesignHole
tProcessesBlastdesignHole
=
new
TProcessesBlastdesignHole
();
BeanUtils
.
copyProperties
(
query
,
tProcessesBlastdesignHole
);
...
...
@@ -173,6 +213,31 @@ public class TProcessesBlastdesignHoleServiceImpl extends ServiceImpl<TProcesses
log
.
info
(
JSON
.
toJSONString
(
tProcessesBlastdesignHole
));
int
insert
=
baseMapper
.
insert
(
tProcessesBlastdesignHole
);
if
(
insert
>
0
)
{
//增加一条穿孔工序
TProcessesDrillingQuery
tProcessesDrillingQuery
=
new
TProcessesDrillingQuery
();
tProcessesDrillingQuery
.
setStepName
(
tProcessesBlastdesignHole
.
getStepName
());
tProcessesDrillingQuery
.
setStopeName
(
tProcessesBlastdesignHole
.
getStopeName
());
tProcessesDrillingQuery
.
setBlastAreaName
(
tProcessesBlastdesignHole
.
getBlastAreaName
());
tProcessesDrillingQuery
.
setHoleID
(
query
.
getBlastHoleID
());
tProcessesDrillingQuery
.
setTag
(
DateUtil
.
timeToStr
(
LocalDateTime
.
now
(),
DateUtil
.
FORMAT_TO_SECOND
));
R
r1
=
itProcessesDrillingService
.
insertTProcessesDrilling
(
tProcessesDrillingQuery
);
if
(
r1
.
getCode
()
!=
0
)
{
log
.
error
(
"增加一条穿孔工序失败:"
+
JSON
.
toJSONString
(
tProcessesDrillingQuery
));
return
R
.
failed
(
r1
.
getMsg
());
}
//增加一条爆破工序
TProcessesBlastQuery
tProcessesBlastQuery
=
new
TProcessesBlastQuery
();
tProcessesBlastQuery
.
setStepName
(
tProcessesBlastdesignHole
.
getStepName
());
tProcessesBlastQuery
.
setStopeName
(
tProcessesBlastdesignHole
.
getStopeName
());
tProcessesBlastQuery
.
setBlastAreaName
(
tProcessesBlastdesignHole
.
getBlastAreaName
());
tProcessesBlastQuery
.
setHoleID
(
query
.
getBlastHoleID
());
tProcessesBlastQuery
.
setTag
(
DateUtil
.
timeToStr
(
LocalDateTime
.
now
(),
DateUtil
.
FORMAT_TO_SECOND
));
R
r2
=
itProcessesBlastService
.
insertTProcessesBlast
(
tProcessesBlastQuery
);
if
(
r2
.
getCode
()
!=
0
)
{
log
.
error
(
"增加一条爆破工序:"
+
JSON
.
toJSONString
(
tProcessesDrillingQuery
));
return
R
.
failed
(
r1
.
getMsg
());
}
return
R
.
ok
(
"增加成功"
);
}
else
{
log
.
info
(
JSON
.
toJSONString
(
tProcessesBlastdesignHole
));
...
...
@@ -186,8 +251,11 @@ public class TProcessesBlastdesignHoleServiceImpl extends ServiceImpl<TProcesses
//参数校验
Rcode
.
NOT_PARAM
.
assertNotNull
(
query
);
Rcode
.
NOT_PARAM
.
assertNotEmpty
(
query
.
getUid
());
//条件
QueryWrapper
<
TProcessesBlastdesignHole
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
ProjectEnum
.
TProcessesBlastdesignHole
.
UID
.
getLabel
(),
query
.
getUid
());
//查询并且返回
return
R
.
ok
(
baseMapper
.
selectById
(
query
.
getUid
()
));
return
R
.
ok
(
baseMapper
.
getByUId
(
queryWrapper
));
}
...
...
@@ -199,11 +267,12 @@ public class TProcessesBlastdesignHoleServiceImpl extends ServiceImpl<TProcesses
Rcode
.
NOT_PARAM
.
assertNotEmpty
(
query
.
getBlastHoleID
());
//封装
QueryWrapper
<
TProcessesBlastdesignHole
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
ProjectEnum
.
TProcessesBlastdesignHole
.
BLAS
E
T_HOLE_ID
.
getLabel
(),
query
.
getBlastHoleID
());
queryWrapper
.
eq
(
ProjectEnum
.
TProcessesBlastdesignHole
.
BLAST_HOLE_ID
.
getLabel
(),
query
.
getBlastHoleID
());
//查询并且返回
baseMapper
.
selectOne
(
queryWrapper
);
return
R
.
ok
(
baseMapper
.
selectOne
(
queryWrapper
));
}
/**
* 计算并设值 单孔爆破量(m3)=孔距*排距*台阶高度
*/
...
...
acquisition-business/src/main/java/cn/wise/sc/acquisition/business/service/impl/TProcessesBlastdesignVolumeServiceImpl.java
View file @
f46bda85
...
...
@@ -16,6 +16,7 @@ import lombok.extern.slf4j.Slf4j;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.stereotype.Service
;
/**
* <p>
* 服务实现类
...
...
@@ -60,9 +61,9 @@ public class TProcessesBlastdesignVolumeServiceImpl extends ServiceImpl<TProcess
BeanUtils
.
copyProperties
(
query
,
tProcessesBlastdesignVolume
);
QueryWrapper
<
TProcessesBlastdesignVolume
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
ProjectEnum
.
TProcessesBlastdesignVolume
.
STOPE_NAME
.
getLabel
(),
query
.
getStopeName
())
.
eq
(
ProjectEnum
.
TProcessesBlastdesignVolume
.
STEP_NAME
.
getLabel
(),
query
.
getStepName
())
.
eq
(
ProjectEnum
.
TProcessesBlastdesignVolume
.
BLAST_AREA_NAME
.
getLabel
(),
query
.
getBlastAreaName
());
queryWrapper
.
eq
(
ProjectEnum
.
TProcessesBlastdesignVolume
.
STOPE_NAME
.
getLabel
(),
query
.
getStopeName
())
.
eq
(
ProjectEnum
.
TProcessesBlastdesignVolume
.
STEP_NAME
.
getLabel
(),
query
.
getStepName
())
.
eq
(
ProjectEnum
.
TProcessesBlastdesignVolume
.
BLAST_AREA_NAME
.
getLabel
(),
query
.
getBlastAreaName
());
//修改
int
update
=
baseMapper
.
update
(
tProcessesBlastdesignVolume
,
queryWrapper
);
if
(
update
>
0
)
{
...
...
@@ -84,10 +85,13 @@ public class TProcessesBlastdesignVolumeServiceImpl extends ServiceImpl<TProcess
//封装
QueryWrapper
<
TProcessesBlastdesignVolume
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
ProjectEnum
.
TProcessesBlastdesignVolume
.
STOPE_NAME
.
getLabel
(),
query
.
getStopeName
())
.
eq
(
ProjectEnum
.
TProcessesBlastdesignVolume
.
STEP_NAME
.
getLabel
(),
query
.
getStepName
())
.
eq
(
ProjectEnum
.
TProcessesBlastdesignVolume
.
BLAST_AREA_NAME
.
getLabel
(),
query
.
getBlastAreaName
());
.
eq
(
ProjectEnum
.
TProcessesBlastdesignVolume
.
STOPE_NAME
.
getLabel
(),
query
.
getStopeName
())
.
eq
(
ProjectEnum
.
TProcessesBlastdesignVolume
.
STEP_NAME
.
getLabel
(),
query
.
getStepName
())
.
eq
(
ProjectEnum
.
TProcessesBlastdesignVolume
.
BLAST_AREA_NAME
.
getLabel
(),
query
.
getBlastAreaName
());
//查询并且返回
return
R
.
ok
(
baseMapper
.
selectOne
(
queryWrapper
));
}
}
acquisition-business/src/main/java/cn/wise/sc/acquisition/business/service/impl/TProcessesCrusherServiceImpl.java
View file @
f46bda85
...
...
@@ -42,7 +42,7 @@ public class TProcessesCrusherServiceImpl extends ServiceImpl<TProcessesCrusherM
queryWrapper
.
eq
(
StringUtils
.
isNotBlank
(
tProcessesCrusherQuery
.
getEquipmentID
()),
ProjectEnum
.
TProcessesCrusher
.
EQUIPMENT_ID
.
getLabel
(),
tProcessesCrusherQuery
.
getEquipmentID
());
//查询
Page
<
TProcessesCrusher
Vo
>
tSampleListPage
=
baseMapper
.
ge
tPage
(
page
,
queryWrapper
);
Page
<
TProcessesCrusher
>
tSampleListPage
=
baseMapper
.
selec
tPage
(
page
,
queryWrapper
);
return
R
.
ok
(
tSampleListPage
);
}
...
...
acquisition-business/src/main/java/cn/wise/sc/acquisition/business/service/impl/TProcessesDrillingServiceImpl.java
View file @
f46bda85
...
...
@@ -8,6 +8,7 @@ import cn.wise.sc.acquisition.business.mapper.TProcessesDrillingMapper;
import
cn.wise.sc.acquisition.business.model.query.TMineStopeQuery
;
import
cn.wise.sc.acquisition.business.model.query.TProcessesBlastdesignHoleQuery
;
import
cn.wise.sc.acquisition.business.model.query.TProcessesDrillingQuery
;
import
cn.wise.sc.acquisition.business.model.vo.TProcessesDrillingVo
;
import
cn.wise.sc.acquisition.business.model.vo.TProcessesProductVo
;
import
cn.wise.sc.acquisition.business.service.ITMineStopeService
;
import
cn.wise.sc.acquisition.business.service.ITProcessesBlastdesignHoleService
;
...
...
@@ -30,7 +31,7 @@ import java.time.LocalDateTime;
/**
* <p>
* 服务实现类
* 服务实现类
穿孔工序
* </p>
*
* @author renchao
...
...
@@ -55,6 +56,16 @@ public class TProcessesDrillingServiceImpl extends ServiceImpl<TProcessesDrillin
Page
<
TProcessesDrilling
>
page
=
new
Page
<>(
query
.
getPageNum
(),
query
.
getPageSize
());
//条件封装
QueryWrapper
<
TProcessesDrilling
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
select
(
ProjectEnum
.
TProcessesDrilling
.
DEPTH
.
getLabel
(),
ProjectEnum
.
TProcessesDrilling
.
ROW_SPACE
.
getLabel
(),
ProjectEnum
.
TProcessesDrilling
.
HOLE_SPACE
.
getLabel
(),
ProjectEnum
.
TProcessesDrilling
.
STEP_HEIGHT
.
getLabel
(),
ProjectEnum
.
TProcessesDrilling
.
HOLE_BLAST_VOLUME
.
getLabel
(),
ProjectEnum
.
TProcessesDrilling
.
DESIGN_DEPTH
.
getLabel
(),
ProjectEnum
.
TProcessesDrilling
.
DESIGN_ROW_SPACE
.
getLabel
(),
ProjectEnum
.
TProcessesDrilling
.
DESIGN_HOLE_SPACE
.
getLabel
()
);
//如果设计时间不为空 因为涉及到表连接,需要创建字段别名
if
(
tProcessesDrillingQuery
.
getDrillingDate
()
!=
null
)
{
//前端传来的时间可能为2021-04-05 17:37:33.000, 需要查询 2021-04-05 00:00:00 到 2021-04-05 23:59:59 的数据 故作处理
...
...
@@ -62,8 +73,9 @@ public class TProcessesDrillingServiceImpl extends ServiceImpl<TProcessesDrillin
.
ge
(
ProjectEnum
.
TProcessesDrilling
.
DRILLING_DATE
.
getLabel
(),
DateUtil
.
getBeginTimeStr
(
tProcessesDrillingQuery
.
getDrillingDate
()))
.
le
(
ProjectEnum
.
TProcessesDrilling
.
DRILLING_DATE
.
getLabel
(),
DateUtil
.
getEndTimeStr
(
tProcessesDrillingQuery
.
getDrillingDate
()));
}
//查询分页数据
Page
<
TProcessesDrilling
>
data
=
baseMapper
.
selec
tPage
(
page
,
queryWrapper
);
Page
<
TProcessesDrilling
Vo
>
data
=
baseMapper
.
ge
tPage
(
page
,
queryWrapper
);
StringBuffer
depth
=
new
StringBuffer
()
.
append
(
ProjectEnum
.
TableAlias
.
A
.
getLabel
())
.
append
(
ProjectEnum
.
TProcessesDrilling
.
DEPTH
.
getLabel
());
...
...
@@ -92,6 +104,32 @@ public class TProcessesDrillingServiceImpl extends ServiceImpl<TProcessesDrillin
return
R
.
ok
(
new
TProcessesProductVo
<>(
data
,
depthSum
,
todayDepthSum
,
monthDepthSum
));
}
@Override
public
R
insertTProcessesDrilling
(
TProcessesDrillingQuery
query
)
{
log
.
info
(
JSON
.
toJSONString
(
query
));
//参数校验
Rcode
.
NOT_PARAM
.
assertNotNull
(
query
);
Rcode
.
NOT_PARAM
.
assertNotEmpty
(
query
.
getStopeName
());
Rcode
.
NOT_PARAM
.
assertNotEmpty
(
query
.
getStepName
());
Rcode
.
NOT_PARAM
.
assertNotEmpty
(
query
.
getBlastAreaName
());
Rcode
.
NOT_PARAM
.
assertNotEmpty
(
query
.
getHoleID
());
//uid自动生成 不能手动设置
if
(
query
.
getUid
()
!=
null
)
{
return
R
.
failed
(
"uid自动生成 不能手动设置"
);
}
//条件封装
TProcessesDrilling
tProcessesDrilling
=
new
TProcessesDrilling
();
BeanUtils
.
copyProperties
(
query
,
tProcessesDrilling
);
//增加
int
insert
=
baseMapper
.
insert
(
tProcessesDrilling
);
if
(
insert
>
0
)
{
return
R
.
ok
(
"增加成功"
);
}
else
{
log
.
info
(
JSON
.
toJSONString
(
tProcessesDrilling
));
return
R
.
failed
(
"增加失败"
);
}
}
@Override
public
R
updateByUid
(
TProcessesDrillingQuery
query
)
{
...
...
@@ -111,7 +149,7 @@ public class TProcessesDrillingServiceImpl extends ServiceImpl<TProcessesDrillin
//判断矿山爆区表是否存在数据 不存在不能修改
//query里不一定StopeName,StepName,BlastAreaName都有,需要从temp中拿query没有的,
// 所以将query有的更新到temp中,再把temp中的复制到tMineStopeQuery
BeanUtilsNewCopy
.
copyPropertiesIgnoreNull
(
query
,
temp
);
BeanUtilsNewCopy
.
copyPropertiesIgnoreNull
(
query
,
temp
);
TMineStopeQuery
tMineStopeQuery
=
new
TMineStopeQuery
();
BeanUtils
.
copyProperties
(
temp
,
tMineStopeQuery
);
R
volume
=
itMineStopeService
.
getByQuery
(
tMineStopeQuery
);
...
...
@@ -145,6 +183,20 @@ public class TProcessesDrillingServiceImpl extends ServiceImpl<TProcessesDrillin
}
@Override
public
R
getByUid
(
TProcessesDrillingQuery
query
)
{
log
.
info
(
JSON
.
toJSONString
(
query
));
//参数校验
Rcode
.
NOT_PARAM
.
assertNotNull
(
query
);
Rcode
.
NOT_PARAM
.
assertNotEmpty
(
query
.
getUid
());
//查询并且返回
QueryWrapper
<
TProcessesDrilling
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
ProjectEnum
.
TProcessesDrilling
.
UID
.
getLabel
(),
query
.
getUid
());
//查询并且返回
return
R
.
ok
(
baseMapper
.
getByUid
(
queryWrapper
));
}
/**
* 计算并设值 单孔爆破量(m3)=孔距*排距*台阶高度
*/
...
...
acquisition-business/target/classes/cn/wise/sc/acquisition/business/mapper/TProcessesBlastMapper.xml
View file @
f46bda85
...
...
@@ -18,13 +18,13 @@
a.Supervisor,
a.TechDepart,
a.Tabulator,
a.Depth,
a.Bz,
a.Tag
</sql>
<sql
id=
"TProcessesDiggingHoleColumns"
>
b.HoleBlastVolume,
b.depth ,
<!-- 设计孔深,将爆破工序里的depth去掉,用设计炮孔里的替代 -->
</sql>
<sql
id=
"TProcessesDrillingColumns"
>
...
...
acquisition-business/target/classes/cn/wise/sc/acquisition/business/mapper/TProcessesDrillingMapper.xml
View file @
f46bda85
...
...
@@ -20,7 +20,7 @@
a.StartTime,
a.EndTime,
a.WorkTime,
<!--
a.Depth,
a.RowSpace,
a.HoleSpace,
...
...
@@ -30,32 +30,32 @@
a.x,
a.y,
a.z,
a.HoleBlastVolume,
a.BlastDate,-->
-- a.HoleBlastVolume, /* 用炮孔设计的爆破量 */
a.BlastDate,
a.Operator,
a.Accepter,
a.Bz,
a.Tag
,
a.Tag
</sql>
<sql
id=
"TProcessesDiggingHoleColumns"
>
b.Depth
;
/*孔深(m)*/
b.RowSpace
;
/*排距(m)*/
b.HoleSpace
;
/*孔距(m)*/
b.Azimuth
;
/*方位角*/
b.Inclination
;
/*倾角*/
b.Aperture
;
/*孔径(m)*/
b.x;/*开孔坐标X*/
b.y;/*开孔坐标Y*/
b.z;/*开孔坐标Z*/
b.HoleBlastVolume
;
/* 单孔爆破量(m3)=孔距*排距*台阶高度*/
b.Depth
AS DesignDepth,
/*孔深(m)*/
b.RowSpace
AS DesignRowSpace,
/*排距(m)*/
b.HoleSpace
AS DesignHoleSpace,
/*孔距(m)*/
b.Azimuth
AS DesignAzimuth,
/*方位角*/
b.Inclination
AS DesignInclination,
/*倾角*/
b.Aperture
AS DesignAperture,
/*孔径(m)*/
--
b.x;/*开孔坐标X*/
--
b.y;/*开孔坐标Y*/
--
b.z;/*开孔坐标Z*/
b.HoleBlastVolume
,
/* 单孔爆破量(m3)=孔距*排距*台阶高度*/
</sql>
<sql
id=
"TProcessesBlastColumns"
>
c.BlastDate
</sql>
<sql
id=
"TProcessesBlastdesignHoleJoins"
>
left join T_Processes_BlastDesign_Hole b on a.HoleID = b.BlastHoleID
left join T_Processes_Blast c on a.HoleID = c.HoleID
...
...
@@ -74,7 +74,21 @@
</where>
</select>
<!-- 获取所有getByQuery列表 -->
<!-- 获取所有getPage列表 -->
<select
id=
"getByUid"
resultType=
"cn.wise.sc.acquisition.business.model.vo.TProcessesDrillingVo"
>
SELECT
<include
refid=
"TProcessesDiggingHoleColumns"
/>
<include
refid=
"TProcessesDrillingColumns"
/>
<include
refid=
"TProcessesBlastColumns"
/>
FROM T_Processes_Blast a
<include
refid=
"TProcessesBlastdesignHoleJoins"
/>
<where>
${ew.sqlSegment}
</where>
</select>
<!-- 根据条件求和某字段 -->
<select
id=
"getSumByCondition"
resultType=
"Double"
>
SELECT
sum(${condition})
...
...
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