Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
patzn-cloud-service-hmhj
Overview
Overview
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
wangweidong
patzn-cloud-service-hmhj
Commits
eddc4c47
Commit
eddc4c47
authored
Jul 16, 2022
by
lijingjing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
大屏接口添加;
parent
81133afa
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
129 additions
and
27 deletions
+129
-27
DateKit.java
...ain/java/com/patzn/cloud/service/lims/common/DateKit.java
+2
-4
NoticeAnnouncementController.java
...ce/lims/hmhj/controller/NoticeAnnouncementController.java
+5
-1
StatisticsController.java
...ud/service/lims/hmhj/controller/StatisticsController.java
+43
-0
NoticeAnnouncementMapper.java
...ud/service/lims/hmhj/mapper/NoticeAnnouncementMapper.java
+2
-0
StatisticsMapper.java
...atzn/cloud/service/lims/hmhj/mapper/StatisticsMapper.java
+16
-0
IStatisticsService.java
...n/cloud/service/lims/hmhj/service/IStatisticsService.java
+10
-0
StatisticsServiceImpl.java
...service/lims/hmhj/service/impl/StatisticsServiceImpl.java
+51
-22
StatisticsMapper.xml
src/main/resources/mapper/hmhj/StatisticsMapper.xml
+0
-0
No files found.
src/main/java/com/patzn/cloud/service/lims/common/DateKit.java
View file @
eddc4c47
...
@@ -40,10 +40,7 @@ public class DateKit {
...
@@ -40,10 +40,7 @@ public class DateKit {
}
}
public
static
Integer
daysBetweenTwoDates
(
Date
start
,
Date
end
)
{
public
static
Integer
daysBetweenTwoDates
(
Date
start
,
Date
end
)
{
if
(
null
==
start
||
null
==
end
)
{
return
daysBetweenTwoDates
(
date2Local
(
start
),
date2Local
(
end
));
return
null
;
}
return
daysBetweenTwoDates
(
start
,
end
);
}
}
public
static
Integer
daysBetweenTwoDates
(
LocalDate
start
,
LocalDate
end
)
{
public
static
Integer
daysBetweenTwoDates
(
LocalDate
start
,
LocalDate
end
)
{
...
@@ -93,6 +90,7 @@ public class DateKit {
...
@@ -93,6 +90,7 @@ public class DateKit {
/**
/**
* 根据当前系统时间获取班次
* 根据当前系统时间获取班次
*
* @return
* @return
*/
*/
public
static
String
getShiftByNow
()
{
public
static
String
getShiftByNow
()
{
...
...
src/main/java/com/patzn/cloud/service/lims/hmhj/controller/NoticeAnnouncementController.java
View file @
eddc4c47
package
com
.
patzn
.
cloud
.
service
.
lims
.
hmhj
.
controller
;
package
com
.
patzn
.
cloud
.
service
.
lims
.
hmhj
.
controller
;
import
com.baomidou.kisso.annotation.Action
;
import
com.baomidou.kisso.annotation.Login
;
import
com.baomidou.mybatisplus.plugins.Page
;
import
com.baomidou.mybatisplus.plugins.Page
;
import
com.patzn.cloud.commons.api.RestConstants
;
import
com.patzn.cloud.commons.api.RestConstants
;
import
com.patzn.cloud.commons.api.RestResult
;
import
com.patzn.cloud.commons.api.RestResult
;
...
@@ -82,12 +84,14 @@ public class NoticeAnnouncementController extends ServiceController {
...
@@ -82,12 +84,14 @@ public class NoticeAnnouncementController extends ServiceController {
@PostMapping
(
"/recent/"
)
@PostMapping
(
"/recent/"
)
public
RestResult
<
List
<
NoticeAnnouncement
>>
recent
(
public
RestResult
<
List
<
NoticeAnnouncement
>>
recent
(
@RequestParam
(
value
=
"count"
,
required
=
false
)
Integer
count
)
{
@RequestParam
(
value
=
"count"
,
required
=
false
)
Integer
count
)
{
if
(
count
==
null
)
if
(
count
==
null
)
{
count
=
3
;
count
=
3
;
}
return
success
(
noticeAnnouncementService
.
recent
(
count
));
return
success
(
noticeAnnouncementService
.
recent
(
count
));
}
}
@ApiOperation
(
"显示最新 N 条通知公告"
)
@ApiOperation
(
"显示最新 N 条通知公告"
)
@Login
(
action
=
Action
.
Skip
)
@PostMapping
(
"/latest"
)
@PostMapping
(
"/latest"
)
public
RestResult
<
List
<
NoticeAnnouncement
>>
latestNotices
(
Integer
limit
)
{
public
RestResult
<
List
<
NoticeAnnouncement
>>
latestNotices
(
Integer
limit
)
{
return
success
(
noticeAnnouncementService
.
latestNotices
(
limit
));
return
success
(
noticeAnnouncementService
.
latestNotices
(
limit
));
...
...
src/main/java/com/patzn/cloud/service/lims/hmhj/controller/StatisticsController.java
View file @
eddc4c47
...
@@ -72,6 +72,7 @@ public class StatisticsController extends ServiceController {
...
@@ -72,6 +72,7 @@ public class StatisticsController extends ServiceController {
@ApiOperation
(
"检测项目数量统计"
)
@ApiOperation
(
"检测项目数量统计"
)
@Login
(
action
=
Action
.
Skip
)
@PostMapping
(
"/item_quantity"
)
@PostMapping
(
"/item_quantity"
)
public
RestResult
<
List
<
Statistics
>>
getItemQuantity
(
QueryDTO
queryDTO
)
{
public
RestResult
<
List
<
Statistics
>>
getItemQuantity
(
QueryDTO
queryDTO
)
{
return
success
(
statsService
.
getItemQuantity
(
queryDTO
));
return
success
(
statsService
.
getItemQuantity
(
queryDTO
));
...
@@ -120,24 +121,28 @@ public class StatisticsController extends ServiceController {
...
@@ -120,24 +121,28 @@ public class StatisticsController extends ServiceController {
}
}
@ApiOperation
(
"获取外检完成量数据"
)
@ApiOperation
(
"获取外检完成量数据"
)
@Login
(
action
=
Action
.
Skip
)
@PostMapping
(
"/out_test_finish_quantity"
)
@PostMapping
(
"/out_test_finish_quantity"
)
public
RestResult
<
Statistics
>
getOutTestFinishQuantity
(
QueryDTO
queryDTO
)
{
public
RestResult
<
Statistics
>
getOutTestFinishQuantity
(
QueryDTO
queryDTO
)
{
return
success
(
statsService
.
getOutTestFinishQuantity
(
queryDTO
));
return
success
(
statsService
.
getOutTestFinishQuantity
(
queryDTO
));
}
}
@ApiOperation
(
"外检项目数量统计"
)
@ApiOperation
(
"外检项目数量统计"
)
@Login
(
action
=
Action
.
Skip
)
@PostMapping
(
"/out_test_item_quantity"
)
@PostMapping
(
"/out_test_item_quantity"
)
public
RestResult
<
List
<
Statistics
>>
getOutTestItemQuantity
(
QueryDTO
queryDTO
)
{
public
RestResult
<
List
<
Statistics
>>
getOutTestItemQuantity
(
QueryDTO
queryDTO
)
{
return
success
(
statsService
.
getOutTestItemQuantity
(
queryDTO
));
return
success
(
statsService
.
getOutTestItemQuantity
(
queryDTO
));
}
}
@ApiOperation
(
"工作量统计"
)
@ApiOperation
(
"工作量统计"
)
@Login
(
action
=
Action
.
Skip
)
@PostMapping
(
"/workload_quantity"
)
@PostMapping
(
"/workload_quantity"
)
public
RestResult
<
Statistics
>
getWorkloadQuantity
(
RangeStatsQueryDTO
queryDTO
)
{
public
RestResult
<
Statistics
>
getWorkloadQuantity
(
RangeStatsQueryDTO
queryDTO
)
{
return
success
(
statsService
.
getWorkloadQuantity
(
queryDTO
));
return
success
(
statsService
.
getWorkloadQuantity
(
queryDTO
));
}
}
@ApiOperation
(
"本周验收合格情况"
)
@ApiOperation
(
"本周验收合格情况"
)
@Login
(
action
=
Action
.
Skip
)
@PostMapping
(
"/cur_week_acceptance_qualified"
)
@PostMapping
(
"/cur_week_acceptance_qualified"
)
public
RestResult
<
List
<
Statistics
>>
getCurWeekAcceptanceQualified
(
QueryDTO
queryDTO
)
{
public
RestResult
<
List
<
Statistics
>>
getCurWeekAcceptanceQualified
(
QueryDTO
queryDTO
)
{
return
success
(
statsService
.
getCurWeekAcceptanceQualified
(
queryDTO
));
return
success
(
statsService
.
getCurWeekAcceptanceQualified
(
queryDTO
));
...
@@ -158,12 +163,14 @@ public class StatisticsController extends ServiceController {
...
@@ -158,12 +163,14 @@ public class StatisticsController extends ServiceController {
}
}
@ApiOperation
(
"本周自产炭块质量统计"
)
@ApiOperation
(
"本周自产炭块质量统计"
)
@Login
(
action
=
Action
.
Skip
)
@PostMapping
(
"/cur_week_carbon_blocks"
)
@PostMapping
(
"/cur_week_carbon_blocks"
)
public
RestResult
<
List
<
Statistics
>>
getCurWeekCarbonBlocks
(
QueryDTO
queryDTO
)
{
public
RestResult
<
List
<
Statistics
>>
getCurWeekCarbonBlocks
(
QueryDTO
queryDTO
)
{
return
success
(
statsService
.
getCurWeekCarbonBlocks
(
queryDTO
));
return
success
(
statsService
.
getCurWeekCarbonBlocks
(
queryDTO
));
}
}
@ApiOperation
(
"当日原铝质量统计"
)
@ApiOperation
(
"当日原铝质量统计"
)
@Login
(
action
=
Action
.
Skip
)
@PostMapping
(
"/al_brands_rate"
)
@PostMapping
(
"/al_brands_rate"
)
public
RestResult
<
List
<
Statistics
>>
getAlBrandsRate
(
QueryDTO
queryDTO
)
{
public
RestResult
<
List
<
Statistics
>>
getAlBrandsRate
(
QueryDTO
queryDTO
)
{
return
success
(
statsService
.
getAlBrandsRate
(
queryDTO
));
return
success
(
statsService
.
getAlBrandsRate
(
queryDTO
));
...
@@ -220,4 +227,40 @@ public class StatisticsController extends ServiceController {
...
@@ -220,4 +227,40 @@ public class StatisticsController extends ServiceController {
public
RestResult
<
Statistics
>
getTestItemQuantityStats
(
QueryDTO
queryDTO
)
{
public
RestResult
<
Statistics
>
getTestItemQuantityStats
(
QueryDTO
queryDTO
)
{
return
success
(
statsService
.
getTestItemQuantityStats
(
queryDTO
));
return
success
(
statsService
.
getTestItemQuantityStats
(
queryDTO
));
}
}
@ApiOperation
(
"获取化验委托数量统计数据"
)
@Login
(
action
=
Action
.
Skip
)
@PostMapping
(
"/assay_material_quantity"
)
public
RestResult
<
List
<
Map
<
String
,
Object
>>>
getAssayMaterialQuantity
(
QueryDTO
queryDTO
)
{
return
success
(
statsService
.
getAssayMaterialQuantity
(
queryDTO
));
}
@ApiOperation
(
"获取可检测项目统计数据"
)
@Login
(
action
=
Action
.
Skip
)
@PostMapping
(
"/detectable_item_quantity"
)
public
RestResult
<
List
<
Map
<
String
,
Object
>>>
getDetectableItemQuantity
(
QueryDTO
queryDTO
)
{
return
success
(
statsService
.
getDetectableItemQuantity
(
queryDTO
));
}
@ApiOperation
(
"获取化验检测完毕任务数量统计数据"
)
@Login
(
action
=
Action
.
Skip
)
@PostMapping
(
"/detected_tasks_quantity"
)
public
RestResult
<
List
<
Map
<
String
,
Object
>>>
getDetectedTasksQuantity
(
QueryDTO
queryDTO
)
{
return
success
(
statsService
.
getDetectedTasksQuantity
(
queryDTO
));
}
@ApiOperation
(
"获取日原辅料检测当前实时数据情况"
)
@Login
(
action
=
Action
.
Skip
)
@PostMapping
(
"/cur_raw_material_quantity"
)
public
RestResult
<
Map
<
String
,
Object
>>
getRawMaterialStageQuantity
(
QueryDTO
queryDTO
)
{
return
success
(
statsService
.
getRawMaterialStageQuantity
(
queryDTO
));
}
@ApiOperation
(
"获取日过程样检测当前实时数据情况"
)
@Login
(
action
=
Action
.
Skip
)
@PostMapping
(
"/cur_process_sample_quantity"
)
public
RestResult
<
Map
<
String
,
Object
>>
getProcessSampleStageQuantity
(
QueryDTO
queryDTO
)
{
return
success
(
statsService
.
getProcessSampleStageQuantity
(
queryDTO
));
}
}
}
src/main/java/com/patzn/cloud/service/lims/hmhj/mapper/NoticeAnnouncementMapper.java
View file @
eddc4c47
package
com
.
patzn
.
cloud
.
service
.
lims
.
hmhj
.
mapper
;
package
com
.
patzn
.
cloud
.
service
.
lims
.
hmhj
.
mapper
;
import
com.baomidou.mybatisplus.annotations.SqlParser
;
import
com.patzn.cloud.commons.mapper.BatchMapper
;
import
com.patzn.cloud.commons.mapper.BatchMapper
;
import
com.patzn.cloud.service.hmhj.entity.NoticeAnnouncement
;
import
com.patzn.cloud.service.hmhj.entity.NoticeAnnouncement
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
...
@@ -30,5 +31,6 @@ public interface NoticeAnnouncementMapper extends BatchMapper<NoticeAnnouncement
...
@@ -30,5 +31,6 @@ public interface NoticeAnnouncementMapper extends BatchMapper<NoticeAnnouncement
* @param limit the limit
* @param limit the limit
* @return the list
* @return the list
*/
*/
@SqlParser
(
filter
=
true
)
List
<
NoticeAnnouncement
>
selectLatestNotices
(
@Param
(
"limit"
)
Integer
limit
);
List
<
NoticeAnnouncement
>
selectLatestNotices
(
@Param
(
"limit"
)
Integer
limit
);
}
}
src/main/java/com/patzn/cloud/service/lims/hmhj/mapper/StatisticsMapper.java
View file @
eddc4c47
...
@@ -10,6 +10,7 @@ import com.patzn.cloud.service.hmhj.vo.DailyStatsLedgerVO;
...
@@ -10,6 +10,7 @@ import com.patzn.cloud.service.hmhj.vo.DailyStatsLedgerVO;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
public
interface
StatisticsMapper
extends
BatchMapper
<
Statistics
>
{
public
interface
StatisticsMapper
extends
BatchMapper
<
Statistics
>
{
...
@@ -93,4 +94,19 @@ public interface StatisticsMapper extends BatchMapper<Statistics> {
...
@@ -93,4 +94,19 @@ public interface StatisticsMapper extends BatchMapper<Statistics> {
@SqlParser
(
filter
=
true
)
@SqlParser
(
filter
=
true
)
Statistics
selectAlProductInspectionQuantityRate
(
@Param
(
"vo"
)
QueryDTO
queryDTO
);
Statistics
selectAlProductInspectionQuantityRate
(
@Param
(
"vo"
)
QueryDTO
queryDTO
);
@SqlParser
(
filter
=
true
)
List
<
Map
<
String
,
Object
>>
selectAssayMaterialQuantity
(
@Param
(
"vo"
)
QueryDTO
queryDTO
);
@SqlParser
(
filter
=
true
)
List
<
Map
<
String
,
Object
>>
selectDetectableItemQuantity
(
@Param
(
"vo"
)
QueryDTO
queryDTO
);
@SqlParser
(
filter
=
true
)
List
<
Map
<
String
,
Object
>>
selectDetectedTasksQuantity
(
@Param
(
"vo"
)
QueryDTO
queryDTO
);
@SqlParser
(
filter
=
true
)
Map
<
String
,
Object
>
selectRawMaterialStageQuantity
(
@Param
(
"vo"
)
QueryDTO
queryDTO
);
@SqlParser
(
filter
=
true
)
Map
<
String
,
Object
>
selectProcessSampleStageQuantity
(
@Param
(
"vo"
)
QueryDTO
queryDTO
);
}
}
src/main/java/com/patzn/cloud/service/lims/hmhj/service/IStatisticsService.java
View file @
eddc4c47
...
@@ -33,6 +33,12 @@ public interface IStatisticsService extends IBaseService<Statistics> {
...
@@ -33,6 +33,12 @@ public interface IStatisticsService extends IBaseService<Statistics> {
List
<
Statistics
>
getSamplingQuantity
(
RangeStatsQueryDTO
queryDTO
);
List
<
Statistics
>
getSamplingQuantity
(
RangeStatsQueryDTO
queryDTO
);
List
<
Map
<
String
,
Object
>>
getDetectableItemQuantity
(
QueryDTO
queryDTO
);
List
<
Map
<
String
,
Object
>>
getDetectedTasksQuantity
(
QueryDTO
queryDTO
);
Map
<
String
,
Object
>
getRawMaterialStageQuantity
(
QueryDTO
queryDTO
);
Statistics
getItemSamesChainQuantity
(
RangeStatsQueryDTO
queryDTO
);
Statistics
getItemSamesChainQuantity
(
RangeStatsQueryDTO
queryDTO
);
Statistics
getOutTestFinishQuantity
(
QueryDTO
queryDTO
);
Statistics
getOutTestFinishQuantity
(
QueryDTO
queryDTO
);
...
@@ -70,4 +76,8 @@ public interface IStatisticsService extends IBaseService<Statistics> {
...
@@ -70,4 +76,8 @@ public interface IStatisticsService extends IBaseService<Statistics> {
Integer
getAlProductInspectionQuantity
(
QueryDTO
queryDTO
);
Integer
getAlProductInspectionQuantity
(
QueryDTO
queryDTO
);
Statistics
getAlProductInspectionQuantityRate
(
QueryDTO
queryDTO
);
Statistics
getAlProductInspectionQuantityRate
(
QueryDTO
queryDTO
);
List
<
Map
<
String
,
Object
>>
getAssayMaterialQuantity
(
QueryDTO
queryDTO
);
Map
<
String
,
Object
>
getProcessSampleStageQuantity
(
QueryDTO
queryDTO
);
}
}
src/main/java/com/patzn/cloud/service/lims/hmhj/service/impl/StatisticsServiceImpl.java
View file @
eddc4c47
...
@@ -3,7 +3,6 @@ package com.patzn.cloud.service.lims.hmhj.service.impl;
...
@@ -3,7 +3,6 @@ package com.patzn.cloud.service.lims.hmhj.service.impl;
import
com.baomidou.mybatisplus.toolkit.CollectionUtils
;
import
com.baomidou.mybatisplus.toolkit.CollectionUtils
;
import
com.patzn.cloud.commons.api.RestAssert
;
import
com.patzn.cloud.commons.api.RestAssert
;
import
com.patzn.cloud.commons.service.impl.BaseServiceImpl
;
import
com.patzn.cloud.commons.service.impl.BaseServiceImpl
;
import
com.patzn.cloud.commons.toolkit.BigDecimalUtils
;
import
com.patzn.cloud.service.hmhj.dto.LedgerQueryDTO
;
import
com.patzn.cloud.service.hmhj.dto.LedgerQueryDTO
;
import
com.patzn.cloud.service.hmhj.dto.QueryDTO
;
import
com.patzn.cloud.service.hmhj.dto.QueryDTO
;
import
com.patzn.cloud.service.hmhj.dto.RangeStatsQueryDTO
;
import
com.patzn.cloud.service.hmhj.dto.RangeStatsQueryDTO
;
...
@@ -16,7 +15,6 @@ import org.apache.commons.lang.time.DateUtils;
...
@@ -16,7 +15,6 @@ import org.apache.commons.lang.time.DateUtils;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.math.BigDecimal
;
import
java.util.*
;
import
java.util.*
;
import
java.util.concurrent.atomic.AtomicReference
;
import
java.util.concurrent.atomic.AtomicReference
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -89,24 +87,24 @@ public class StatisticsServiceImpl extends BaseServiceImpl<StatisticsMapper, Sta
...
@@ -89,24 +87,24 @@ public class StatisticsServiceImpl extends BaseServiceImpl<StatisticsMapper, Sta
@Override
@Override
public
List
<
Statistics
>
getPrevAlBrandsRate
(
QueryDTO
queryDTO
)
{
public
List
<
Statistics
>
getPrevAlBrandsRate
(
QueryDTO
queryDTO
)
{
List
<
Statistics
>
statistics
=
getAlBrandsRate
(
queryDTO
);
List
<
Statistics
>
statistics
=
getAlBrandsRate
(
queryDTO
);
if
(
CollectionUtils
.
isEmpty
(
statistics
))
{
//
if (CollectionUtils.isEmpty(statistics)) {
return
statistics
;
//
return statistics;
}
//
}
queryDTO
.
setType
(
"Al99.70"
);
//
queryDTO.setType("Al99.70");
Integer
total
=
statistics
.
get
(
0
).
getTotal
();
//
Integer total = statistics.get(0).getTotal();
Integer
num
=
baseMapper
.
selectAlBrandLowFeStats
(
queryDTO
);
//
Integer num = baseMapper.selectAlBrandLowFeStats(queryDTO);
num
=
null
==
num
?
0
:
num
;
//
num = null == num ? 0 : num;
Statistics
lowFe
=
new
Statistics
();
//
Statistics lowFe = new Statistics();
lowFe
.
setBrand
(
queryDTO
.
getType
()
+
"低铁"
);
//
lowFe.setBrand(queryDTO.getType() + "低铁");
lowFe
.
setTotal
(
total
);
//
lowFe.setTotal(total);
lowFe
.
setBrandNum
(
num
);
//
lowFe.setBrandNum(num);
if
(
null
==
total
||
0
==
total
)
{
//
if (null == total || 0 == total) {
lowFe
.
setRatio
(
0.0000
);
//
lowFe.setRatio(0.0000);
}
else
{
//
} else {
double
def
=
1.0000
;
//
double def = 1.0000;
lowFe
.
setRatio
(
BigDecimalUtils
.
div
(
new
BigDecimal
(
def
*
num
),
new
BigDecimal
(
def
*
total
),
4
).
doubleValue
());
//
lowFe.setRatio(BigDecimalUtils.div(new BigDecimal(def * num), new BigDecimal(def * total), 4).doubleValue());
}
//
}
statistics
.
add
(
lowFe
);
//
statistics.add(lowFe);
return
statistics
;
return
statistics
;
}
}
...
@@ -143,7 +141,7 @@ public class StatisticsServiceImpl extends BaseServiceImpl<StatisticsMapper, Sta
...
@@ -143,7 +141,7 @@ public class StatisticsServiceImpl extends BaseServiceImpl<StatisticsMapper, Sta
}
}
@Override
@Override
public
Statistics
getAnodeInspectionDoneQuantity
(
QueryDTO
queryDTO
){
public
Statistics
getAnodeInspectionDoneQuantity
(
QueryDTO
queryDTO
)
{
return
baseMapper
.
selectAnodeInspectionDoneQuantity
(
queryDTO
);
return
baseMapper
.
selectAnodeInspectionDoneQuantity
(
queryDTO
);
}
}
...
@@ -210,6 +208,37 @@ public class StatisticsServiceImpl extends BaseServiceImpl<StatisticsMapper, Sta
...
@@ -210,6 +208,37 @@ public class StatisticsServiceImpl extends BaseServiceImpl<StatisticsMapper, Sta
}
}
@Override
@Override
public
List
<
Map
<
String
,
Object
>>
getAssayMaterialQuantity
(
QueryDTO
queryDTO
)
{
return
baseMapper
.
selectAssayMaterialQuantity
(
queryDTO
);
}
@Override
public
List
<
Map
<
String
,
Object
>>
getDetectableItemQuantity
(
QueryDTO
queryDTO
)
{
return
baseMapper
.
selectDetectableItemQuantity
(
queryDTO
);
}
@Override
public
List
<
Map
<
String
,
Object
>>
getDetectedTasksQuantity
(
QueryDTO
queryDTO
)
{
return
baseMapper
.
selectDetectedTasksQuantity
(
queryDTO
);
}
@Override
public
Map
<
String
,
Object
>
getRawMaterialStageQuantity
(
QueryDTO
queryDTO
)
{
if
(
null
==
queryDTO
.
getQueryDate
())
{
queryDTO
.
setQueryDate
(
new
Date
());
}
return
baseMapper
.
selectRawMaterialStageQuantity
(
queryDTO
);
}
@Override
public
Map
<
String
,
Object
>
getProcessSampleStageQuantity
(
QueryDTO
queryDTO
)
{
if
(
null
==
queryDTO
.
getQueryDate
())
{
queryDTO
.
setQueryDate
(
new
Date
());
}
return
baseMapper
.
selectProcessSampleStageQuantity
(
queryDTO
);
}
@Override
public
Statistics
getItemSamesChainQuantity
(
RangeStatsQueryDTO
queryDTO
)
{
public
Statistics
getItemSamesChainQuantity
(
RangeStatsQueryDTO
queryDTO
)
{
handleSamesChainTimeRange
(
queryDTO
);
handleSamesChainTimeRange
(
queryDTO
);
return
baseMapper
.
selectItemSamesChainQuantity
(
queryDTO
);
return
baseMapper
.
selectItemSamesChainQuantity
(
queryDTO
);
...
@@ -231,7 +260,7 @@ public class StatisticsServiceImpl extends BaseServiceImpl<StatisticsMapper, Sta
...
@@ -231,7 +260,7 @@ public class StatisticsServiceImpl extends BaseServiceImpl<StatisticsMapper, Sta
private
void
handleTimeRange
(
RangeStatsQueryDTO
queryDTO
)
{
private
void
handleTimeRange
(
RangeStatsQueryDTO
queryDTO
)
{
queryDTO
.
setLastYearTimeS
(
DateUtils
.
addYears
(
queryDTO
.
getTimeS
(),
-
1
));
queryDTO
.
setLastYearTimeS
(
DateUtils
.
addYears
(
queryDTO
.
getTimeS
(),
-
1
));
queryDTO
.
setLastYearTimeE
(
DateUtils
.
addYears
(
queryDTO
.
getTimeE
(),
-
1
));
queryDTO
.
setLastYearTimeE
(
DateUtils
.
addYears
(
queryDTO
.
getTimeE
(),
-
1
));
Integer
days
=
DateKit
.
monthsBetweenTwoDates
(
queryDTO
.
getTimeS
(),
queryDTO
.
getTimeE
())
;
Integer
days
=
DateKit
.
daysBetweenTwoDates
(
queryDTO
.
getTimeS
(),
queryDTO
.
getTimeE
())
+
2
;
queryDTO
.
setPrevTimeS
(
DateUtils
.
addDays
(
queryDTO
.
getTimeS
(),
-
days
));
queryDTO
.
setPrevTimeS
(
DateUtils
.
addDays
(
queryDTO
.
getTimeS
(),
-
days
));
queryDTO
.
setPrevTimeE
(
queryDTO
.
getTimeS
());
queryDTO
.
setPrevTimeE
(
queryDTO
.
getTimeS
());
}
}
...
...
src/main/resources/mapper/hmhj/StatisticsMapper.xml
View file @
eddc4c47
This diff is collapsed.
Click to expand it.
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