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
Expand all
Show 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
...
...
@@ -56,11 +56,6 @@ public class TProcessesBlast implements Serializable {
@TableField
(
"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 @@
a.Tag
</sql>
<sql
id=
"TProcesses
DiggingHole
Columns"
>
<sql
id=
"TProcesses
Blastdesign
Columns"
>
b.HoleBlastVolume,
b.depth AS DesignDepth,
<!-- 设计孔深,将爆破工序里的depth去掉,用设计炮孔里的替代 -->
</sql>
...
...
@@ -56,7 +56,7 @@
<!-- 获取所有getByUid列表 -->
<select
id=
"getByQuery"
resultType=
"cn.wise.sc.acquisition.business.model.vo.TProcessesBlastVo"
>
SELECT
<include
refid=
"TProcesses
DiggingHole
Columns"
/>
<include
refid=
"TProcesses
Blastdesign
Columns"
/>
<include
refid=
"TProcessesDrillingColumns"
/>
<include
refid=
"TProcessesBlastColumns"
/>
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 @@
b.DesignDate,
</sql>
<sql
id=
"TProcessesBlastColumns"
>
c.BlastDate,
</sql>
<sql
id=
"TProcessesDrillingColumns"
>
d.DrillingDate,
</sql>
<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_Blast c on a.BlastHoleID = c.HoleID
left join T_Processes_Drilling d on a.BlastHoleID = d.HoleID
</sql>
...
...
@@ -58,7 +53,6 @@
a.z,
a.StepHeight,
b.BlastVolume,
c.BlastDate,
d.DrillingDate
FROM T_Processes_BlastDesign_Hole a
<include
refid=
"TProcessesBlastdesignHoleJoins"
/>
...
...
@@ -72,7 +66,6 @@
<select
id=
"getByQuery"
resultType=
"cn.wise.sc.acquisition.business.model.vo.TProcessesBlastdesignHoleVo"
>
SELECT
<include
refid=
"TProcessesBlastdesignVolumeColumns"
/>
<include
refid=
"TProcessesBlastColumns"
/>
<include
refid=
"TProcessesBlastdesignHoleColumns"
/>
FROM T_Processes_BlastDesign_Hole a
<include
refid=
"TProcessesBlastdesignHoleJoins"
/>
...
...
acquisition-business/src/main/java/cn/wise/sc/acquisition/business/mapper/xml/TProcessesDrillingMapper.xml
View file @
65cf3d7f
...
...
@@ -30,7 +30,7 @@
a.x,
a.y,
a.z,
a.BlastDate,
a.Operator,
a.Accepter,
a.Bz,
...
...
@@ -48,10 +48,6 @@
</sql>
<sql
id=
"TProcessesBlastColumns"
>
c.BlastDate,
</sql>
<sql
id=
"TProcessesBlastdesignVolumeColumns"
>
d.BlastVolume,
d.DesignDate,
...
...
@@ -59,7 +55,6 @@
<sql
id=
"TProcessesDrillingJoins"
>
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
</sql>
...
...
@@ -88,7 +83,6 @@
<select
id=
"getByQuery"
resultType=
"cn.wise.sc.acquisition.business.model.vo.TProcessesDrillingVo"
>
SELECT
<include
refid=
"TProcessesDiggingHoleColumns"
/>
<include
refid=
"TProcessesBlastColumns"
/>
<include
refid=
"TProcessesBlastdesignVolumeColumns"
/>
<include
refid=
"TProcessesDrillingColumns"
/>
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
@ApiModelProperty
(
"穿孔日期"
)
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 {
private
LocalDateTime
DrillingDate
;
//以下为增加字段
/**
* 设计爆区爆破量(m3)
...
...
@@ -140,9 +138,4 @@ public class TProcessesBlastdesignHoleVo {
@ApiModelProperty
(
"设计日期"
)
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
//判断数据是否存在
TProcessesBlast
temp
=
baseMapper
.
selectById
(
query
.
getUid
());
if
(
temp
==
null
)
{
return
R
.
failed
(
"数据不存在:uid:"
+
query
.
getUid
());
}
//判断炮孔编号是否已经存在 如果不存在,需要修改其他关联工序的炮孔编号
if
(
StringUtils
.
isNotBlank
(
query
.
getHoleID
())
&&
!
temp
.
getHoleID
().
equals
(
query
.
getHoleID
()))
{
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
.
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
());
return
R
.
failed
(
"爆破设计中->数据不存在:uid:"
+
query
.
getUid
());
}
//不能修改炮孔编号
if
(
StringUtils
.
isNotBlank
(
query
.
getHoleID
()))
{
return
R
.
failed
(
"爆破设计中->不能修改炮孔编号"
);
}
//条件封装
BeanUtilsNewCopy
.
copyPropertiesIgnoreNull
(
query
,
temp
);
...
...
@@ -125,40 +104,42 @@ public class TProcessesBlastServiceImpl extends ServiceImpl<TProcessesBlastMappe
BeanUtils
.
copyProperties
(
temp
,
tMineStopeQuery
);
R
volume
=
itMineStopeService
.
getByQuery
(
tMineStopeQuery
);
if
(
volume
.
getData
()
==
null
)
{
return
R
.
failed
(
"矿山爆区表数据不存在,StopeName,StepName,BlastAreaName"
);
return
R
.
failed
(
"
爆破设计中->
矿山爆区表数据不存在,StopeName,StepName,BlastAreaName"
);
}
}
//判断是否修改设计孔深
if
(
query
.
getDesignDepth
()
!=
null
)
{
TProcessesBlastdesignHoleQuery
holeQuery
=
new
TProcessesBlastdesignHoleQuery
();
holeQuery
.
setBlastHoleID
(
temp
.
getHoleID
());
holeQuery
.
setDepth
(
query
.
getDepth
());
R
r
=
itProcessesBlastdesignHoleService
.
updateByBlastHoleID
(
holeQuery
);
if
(
r
.
getCode
()
!=
0
)
{
log
.
error
(
"修改炮孔设计失败:{}"
,
JSON
.
toJSONString
(
holeQuery
));
return
R
.
failed
(
r
.
getMsg
());
}
//判断是否修改设计孔深 和 单孔爆破量
if
(
query
.
getDesignDepth
()
!=
null
||
query
.
getHoleBlastVolume
()
!=
null
)
{
return
R
.
failed
(
"爆破设计中->请到炮孔设计中修改设计孔深和单孔爆破量"
);
// TProcessesBlastdesignHoleQuery holeQuery = new TProcessesBlastdesignHoleQuery();
// holeQuery.setBlastHoleID(temp.getHoleID());
// holeQuery.setDepth(query.getDepth());
// R r = itProcessesBlastdesignHoleService.updateByBlastHoleID(holeQuery);
// if (r.getCode() != 0) {
// log.error("修改炮孔设计失败:{}", JSON.toJSONString(holeQuery));
// return R.failed(r.getMsg());
// }
}
//判断是否修改实测孔深
if
(
query
.
getDepth
()
!=
null
)
{
TProcessesDrillingQuery
drillingQuery
=
new
TProcessesDrillingQuery
();
drillingQuery
.
setHoleID
(
temp
.
getHoleID
());
drillingQuery
.
setDepth
(
query
.
getDepth
());
R
r
=
itProcessesDrillingService
.
updateByHoleId
(
drillingQuery
);
if
(
r
.
getCode
()
!=
0
)
{
log
.
error
(
"修改穿孔工序失败:{}"
,
JSON
.
toJSONString
(
drillingQuery
));
return
R
.
failed
(
r
.
getMsg
());
}
return
R
.
failed
(
"爆破设计中->请到穿孔工序中修改实测孔深"
);
// TProcessesDrillingQuery drillingQuery = new TProcessesDrillingQuery();
// drillingQuery.setHoleID(temp.getHoleID());
// drillingQuery.setDepth(query.getDepth());
// R r = itProcessesDrillingService.updateByHoleId(drillingQuery);
// if (r.getCode() != 0) {
// log.error("修改穿孔工序失败:{}", JSON.toJSONString(drillingQuery));
// return R.failed(r.getMsg());
// }
}
QueryWrapper
<
TProcessesBlast
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
StringUtils
.
isNotBlank
(
query
.
getUid
()),
ProjectEnum
.
TProcessesBlast
.
UID
.
getLabel
(),
query
.
getUid
());
//修改
int
update
=
baseMapper
.
update
(
temp
,
queryWrapper
);
if
(
update
>
0
)
{
return
R
.
ok
(
"修改成功"
);
return
R
.
ok
(
"
爆破设计中->
修改成功"
);
}
else
{
log
.
error
(
"修改失败:{}"
,
JSON
.
toJSONString
(
temp
));
return
R
.
failed
(
"修改失败"
);
log
.
error
(
"
爆破设计中->
修改失败:{}"
,
JSON
.
toJSONString
(
temp
));
return
R
.
failed
(
"
爆破设计中->
修改失败"
);
}
}
...
...
@@ -173,16 +154,16 @@ public class TProcessesBlastServiceImpl extends ServiceImpl<TProcessesBlastMappe
queryWrapper
.
eq
(
ProjectEnum
.
TProcessesBlast
.
HOLE_ID
.
getLabel
(),
query
.
getHoleID
());
TProcessesBlast
temp
=
baseMapper
.
selectOne
(
queryWrapper
);
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
());
int
update
=
baseMapper
.
updateById
(
temp
);
if
(
update
>
0
)
{
return
R
.
ok
(
"修改成功"
);
return
R
.
ok
(
"
爆破设计中->
修改成功"
);
}
else
{
return
R
.
failed
(
"修改失败"
);
return
R
.
failed
(
"
爆破设计中->
修改失败"
);
}
}
//条件封装
...
...
@@ -202,13 +183,13 @@ public class TProcessesBlastServiceImpl extends ServiceImpl<TProcessesBlastMappe
Rcode
.
NOT_PARAM
.
assertNotEmpty
(
query
.
getHoleID
());
//uid自动生成 不能手动设置
if
(
query
.
getUid
()
!=
null
)
{
return
R
.
failed
(
"uid自动生成 不能手动设置"
);
return
R
.
failed
(
"
爆破设计中->
uid自动生成 不能手动设置"
);
}
//判断炮孔编号是否已经存在
if
(
StringUtils
.
isNotBlank
(
query
.
getHoleID
()))
{
R
r
=
getByHoleId
(
query
);
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
//增加
int
insert
=
baseMapper
.
insert
(
tProcessesDrilling
);
if
(
insert
>
0
)
{
return
R
.
ok
(
"增加成功"
);
return
R
.
ok
(
"
爆破设计中->
增加成功"
);
}
else
{
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
//判断数据是否存在
TProcessesBlastdesignHole
temp
=
baseMapper
.
selectById
(
query
.
getUid
());
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
()))
{
R
r
=
getByBlastHoleID
(
query
);
if
(
r
.
getData
()
!=
null
)
{
return
R
.
failed
(
"炮孔编号已存在: BlastHoleID:"
+
query
.
getBlastHoleID
());
return
R
.
failed
(
"炮孔
设计中->炮孔
编号已存在: BlastHoleID:"
+
query
.
getBlastHoleID
());
}
//修改穿孔工序炮孔编号
TProcessesDrillingQuery
tProcessesDrillingQuery
=
new
TProcessesDrillingQuery
();
...
...
@@ -100,7 +100,7 @@ public class TProcessesBlastdesignHoleServiceImpl extends ServiceImpl<TProcesses
tProcessesDrillingQuery
.
setNewHoleID
(
query
.
getBlastHoleID
());
R
r1
=
itProcessesDrillingService
.
updateByHoleId
(
tProcessesDrillingQuery
);
if
(
r1
.
getCode
()
!=
0
)
{
log
.
error
(
"修改穿孔工序炮孔编号失败:{}"
,
JSON
.
toJSONString
(
tProcessesDrillingQuery
));
log
.
error
(
"
炮孔设计中->
修改穿孔工序炮孔编号失败:{}"
,
JSON
.
toJSONString
(
tProcessesDrillingQuery
));
return
R
.
failed
(
r1
.
getMsg
());
}
//修改爆破设计炮孔编号
...
...
@@ -109,7 +109,7 @@ public class TProcessesBlastdesignHoleServiceImpl extends ServiceImpl<TProcesses
tProcessesBlastQuery
.
setNewHoleID
(
query
.
getBlastHoleID
());
R
r2
=
itProcessesBlastService
.
updateByHoleId
(
tProcessesBlastQuery
);
if
(
r2
.
getCode
()
!=
0
)
{
log
.
error
(
"修改爆破设计炮孔编号失败:{}"
,
JSON
.
toJSONString
(
tProcessesBlastQuery
));
log
.
error
(
"
炮孔设计中->
修改爆破设计炮孔编号失败:{}"
,
JSON
.
toJSONString
(
tProcessesBlastQuery
));
return
R
.
failed
(
r2
.
getMsg
());
}
}
...
...
@@ -125,7 +125,7 @@ public class TProcessesBlastdesignHoleServiceImpl extends ServiceImpl<TProcesses
BeanUtils
.
copyProperties
(
temp
,
tProcessesBlastdesignVolumeQuery
);
R
volume
=
itProcessesBlastdesignVolumeService
.
getByQuery
(
tProcessesBlastdesignVolumeQuery
);
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
tProcessesBlastdesignVolumeQuery
.
setBlastVolume
(
query
.
getBlastVolume
());
R
r
=
itProcessesBlastdesignVolumeService
.
updateByQuery
(
tProcessesBlastdesignVolumeQuery
);
if
(
r
.
getCode
()
!=
0
)
{
log
.
info
(
"
修改设计爆区爆破量失败:"
+
JSON
.
toJSONString
(
tProcessesBlastdesignVolumeQuery
));
log
.
error
(
"炮孔设计中->
修改设计爆区爆破量失败:"
+
JSON
.
toJSONString
(
tProcessesBlastdesignVolumeQuery
));
return
R
.
failed
(
r
.
getMsg
());
}
}
...
...
@@ -165,10 +165,10 @@ public class TProcessesBlastdesignHoleServiceImpl extends ServiceImpl<TProcesses
//修改
int
update
=
baseMapper
.
update
(
temp
,
queryWrapper
);
if
(
update
>
0
)
{
return
R
.
ok
(
"修改成功"
);
return
R
.
ok
(
"
炮孔设计中->
修改成功"
);
}
else
{
log
.
info
(
JSON
.
toJSONString
(
temp
));
return
R
.
failed
(
"修改失败"
);
return
R
.
failed
(
"
炮孔设计中->
修改失败"
);
}
}
...
...
@@ -185,16 +185,16 @@ public class TProcessesBlastdesignHoleServiceImpl extends ServiceImpl<TProcesses
TProcessesBlastdesignHole
temp
=
baseMapper
.
selectOne
(
queryWrapper
);
if
(
temp
==
null
)
{
return
R
.
failed
(
"数据不存在:BLAST_HOLE_ID:"
+
query
.
getBlastHoleID
());
return
R
.
failed
(
"
炮孔设计中->
数据不存在:BLAST_HOLE_ID:"
+
query
.
getBlastHoleID
());
}
//判断是否将炮孔编号修改为新的炮孔编号 如果是,直接修改,不能调用基础方法,避免循环
if
(
StringUtils
.
isNotBlank
(
query
.
getNewBlastHoleID
()))
{
temp
.
setBlastHoleID
(
query
.
getNewBlastHoleID
());
int
update
=
baseMapper
.
updateById
(
temp
);
if
(
update
>
0
)
{
return
R
.
ok
(
"修改成功"
);
return
R
.
ok
(
"
炮孔设计中->
修改成功"
);
}
else
{
return
R
.
failed
(
"修改失败"
);
return
R
.
failed
(
"
炮孔设计中->
修改失败"
);
}
}
...
...
@@ -212,14 +212,14 @@ public class TProcessesBlastdesignHoleServiceImpl extends ServiceImpl<TProcesses
Rcode
.
NOT_PARAM
.
assertNotEmpty
(
query
.
getUid
());
TProcessesBlastdesignHole
temp
=
baseMapper
.
selectById
(
query
.
getUid
());
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
()));
if
(
delete
>
0
)
{
return
R
.
ok
(
"删除成功"
);
return
R
.
ok
(
"
炮孔设计中->
删除成功"
);
}
else
{
return
R
.
failed
(
"删除失败"
);
return
R
.
failed
(
"
炮孔设计中->
删除失败"
);
}
}
...
...
@@ -247,13 +247,13 @@ public class TProcessesBlastdesignHoleServiceImpl extends ServiceImpl<TProcesses
Rcode
.
NOT_PARAM
.
assertNotNull
(
query
.
getDrillingDate
());
//uid自动生成 不能手动设置
if
(
query
.
getUid
()
!=
null
)
{
return
R
.
failed
(
"uid自动生成 不能手动设置"
);
return
R
.
failed
(
"
炮孔设计中->
uid自动生成 不能手动设置"
);
}
//判断炮孔编号是否存在
if
(
StringUtils
.
isNotBlank
(
query
.
getBlastHoleID
()))
{
R
r
=
getByBlastHoleID
(
query
);
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
BeanUtils
.
copyProperties
(
query
,
tProcessesBlastdesignVolumeQuery
);
R
volume
=
itProcessesBlastdesignVolumeService
.
getByQuery
(
tProcessesBlastdesignVolumeQuery
);
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
tProcessesDrillingQuery
.
setTag
(
DateUtil
.
timeToStr
(
LocalDateTime
.
now
(),
DateUtil
.
FORMAT_TO_SECOND
));
R
r1
=
itProcessesDrillingService
.
insertTProcessesDrilling
(
tProcessesDrillingQuery
);
if
(
r1
.
getCode
()
!=
0
)
{
log
.
error
(
"增加一条穿孔工序失败:"
+
JSON
.
toJSONString
(
tProcessesDrillingQuery
));
log
.
error
(
"
炮孔设计中->
增加一条穿孔工序失败:"
+
JSON
.
toJSONString
(
tProcessesDrillingQuery
));
return
R
.
failed
(
r1
.
getMsg
());
}
...
...
@@ -295,13 +295,13 @@ public class TProcessesBlastdesignHoleServiceImpl extends ServiceImpl<TProcesses
tProcessesBlastQuery
.
setTag
(
DateUtil
.
timeToStr
(
LocalDateTime
.
now
(),
DateUtil
.
FORMAT_TO_SECOND
));
R
r2
=
itProcessesBlastService
.
insertTProcessesBlast
(
tProcessesBlastQuery
);
if
(
r2
.
getCode
()
!=
0
)
{
log
.
error
(
"增加一条爆破工序失败:"
+
JSON
.
toJSONString
(
tProcessesDrillingQuery
));
log
.
error
(
"
炮孔设计中->
增加一条爆破工序失败:"
+
JSON
.
toJSONString
(
tProcessesDrillingQuery
));
return
R
.
failed
(
r1
.
getMsg
());
}
return
R
.
ok
(
"增加成功"
);
return
R
.
ok
(
"
炮孔设计中->
增加成功"
);
}
else
{
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
This diff is collapsed.
Click to expand it.
acquisition-business/target/classes/cn/wise/sc/acquisition/business/mapper/DataStatisticsMapper.xml
View file @
65cf3d7f
...
...
@@ -3,9 +3,12 @@
<mapper
namespace=
"cn.wise.sc.acquisition.business.mapper.DataStatisticsMapper"
>
<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
where 1=1
<if
test=
"params.TruckID != null and params.TruckID != ''"
>
and tw.TruckID = #{params.TruckID}
</if>
<if
test=
"params.cycle == 1 "
>
and datediff(week, tw.Rq,getdate())=0
</if>
...
...
@@ -19,23 +22,26 @@
and datediff(year, tw.Rq,getdate())=0
</if>
<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
test=
"params.endDate != null and params.endDate != ''"
>
and
tw.Rq >
<
=
#{params.endDate}
and
Convert(varchar(10),tw.Rq,120)
<![CDATA[ <= ]]>
#{params.endDate}
</if>
<if
test=
"params.startDate == null and params.endDate == null"
>
and datediff(week, tw.Rq,getdate())=0
</if>
group by
tw.Rq
group by
Convert(varchar(10),tw.Rq,120)
</select>
<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
left join T_Processes_Truck tpt on tpt.TruckID = tw.TruckID
where 1=1
<if
test=
"params.TruckID != null and params.TruckID != ''"
>
and tw.TruckID = #{params.TruckID}
</if>
<if
test=
"params.cycle == 1 "
>
and datediff(week, tw.Rq,getdate())=0
</if>
...
...
@@ -49,10 +55,10 @@
and datediff(year, tw.Rq,getdate())=0
</if>
<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
test=
"params.endDate != null and params.endDate != ''"
>
and
tw.Rq >
<
=
#{params.endDate}
and
Convert(varchar(10),tw.Rq,120)
<![CDATA[ <= ]]>
#{params.endDate}
</if>
<if
test=
"params.startDate == null and params.endDate == null"
>
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 @@
a.Tag
</sql>
<sql
id=
"TProcesses
DiggingHole
Columns"
>
<sql
id=
"TProcesses
Blastdesign
Columns"
>
b.HoleBlastVolume,
b.depth AS DesignDepth,
<!-- 设计孔深,将爆破工序里的depth去掉,用设计炮孔里的替代 -->
</sql>
...
...
@@ -56,7 +56,7 @@
<!-- 获取所有getByUid列表 -->
<select
id=
"getByQuery"
resultType=
"cn.wise.sc.acquisition.business.model.vo.TProcessesBlastVo"
>
SELECT
<include
refid=
"TProcesses
DiggingHole
Columns"
/>
<include
refid=
"TProcesses
Blastdesign
Columns"
/>
<include
refid=
"TProcessesDrillingColumns"
/>
<include
refid=
"TProcessesBlastColumns"
/>
FROM T_Processes_Blast a
...
...
acquisition-business/target/classes/cn/wise/sc/acquisition/business/mapper/TProcessesBlastdesignHoleMapper.xml
View file @
65cf3d7f
...
...
@@ -28,17 +28,12 @@
b.DesignDate,
</sql>
<sql
id=
"TProcessesBlastColumns"
>
c.BlastDate,
</sql>
<sql
id=
"TProcessesDrillingColumns"
>
d.DrillingDate,
</sql>
<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_Blast c on a.BlastHoleID = c.HoleID
left join T_Processes_Drilling d on a.BlastHoleID = d.HoleID
</sql>
...
...
@@ -58,7 +53,6 @@
a.z,
a.StepHeight,
b.BlastVolume,
c.BlastDate,
d.DrillingDate
FROM T_Processes_BlastDesign_Hole a
<include
refid=
"TProcessesBlastdesignHoleJoins"
/>
...
...
@@ -72,7 +66,6 @@
<select
id=
"getByQuery"
resultType=
"cn.wise.sc.acquisition.business.model.vo.TProcessesBlastdesignHoleVo"
>
SELECT
<include
refid=
"TProcessesBlastdesignVolumeColumns"
/>
<include
refid=
"TProcessesBlastColumns"
/>
<include
refid=
"TProcessesBlastdesignHoleColumns"
/>
FROM T_Processes_BlastDesign_Hole a
<include
refid=
"TProcessesBlastdesignHoleJoins"
/>
...
...
acquisition-business/target/classes/cn/wise/sc/acquisition/business/mapper/TProcessesDrillingMapper.xml
View file @
65cf3d7f
...
...
@@ -30,7 +30,7 @@
a.x,
a.y,
a.z,
a.BlastDate,
a.Operator,
a.Accepter,
a.Bz,
...
...
@@ -48,10 +48,6 @@
</sql>
<sql
id=
"TProcessesBlastColumns"
>
c.BlastDate,
</sql>
<sql
id=
"TProcessesBlastdesignVolumeColumns"
>
d.BlastVolume,
d.DesignDate,
...
...
@@ -59,7 +55,6 @@
<sql
id=
"TProcessesDrillingJoins"
>
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
</sql>
...
...
@@ -88,7 +83,6 @@
<select
id=
"getByQuery"
resultType=
"cn.wise.sc.acquisition.business.model.vo.TProcessesDrillingVo"
>
SELECT
<include
refid=
"TProcessesDiggingHoleColumns"
/>
<include
refid=
"TProcessesBlastColumns"
/>
<include
refid=
"TProcessesBlastdesignVolumeColumns"
/>
<include
refid=
"TProcessesDrillingColumns"
/>
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