|
@@ -174,8 +174,9 @@ object ScanTaskBaseService : RService<ScanTaskBase>(SMybatisDao(ScanTaskBase::cl
|
|
|
*/
|
|
|
fun categoryCounts(equipScanTask: EquipScanTask): SQueryResponse<CategoryStatistics>{
|
|
|
try {
|
|
|
+ val projectId = SPageContext.getHeader("projectId").toString()
|
|
|
if (!equipScanTask.id.isNullOrEmpty()&&!equipScanTask.equipId.isNullOrEmpty()){
|
|
|
- val categoryStatistics = mapper.categoryStatistics(equipScanTask.id!!, equipScanTask.equipId!!)
|
|
|
+ val categoryStatistics = mapper.categoryStatistics(projectId,equipScanTask.id!!, equipScanTask.equipId!!)
|
|
|
val sQueryResponse = SQueryResponse<CategoryStatistics>()
|
|
|
sQueryResponse.total = categoryStatistics.size.toLong()
|
|
|
sQueryResponse.content = categoryStatistics
|
|
@@ -198,16 +199,17 @@ object ScanTaskBaseService : RService<ScanTaskBase>(SMybatisDao(ScanTaskBase::cl
|
|
|
*/
|
|
|
fun categoryCountsModel(type: String?,equipScanTask: ModelScanTask): SQueryResponse<CategoryStatistics>{
|
|
|
try {
|
|
|
+ val projectId = SPageContext.getHeader("projectId")
|
|
|
if (!equipScanTask.id.isNullOrEmpty()&&!equipScanTask.equipId.isNullOrEmpty()){
|
|
|
if (!type.isNullOrEmpty()&&type == "model"){
|
|
|
- val categoryStatistics = ModelScanTaskService.mapper.categoryStatisticsModel(equipScanTask.id!!, equipScanTask.equipId!!)
|
|
|
+ val categoryStatistics = ModelScanTaskService.mapper.categoryStatisticsModel(projectId!!,equipScanTask.id!!, equipScanTask.equipId!!)
|
|
|
val sQueryResponse = SQueryResponse<CategoryStatistics>()
|
|
|
sQueryResponse.total = categoryStatistics.size.toLong()
|
|
|
sQueryResponse.content = categoryStatistics
|
|
|
sQueryResponse.result = SResponseType.success
|
|
|
return sQueryResponse
|
|
|
}else{
|
|
|
- val categoryStatistics = mapper.categoryStatistics(equipScanTask.id!!, equipScanTask.equipId!!)
|
|
|
+ val categoryStatistics = mapper.categoryStatistics(projectId!!,equipScanTask.id!!, equipScanTask.equipId!!)
|
|
|
val sQueryResponse = SQueryResponse<CategoryStatistics>()
|
|
|
sQueryResponse.total = categoryStatistics.size.toLong()
|
|
|
sQueryResponse.content = categoryStatistics
|