Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
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
af021c9e
Commit
af021c9e
authored
Nov 05, 2020
by
竹天卫
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://111.203.232.171:8888/zhutianwei/tianjin-cement
parents
a2ba8204
27032be5
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
42 additions
and
9 deletions
+42
-9
NormProductionController.java
.../cement/business/controller/NormProductionController.java
+4
-4
PrecipriceMapper.java
...a/cn/wise/sc/cement/business/mapper/PrecipriceMapper.java
+2
-0
PrecipriceMapper.xml
...n/wise/sc/cement/business/mapper/xml/PrecipriceMapper.xml
+5
-0
IPrecipriceService.java
...n/wise/sc/cement/business/service/IPrecipriceService.java
+7
-4
EntrustServiceImpl.java
...e/sc/cement/business/service/impl/EntrustServiceImpl.java
+2
-0
PrecipriceServiceImpl.java
...c/cement/business/service/impl/PrecipriceServiceImpl.java
+22
-1
No files found.
cement-business/src/main/java/cn/wise/sc/cement/business/controller/NormProductionController.java
View file @
af021c9e
...
...
@@ -181,8 +181,8 @@ public class NormProductionController {
}
List
<
ProductionVo
>
newRts
=
new
ArrayList
<>();
for
(
Integer
groupId1
:
ids
)
{
ProductionVo
finalNormProduction
=
new
ProductionVo
();
for
(
ProductionVo
productionVo
:
rts
)
{
ProductionVo
finalNormProduction
=
new
ProductionVo
();
if
(
productionVo
.
getGroupId
().
intValue
()
==
groupId1
)
{
finalNormProduction
.
setUserId
(
productionVo
.
getUserId
());
finalNormProduction
.
setUserName
(
productionVo
.
getUserName
());
...
...
@@ -197,13 +197,13 @@ public class NormProductionController {
finalNormProduction
.
setProductionTotalValue
(
newFinalValue
);
Double
newNonProductionValue
=
productionVo
.
getNonProductionValue
()
+
finalNormProduction
.
getNonProductionValue
();
finalNormProduction
.
set
Non
ProductionValue
(
newNonProductionValue
);
finalNormProduction
.
setProductionValue
(
newNonProductionValue
);
Double
newProductionValue
=
productionVo
.
getProductionValue
()
+
finalNormProduction
.
getProductionValue
();
finalNormProduction
.
setProductionValue
(
newProductionValue
);
finalNormProduction
.
set
Non
ProductionValue
(
newProductionValue
);
}
newRts
.
add
(
finalNormProduction
);
}
newRts
.
add
(
finalNormProduction
);
}
rts
=
newRts
;
}
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/PrecipriceMapper.java
View file @
af021c9e
...
...
@@ -2,6 +2,7 @@ package cn.wise.sc.cement.business.mapper;
import
cn.wise.sc.cement.business.entity.Preciprice
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Param
;
/**
* <p>
...
...
@@ -13,4 +14,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/
public
interface
PrecipriceMapper
extends
BaseMapper
<
Preciprice
>
{
void
updateStatusByEntrustId
(
@Param
(
"param"
)
Integer
entrustId
);
}
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/PrecipriceMapper.xml
View file @
af021c9e
...
...
@@ -2,4 +2,9 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.wise.sc.cement.business.mapper.PrecipriceMapper"
>
<update
id=
"updateStatusByEntrustId"
>
UPDATE preciprice SET `status` =1 WHERE entrust_id = #{param}
</update>
</mapper>
cement-business/src/main/java/cn/wise/sc/cement/business/service/IPrecipriceService.java
View file @
af021c9e
...
...
@@ -4,12 +4,8 @@ import cn.wise.sc.cement.business.entity.NormProduction;
import
cn.wise.sc.cement.business.entity.NormProductionStatistics
;
import
cn.wise.sc.cement.business.entity.Preciprice
;
import
cn.wise.sc.cement.business.model.BaseResponse
;
import
cn.wise.sc.cement.business.model.PageQuery
;
import
cn.wise.sc.cement.business.model.vo.NormProductionVo
;
import
cn.wise.sc.cement.business.model.vo.ProductionVo
;
import
cn.wise.sc.cement.business.model.vo.WorkloadStatisticsVo
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
javax.servlet.http.HttpServletResponse
;
...
...
@@ -96,4 +92,11 @@ public interface IPrecipriceService extends IService<Preciprice> {
* @return 统计对象
*/
List
<
WorkloadStatisticsVo
>
workloadStatistics
(
Date
startTime
,
Date
endTime
,
Integer
userId
);
/**
* 根据报告id更新
* @param entrustId
* @return
*/
boolean
updateStatusByEntrustId
(
Integer
entrustId
);
}
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/EntrustServiceImpl.java
View file @
af021c9e
...
...
@@ -2232,6 +2232,8 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
}
entrustMapper
.
updateById
(
entrust
);
logsService
.
saveLog
(
SysLogs
.
ObjType
.
ENTRUST_LOG
,
entrust
.
getId
(),
"数据校核"
,
null
);
iPrecipriceService
.
updateStatusByEntrustId
(
entrust
.
getId
());
return
BaseResponse
.
okData
(
countResultMap
);
}
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/PrecipriceServiceImpl.java
View file @
af021c9e
...
...
@@ -37,6 +37,7 @@ import cn.wise.sc.cement.business.service.ISysPostService;
import
cn.wise.sc.cement.business.service.ISysUserService
;
import
cn.wise.sc.cement.business.service.ITeamGroupService
;
import
cn.wise.sc.cement.business.util.ExcelUtil
;
import
cn.wise.sc.cement.business.wrapper.page.Query
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
...
@@ -46,6 +47,8 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Propagation
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.Assert
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletResponse
;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
...
...
@@ -63,6 +66,7 @@ import java.util.List;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.stream.Collectors
;
/**
* <p>
* 服务实现类
...
...
@@ -97,6 +101,8 @@ public class PrecipriceServiceImpl extends ServiceImpl<PrecipriceMapper, Precipr
INonStandardApplyService
iNonStandardApplyService
;
final
ISampleDistributionService
iSampleDistributionService
;
@Resource
PrecipriceMapper
precipriceMapper
;
public
PrecipriceServiceImpl
(
EntrustMapper
iEntrustService
,
ISampleService
iSampleService
,
...
...
@@ -123,7 +129,7 @@ public class PrecipriceServiceImpl extends ServiceImpl<PrecipriceMapper, Precipr
}
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
,
propagation
=
Propagation
.
NESTED
)
@Transactional
(
rollbackFor
=
Exception
.
class
,
propagation
=
Propagation
.
NESTED
)
public
boolean
createPreciprice
(
final
Integer
userId
,
final
Integer
entrustId
,
final
Integer
targetId
,
final
Integer
type
,
final
Integer
sampleId
)
{
...
...
@@ -320,6 +326,7 @@ public class PrecipriceServiceImpl extends ServiceImpl<PrecipriceMapper, Precipr
if
(!
BeanUtil
.
isEmpty
(
userId
))
{
qw
.
like
(
"user_id"
,
userId
);
}
qw
.
eq
(
"status"
,
1
);
List
<
Preciprice
>
list
=
this
.
list
(
qw
);
List
<
NormProduction
.
NormProductionDetail
>
rts
=
new
ArrayList
<>(
list
.
size
());
for
(
Preciprice
preciprice
:
list
)
{
...
...
@@ -581,6 +588,20 @@ public class PrecipriceServiceImpl extends ServiceImpl<PrecipriceMapper, Precipr
return
rts
;
}
@Override
public
boolean
updateStatusByEntrustId
(
Integer
entrustId
)
{
cn
.
hutool
.
core
.
lang
.
Assert
.
notNull
(
entrustId
,
"报告id不能为空!"
);
try
{
precipriceMapper
.
updateStatusByEntrustId
(
entrustId
);
return
true
;
}
catch
(
Exception
e
){
log
.
error
(
"更新产值状态失败!"
);
return
false
;
}
}
private
NormProduction
.
NormProductionDetail
preciprice2NormDetail
(
Preciprice
preciprice
)
{
NormProduction
.
NormProductionDetail
rts
=
new
NormProduction
.
NormProductionDetail
();
...
...
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