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
b33db56d
Commit
b33db56d
authored
Mar 26, 2021
by
竹天卫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
产值优化
parent
c6dfb54a
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
40 additions
and
13 deletions
+40
-13
NormProductionController.java
.../cement/business/controller/NormProductionController.java
+4
-4
WeiXinController.java
.../wise/sc/cement/business/controller/WeiXinController.java
+20
-8
DataStatisticsMapper.xml
...se/sc/cement/business/mapper/xml/DataStatisticsMapper.xml
+3
-0
SampleTmpQuery.java
...n/wise/sc/cement/business/model/query/SampleTmpQuery.java
+2
-0
EntrustServiceImpl.java
...e/sc/cement/business/service/impl/EntrustServiceImpl.java
+10
-0
PrecipriceServiceImpl.java
...c/cement/business/service/impl/PrecipriceServiceImpl.java
+1
-1
No files found.
cement-business/src/main/java/cn/wise/sc/cement/business/controller/NormProductionController.java
View file @
b33db56d
...
@@ -122,15 +122,15 @@ public class NormProductionController {
...
@@ -122,15 +122,15 @@ public class NormProductionController {
@ApiOperation
(
"产值统计-标准产值-分页列表"
)
@ApiOperation
(
"产值统计-标准产值-分页列表"
)
@ApiImplicitParams
(
value
=
{
@ApiImplicitParams
(
value
=
{
@ApiImplicitParam
(
name
=
"start
Date
"
,
value
=
"开始日期"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"start"
,
value
=
"开始日期"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"end
Date
"
,
value
=
"结束日期"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"end"
,
value
=
"结束日期"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"userName"
,
value
=
"姓名"
,
paramType
=
"query"
,
dataType
=
"String"
)
@ApiImplicitParam
(
name
=
"userName"
,
value
=
"姓名"
,
paramType
=
"query"
,
dataType
=
"String"
)
})
})
@GetMapping
(
"/statistics"
)
@GetMapping
(
"/statistics"
)
public
BaseResponse
statistics
(
PageQuery
pageQuery
,
String
start
Date
,
String
endDate
,
String
userName
)
{
public
BaseResponse
statistics
(
PageQuery
pageQuery
,
String
start
,
String
end
,
String
userName
)
{
try
{
try
{
return
iPrecipriceService
.
normProductionStatistics
(
pageQuery
,
start
Date
,
endDate
,
userName
);
return
iPrecipriceService
.
normProductionStatistics
(
pageQuery
,
start
,
end
,
userName
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
debug
(
"产值统计-标准产值-分页列表{}"
,
e
);
log
.
debug
(
"产值统计-标准产值-分页列表{}"
,
e
);
}
}
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/controller/WeiXinController.java
View file @
b33db56d
...
@@ -31,6 +31,10 @@ public class WeiXinController {
...
@@ -31,6 +31,10 @@ public class WeiXinController {
@Autowired
@Autowired
private
WeiXinService
weiXinService
;
private
WeiXinService
weiXinService
;
@Value
(
"${spring.profiles.active}"
)
private
String
active
;
@ApiOperation
(
value
=
"获取登录token-小程序端"
)
@ApiOperation
(
value
=
"获取登录token-小程序端"
)
@GetMapping
(
"/getToken"
)
@GetMapping
(
"/getToken"
)
public
BaseResponse
getToken
(
String
code
)
{
public
BaseResponse
getToken
(
String
code
)
{
...
@@ -39,10 +43,14 @@ public class WeiXinController {
...
@@ -39,10 +43,14 @@ public class WeiXinController {
log
.
debug
(
"code: {}"
,
code
);
log
.
debug
(
"code: {}"
,
code
);
log
.
debug
(
"============================================="
);
log
.
debug
(
"============================================="
);
try
{
try
{
//测试服务器
if
(
active
.
equals
(
"prod"
)){
return
weiXinService
.
getTestToken
(
code
);
//正式服务器
//正式服务器
return
weiXinService
.
getToken
(
code
,
"APP"
);
// return weiXinService.getToken(code, "APP");
}
else
{
//测试服务器
return
weiXinService
.
getTestToken
(
code
);
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
debug
(
"获取登录token{}"
,
e
);
log
.
debug
(
"获取登录token{}"
,
e
);
}
}
...
@@ -53,10 +61,14 @@ public class WeiXinController {
...
@@ -53,10 +61,14 @@ public class WeiXinController {
@GetMapping
(
"/getPCToken"
)
@GetMapping
(
"/getPCToken"
)
public
BaseResponse
getPCToken
(
String
code
)
{
public
BaseResponse
getPCToken
(
String
code
)
{
try
{
try
{
//测试服务器
return
weiXinService
.
getTestToken
(
code
);
if
(
active
.
equals
(
"prod"
)){
//正式服务器
//正式服务器
// return weiXinService.getToken(code, "PC");
return
weiXinService
.
getToken
(
code
,
"PC"
);
}
else
{
//测试服务器
return
weiXinService
.
getTestToken
(
code
);
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
debug
(
"获取登录token{}"
,
e
);
log
.
debug
(
"获取登录token{}"
,
e
);
}
}
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/DataStatisticsMapper.xml
View file @
b33db56d
...
@@ -459,6 +459,7 @@
...
@@ -459,6 +459,7 @@
LEFT JOIN team t ON t.id = sd.team_id
LEFT JOIN team t ON t.id = sd.team_id
WHERE s.is_check = 1 and s.cement_code = s.parallel_code
WHERE s.is_check = 1 and s.cement_code = s.parallel_code
and sd.status = 4 and sd.check_id is not null
and sd.status = 4 and sd.check_id is not null
and sd.distribution_result is not null and sd.distribution_result
<![CDATA[ <> ]]>
''
<if
test=
"start != null and end != null"
>
<if
test=
"start != null and end != null"
>
AND (sd.finish_time between #{start} and #{end})
AND (sd.finish_time between #{start} and #{end})
</if>
</if>
...
@@ -484,6 +485,7 @@
...
@@ -484,6 +485,7 @@
LEFT JOIN team t ON t.id = sd.team_id
LEFT JOIN team t ON t.id = sd.team_id
WHERE s.is_check = 1 and s.cement_code = s.parallel_code
WHERE s.is_check = 1 and s.cement_code = s.parallel_code
and sd.status = 4 and sd.check_id is not null
and sd.status = 4 and sd.check_id is not null
and sd.distribution_result is not null and sd.distribution_result
<![CDATA[ <> ]]>
''
<if
test=
"start != null and end != null"
>
<if
test=
"start != null and end != null"
>
AND (sd.finish_time between #{start} and #{end})
AND (sd.finish_time between #{start} and #{end})
</if>
</if>
...
@@ -515,6 +517,7 @@
...
@@ -515,6 +517,7 @@
,(select @i:=0)t
,(select @i:=0)t
WHERE s.is_check = 1 and s.cement_code = s.parallel_code
WHERE s.is_check = 1 and s.cement_code = s.parallel_code
and sd.status = 4 and sd.check_id is not null
and sd.status = 4 and sd.check_id is not null
and sd.distribution_result is not null and sd.distribution_result
<![CDATA[ <> ]]>
''
<if
test=
"start != null and end != null"
>
<if
test=
"start != null and end != null"
>
AND (sd.finish_time between #{start} and #{end})
AND (sd.finish_time between #{start} and #{end})
</if>
</if>
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/model/query/SampleTmpQuery.java
View file @
b33db56d
...
@@ -6,6 +6,7 @@ import io.swagger.models.auth.In;
...
@@ -6,6 +6,7 @@ import io.swagger.models.auth.In;
import
lombok.Data
;
import
lombok.Data
;
import
sun.java2d.loops.GeneralRenderer
;
import
sun.java2d.loops.GeneralRenderer
;
import
javax.validation.constraints.Size
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.time.LocalDate
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
...
@@ -37,6 +38,7 @@ public class SampleTmpQuery {
...
@@ -37,6 +38,7 @@ public class SampleTmpQuery {
private
String
samplePhoto
;
private
String
samplePhoto
;
@ApiModelProperty
(
"样品重量"
)
@ApiModelProperty
(
"样品重量"
)
@Size
(
max
=
10
,
min
=
1
)
private
BigDecimal
weight
;
private
BigDecimal
weight
;
@ApiModelProperty
(
"样品重量计量单位(1微克,2毫克,3克,4千克,5吨)"
)
@ApiModelProperty
(
"样品重量计量单位(1微克,2毫克,3克,4千克,5吨)"
)
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/EntrustServiceImpl.java
View file @
b33db56d
...
@@ -46,6 +46,7 @@ import java.time.LocalDate;
...
@@ -46,6 +46,7 @@ import java.time.LocalDate;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
import
java.time.format.DateTimeFormatter
;
import
java.time.format.DateTimeFormatter
;
import
java.util.*
;
import
java.util.*
;
import
java.util.regex.Pattern
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
/**
/**
...
@@ -318,6 +319,11 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
...
@@ -318,6 +319,11 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
if
(
sampleTmpQuery
.
getWeight
()
==
null
)
{
if
(
sampleTmpQuery
.
getWeight
()
==
null
)
{
return
BaseResponse
.
errorMsg
(
"请填写样品重量"
);
return
BaseResponse
.
errorMsg
(
"请填写样品重量"
);
}
}
if
(
sampleTmpQuery
.
getWeight
().
toString
().
length
()>
10
)
{
return
BaseResponse
.
errorMsg
(
"样品重量输入过长"
);
}
if
(
sampleTmpQuery
.
getWeightType
()
==
null
)
{
if
(
sampleTmpQuery
.
getWeightType
()
==
null
)
{
return
BaseResponse
.
errorMsg
(
"请选择重量单位"
);
return
BaseResponse
.
errorMsg
(
"请选择重量单位"
);
}
}
...
@@ -571,6 +577,10 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
...
@@ -571,6 +577,10 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
if
(
sampleQuery
.
getWeight
()
==
null
)
{
if
(
sampleQuery
.
getWeight
()
==
null
)
{
return
BaseResponse
.
errorMsg
(
"请填写样品重量"
);
return
BaseResponse
.
errorMsg
(
"请填写样品重量"
);
}
}
if
(
sampleQuery
.
getWeight
().
toString
().
length
()>
10
)
{
return
BaseResponse
.
errorMsg
(
"样品重量输入过长"
);
}
if
(
sampleQuery
.
getWeightType
()
==
null
)
{
if
(
sampleQuery
.
getWeightType
()
==
null
)
{
return
BaseResponse
.
errorMsg
(
"请选择重量单位"
);
return
BaseResponse
.
errorMsg
(
"请选择重量单位"
);
}
}
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/PrecipriceServiceImpl.java
View file @
b33db56d
...
@@ -364,7 +364,7 @@ public class PrecipriceServiceImpl extends ServiceImpl<PrecipriceMapper, Precipr
...
@@ -364,7 +364,7 @@ public class PrecipriceServiceImpl extends ServiceImpl<PrecipriceMapper, Precipr
List
<
Preciprice
>
teamlist
=
list
.
stream
().
filter
(
arg
->(
arg
.
getType
()==
2
)).
collect
(
Collectors
.
toList
());
List
<
Preciprice
>
teamlist
=
list
.
stream
().
filter
(
arg
->(
arg
.
getType
()==
2
)).
collect
(
Collectors
.
toList
());
if
(
teamlist
!=
null
&&
teamlist
.
size
()>
0
){
if
(
teamlist
!=
null
&&
teamlist
.
size
()>
0
){
Map
<
Integer
,
List
<
Preciprice
>>
mapByTeamId
=
team
Group
list
.
stream
().
collect
(
Collectors
.
groupingBy
(
Preciprice:
:
getTargetId
,
Collectors
.
toList
()));
Map
<
Integer
,
List
<
Preciprice
>>
mapByTeamId
=
teamlist
.
stream
().
collect
(
Collectors
.
groupingBy
(
Preciprice:
:
getTargetId
,
Collectors
.
toList
()));
for
(
Map
.
Entry
<
Integer
,
List
<
Preciprice
>>
entry
:
mapByTeamId
.
entrySet
()){
for
(
Map
.
Entry
<
Integer
,
List
<
Preciprice
>>
entry
:
mapByTeamId
.
entrySet
()){
NormProduction
.
NormProductionUserDetail
UserDetailRts
=
new
NormProduction
.
NormProductionUserDetail
();
NormProduction
.
NormProductionUserDetail
UserDetailRts
=
new
NormProduction
.
NormProductionUserDetail
();
UserDetailRts
.
setType
(
2
);
UserDetailRts
.
setType
(
2
);
...
...
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