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
65cf3d7f
Commit
65cf3d7f
authored
May 12, 2021
by
renchao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
生产工序业务修改
parent
ed51c540
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
115 additions
and
189 deletions
+115
-189
TProcessesBlast.java
.../wise/sc/acquisition/business/entity/TProcessesBlast.java
+1
-6
TProcessesBlastMapper.xml
...acquisition/business/mapper/xml/TProcessesBlastMapper.xml
+2
-2
TProcessesBlastdesignHoleMapper.xml
...n/business/mapper/xml/TProcessesBlastdesignHoleMapper.xml
+0
-7
TProcessesDrillingMapper.xml
...uisition/business/mapper/xml/TProcessesDrillingMapper.xml
+1
-7
TProcessesBlastdesignHoleQuery.java
.../business/model/query/TProcessesBlastdesignHoleQuery.java
+0
-5
TProcessesBlastdesignHoleVo.java
...sition/business/model/vo/TProcessesBlastdesignHoleVo.java
+0
-7
TProcessesBlastServiceImpl.java
...ion/business/service/impl/TProcessesBlastServiceImpl.java
+36
-55
TProcessesBlastdesignHoleServiceImpl.java
...ss/service/impl/TProcessesBlastdesignHoleServiceImpl.java
+21
-21
TProcessesDrillingServiceImpl.java
.../business/service/impl/TProcessesDrillingServiceImpl.java
+38
-56
DataStatisticsMapper.xml
...e/sc/acquisition/business/mapper/DataStatisticsMapper.xml
+13
-7
TProcessesBlastMapper.xml
.../sc/acquisition/business/mapper/TProcessesBlastMapper.xml
+2
-2
TProcessesBlastdesignHoleMapper.xml
...ition/business/mapper/TProcessesBlastdesignHoleMapper.xml
+0
-7
TProcessesDrillingMapper.xml
.../acquisition/business/mapper/TProcessesDrillingMapper.xml
+1
-7
No files found.
acquisition-business/src/main/java/cn/wise/sc/acquisition/business/entity/TProcessesBlast.java
View file @
65cf3d7f
...
@@ -55,12 +55,7 @@ public class TProcessesBlast implements Serializable {
...
@@ -55,12 +55,7 @@ public class TProcessesBlast implements Serializable {
*/
*/
@TableField
(
"HoleID"
)
@TableField
(
"HoleID"
)
private
String
HoleID
;
private
String
HoleID
;
/**
* 爆破日期
*/
@TableField
(
"BlastDate"
)
private
LocalDateTime
BlastDate
;
/**
/**
* 爆破人员
* 爆破人员
...
...
acquisition-business/src/main/java/cn/wise/sc/acquisition/business/mapper/xml/TProcessesBlastMapper.xml
View file @
65cf3d7f
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
a.Tag
a.Tag
</sql>
</sql>
<sql
id=
"TProcesses
DiggingHole
Columns"
>
<sql
id=
"TProcesses
Blastdesign
Columns"
>
b.HoleBlastVolume,
b.HoleBlastVolume,
b.depth AS DesignDepth,
<!-- 设计孔深,将爆破工序里的depth去掉,用设计炮孔里的替代 -->
b.depth AS DesignDepth,
<!-- 设计孔深,将爆破工序里的depth去掉,用设计炮孔里的替代 -->
</sql>
</sql>
...
@@ -56,7 +56,7 @@
...
@@ -56,7 +56,7 @@
<!-- 获取所有getByUid列表 -->
<!-- 获取所有getByUid列表 -->
<select
id=
"getByQuery"
resultType=
"cn.wise.sc.acquisition.business.model.vo.TProcessesBlastVo"
>
<select
id=
"getByQuery"
resultType=
"cn.wise.sc.acquisition.business.model.vo.TProcessesBlastVo"
>
SELECT
SELECT
<include
refid=
"TProcesses
DiggingHole
Columns"
/>
<include
refid=
"TProcesses
Blastdesign
Columns"
/>
<include
refid=
"TProcessesDrillingColumns"
/>
<include
refid=
"TProcessesDrillingColumns"
/>
<include
refid=
"TProcessesBlastColumns"
/>
<include
refid=
"TProcessesBlastColumns"
/>
FROM T_Processes_Blast a
FROM T_Processes_Blast a
...
...
acquisition-business/src/main/java/cn/wise/sc/acquisition/business/mapper/xml/TProcessesBlastdesignHoleMapper.xml
View file @
65cf3d7f
...
@@ -28,17 +28,12 @@
...
@@ -28,17 +28,12 @@
b.DesignDate,
b.DesignDate,
</sql>
</sql>
<sql
id=
"TProcessesBlastColumns"
>
c.BlastDate,
</sql>
<sql
id=
"TProcessesDrillingColumns"
>
<sql
id=
"TProcessesDrillingColumns"
>
d.DrillingDate,
d.DrillingDate,
</sql>
</sql>
<sql
id=
"TProcessesBlastdesignHoleJoins"
>
<sql
id=
"TProcessesBlastdesignHoleJoins"
>
left join T_Processes_BlastDesign_Volume b on a.StopeName=b.StopeName and a.StepName=b.StepName and a.BlastAreaName=b.BlastAreaName
left join T_Processes_BlastDesign_Volume b on a.StopeName=b.StopeName and a.StepName=b.StepName and a.BlastAreaName=b.BlastAreaName
left join T_Processes_Blast c on a.BlastHoleID = c.HoleID
left join T_Processes_Drilling d on a.BlastHoleID = d.HoleID
left join T_Processes_Drilling d on a.BlastHoleID = d.HoleID
</sql>
</sql>
...
@@ -58,7 +53,6 @@
...
@@ -58,7 +53,6 @@
a.z,
a.z,
a.StepHeight,
a.StepHeight,
b.BlastVolume,
b.BlastVolume,
c.BlastDate,
d.DrillingDate
d.DrillingDate
FROM T_Processes_BlastDesign_Hole a
FROM T_Processes_BlastDesign_Hole a
<include
refid=
"TProcessesBlastdesignHoleJoins"
/>
<include
refid=
"TProcessesBlastdesignHoleJoins"
/>
...
@@ -72,7 +66,6 @@
...
@@ -72,7 +66,6 @@
<select
id=
"getByQuery"
resultType=
"cn.wise.sc.acquisition.business.model.vo.TProcessesBlastdesignHoleVo"
>
<select
id=
"getByQuery"
resultType=
"cn.wise.sc.acquisition.business.model.vo.TProcessesBlastdesignHoleVo"
>
SELECT
SELECT
<include
refid=
"TProcessesBlastdesignVolumeColumns"
/>
<include
refid=
"TProcessesBlastdesignVolumeColumns"
/>
<include
refid=
"TProcessesBlastColumns"
/>
<include
refid=
"TProcessesBlastdesignHoleColumns"
/>
<include
refid=
"TProcessesBlastdesignHoleColumns"
/>
FROM T_Processes_BlastDesign_Hole a
FROM T_Processes_BlastDesign_Hole a
<include
refid=
"TProcessesBlastdesignHoleJoins"
/>
<include
refid=
"TProcessesBlastdesignHoleJoins"
/>
...
...
acquisition-business/src/main/java/cn/wise/sc/acquisition/business/mapper/xml/TProcessesDrillingMapper.xml
View file @
65cf3d7f
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
a.x,
a.x,
a.y,
a.y,
a.z,
a.z,
a.BlastDate,
a.Operator,
a.Operator,
a.Accepter,
a.Accepter,
a.Bz,
a.Bz,
...
@@ -48,10 +48,6 @@
...
@@ -48,10 +48,6 @@
</sql>
</sql>
<sql
id=
"TProcessesBlastColumns"
>
c.BlastDate,
</sql>
<sql
id=
"TProcessesBlastdesignVolumeColumns"
>
<sql
id=
"TProcessesBlastdesignVolumeColumns"
>
d.BlastVolume,
d.BlastVolume,
d.DesignDate,
d.DesignDate,
...
@@ -59,7 +55,6 @@
...
@@ -59,7 +55,6 @@
<sql
id=
"TProcessesDrillingJoins"
>
<sql
id=
"TProcessesDrillingJoins"
>
left join T_Processes_BlastDesign_Hole b on a.HoleID = b.BlastHoleID
left join T_Processes_BlastDesign_Hole b on a.HoleID = b.BlastHoleID
left join T_Processes_Blast c on a.HoleID = c.HoleID
left join T_Processes_BlastDesign_Volume d on a.StopeName=d.StopeName and a.StepName=d.StepName and a.BlastAreaName=d.BlastAreaName
left join T_Processes_BlastDesign_Volume d on a.StopeName=d.StopeName and a.StepName=d.StepName and a.BlastAreaName=d.BlastAreaName
</sql>
</sql>
...
@@ -88,7 +83,6 @@
...
@@ -88,7 +83,6 @@
<select
id=
"getByQuery"
resultType=
"cn.wise.sc.acquisition.business.model.vo.TProcessesDrillingVo"
>
<select
id=
"getByQuery"
resultType=
"cn.wise.sc.acquisition.business.model.vo.TProcessesDrillingVo"
>
SELECT
SELECT
<include
refid=
"TProcessesDiggingHoleColumns"
/>
<include
refid=
"TProcessesDiggingHoleColumns"
/>
<include
refid=
"TProcessesBlastColumns"
/>
<include
refid=
"TProcessesBlastdesignVolumeColumns"
/>
<include
refid=
"TProcessesBlastdesignVolumeColumns"
/>
<include
refid=
"TProcessesDrillingColumns"
/>
<include
refid=
"TProcessesDrillingColumns"
/>
FROM T_Processes_Drilling a
FROM T_Processes_Drilling a
...
...
acquisition-business/src/main/java/cn/wise/sc/acquisition/business/model/query/TProcessesBlastdesignHoleQuery.java
View file @
65cf3d7f
...
@@ -119,11 +119,6 @@ public class TProcessesBlastdesignHoleQuery extends TProcessesBlastdesignVolume
...
@@ -119,11 +119,6 @@ public class TProcessesBlastdesignHoleQuery extends TProcessesBlastdesignVolume
@ApiModelProperty
(
"穿孔日期"
)
@ApiModelProperty
(
"穿孔日期"
)
private
LocalDateTime
DrillingDate
;
private
LocalDateTime
DrillingDate
;
/**
* 爆破日期
*/
@ApiModelProperty
(
"爆破日期"
)
private
LocalDateTime
BlastDate
;
//以下为增加字段
//以下为增加字段
/**
/**
...
...
acquisition-business/src/main/java/cn/wise/sc/acquisition/business/model/vo/TProcessesBlastdesignHoleVo.java
View file @
65cf3d7f
...
@@ -125,8 +125,6 @@ public class TProcessesBlastdesignHoleVo {
...
@@ -125,8 +125,6 @@ public class TProcessesBlastdesignHoleVo {
private
LocalDateTime
DrillingDate
;
private
LocalDateTime
DrillingDate
;
//以下为增加字段
//以下为增加字段
/**
/**
* 设计爆区爆破量(m3)
* 设计爆区爆破量(m3)
...
@@ -140,9 +138,4 @@ public class TProcessesBlastdesignHoleVo {
...
@@ -140,9 +138,4 @@ public class TProcessesBlastdesignHoleVo {
@ApiModelProperty
(
"设计日期"
)
@ApiModelProperty
(
"设计日期"
)
private
LocalDateTime
DesignDate
;
private
LocalDateTime
DesignDate
;
/**
* 爆破日期
*/
@ApiModelProperty
(
"爆破日期"
)
private
LocalDateTime
BlastDate
;
}
}
acquisition-business/src/main/java/cn/wise/sc/acquisition/business/service/impl/TProcessesBlastServiceImpl.java
View file @
65cf3d7f
...
@@ -85,32 +85,11 @@ public class TProcessesBlastServiceImpl extends ServiceImpl<TProcessesBlastMappe
...
@@ -85,32 +85,11 @@ public class TProcessesBlastServiceImpl extends ServiceImpl<TProcessesBlastMappe
//判断数据是否存在
//判断数据是否存在
TProcessesBlast
temp
=
baseMapper
.
selectById
(
query
.
getUid
());
TProcessesBlast
temp
=
baseMapper
.
selectById
(
query
.
getUid
());
if
(
temp
==
null
)
{
if
(
temp
==
null
)
{
return
R
.
failed
(
"数据不存在:uid:"
+
query
.
getUid
());
return
R
.
failed
(
"
爆破设计中->
数据不存在:uid:"
+
query
.
getUid
());
}
}
//判断炮孔编号是否已经存在 如果不存在,需要修改其他关联工序的炮孔编号
//不能修改炮孔编号
if
(
StringUtils
.
isNotBlank
(
query
.
getHoleID
())
&&
!
temp
.
getHoleID
().
equals
(
query
.
getHoleID
()))
{
if
(
StringUtils
.
isNotBlank
(
query
.
getHoleID
()))
{
R
r
=
getByHoleId
(
query
);
return
R
.
failed
(
"爆破设计中->不能修改炮孔编号"
);
if
(
r
.
getData
()
!=
null
)
{
return
R
.
failed
(
"炮孔编号已存在: HoleID:"
+
query
.
getHoleID
());
}
//修改炮孔设计的炮孔编号
TProcessesBlastdesignHoleQuery
tProcessesBlastdesignHoleQuery
=
new
TProcessesBlastdesignHoleQuery
();
tProcessesBlastdesignHoleQuery
.
setBlastHoleID
(
temp
.
getHoleID
());
tProcessesBlastdesignHoleQuery
.
setNewBlastHoleID
(
query
.
getHoleID
());
R
r1
=
itProcessesBlastdesignHoleService
.
getByBlastHoleID
(
tProcessesBlastdesignHoleQuery
);
if
(
r1
.
getCode
()!=
0
){
log
.
error
(
"修改炮孔设计的炮孔编号失败"
,
JSON
.
toJSONString
(
tProcessesBlastdesignHoleQuery
));
return
R
.
failed
(
r1
.
getMsg
());
}
//修改穿孔工序的炮孔编号
TProcessesDrillingQuery
tProcessesDrillingQuery
=
new
TProcessesDrillingQuery
();
tProcessesDrillingQuery
.
setHoleID
(
temp
.
getHoleID
());
tProcessesDrillingQuery
.
setNewHoleID
(
query
.
getNewHoleID
());
R
r2
=
itProcessesDrillingService
.
getByHoleId
(
tProcessesDrillingQuery
);
if
(
r2
.
getCode
()!=
0
){
log
.
error
(
"修改穿孔工序的炮孔编号失败"
,
JSON
.
toJSONString
(
tProcessesDrillingQuery
));
return
R
.
failed
(
r2
.
getMsg
());
}
}
}
//条件封装
//条件封装
BeanUtilsNewCopy
.
copyPropertiesIgnoreNull
(
query
,
temp
);
BeanUtilsNewCopy
.
copyPropertiesIgnoreNull
(
query
,
temp
);
...
@@ -125,40 +104,42 @@ public class TProcessesBlastServiceImpl extends ServiceImpl<TProcessesBlastMappe
...
@@ -125,40 +104,42 @@ public class TProcessesBlastServiceImpl extends ServiceImpl<TProcessesBlastMappe
BeanUtils
.
copyProperties
(
temp
,
tMineStopeQuery
);
BeanUtils
.
copyProperties
(
temp
,
tMineStopeQuery
);
R
volume
=
itMineStopeService
.
getByQuery
(
tMineStopeQuery
);
R
volume
=
itMineStopeService
.
getByQuery
(
tMineStopeQuery
);
if
(
volume
.
getData
()
==
null
)
{
if
(
volume
.
getData
()
==
null
)
{
return
R
.
failed
(
"矿山爆区表数据不存在,StopeName,StepName,BlastAreaName"
);
return
R
.
failed
(
"
爆破设计中->
矿山爆区表数据不存在,StopeName,StepName,BlastAreaName"
);
}
}
}
}
//判断是否修改设计孔深
//判断是否修改设计孔深 和 单孔爆破量
if
(
query
.
getDesignDepth
()
!=
null
)
{
if
(
query
.
getDesignDepth
()
!=
null
||
query
.
getHoleBlastVolume
()
!=
null
)
{
TProcessesBlastdesignHoleQuery
holeQuery
=
new
TProcessesBlastdesignHoleQuery
();
return
R
.
failed
(
"爆破设计中->请到炮孔设计中修改设计孔深和单孔爆破量"
);
holeQuery
.
setBlastHoleID
(
temp
.
getHoleID
());
// TProcessesBlastdesignHoleQuery holeQuery = new TProcessesBlastdesignHoleQuery();
holeQuery
.
setDepth
(
query
.
getDepth
());
// holeQuery.setBlastHoleID(temp.getHoleID());
R
r
=
itProcessesBlastdesignHoleService
.
updateByBlastHoleID
(
holeQuery
);
// holeQuery.setDepth(query.getDepth());
if
(
r
.
getCode
()
!=
0
)
{
// R r = itProcessesBlastdesignHoleService.updateByBlastHoleID(holeQuery);
log
.
error
(
"修改炮孔设计失败:{}"
,
JSON
.
toJSONString
(
holeQuery
));
// if (r.getCode() != 0) {
return
R
.
failed
(
r
.
getMsg
());
// log.error("修改炮孔设计失败:{}", JSON.toJSONString(holeQuery));
}
// return R.failed(r.getMsg());
// }
}
}
//判断是否修改实测孔深
//判断是否修改实测孔深
if
(
query
.
getDepth
()
!=
null
)
{
if
(
query
.
getDepth
()
!=
null
)
{
TProcessesDrillingQuery
drillingQuery
=
new
TProcessesDrillingQuery
();
return
R
.
failed
(
"爆破设计中->请到穿孔工序中修改实测孔深"
);
drillingQuery
.
setHoleID
(
temp
.
getHoleID
());
// TProcessesDrillingQuery drillingQuery = new TProcessesDrillingQuery();
drillingQuery
.
setDepth
(
query
.
getDepth
());
// drillingQuery.setHoleID(temp.getHoleID());
R
r
=
itProcessesDrillingService
.
updateByHoleId
(
drillingQuery
);
// drillingQuery.setDepth(query.getDepth());
if
(
r
.
getCode
()
!=
0
)
{
// R r = itProcessesDrillingService.updateByHoleId(drillingQuery);
log
.
error
(
"修改穿孔工序失败:{}"
,
JSON
.
toJSONString
(
drillingQuery
));
// if (r.getCode() != 0) {
return
R
.
failed
(
r
.
getMsg
());
// log.error("修改穿孔工序失败:{}", JSON.toJSONString(drillingQuery));
}
// return R.failed(r.getMsg());
// }
}
}
QueryWrapper
<
TProcessesBlast
>
queryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
TProcessesBlast
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
StringUtils
.
isNotBlank
(
query
.
getUid
()),
ProjectEnum
.
TProcessesBlast
.
UID
.
getLabel
(),
query
.
getUid
());
queryWrapper
.
eq
(
StringUtils
.
isNotBlank
(
query
.
getUid
()),
ProjectEnum
.
TProcessesBlast
.
UID
.
getLabel
(),
query
.
getUid
());
//修改
//修改
int
update
=
baseMapper
.
update
(
temp
,
queryWrapper
);
int
update
=
baseMapper
.
update
(
temp
,
queryWrapper
);
if
(
update
>
0
)
{
if
(
update
>
0
)
{
return
R
.
ok
(
"修改成功"
);
return
R
.
ok
(
"
爆破设计中->
修改成功"
);
}
else
{
}
else
{
log
.
error
(
"修改失败:{}"
,
JSON
.
toJSONString
(
temp
));
log
.
error
(
"
爆破设计中->
修改失败:{}"
,
JSON
.
toJSONString
(
temp
));
return
R
.
failed
(
"修改失败"
);
return
R
.
failed
(
"
爆破设计中->
修改失败"
);
}
}
}
}
...
@@ -173,16 +154,16 @@ public class TProcessesBlastServiceImpl extends ServiceImpl<TProcessesBlastMappe
...
@@ -173,16 +154,16 @@ public class TProcessesBlastServiceImpl extends ServiceImpl<TProcessesBlastMappe
queryWrapper
.
eq
(
ProjectEnum
.
TProcessesBlast
.
HOLE_ID
.
getLabel
(),
query
.
getHoleID
());
queryWrapper
.
eq
(
ProjectEnum
.
TProcessesBlast
.
HOLE_ID
.
getLabel
(),
query
.
getHoleID
());
TProcessesBlast
temp
=
baseMapper
.
selectOne
(
queryWrapper
);
TProcessesBlast
temp
=
baseMapper
.
selectOne
(
queryWrapper
);
if
(
temp
==
null
)
{
if
(
temp
==
null
)
{
return
R
.
failed
(
"数据不存在:HOLE_ID: "
+
query
.
getHoleID
());
return
R
.
failed
(
"
爆破设计中->爆破设计中
数据不存在:HOLE_ID: "
+
query
.
getHoleID
());
}
}
//判断是否将炮孔编号修改为新的炮孔编号 如果是,直接修改,不能调用基础方法,避免循环
//判断是否将炮孔编号修改为新的炮孔编号 如果是,直接修改,不能调用基础方法,避免循环
if
(
StringUtils
.
isNotBlank
(
query
.
getHoleID
()))
{
if
(
StringUtils
.
isNotBlank
(
query
.
get
New
HoleID
()))
{
temp
.
setHoleID
(
query
.
getNewHoleID
());
temp
.
setHoleID
(
query
.
getNewHoleID
());
int
update
=
baseMapper
.
updateById
(
temp
);
int
update
=
baseMapper
.
updateById
(
temp
);
if
(
update
>
0
)
{
if
(
update
>
0
)
{
return
R
.
ok
(
"修改成功"
);
return
R
.
ok
(
"
爆破设计中->
修改成功"
);
}
else
{
}
else
{
return
R
.
failed
(
"修改失败"
);
return
R
.
failed
(
"
爆破设计中->
修改失败"
);
}
}
}
}
//条件封装
//条件封装
...
@@ -202,13 +183,13 @@ public class TProcessesBlastServiceImpl extends ServiceImpl<TProcessesBlastMappe
...
@@ -202,13 +183,13 @@ public class TProcessesBlastServiceImpl extends ServiceImpl<TProcessesBlastMappe
Rcode
.
NOT_PARAM
.
assertNotEmpty
(
query
.
getHoleID
());
Rcode
.
NOT_PARAM
.
assertNotEmpty
(
query
.
getHoleID
());
//uid自动生成 不能手动设置
//uid自动生成 不能手动设置
if
(
query
.
getUid
()
!=
null
)
{
if
(
query
.
getUid
()
!=
null
)
{
return
R
.
failed
(
"uid自动生成 不能手动设置"
);
return
R
.
failed
(
"
爆破设计中->
uid自动生成 不能手动设置"
);
}
}
//判断炮孔编号是否已经存在
//判断炮孔编号是否已经存在
if
(
StringUtils
.
isNotBlank
(
query
.
getHoleID
()))
{
if
(
StringUtils
.
isNotBlank
(
query
.
getHoleID
()))
{
R
r
=
getByHoleId
(
query
);
R
r
=
getByHoleId
(
query
);
if
(
r
.
getData
()
!=
null
)
{
if
(
r
.
getData
()
!=
null
)
{
return
R
.
failed
(
"炮孔编号已存在: HoleID:"
+
query
.
getHoleID
());
return
R
.
failed
(
"
爆破设计中->
炮孔编号已存在: HoleID:"
+
query
.
getHoleID
());
}
}
}
}
//条件封装
//条件封装
...
@@ -217,10 +198,10 @@ public class TProcessesBlastServiceImpl extends ServiceImpl<TProcessesBlastMappe
...
@@ -217,10 +198,10 @@ public class TProcessesBlastServiceImpl extends ServiceImpl<TProcessesBlastMappe
//增加
//增加
int
insert
=
baseMapper
.
insert
(
tProcessesDrilling
);
int
insert
=
baseMapper
.
insert
(
tProcessesDrilling
);
if
(
insert
>
0
)
{
if
(
insert
>
0
)
{
return
R
.
ok
(
"增加成功"
);
return
R
.
ok
(
"
爆破设计中->
增加成功"
);
}
else
{
}
else
{
log
.
info
(
JSON
.
toJSONString
(
tProcessesDrilling
));
log
.
info
(
JSON
.
toJSONString
(
tProcessesDrilling
));
return
R
.
failed
(
"增加失败"
);
return
R
.
failed
(
"
爆破设计中->
增加失败"
);
}
}
}
}
...
...
acquisition-business/src/main/java/cn/wise/sc/acquisition/business/service/impl/TProcessesBlastdesignHoleServiceImpl.java
View file @
65cf3d7f
...
@@ -86,13 +86,13 @@ public class TProcessesBlastdesignHoleServiceImpl extends ServiceImpl<TProcesses
...
@@ -86,13 +86,13 @@ public class TProcessesBlastdesignHoleServiceImpl extends ServiceImpl<TProcesses
//判断数据是否存在
//判断数据是否存在
TProcessesBlastdesignHole
temp
=
baseMapper
.
selectById
(
query
.
getUid
());
TProcessesBlastdesignHole
temp
=
baseMapper
.
selectById
(
query
.
getUid
());
if
(
temp
==
null
)
{
if
(
temp
==
null
)
{
return
R
.
failed
(
"数据不存在:uid:"
+
query
.
getUid
());
return
R
.
failed
(
"
炮孔设计中->
数据不存在:uid:"
+
query
.
getUid
());
}
}
//判断炮孔编号是否存在
//判断炮孔编号是否存在
if
(
StringUtils
.
isNotBlank
(
query
.
getBlastHoleID
())
&&
!
temp
.
getBlastHoleID
().
equals
(
query
.
getBlastHoleID
()))
{
if
(
StringUtils
.
isNotBlank
(
query
.
getBlastHoleID
())
&&
!
temp
.
getBlastHoleID
().
equals
(
query
.
getBlastHoleID
()))
{
R
r
=
getByBlastHoleID
(
query
);
R
r
=
getByBlastHoleID
(
query
);
if
(
r
.
getData
()
!=
null
)
{
if
(
r
.
getData
()
!=
null
)
{
return
R
.
failed
(
"炮孔编号已存在: BlastHoleID:"
+
query
.
getBlastHoleID
());
return
R
.
failed
(
"炮孔
设计中->炮孔
编号已存在: BlastHoleID:"
+
query
.
getBlastHoleID
());
}
}
//修改穿孔工序炮孔编号
//修改穿孔工序炮孔编号
TProcessesDrillingQuery
tProcessesDrillingQuery
=
new
TProcessesDrillingQuery
();
TProcessesDrillingQuery
tProcessesDrillingQuery
=
new
TProcessesDrillingQuery
();
...
@@ -100,7 +100,7 @@ public class TProcessesBlastdesignHoleServiceImpl extends ServiceImpl<TProcesses
...
@@ -100,7 +100,7 @@ public class TProcessesBlastdesignHoleServiceImpl extends ServiceImpl<TProcesses
tProcessesDrillingQuery
.
setNewHoleID
(
query
.
getBlastHoleID
());
tProcessesDrillingQuery
.
setNewHoleID
(
query
.
getBlastHoleID
());
R
r1
=
itProcessesDrillingService
.
updateByHoleId
(
tProcessesDrillingQuery
);
R
r1
=
itProcessesDrillingService
.
updateByHoleId
(
tProcessesDrillingQuery
);
if
(
r1
.
getCode
()
!=
0
)
{
if
(
r1
.
getCode
()
!=
0
)
{
log
.
error
(
"修改穿孔工序炮孔编号失败:{}"
,
JSON
.
toJSONString
(
tProcessesDrillingQuery
));
log
.
error
(
"
炮孔设计中->
修改穿孔工序炮孔编号失败:{}"
,
JSON
.
toJSONString
(
tProcessesDrillingQuery
));
return
R
.
failed
(
r1
.
getMsg
());
return
R
.
failed
(
r1
.
getMsg
());
}
}
//修改爆破设计炮孔编号
//修改爆破设计炮孔编号
...
@@ -109,7 +109,7 @@ public class TProcessesBlastdesignHoleServiceImpl extends ServiceImpl<TProcesses
...
@@ -109,7 +109,7 @@ public class TProcessesBlastdesignHoleServiceImpl extends ServiceImpl<TProcesses
tProcessesBlastQuery
.
setNewHoleID
(
query
.
getBlastHoleID
());
tProcessesBlastQuery
.
setNewHoleID
(
query
.
getBlastHoleID
());
R
r2
=
itProcessesBlastService
.
updateByHoleId
(
tProcessesBlastQuery
);
R
r2
=
itProcessesBlastService
.
updateByHoleId
(
tProcessesBlastQuery
);
if
(
r2
.
getCode
()
!=
0
)
{
if
(
r2
.
getCode
()
!=
0
)
{
log
.
error
(
"修改爆破设计炮孔编号失败:{}"
,
JSON
.
toJSONString
(
tProcessesBlastQuery
));
log
.
error
(
"
炮孔设计中->
修改爆破设计炮孔编号失败:{}"
,
JSON
.
toJSONString
(
tProcessesBlastQuery
));
return
R
.
failed
(
r2
.
getMsg
());
return
R
.
failed
(
r2
.
getMsg
());
}
}
}
}
...
@@ -125,7 +125,7 @@ public class TProcessesBlastdesignHoleServiceImpl extends ServiceImpl<TProcesses
...
@@ -125,7 +125,7 @@ public class TProcessesBlastdesignHoleServiceImpl extends ServiceImpl<TProcesses
BeanUtils
.
copyProperties
(
temp
,
tProcessesBlastdesignVolumeQuery
);
BeanUtils
.
copyProperties
(
temp
,
tProcessesBlastdesignVolumeQuery
);
R
volume
=
itProcessesBlastdesignVolumeService
.
getByQuery
(
tProcessesBlastdesignVolumeQuery
);
R
volume
=
itProcessesBlastdesignVolumeService
.
getByQuery
(
tProcessesBlastdesignVolumeQuery
);
if
(
volume
.
getData
()
==
null
)
{
if
(
volume
.
getData
()
==
null
)
{
return
R
.
failed
(
"设计爆区爆破量表数据不存在,StopeName,StepName,BlastAreaName"
);
return
R
.
failed
(
"
炮孔设计中->
设计爆区爆破量表数据不存在,StopeName,StepName,BlastAreaName"
);
}
}
}
}
//条件封装
//条件封装
...
@@ -142,7 +142,7 @@ public class TProcessesBlastdesignHoleServiceImpl extends ServiceImpl<TProcesses
...
@@ -142,7 +142,7 @@ public class TProcessesBlastdesignHoleServiceImpl extends ServiceImpl<TProcesses
tProcessesBlastdesignVolumeQuery
.
setBlastVolume
(
query
.
getBlastVolume
());
tProcessesBlastdesignVolumeQuery
.
setBlastVolume
(
query
.
getBlastVolume
());
R
r
=
itProcessesBlastdesignVolumeService
.
updateByQuery
(
tProcessesBlastdesignVolumeQuery
);
R
r
=
itProcessesBlastdesignVolumeService
.
updateByQuery
(
tProcessesBlastdesignVolumeQuery
);
if
(
r
.
getCode
()
!=
0
)
{
if
(
r
.
getCode
()
!=
0
)
{
log
.
info
(
"
修改设计爆区爆破量失败:"
+
JSON
.
toJSONString
(
tProcessesBlastdesignVolumeQuery
));
log
.
error
(
"炮孔设计中->
修改设计爆区爆破量失败:"
+
JSON
.
toJSONString
(
tProcessesBlastdesignVolumeQuery
));
return
R
.
failed
(
r
.
getMsg
());
return
R
.
failed
(
r
.
getMsg
());
}
}
}
}
...
@@ -165,10 +165,10 @@ public class TProcessesBlastdesignHoleServiceImpl extends ServiceImpl<TProcesses
...
@@ -165,10 +165,10 @@ public class TProcessesBlastdesignHoleServiceImpl extends ServiceImpl<TProcesses
//修改
//修改
int
update
=
baseMapper
.
update
(
temp
,
queryWrapper
);
int
update
=
baseMapper
.
update
(
temp
,
queryWrapper
);
if
(
update
>
0
)
{
if
(
update
>
0
)
{
return
R
.
ok
(
"修改成功"
);
return
R
.
ok
(
"
炮孔设计中->
修改成功"
);
}
else
{
}
else
{
log
.
info
(
JSON
.
toJSONString
(
temp
));
log
.
info
(
JSON
.
toJSONString
(
temp
));
return
R
.
failed
(
"修改失败"
);
return
R
.
failed
(
"
炮孔设计中->
修改失败"
);
}
}
}
}
...
@@ -185,16 +185,16 @@ public class TProcessesBlastdesignHoleServiceImpl extends ServiceImpl<TProcesses
...
@@ -185,16 +185,16 @@ public class TProcessesBlastdesignHoleServiceImpl extends ServiceImpl<TProcesses
TProcessesBlastdesignHole
temp
=
baseMapper
.
selectOne
(
queryWrapper
);
TProcessesBlastdesignHole
temp
=
baseMapper
.
selectOne
(
queryWrapper
);
if
(
temp
==
null
)
{
if
(
temp
==
null
)
{
return
R
.
failed
(
"数据不存在:BLAST_HOLE_ID:"
+
query
.
getBlastHoleID
());
return
R
.
failed
(
"
炮孔设计中->
数据不存在:BLAST_HOLE_ID:"
+
query
.
getBlastHoleID
());
}
}
//判断是否将炮孔编号修改为新的炮孔编号 如果是,直接修改,不能调用基础方法,避免循环
//判断是否将炮孔编号修改为新的炮孔编号 如果是,直接修改,不能调用基础方法,避免循环
if
(
StringUtils
.
isNotBlank
(
query
.
getNewBlastHoleID
()))
{
if
(
StringUtils
.
isNotBlank
(
query
.
getNewBlastHoleID
()))
{
temp
.
setBlastHoleID
(
query
.
getNewBlastHoleID
());
temp
.
setBlastHoleID
(
query
.
getNewBlastHoleID
());
int
update
=
baseMapper
.
updateById
(
temp
);
int
update
=
baseMapper
.
updateById
(
temp
);
if
(
update
>
0
)
{
if
(
update
>
0
)
{
return
R
.
ok
(
"修改成功"
);
return
R
.
ok
(
"
炮孔设计中->
修改成功"
);
}
else
{
}
else
{
return
R
.
failed
(
"修改失败"
);
return
R
.
failed
(
"
炮孔设计中->
修改失败"
);
}
}
}
}
...
@@ -212,14 +212,14 @@ public class TProcessesBlastdesignHoleServiceImpl extends ServiceImpl<TProcesses
...
@@ -212,14 +212,14 @@ public class TProcessesBlastdesignHoleServiceImpl extends ServiceImpl<TProcesses
Rcode
.
NOT_PARAM
.
assertNotEmpty
(
query
.
getUid
());
Rcode
.
NOT_PARAM
.
assertNotEmpty
(
query
.
getUid
());
TProcessesBlastdesignHole
temp
=
baseMapper
.
selectById
(
query
.
getUid
());
TProcessesBlastdesignHole
temp
=
baseMapper
.
selectById
(
query
.
getUid
());
if
(
temp
==
null
)
{
if
(
temp
==
null
)
{
return
R
.
failed
(
"数据不存在,uid:"
+
query
.
getUid
());
return
R
.
failed
(
"
炮孔设计中->
数据不存在,uid:"
+
query
.
getUid
());
}
}
//删除
//删除
int
delete
=
baseMapper
.
delete
(
new
QueryWrapper
<
TProcessesBlastdesignHole
>().
eq
(
ProjectEnum
.
TProcessesBlastdesignHole
.
UID
.
getLabel
(),
query
.
getUid
()));
int
delete
=
baseMapper
.
delete
(
new
QueryWrapper
<
TProcessesBlastdesignHole
>().
eq
(
ProjectEnum
.
TProcessesBlastdesignHole
.
UID
.
getLabel
(),
query
.
getUid
()));
if
(
delete
>
0
)
{
if
(
delete
>
0
)
{
return
R
.
ok
(
"删除成功"
);
return
R
.
ok
(
"
炮孔设计中->
删除成功"
);
}
else
{
}
else
{
return
R
.
failed
(
"删除失败"
);
return
R
.
failed
(
"
炮孔设计中->
删除失败"
);
}
}
}
}
...
@@ -247,13 +247,13 @@ public class TProcessesBlastdesignHoleServiceImpl extends ServiceImpl<TProcesses
...
@@ -247,13 +247,13 @@ public class TProcessesBlastdesignHoleServiceImpl extends ServiceImpl<TProcesses
Rcode
.
NOT_PARAM
.
assertNotNull
(
query
.
getDrillingDate
());
Rcode
.
NOT_PARAM
.
assertNotNull
(
query
.
getDrillingDate
());
//uid自动生成 不能手动设置
//uid自动生成 不能手动设置
if
(
query
.
getUid
()
!=
null
)
{
if
(
query
.
getUid
()
!=
null
)
{
return
R
.
failed
(
"uid自动生成 不能手动设置"
);
return
R
.
failed
(
"
炮孔设计中->
uid自动生成 不能手动设置"
);
}
}
//判断炮孔编号是否存在
//判断炮孔编号是否存在
if
(
StringUtils
.
isNotBlank
(
query
.
getBlastHoleID
()))
{
if
(
StringUtils
.
isNotBlank
(
query
.
getBlastHoleID
()))
{
R
r
=
getByBlastHoleID
(
query
);
R
r
=
getByBlastHoleID
(
query
);
if
(
r
.
getData
()
!=
null
)
{
if
(
r
.
getData
()
!=
null
)
{
return
R
.
failed
(
"炮孔编号已存在: BlastHoleID:"
+
query
.
getBlastHoleID
());
return
R
.
failed
(
"炮孔
设计中->炮孔
编号已存在: BlastHoleID:"
+
query
.
getBlastHoleID
());
}
}
}
}
//查看设计爆区爆破量是否存在数据
//查看设计爆区爆破量是否存在数据
...
@@ -261,7 +261,7 @@ public class TProcessesBlastdesignHoleServiceImpl extends ServiceImpl<TProcesses
...
@@ -261,7 +261,7 @@ public class TProcessesBlastdesignHoleServiceImpl extends ServiceImpl<TProcesses
BeanUtils
.
copyProperties
(
query
,
tProcessesBlastdesignVolumeQuery
);
BeanUtils
.
copyProperties
(
query
,
tProcessesBlastdesignVolumeQuery
);
R
volume
=
itProcessesBlastdesignVolumeService
.
getByQuery
(
tProcessesBlastdesignVolumeQuery
);
R
volume
=
itProcessesBlastdesignVolumeService
.
getByQuery
(
tProcessesBlastdesignVolumeQuery
);
if
(
volume
.
getData
()
==
null
)
{
if
(
volume
.
getData
()
==
null
)
{
return
R
.
failed
(
"设计爆区爆破量表数据不存在,StopeName,StepName,BlastAreaName"
);
return
R
.
failed
(
"
炮孔设计中->
设计爆区爆破量表数据不存在,StopeName,StepName,BlastAreaName"
);
}
}
//条件封装
//条件封装
...
@@ -282,7 +282,7 @@ public class TProcessesBlastdesignHoleServiceImpl extends ServiceImpl<TProcesses
...
@@ -282,7 +282,7 @@ public class TProcessesBlastdesignHoleServiceImpl extends ServiceImpl<TProcesses
tProcessesDrillingQuery
.
setTag
(
DateUtil
.
timeToStr
(
LocalDateTime
.
now
(),
DateUtil
.
FORMAT_TO_SECOND
));
tProcessesDrillingQuery
.
setTag
(
DateUtil
.
timeToStr
(
LocalDateTime
.
now
(),
DateUtil
.
FORMAT_TO_SECOND
));
R
r1
=
itProcessesDrillingService
.
insertTProcessesDrilling
(
tProcessesDrillingQuery
);
R
r1
=
itProcessesDrillingService
.
insertTProcessesDrilling
(
tProcessesDrillingQuery
);
if
(
r1
.
getCode
()
!=
0
)
{
if
(
r1
.
getCode
()
!=
0
)
{
log
.
error
(
"增加一条穿孔工序失败:"
+
JSON
.
toJSONString
(
tProcessesDrillingQuery
));
log
.
error
(
"
炮孔设计中->
增加一条穿孔工序失败:"
+
JSON
.
toJSONString
(
tProcessesDrillingQuery
));
return
R
.
failed
(
r1
.
getMsg
());
return
R
.
failed
(
r1
.
getMsg
());
}
}
...
@@ -295,13 +295,13 @@ public class TProcessesBlastdesignHoleServiceImpl extends ServiceImpl<TProcesses
...
@@ -295,13 +295,13 @@ public class TProcessesBlastdesignHoleServiceImpl extends ServiceImpl<TProcesses
tProcessesBlastQuery
.
setTag
(
DateUtil
.
timeToStr
(
LocalDateTime
.
now
(),
DateUtil
.
FORMAT_TO_SECOND
));
tProcessesBlastQuery
.
setTag
(
DateUtil
.
timeToStr
(
LocalDateTime
.
now
(),
DateUtil
.
FORMAT_TO_SECOND
));
R
r2
=
itProcessesBlastService
.
insertTProcessesBlast
(
tProcessesBlastQuery
);
R
r2
=
itProcessesBlastService
.
insertTProcessesBlast
(
tProcessesBlastQuery
);
if
(
r2
.
getCode
()
!=
0
)
{
if
(
r2
.
getCode
()
!=
0
)
{
log
.
error
(
"增加一条爆破工序失败:"
+
JSON
.
toJSONString
(
tProcessesDrillingQuery
));
log
.
error
(
"
炮孔设计中->
增加一条爆破工序失败:"
+
JSON
.
toJSONString
(
tProcessesDrillingQuery
));
return
R
.
failed
(
r1
.
getMsg
());
return
R
.
failed
(
r1
.
getMsg
());
}
}
return
R
.
ok
(
"增加成功"
);
return
R
.
ok
(
"
炮孔设计中->
增加成功"
);
}
else
{
}
else
{
log
.
info
(
JSON
.
toJSONString
(
tProcessesBlastdesignHole
));
log
.
info
(
JSON
.
toJSONString
(
tProcessesBlastdesignHole
));
return
R
.
failed
(
"增加失败"
);
return
R
.
failed
(
"
炮孔设计中->
增加失败"
);
}
}
}
}
...
...
acquisition-business/src/main/java/cn/wise/sc/acquisition/business/service/impl/TProcessesDrillingServiceImpl.java
View file @
65cf3d7f
...
@@ -110,13 +110,13 @@ public class TProcessesDrillingServiceImpl extends ServiceImpl<TProcessesDrillin
...
@@ -110,13 +110,13 @@ public class TProcessesDrillingServiceImpl extends ServiceImpl<TProcessesDrillin
Rcode
.
NOT_PARAM
.
assertNotEmpty
(
query
.
getHoleID
());
Rcode
.
NOT_PARAM
.
assertNotEmpty
(
query
.
getHoleID
());
//uid自动生成 不能手动设置
//uid自动生成 不能手动设置
if
(
query
.
getUid
()
!=
null
)
{
if
(
query
.
getUid
()
!=
null
)
{
return
R
.
failed
(
"uid自动生成 不能手动设置"
);
return
R
.
failed
(
"
穿孔工序中->
uid自动生成 不能手动设置"
);
}
}
//判断炮孔编号是否已经存在
//判断炮孔编号是否已经存在
if
(
StringUtils
.
isNotBlank
(
query
.
getHoleID
()))
{
if
(
StringUtils
.
isNotBlank
(
query
.
getHoleID
()))
{
R
r
=
getByHoleId
(
query
);
R
r
=
getByHoleId
(
query
);
if
(
r
.
getData
()
!=
null
)
{
if
(
r
.
getData
()
!=
null
)
{
return
R
.
failed
(
"炮孔编号已存在: HoleID:"
+
query
.
getHoleID
());
return
R
.
failed
(
"
穿孔工序中->
炮孔编号已存在: HoleID:"
+
query
.
getHoleID
());
}
}
}
}
//条件封装
//条件封装
...
@@ -125,10 +125,10 @@ public class TProcessesDrillingServiceImpl extends ServiceImpl<TProcessesDrillin
...
@@ -125,10 +125,10 @@ public class TProcessesDrillingServiceImpl extends ServiceImpl<TProcessesDrillin
//增加
//增加
int
insert
=
baseMapper
.
insert
(
tProcessesDrilling
);
int
insert
=
baseMapper
.
insert
(
tProcessesDrilling
);
if
(
insert
>
0
)
{
if
(
insert
>
0
)
{
return
R
.
ok
(
"增加成功"
);
return
R
.
ok
(
"
穿孔工序中->
增加成功"
);
}
else
{
}
else
{
log
.
info
(
JSON
.
toJSONString
(
tProcessesDrilling
));
log
.
info
(
JSON
.
toJSONString
(
tProcessesDrilling
));
return
R
.
failed
(
"增加失败"
);
return
R
.
failed
(
"
穿孔工序中->
增加失败"
);
}
}
}
}
...
@@ -142,33 +142,11 @@ public class TProcessesDrillingServiceImpl extends ServiceImpl<TProcessesDrillin
...
@@ -142,33 +142,11 @@ public class TProcessesDrillingServiceImpl extends ServiceImpl<TProcessesDrillin
//判断数据是否存在
//判断数据是否存在
TProcessesDrilling
temp
=
baseMapper
.
selectById
(
query
.
getUid
());
TProcessesDrilling
temp
=
baseMapper
.
selectById
(
query
.
getUid
());
if
(
temp
==
null
)
{
if
(
temp
==
null
)
{
return
R
.
failed
(
"数据不存在:uid: "
+
query
.
getUid
());
return
R
.
failed
(
"
穿孔工序中->
数据不存在:uid: "
+
query
.
getUid
());
}
}
//判断炮孔编号是否已经存在 如果不存在需要修改关联工序的炮孔编号
//不能修改炮孔编号
if
(
StringUtils
.
isNotBlank
(
query
.
getHoleID
())
if
(
StringUtils
.
isNotBlank
(
query
.
getHoleID
()))
{
&&
!
temp
.
getHoleID
().
equals
(
query
.
getHoleID
()))
{
return
R
.
failed
(
"穿孔工序中->不能修改炮孔编号"
);
R
r
=
getByHoleId
(
query
);
if
(
r
.
getData
()
!=
null
)
{
return
R
.
failed
(
"炮孔编号已存在: HoleID:"
+
query
.
getHoleID
());
}
//修改炮孔设计的炮孔编号
TProcessesBlastdesignHoleQuery
tProcessesBlastdesignHoleQuery
=
new
TProcessesBlastdesignHoleQuery
();
tProcessesBlastdesignHoleQuery
.
setBlastHoleID
(
temp
.
getHoleID
());
tProcessesBlastdesignHoleQuery
.
setNewBlastHoleID
(
query
.
getHoleID
());
R
r1
=
itProcessesBlastdesignHoleService
.
updateByBlastHoleID
(
tProcessesBlastdesignHoleQuery
);
if
(
r1
.
getCode
()
!=
0
)
{
log
.
error
(
"修改炮孔设计的炮孔编号失败:{}"
,
JSON
.
toJSONString
(
tProcessesBlastdesignHoleQuery
));
return
R
.
failed
(
r1
.
getMsg
());
}
//修改爆破工序的炮孔编号
TProcessesBlastQuery
tProcessesBlastQuery
=
new
TProcessesBlastQuery
();
tProcessesBlastQuery
.
setHoleID
(
temp
.
getHoleID
());
tProcessesBlastQuery
.
setNewHoleID
(
query
.
getHoleID
());
R
r2
=
itProcessesBlastService
.
updateByHoleId
(
tProcessesBlastQuery
);
if
(
r2
.
getCode
()
!=
0
)
{
log
.
error
(
"修改爆破工序的炮孔编号失败:{}"
,
JSON
.
toJSONString
(
tProcessesBlastQuery
));
return
R
.
failed
(
r2
.
getMsg
());
}
}
}
//条件封装
//条件封装
BeanUtilsNewCopy
.
copyPropertiesIgnoreNull
(
query
,
temp
);
BeanUtilsNewCopy
.
copyPropertiesIgnoreNull
(
query
,
temp
);
...
@@ -183,7 +161,7 @@ public class TProcessesDrillingServiceImpl extends ServiceImpl<TProcessesDrillin
...
@@ -183,7 +161,7 @@ public class TProcessesDrillingServiceImpl extends ServiceImpl<TProcessesDrillin
BeanUtils
.
copyProperties
(
temp
,
tMineStopeQuery
);
BeanUtils
.
copyProperties
(
temp
,
tMineStopeQuery
);
R
volume
=
itMineStopeService
.
getByQuery
(
tMineStopeQuery
);
R
volume
=
itMineStopeService
.
getByQuery
(
tMineStopeQuery
);
if
(
volume
.
getData
()
==
null
)
{
if
(
volume
.
getData
()
==
null
)
{
return
R
.
failed
(
"矿山爆区表数据不存在,StopeName,StepName,BlastAreaName"
);
return
R
.
failed
(
"
穿孔工序中->
矿山爆区表数据不存在,StopeName,StepName,BlastAreaName"
);
}
}
}
}
//判断是否修改设计爆区爆破量 设计爆区爆破量(m3) TAT
//判断是否修改设计爆区爆破量 设计爆区爆破量(m3) TAT
...
@@ -195,7 +173,7 @@ public class TProcessesDrillingServiceImpl extends ServiceImpl<TProcessesDrillin
...
@@ -195,7 +173,7 @@ public class TProcessesDrillingServiceImpl extends ServiceImpl<TProcessesDrillin
tProcessesBlastdesignVolumeQuery
.
setBlastVolume
(
query
.
getBlastVolume
());
tProcessesBlastdesignVolumeQuery
.
setBlastVolume
(
query
.
getBlastVolume
());
R
r
=
itProcessesBlastdesignVolumeService
.
updateByQuery
(
tProcessesBlastdesignVolumeQuery
);
R
r
=
itProcessesBlastdesignVolumeService
.
updateByQuery
(
tProcessesBlastdesignVolumeQuery
);
if
(
r
.
getCode
()
!=
0
)
{
if
(
r
.
getCode
()
!=
0
)
{
log
.
info
(
"修改设计爆区爆破量失败:{}"
,
JSON
.
toJSONString
(
tProcessesBlastdesignVolumeQuery
));
log
.
info
(
"
穿孔工序中->
修改设计爆区爆破量失败:{}"
,
JSON
.
toJSONString
(
tProcessesBlastdesignVolumeQuery
));
return
R
.
failed
(
r
.
getMsg
());
return
R
.
failed
(
r
.
getMsg
());
}
}
}
}
...
@@ -207,20 +185,22 @@ public class TProcessesDrillingServiceImpl extends ServiceImpl<TProcessesDrillin
...
@@ -207,20 +185,22 @@ public class TProcessesDrillingServiceImpl extends ServiceImpl<TProcessesDrillin
||
query
.
getDesignInclination
()
!=
null
||
query
.
getDesignInclination
()
!=
null
||
query
.
getDesignAperture
()
!=
null
||
query
.
getDesignAperture
()
!=
null
||
query
.
getStepHeight
()
!=
null
)
{
||
query
.
getStepHeight
()
!=
null
)
{
TProcessesBlastdesignHoleQuery
holeQuery
=
new
TProcessesBlastdesignHoleQuery
();
return
R
.
failed
(
"穿孔工序中->不能在穿孔工序中修改炮孔设计字段信息:DesignDepth,DesignRowSpace,DesignHoleSpace,DesignAzimuth,DesignInclination,DesignAperture,StepHeight"
);
holeQuery
.
setBlastHoleID
(
temp
.
getHoleID
());
// TProcessesBlastdesignHoleQuery holeQuery = new TProcessesBlastdesignHoleQuery();
holeQuery
.
setDepth
(
query
.
getDesignDepth
());
// holeQuery.setBlastHoleID(temp.getHoleID());
holeQuery
.
setRowSpace
(
query
.
getDesignRowSpace
());
// holeQuery.setDepth(query.getDesignDepth());
holeQuery
.
setHoleSpace
(
query
.
getDesignHoleSpace
());
// holeQuery.setRowSpace(query.getDesignRowSpace());
holeQuery
.
setAzimuth
(
query
.
getAzimuth
());
// holeQuery.setHoleSpace(query.getDesignHoleSpace());
holeQuery
.
setInclination
(
query
.
getDesignInclination
());
// holeQuery.setAzimuth(query.getAzimuth());
holeQuery
.
setAperture
(
query
.
getDesignAperture
());
// holeQuery.setInclination(query.getDesignInclination());
holeQuery
.
setStepHeight
(
query
.
getStepHeight
());
// holeQuery.setAperture(query.getDesignAperture());
R
r
=
itProcessesBlastdesignHoleService
.
updateByBlastHoleID
(
holeQuery
);
// holeQuery.setStepHeight(query.getStepHeight());
if
(
r
.
getCode
()
!=
0
)
{
// R r = itProcessesBlastdesignHoleService.updateByBlastHoleID(holeQuery);
log
.
error
(
"修改炮孔设计失败:{}"
,
JSON
.
toJSONString
(
holeQuery
));
// if (r.getCode() != 0) {
return
R
.
failed
(
r
.
getMsg
());
// log.error("修改炮孔设计失败:{}", JSON.toJSONString(holeQuery));
}
// return R.failed(r.getMsg());
// }
}
}
//判断是否需要重新计算爆破量
//判断是否需要重新计算爆破量
...
@@ -236,7 +216,7 @@ public class TProcessesDrillingServiceImpl extends ServiceImpl<TProcessesDrillin
...
@@ -236,7 +216,7 @@ public class TProcessesDrillingServiceImpl extends ServiceImpl<TProcessesDrillin
Double
volume
=
calculateHoleBlastVolume
(
temp
.
getHoleSpace
(),
temp
.
getRowSpace
(),
data
.
getStepHeight
());
Double
volume
=
calculateHoleBlastVolume
(
temp
.
getHoleSpace
(),
temp
.
getRowSpace
(),
data
.
getStepHeight
());
temp
.
setHoleBlastVolume
(
volume
);
temp
.
setHoleBlastVolume
(
volume
);
}
else
{
}
else
{
log
.
info
(
"计算单孔爆破量时,获取炮孔设计为空,炮孔编号:{}"
,
temp
.
getHoleID
());
log
.
info
(
"
穿孔工序中->
计算单孔爆破量时,获取炮孔设计为空,炮孔编号:{}"
,
temp
.
getHoleID
());
}
}
}
}
...
@@ -245,14 +225,16 @@ public class TProcessesDrillingServiceImpl extends ServiceImpl<TProcessesDrillin
...
@@ -245,14 +225,16 @@ public class TProcessesDrillingServiceImpl extends ServiceImpl<TProcessesDrillin
//修改
//修改
int
update
=
baseMapper
.
update
(
temp
,
queryWrapper
);
int
update
=
baseMapper
.
update
(
temp
,
queryWrapper
);
if
(
update
>
0
)
{
if
(
update
>
0
)
{
return
R
.
ok
(
"修改成功"
);
return
R
.
ok
(
"
穿孔工序中->
修改成功"
);
}
else
{
}
else
{
log
.
info
(
JSON
.
toJSONString
(
temp
));
log
.
info
(
JSON
.
toJSONString
(
temp
));
return
R
.
failed
(
"修改失败"
);
return
R
.
failed
(
"
穿孔工序中->
修改失败"
);
}
}
}
}
@Override
@Override
public
R
updateByHoleId
(
TProcessesDrillingQuery
query
)
{
public
R
updateByHoleId
(
TProcessesDrillingQuery
query
)
{
log
.
info
(
JSON
.
toJSONString
(
query
));
log
.
info
(
JSON
.
toJSONString
(
query
));
...
@@ -264,16 +246,16 @@ public class TProcessesDrillingServiceImpl extends ServiceImpl<TProcessesDrillin
...
@@ -264,16 +246,16 @@ public class TProcessesDrillingServiceImpl extends ServiceImpl<TProcessesDrillin
queryWrapper
.
eq
(
ProjectEnum
.
TProcessesDrilling
.
HOLE_ID
.
getLabel
(),
query
.
getHoleID
());
queryWrapper
.
eq
(
ProjectEnum
.
TProcessesDrilling
.
HOLE_ID
.
getLabel
(),
query
.
getHoleID
());
TProcessesDrilling
temp
=
baseMapper
.
selectOne
(
queryWrapper
);
TProcessesDrilling
temp
=
baseMapper
.
selectOne
(
queryWrapper
);
if
(
temp
==
null
)
{
if
(
temp
==
null
)
{
return
R
.
failed
(
"数据不存在:HOLE_ID: "
+
query
.
getHoleID
());
return
R
.
failed
(
"
穿孔工序中->
数据不存在:HOLE_ID: "
+
query
.
getHoleID
());
}
}
//判断是否将炮孔编号修改为新的炮孔编号 如果是,直接修改,不能调用基础方法,避免循环
//判断是否将炮孔编号修改为新的炮孔编号 如果是,直接修改,不能调用基础方法,避免循环
if
(
StringUtils
.
isNotBlank
(
query
.
getHoleID
()))
{
if
(
StringUtils
.
isNotBlank
(
query
.
get
New
HoleID
()))
{
temp
.
setHoleID
(
query
.
getNewHoleID
());
temp
.
setHoleID
(
query
.
getNewHoleID
());
int
update
=
baseMapper
.
updateById
(
temp
);
int
update
=
baseMapper
.
updateById
(
temp
);
if
(
update
>
0
)
{
if
(
update
>
0
)
{
return
R
.
ok
(
"修改成功"
);
return
R
.
ok
(
"
穿孔工序中->
修改成功"
);
}
else
{
}
else
{
return
R
.
failed
(
"修改失败"
);
return
R
.
failed
(
"
穿孔工序中->
修改失败"
);
}
}
}
}
//条件封装
//条件封装
...
@@ -294,17 +276,17 @@ public class TProcessesDrillingServiceImpl extends ServiceImpl<TProcessesDrillin
...
@@ -294,17 +276,17 @@ public class TProcessesDrillingServiceImpl extends ServiceImpl<TProcessesDrillin
queryWrapper
.
eq
(
ProjectEnum
.
TProcessesBlast
.
HOLE_ID
.
getLabel
(),
query
.
getHoleID
());
queryWrapper
.
eq
(
ProjectEnum
.
TProcessesBlast
.
HOLE_ID
.
getLabel
(),
query
.
getHoleID
());
TProcessesDrilling
temp
=
baseMapper
.
selectOne
(
queryWrapper
);
TProcessesDrilling
temp
=
baseMapper
.
selectOne
(
queryWrapper
);
if
(
temp
==
null
)
{
if
(
temp
==
null
)
{
return
R
.
failed
(
"数据不存在:HOLE_ID: "
+
query
.
getHoleID
());
return
R
.
failed
(
"
穿孔工序中->
数据不存在:HOLE_ID: "
+
query
.
getHoleID
());
}
}
//计算设计区爆破量
//计算设计区爆破量
Double
volume
=
calculateHoleBlastVolume
(
temp
.
getHoleSpace
(),
temp
.
getRowSpace
(),
query
.
getStepHeight
());
Double
volume
=
calculateHoleBlastVolume
(
temp
.
getHoleSpace
(),
temp
.
getRowSpace
(),
query
.
getStepHeight
());
temp
.
setHoleBlastVolume
(
volume
);
temp
.
setHoleBlastVolume
(
volume
);
int
update
=
baseMapper
.
updateById
(
temp
);
int
update
=
baseMapper
.
updateById
(
temp
);
if
(
update
>
0
)
{
if
(
update
>
0
)
{
return
R
.
ok
(
"修改成功"
);
return
R
.
ok
(
"
穿孔工序中->
修改成功"
);
}
else
{
}
else
{
log
.
info
(
JSON
.
toJSONString
(
temp
));
log
.
info
(
JSON
.
toJSONString
(
temp
));
return
R
.
failed
(
"修改失败"
);
return
R
.
failed
(
"
穿孔工序中->
修改失败"
);
}
}
}
}
...
...
acquisition-business/target/classes/cn/wise/sc/acquisition/business/mapper/DataStatisticsMapper.xml
View file @
65cf3d7f
...
@@ -3,9 +3,12 @@
...
@@ -3,9 +3,12 @@
<mapper
namespace=
"cn.wise.sc.acquisition.business.mapper.DataStatisticsMapper"
>
<mapper
namespace=
"cn.wise.sc.acquisition.business.mapper.DataStatisticsMapper"
>
<select
id=
"countByPhoto"
resultType=
"cn.wise.sc.acquisition.business.model.vo.DataStatisticsVo"
>
<select
id=
"countByPhoto"
resultType=
"cn.wise.sc.acquisition.business.model.vo.DataStatisticsVo"
>
SELECT
tw.Rq
as name, SUM(tw.Jz) as value
SELECT
Convert(varchar(10),tw.Rq,120)
as name, SUM(tw.Jz) as value
FROM T_Weight tw
FROM T_Weight tw
where 1=1
where 1=1
<if
test=
"params.TruckID != null and params.TruckID != ''"
>
and tw.TruckID = #{params.TruckID}
</if>
<if
test=
"params.cycle == 1 "
>
<if
test=
"params.cycle == 1 "
>
and datediff(week, tw.Rq,getdate())=0
and datediff(week, tw.Rq,getdate())=0
</if>
</if>
...
@@ -19,23 +22,26 @@
...
@@ -19,23 +22,26 @@
and datediff(year, tw.Rq,getdate())=0
and datediff(year, tw.Rq,getdate())=0
</if>
</if>
<if
test=
"params.startDate != null and params.startDate != ''"
>
<if
test=
"params.startDate != null and params.startDate != ''"
>
and
tw.Rq >
>
=
#{params.startDate}
and
Convert(varchar(10),tw.Rq,120)
<![CDATA[ >= ]]>
#{params.startDate}
</if>
</if>
<if
test=
"params.endDate != null and params.endDate != ''"
>
<if
test=
"params.endDate != null and params.endDate != ''"
>
and
tw.Rq >
<
=
#{params.endDate}
and
Convert(varchar(10),tw.Rq,120)
<![CDATA[ <= ]]>
#{params.endDate}
</if>
</if>
<if
test=
"params.startDate == null and params.endDate == null"
>
<if
test=
"params.startDate == null and params.endDate == null"
>
and datediff(week, tw.Rq,getdate())=0
and datediff(week, tw.Rq,getdate())=0
</if>
</if>
group by
tw.Rq
group by
Convert(varchar(10),tw.Rq,120)
</select>
</select>
<select
id=
"countByTable"
resultType=
"cn.wise.sc.acquisition.business.model.vo.DataStatisticsTableVo"
>
<select
id=
"countByTable"
resultType=
"cn.wise.sc.acquisition.business.model.vo.DataStatisticsTableVo"
>
SELECT tw.Uid,
tw.Rq,tw.Sj
,tw.TruckID,'发货单位' as clientName,tpt.WorkType,tw.Mz,tw.Pz,tw.Jz
SELECT tw.Uid,
Convert(varchar(19),tw.Rq,120)as Rq
,tw.TruckID,'发货单位' as clientName,tpt.WorkType,tw.Mz,tw.Pz,tw.Jz
FROM T_Weight tw
FROM T_Weight tw
left join T_Processes_Truck tpt on tpt.TruckID = tw.TruckID
left join T_Processes_Truck tpt on tpt.TruckID = tw.TruckID
where 1=1
where 1=1
<if
test=
"params.TruckID != null and params.TruckID != ''"
>
and tw.TruckID = #{params.TruckID}
</if>
<if
test=
"params.cycle == 1 "
>
<if
test=
"params.cycle == 1 "
>
and datediff(week, tw.Rq,getdate())=0
and datediff(week, tw.Rq,getdate())=0
</if>
</if>
...
@@ -49,10 +55,10 @@
...
@@ -49,10 +55,10 @@
and datediff(year, tw.Rq,getdate())=0
and datediff(year, tw.Rq,getdate())=0
</if>
</if>
<if
test=
"params.startDate != null and params.startDate != ''"
>
<if
test=
"params.startDate != null and params.startDate != ''"
>
and
tw.Rq >
>
=
#{params.startDate}
and
Convert(varchar(10),tw.Rq,120)
<![CDATA[ >= ]]>
#{params.startDate}
</if>
</if>
<if
test=
"params.endDate != null and params.endDate != ''"
>
<if
test=
"params.endDate != null and params.endDate != ''"
>
and
tw.Rq >
<
=
#{params.endDate}
and
Convert(varchar(10),tw.Rq,120)
<![CDATA[ <= ]]>
#{params.endDate}
</if>
</if>
<if
test=
"params.startDate == null and params.endDate == null"
>
<if
test=
"params.startDate == null and params.endDate == null"
>
and datediff(week, tw.Rq,getdate())=0
and datediff(week, tw.Rq,getdate())=0
...
...
acquisition-business/target/classes/cn/wise/sc/acquisition/business/mapper/TProcessesBlastMapper.xml
View file @
65cf3d7f
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
a.Tag
a.Tag
</sql>
</sql>
<sql
id=
"TProcesses
DiggingHole
Columns"
>
<sql
id=
"TProcesses
Blastdesign
Columns"
>
b.HoleBlastVolume,
b.HoleBlastVolume,
b.depth AS DesignDepth,
<!-- 设计孔深,将爆破工序里的depth去掉,用设计炮孔里的替代 -->
b.depth AS DesignDepth,
<!-- 设计孔深,将爆破工序里的depth去掉,用设计炮孔里的替代 -->
</sql>
</sql>
...
@@ -56,7 +56,7 @@
...
@@ -56,7 +56,7 @@
<!-- 获取所有getByUid列表 -->
<!-- 获取所有getByUid列表 -->
<select
id=
"getByQuery"
resultType=
"cn.wise.sc.acquisition.business.model.vo.TProcessesBlastVo"
>
<select
id=
"getByQuery"
resultType=
"cn.wise.sc.acquisition.business.model.vo.TProcessesBlastVo"
>
SELECT
SELECT
<include
refid=
"TProcesses
DiggingHole
Columns"
/>
<include
refid=
"TProcesses
Blastdesign
Columns"
/>
<include
refid=
"TProcessesDrillingColumns"
/>
<include
refid=
"TProcessesDrillingColumns"
/>
<include
refid=
"TProcessesBlastColumns"
/>
<include
refid=
"TProcessesBlastColumns"
/>
FROM T_Processes_Blast a
FROM T_Processes_Blast a
...
...
acquisition-business/target/classes/cn/wise/sc/acquisition/business/mapper/TProcessesBlastdesignHoleMapper.xml
View file @
65cf3d7f
...
@@ -28,17 +28,12 @@
...
@@ -28,17 +28,12 @@
b.DesignDate,
b.DesignDate,
</sql>
</sql>
<sql
id=
"TProcessesBlastColumns"
>
c.BlastDate,
</sql>
<sql
id=
"TProcessesDrillingColumns"
>
<sql
id=
"TProcessesDrillingColumns"
>
d.DrillingDate,
d.DrillingDate,
</sql>
</sql>
<sql
id=
"TProcessesBlastdesignHoleJoins"
>
<sql
id=
"TProcessesBlastdesignHoleJoins"
>
left join T_Processes_BlastDesign_Volume b on a.StopeName=b.StopeName and a.StepName=b.StepName and a.BlastAreaName=b.BlastAreaName
left join T_Processes_BlastDesign_Volume b on a.StopeName=b.StopeName and a.StepName=b.StepName and a.BlastAreaName=b.BlastAreaName
left join T_Processes_Blast c on a.BlastHoleID = c.HoleID
left join T_Processes_Drilling d on a.BlastHoleID = d.HoleID
left join T_Processes_Drilling d on a.BlastHoleID = d.HoleID
</sql>
</sql>
...
@@ -58,7 +53,6 @@
...
@@ -58,7 +53,6 @@
a.z,
a.z,
a.StepHeight,
a.StepHeight,
b.BlastVolume,
b.BlastVolume,
c.BlastDate,
d.DrillingDate
d.DrillingDate
FROM T_Processes_BlastDesign_Hole a
FROM T_Processes_BlastDesign_Hole a
<include
refid=
"TProcessesBlastdesignHoleJoins"
/>
<include
refid=
"TProcessesBlastdesignHoleJoins"
/>
...
@@ -72,7 +66,6 @@
...
@@ -72,7 +66,6 @@
<select
id=
"getByQuery"
resultType=
"cn.wise.sc.acquisition.business.model.vo.TProcessesBlastdesignHoleVo"
>
<select
id=
"getByQuery"
resultType=
"cn.wise.sc.acquisition.business.model.vo.TProcessesBlastdesignHoleVo"
>
SELECT
SELECT
<include
refid=
"TProcessesBlastdesignVolumeColumns"
/>
<include
refid=
"TProcessesBlastdesignVolumeColumns"
/>
<include
refid=
"TProcessesBlastColumns"
/>
<include
refid=
"TProcessesBlastdesignHoleColumns"
/>
<include
refid=
"TProcessesBlastdesignHoleColumns"
/>
FROM T_Processes_BlastDesign_Hole a
FROM T_Processes_BlastDesign_Hole a
<include
refid=
"TProcessesBlastdesignHoleJoins"
/>
<include
refid=
"TProcessesBlastdesignHoleJoins"
/>
...
...
acquisition-business/target/classes/cn/wise/sc/acquisition/business/mapper/TProcessesDrillingMapper.xml
View file @
65cf3d7f
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
a.x,
a.x,
a.y,
a.y,
a.z,
a.z,
a.BlastDate,
a.Operator,
a.Operator,
a.Accepter,
a.Accepter,
a.Bz,
a.Bz,
...
@@ -48,10 +48,6 @@
...
@@ -48,10 +48,6 @@
</sql>
</sql>
<sql
id=
"TProcessesBlastColumns"
>
c.BlastDate,
</sql>
<sql
id=
"TProcessesBlastdesignVolumeColumns"
>
<sql
id=
"TProcessesBlastdesignVolumeColumns"
>
d.BlastVolume,
d.BlastVolume,
d.DesignDate,
d.DesignDate,
...
@@ -59,7 +55,6 @@
...
@@ -59,7 +55,6 @@
<sql
id=
"TProcessesDrillingJoins"
>
<sql
id=
"TProcessesDrillingJoins"
>
left join T_Processes_BlastDesign_Hole b on a.HoleID = b.BlastHoleID
left join T_Processes_BlastDesign_Hole b on a.HoleID = b.BlastHoleID
left join T_Processes_Blast c on a.HoleID = c.HoleID
left join T_Processes_BlastDesign_Volume d on a.StopeName=d.StopeName and a.StepName=d.StepName and a.BlastAreaName=d.BlastAreaName
left join T_Processes_BlastDesign_Volume d on a.StopeName=d.StopeName and a.StepName=d.StepName and a.BlastAreaName=d.BlastAreaName
</sql>
</sql>
...
@@ -88,7 +83,6 @@
...
@@ -88,7 +83,6 @@
<select
id=
"getByQuery"
resultType=
"cn.wise.sc.acquisition.business.model.vo.TProcessesDrillingVo"
>
<select
id=
"getByQuery"
resultType=
"cn.wise.sc.acquisition.business.model.vo.TProcessesDrillingVo"
>
SELECT
SELECT
<include
refid=
"TProcessesDiggingHoleColumns"
/>
<include
refid=
"TProcessesDiggingHoleColumns"
/>
<include
refid=
"TProcessesBlastColumns"
/>
<include
refid=
"TProcessesBlastdesignVolumeColumns"
/>
<include
refid=
"TProcessesBlastdesignVolumeColumns"
/>
<include
refid=
"TProcessesDrillingColumns"
/>
<include
refid=
"TProcessesDrillingColumns"
/>
FROM T_Processes_Drilling a
FROM T_Processes_Drilling a
...
...
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