Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
tianjin-cement
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
竹天卫
tianjin-cement
Commits
3fa8051c
Commit
3fa8051c
authored
Nov 04, 2020
by
竹天卫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fasdfsdaff
parent
69ba1013
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
13 deletions
+14
-13
EntrustServiceImpl.java
...e/sc/cement/business/service/impl/EntrustServiceImpl.java
+5
-1
PrecipriceServiceImpl.java
...c/cement/business/service/impl/PrecipriceServiceImpl.java
+6
-5
entrust2.ftl
cement-business/src/main/resources/templates/entrust2.ftl
+3
-7
No files found.
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/EntrustServiceImpl.java
View file @
3fa8051c
...
@@ -33,6 +33,7 @@ import org.apache.commons.lang3.StringUtils;
...
@@ -33,6 +33,7 @@ import org.apache.commons.lang3.StringUtils;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Propagation
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
...
@@ -1227,7 +1228,7 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
...
@@ -1227,7 +1228,7 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
* @param ids
* @param ids
* @return
* @return
*/
*/
@Transactional
@Transactional
(
rollbackFor
=
Exception
.
class
,
propagation
=
Propagation
.
NESTED
)
@Override
@Override
public
BaseResponse
<
String
>
finishHandle
(
Integer
[]
ids
)
{
public
BaseResponse
<
String
>
finishHandle
(
Integer
[]
ids
)
{
LoginUser
loginUser
=
userService
.
getLoginUser
();
LoginUser
loginUser
=
userService
.
getLoginUser
();
...
@@ -1264,12 +1265,15 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
...
@@ -1264,12 +1265,15 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
//计算产值
//计算产值
if
(
sampleHandle
.
getContent
()
!=
null
)
{
if
(
sampleHandle
.
getContent
()
!=
null
)
{
String
[]
handIdS
=
sampleHandle
.
getContent
().
split
(
"、"
);
String
[]
handIdS
=
sampleHandle
.
getContent
().
split
(
"、"
);
String
illMessage
=
""
;
for
(
String
handleId
:
handIdS
)
{
for
(
String
handleId
:
handIdS
)
{
try
{
try
{
iPrecipriceService
.
createPreciprice
(
sampleHandle
.
getUserId
(),
entrust
.
getId
(),
Integer
.
valueOf
(
handleId
),
0
,
sample
.
getId
());
iPrecipriceService
.
createPreciprice
(
sampleHandle
.
getUserId
(),
entrust
.
getId
(),
Integer
.
valueOf
(
handleId
),
0
,
sample
.
getId
());
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
System
.
out
.
println
(
e
.
getMessage
());
return
BaseResponse
.
errorMsg
(
e
.
getMessage
());
return
BaseResponse
.
errorMsg
(
e
.
getMessage
());
}
}
}
}
}
}
QueryWrapper
<
SampleHandle
>
sampleHandleWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
SampleHandle
>
sampleHandleWrapper
=
new
QueryWrapper
<>();
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/PrecipriceServiceImpl.java
View file @
3fa8051c
...
@@ -18,7 +18,6 @@ import cn.wise.sc.cement.business.entity.SysGroup;
...
@@ -18,7 +18,6 @@ import cn.wise.sc.cement.business.entity.SysGroup;
import
cn.wise.sc.cement.business.entity.SysPost
;
import
cn.wise.sc.cement.business.entity.SysPost
;
import
cn.wise.sc.cement.business.entity.SysUser
;
import
cn.wise.sc.cement.business.entity.SysUser
;
import
cn.wise.sc.cement.business.entity.TeamGroup
;
import
cn.wise.sc.cement.business.entity.TeamGroup
;
import
cn.wise.sc.cement.business.mapper.EntrustMapper
;
import
cn.wise.sc.cement.business.mapper.PrecipriceMapper
;
import
cn.wise.sc.cement.business.mapper.PrecipriceMapper
;
import
cn.wise.sc.cement.business.model.BaseResponse
;
import
cn.wise.sc.cement.business.model.BaseResponse
;
import
cn.wise.sc.cement.business.model.LoginUser
;
import
cn.wise.sc.cement.business.model.LoginUser
;
...
@@ -43,6 +42,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
...
@@ -43,6 +42,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Propagation
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.Assert
;
import
org.springframework.util.Assert
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
...
@@ -73,8 +73,9 @@ import java.util.stream.Collectors;
...
@@ -73,8 +73,9 @@ import java.util.stream.Collectors;
@Service
@Service
public
class
PrecipriceServiceImpl
extends
ServiceImpl
<
PrecipriceMapper
,
Preciprice
>
implements
IPrecipriceService
{
public
class
PrecipriceServiceImpl
extends
ServiceImpl
<
PrecipriceMapper
,
Preciprice
>
implements
IPrecipriceService
{
final
final
EntrustMapper
iEntrustService
;
IEntrustService
iEntrustService
;
final
final
ISampleService
iSampleService
;
ISampleService
iSampleService
;
final
final
...
@@ -96,7 +97,7 @@ public class PrecipriceServiceImpl extends ServiceImpl<PrecipriceMapper, Precipr
...
@@ -96,7 +97,7 @@ public class PrecipriceServiceImpl extends ServiceImpl<PrecipriceMapper, Precipr
final
final
ISampleDistributionService
iSampleDistributionService
;
ISampleDistributionService
iSampleDistributionService
;
public
PrecipriceServiceImpl
(
EntrustMapper
iEntrustService
,
public
PrecipriceServiceImpl
(
IEntrustService
iEntrustService
,
ISampleService
iSampleService
,
ISampleService
iSampleService
,
INormProductionService
iNormProductionService
,
INormProductionService
iNormProductionService
,
ISysUserService
iSysUserService
,
ISysUserService
iSysUserService
,
...
@@ -121,7 +122,7 @@ public class PrecipriceServiceImpl extends ServiceImpl<PrecipriceMapper, Precipr
...
@@ -121,7 +122,7 @@ public class PrecipriceServiceImpl extends ServiceImpl<PrecipriceMapper, Precipr
}
}
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
,
propagation
=
Propagation
.
NESTED
)
public
boolean
createPreciprice
(
final
Integer
userId
,
final
Integer
entrustId
,
public
boolean
createPreciprice
(
final
Integer
userId
,
final
Integer
entrustId
,
final
Integer
targetId
,
final
Integer
type
,
final
Integer
targetId
,
final
Integer
type
,
final
Integer
sampleId
)
{
final
Integer
sampleId
)
{
...
@@ -132,7 +133,7 @@ public class PrecipriceServiceImpl extends ServiceImpl<PrecipriceMapper, Precipr
...
@@ -132,7 +133,7 @@ public class PrecipriceServiceImpl extends ServiceImpl<PrecipriceMapper, Precipr
Assert
.
notNull
(
sampleId
,
"样品id不能为空!"
);
Assert
.
notNull
(
sampleId
,
"样品id不能为空!"
);
Assert
.
notNull
(
type
,
"处理项类型不能为空!"
);
Assert
.
notNull
(
type
,
"处理项类型不能为空!"
);
//获取项目编号和名字
//获取项目编号和名字
Entrust
entrust
=
iEntrustService
.
selec
tById
(
entrustId
);
Entrust
entrust
=
iEntrustService
.
ge
tById
(
entrustId
);
if
(
BeanUtil
.
isEmpty
(
entrust
))
{
if
(
BeanUtil
.
isEmpty
(
entrust
))
{
log
.
debug
(
"产值记录新增失败,项目没找到!"
);
log
.
debug
(
"产值记录新增失败,项目没找到!"
);
throw
new
IllegalArgumentException
(
"无效的项目id!"
);
throw
new
IllegalArgumentException
(
"无效的项目id!"
);
...
...
cement-business/src/main/resources/templates/entrust2.ftl
View file @
3fa8051c
...
@@ -1980,11 +1980,7 @@
...
@@ -1980,11 +1980,7 @@
<!-- 这里是开头 -->
<!-- 这里是开头 -->
<
#list list as iteam>
<
#list list as iteam>
<
#--
<w:tr
wsp:rsidR=
"007E280A"
wsp:rsidRPr=
"003B3488"
wsp:rsidTr=
"003B3488"
>
-->
<w:tr
wsp:rsidR=
"007E280A"
wsp:rsidRPr=
"003B3488"
wsp:rsidTr=
"003B3488"
>
<TEXTAREA
COLS=
"125"
placeholder=
"选填部分,可以不填写。如果有需要说明的事项,填写在此处!"
style=
"overflow-y:hidden;height:100px;"
onpropertychange=
"this.style.height=this.scrollHeight+'px';"
oninput=
"this.style.height=this.scrollHeight+'px';"
>
<w:trPr>
<w:trPr>
<w:trHeight
w:h-rule=
"exact"
w:val=
"600"
/>
<w:trHeight
w:h-rule=
"exact"
w:val=
"600"
/>
<w:jc
<w:jc
...
@@ -2130,6 +2126,7 @@
...
@@ -2130,6 +2126,7 @@
</w:r>
</w:r>
</w:p>
</w:p>
</w:tc>
</w:tc>
<w:tc>
<w:tc>
<w:tcPr>
<w:tcPr>
<w:tcW
w:w=
"1754"
w:type=
"dxa"
/>
<w:tcW
w:w=
"1754"
w:type=
"dxa"
/>
...
@@ -2180,8 +2177,7 @@
...
@@ -2180,8 +2177,7 @@
</w:r>
</w:r>
</w:p>
</w:p>
</w:tc>
</w:tc>
</TEXTAREA>
</w:tr>
<
#--
</w:tr>
-->
<
/#list>
<
/#list>
<!-- 这里是结尾 -->
<!-- 这里是结尾 -->
<!-- ################################################################################################## -->
<!-- ################################################################################################## -->
...
...
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