Compare commits
2 Commits
a516390989
...
b548d915dc
| Author | SHA1 | Date |
|---|---|---|
|
|
b548d915dc | |
|
|
1428e9d2ad |
|
|
@ -0,0 +1,57 @@
|
|||
package com.securitycontrol.screen.controller;
|
||||
|
||||
|
||||
import com.securitycontrol.common.core.web.controller.BaseController;
|
||||
import com.securitycontrol.common.core.web.domain.AjaxResult;
|
||||
import com.securitycontrol.common.core.web.page.TableDataInfo;
|
||||
import com.securitycontrol.screen.domain.SjNewConstructionProgress;
|
||||
import com.securitycontrol.screen.service.ISjNewConstructionProgressService;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/project/constructionProgress")
|
||||
public class SjNewConstructionProgressController extends BaseController {
|
||||
|
||||
|
||||
@Resource
|
||||
private ISjNewConstructionProgressService progressService;
|
||||
|
||||
/**
|
||||
* 施工进度分析列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(@RequestBody SjNewConstructionProgress progress) {
|
||||
startPage();
|
||||
List<SjNewConstructionProgress> list =
|
||||
progressService.selectConstructionProgressList(progress);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询专业工序整体进度
|
||||
*/
|
||||
@GetMapping("/summary")
|
||||
public AjaxResult getProgressSummary(@RequestBody SjNewConstructionProgress progress) {
|
||||
return AjaxResult.success(
|
||||
progressService.getProgressSummary(progress)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 工序明细查询(点击汇总进入)
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
public AjaxResult getProgressDetail(@RequestBody SjNewConstructionProgress progress) {
|
||||
System.out.println(
|
||||
"queryType=[" + progress.getQueryType() + "], length=" +
|
||||
(progress.getQueryType() == null ? 0 : progress.getQueryType().length())
|
||||
);
|
||||
|
||||
return AjaxResult.success(
|
||||
progressService.getProgressDetail(progress)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
package com.securitycontrol.screen.controller;
|
||||
|
||||
import com.securitycontrol.common.core.web.controller.BaseController;
|
||||
import com.securitycontrol.common.core.web.page.TableDataInfo;
|
||||
import com.securitycontrol.screen.domain.SjNewProjectSafety;
|
||||
import com.securitycontrol.screen.service.ISjNewProjectSafetyService;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/project/projectSafety")
|
||||
public class SjNewProjectSafetyController extends BaseController {
|
||||
@Resource
|
||||
private ISjNewProjectSafetyService safetyService;
|
||||
|
||||
/**
|
||||
* 工程安全分析列表
|
||||
*/
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SjNewProjectSafety safety) {
|
||||
startPage();
|
||||
List<SjNewProjectSafety> list = safetyService.selectProjectSafetyList(safety);
|
||||
return getDataTable(list);
|
||||
}
|
||||
/**
|
||||
* 工程安全分析列表-环境信息
|
||||
*/
|
||||
|
||||
@GetMapping("/hjlist")
|
||||
public TableDataInfo hjlist(SjNewProjectSafety safety) {
|
||||
List<SjNewProjectSafety> list = safetyService.selectProjectSafetyList(safety);
|
||||
return getDataTable(list);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
package com.securitycontrol.screen.controller;
|
||||
|
||||
import com.securitycontrol.common.core.web.controller.BaseController;
|
||||
import com.securitycontrol.common.core.web.domain.AjaxResult;
|
||||
import com.securitycontrol.common.core.web.page.TableDataInfo;
|
||||
import com.securitycontrol.screen.domain.SjNewAsyncWarn;
|
||||
import com.securitycontrol.screen.domain.SjNewProjectQuality;
|
||||
import com.securitycontrol.screen.service.ISjNewQualityService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 工程质量控制层
|
||||
*
|
||||
* @author fly
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/project/quality")
|
||||
@Slf4j
|
||||
public class SjNewQualityController extends BaseController {
|
||||
@Resource
|
||||
private ISjNewQualityService qualityService;
|
||||
|
||||
/**
|
||||
* 工程质量分析列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(@RequestBody SjNewProjectQuality quality) {
|
||||
startPage();
|
||||
List<SjNewProjectQuality> list = qualityService.selectQualityList(quality);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 质量预警列表
|
||||
*/
|
||||
@GetMapping("/warnlist")
|
||||
public TableDataInfo warnList( @RequestBody SjNewAsyncWarn warn) {
|
||||
startPage();
|
||||
warn.setDataType("1"); // 质量类型
|
||||
List<SjNewAsyncWarn> list = qualityService.selectWarnList(warn);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 1️⃣ 班组合格率
|
||||
*/
|
||||
@GetMapping("/teamRate")
|
||||
public AjaxResult teamRate(@RequestBody SjNewProjectQuality quality) {
|
||||
|
||||
return AjaxResult.success(qualityService.teamPassRate(quality));
|
||||
}
|
||||
|
||||
/**
|
||||
* 2️⃣ 合格 / 不合格数量
|
||||
*/
|
||||
@GetMapping("/resultCount")
|
||||
public AjaxResult resultCount(@RequestBody SjNewProjectQuality quality) {
|
||||
|
||||
return AjaxResult.success(qualityService.resultCount(quality));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
package com.securitycontrol.screen.controller;
|
||||
|
||||
import com.securitycontrol.common.core.web.controller.BaseController;
|
||||
import com.securitycontrol.common.core.web.domain.AjaxResult;
|
||||
import com.securitycontrol.common.core.web.page.TableDataInfo;
|
||||
import com.securitycontrol.screen.domain.WorkerTaskSummaryVO;
|
||||
import com.securitycontrol.screen.service.WorkerTaskAnalysisService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/worker/analysis")
|
||||
public class SjNewWorkerAnalysisController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private WorkerTaskAnalysisService workerTaskAnalysisService;
|
||||
|
||||
/**
|
||||
* 工人任务状态汇总统计
|
||||
*
|
||||
* @param vo 查询条件(项目ID、时间范围)
|
||||
* @return 各状态任务数量
|
||||
*/
|
||||
@GetMapping("/summary")
|
||||
public AjaxResult summary(@RequestBody WorkerTaskSummaryVO vo) {
|
||||
return AjaxResult.success(
|
||||
workerTaskAnalysisService.selectTaskSummary(vo)
|
||||
);
|
||||
}
|
||||
/**
|
||||
* 工人任务历史明细查询
|
||||
*
|
||||
* 说明:
|
||||
* - 可按任务状态(1/2/3/4)查询
|
||||
* - 支持时间范围过滤
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
public TableDataInfo detail(@RequestBody WorkerTaskSummaryVO vo) {
|
||||
startPage();
|
||||
return getDataTable(
|
||||
workerTaskAnalysisService.selectTaskDetail(vo)
|
||||
);
|
||||
}
|
||||
/**
|
||||
* 月任务延期排名(按人员)
|
||||
*
|
||||
* 示例返回:
|
||||
* 张三 延期 5 次
|
||||
* 李四 延期 3 次
|
||||
*/
|
||||
@GetMapping("/delay/person")
|
||||
public AjaxResult delayRankByPerson(@RequestBody WorkerTaskSummaryVO vo) {
|
||||
|
||||
return AjaxResult.success(
|
||||
workerTaskAnalysisService.selectDelayRankByPerson(vo)
|
||||
);
|
||||
}
|
||||
/**
|
||||
* 月任务延期分布(按工种)
|
||||
*
|
||||
* 示例返回:
|
||||
* 架子工 40%
|
||||
* 电工 30%
|
||||
*/
|
||||
@GetMapping("/delay/workType")
|
||||
public AjaxResult delayDistributionByWorkType(WorkerTaskSummaryVO vo) {
|
||||
return AjaxResult.success(
|
||||
workerTaskAnalysisService.selectDelayDistributionByWorkType(vo)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
package com.securitycontrol.screen.domain;
|
||||
|
||||
import com.securitycontrol.common.core.constant.annotation.Excel;
|
||||
import com.securitycontrol.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class SjNewAsyncWarn extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
private String projectId;
|
||||
/** 提醒时间 */
|
||||
@Excel(name = "提醒时间")
|
||||
private String txTime;
|
||||
|
||||
/** 预警类型 */
|
||||
@Excel(name = "预警类型")
|
||||
private String txType;
|
||||
|
||||
/** 分析提醒内容 */
|
||||
@Excel(name = "提醒内容")
|
||||
private String content;
|
||||
|
||||
/** 类型(1代表质量) */
|
||||
private String dataType;
|
||||
|
||||
/** 备注 */
|
||||
private String remark;
|
||||
|
||||
private String endTestDay;
|
||||
|
||||
/** 测试开始时间 */
|
||||
private String startTestDay;
|
||||
}
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
package com.securitycontrol.screen.domain;
|
||||
|
||||
|
||||
import com.securitycontrol.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
public class SjNewConstructionProgress extends BaseEntity {
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 工序类型(1土建 2电气) */
|
||||
private String gxType;
|
||||
|
||||
/** 工序 */
|
||||
private String gx;
|
||||
|
||||
/** 计划开始时间 */
|
||||
private String planStartTime;
|
||||
|
||||
/** 计划结束时间 */
|
||||
private String planEndTime;
|
||||
|
||||
/** 投入人员 */
|
||||
private String inUser;
|
||||
|
||||
/** 投入设备 */
|
||||
private String inDevice;
|
||||
|
||||
/** 当前进度 */
|
||||
private String progress;
|
||||
|
||||
/** 实际结束时间 */
|
||||
private String endTime;
|
||||
|
||||
/** 状态(1已完成 2进行中 3异常) */
|
||||
private String status;
|
||||
|
||||
/** 项目ID */
|
||||
private String projectId;
|
||||
|
||||
/** ===== 查询条件 ===== */
|
||||
|
||||
/** 开始时间 */
|
||||
private String startTime;
|
||||
|
||||
/** 结束时间 */
|
||||
private String endTimeQuery;
|
||||
|
||||
/** 总工序 */
|
||||
private Integer totalCount;
|
||||
|
||||
/** 已完成工序 */
|
||||
private Integer finishedCount;
|
||||
|
||||
/** 异常工序 */
|
||||
private Integer abnormalCount;
|
||||
|
||||
/** 整体进度(0~1) */
|
||||
private BigDecimal overallProgress;
|
||||
|
||||
private String queryType;
|
||||
}
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
package com.securitycontrol.screen.domain;
|
||||
|
||||
import com.securitycontrol.common.core.constant.annotation.Excel;
|
||||
import com.securitycontrol.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
@Data
|
||||
public class SjNewProjectQuality extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 项目编号 */
|
||||
private String projectId;
|
||||
|
||||
/** 班组名称 */
|
||||
@Excel(name = "班组名称")
|
||||
private String teamName;
|
||||
|
||||
/** 检测内容 */
|
||||
@Excel(name = "检测内容")
|
||||
private String content;
|
||||
|
||||
/** 检测日期 */
|
||||
@Excel(name = "检测日期")
|
||||
private String testDay;
|
||||
|
||||
/** 检测结果 */
|
||||
@Excel(name = "检测结果")
|
||||
private String testResult;
|
||||
|
||||
/** 质量检测报告 */
|
||||
private String testReport;
|
||||
|
||||
/** 删除状态 */
|
||||
private String delFlag;
|
||||
|
||||
|
||||
/** 查询用:开始日期 */
|
||||
private String startTestDay;
|
||||
|
||||
/** 查询用:结束日期 */
|
||||
private String endTestDay;
|
||||
|
||||
/** 合格数 */
|
||||
private Integer passCount;
|
||||
|
||||
/** 不合格数 */
|
||||
private Integer failCount;
|
||||
/** 总数 */
|
||||
private Integer totalCount;
|
||||
|
||||
/** 合格率 */
|
||||
private Double passRate;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,85 @@
|
|||
package com.securitycontrol.screen.domain;
|
||||
|
||||
|
||||
import com.securitycontrol.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class SjNewProjectSafety extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 工程名称
|
||||
*/
|
||||
private String proName;
|
||||
|
||||
/**
|
||||
* 作业计划编号
|
||||
*/
|
||||
private String planNum;
|
||||
|
||||
/**
|
||||
* 作业地点
|
||||
*/
|
||||
private String workLocation;
|
||||
|
||||
/**
|
||||
* 检测点编号
|
||||
*/
|
||||
private String monitorCode;
|
||||
|
||||
/**
|
||||
* 检测点名称
|
||||
*/
|
||||
private String monitorName;
|
||||
|
||||
/**
|
||||
* 温度
|
||||
*/
|
||||
private String wd;
|
||||
|
||||
/**
|
||||
* 湿度
|
||||
*/
|
||||
private String sd;
|
||||
|
||||
/**
|
||||
* 风速
|
||||
*/
|
||||
private String speed;
|
||||
|
||||
/**
|
||||
* 空气质量
|
||||
*/
|
||||
private String airQuality;
|
||||
|
||||
/**
|
||||
* 是否存在隐患(0否 1是)
|
||||
*/
|
||||
private String isSafety;
|
||||
|
||||
/**
|
||||
* 分析与改进
|
||||
*/
|
||||
private String analysis;
|
||||
|
||||
/**
|
||||
* 球机编码
|
||||
*/
|
||||
private String puid;
|
||||
|
||||
/**
|
||||
* 检测时间
|
||||
*/
|
||||
private String detectionTime;
|
||||
|
||||
/**
|
||||
* ===== 查询用 =====
|
||||
*/
|
||||
private String startTime;
|
||||
private String endTime;
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
package com.securitycontrol.screen.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class WorkerDelayDTO {
|
||||
private String userName; // 映射 COALESCE(p.name, a.user_name)
|
||||
private Integer delayCount; // 映射 COUNT(1)
|
||||
}
|
||||
|
|
@ -0,0 +1,91 @@
|
|||
package com.securitycontrol.screen.domain;
|
||||
|
||||
import lombok.Data;
|
||||
/**
|
||||
* 工人任务统计与明细查询 VO
|
||||
*
|
||||
* 说明:
|
||||
* 1. 用于接收前端查询参数
|
||||
* 2. 用于返回任务汇总统计结果
|
||||
* 3. 用于返回任务历史明细数据
|
||||
*/
|
||||
@Data
|
||||
public class WorkerTaskSummaryVO {
|
||||
|
||||
/* ======================== 基础字段(数据库) ======================== */
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 姓名 */
|
||||
private String userName;
|
||||
private String workType;
|
||||
|
||||
/** 班组ID */
|
||||
private String teamId;
|
||||
|
||||
/** 班组名称 */
|
||||
private String teamName;
|
||||
|
||||
/** 工作内容 */
|
||||
private String workContent;
|
||||
|
||||
/**
|
||||
* 任务状态
|
||||
* 1:已完成
|
||||
* 2:进行中
|
||||
* 3:未开始
|
||||
* 4:延期
|
||||
*/
|
||||
private String taskStatus;
|
||||
|
||||
/** 计划开始时间 */
|
||||
private String planStartTime;
|
||||
|
||||
/** 计划完成时间 */
|
||||
private String planEndTime;
|
||||
|
||||
/** 实际完成时间 */
|
||||
private String endTime;
|
||||
|
||||
/** 是否延期 */
|
||||
private String isYq;
|
||||
|
||||
/** 延期天数 */
|
||||
private String yaDay;
|
||||
|
||||
/** 备注 */
|
||||
private String remark;
|
||||
|
||||
/** 创建时间 */
|
||||
private String createTime;
|
||||
|
||||
/** 修改时间 */
|
||||
private String updateTime;
|
||||
|
||||
/** 项目ID */
|
||||
private String projectId;
|
||||
|
||||
/* ======================== 查询条件扩展字段 ======================== */
|
||||
|
||||
/** 查询开始时间(前端传) */
|
||||
private String startTime;
|
||||
|
||||
/* ======================== 汇总统计返回字段 ======================== */
|
||||
|
||||
/** 任务总数 */
|
||||
private Integer totalCount;
|
||||
|
||||
/** 已完成数量 */
|
||||
private Integer finishedCount;
|
||||
|
||||
/** 进行中数量 */
|
||||
private Integer processingCount;
|
||||
|
||||
/** 未开始数量 */
|
||||
private Integer notStartedCount;
|
||||
|
||||
/** 延期数量 */
|
||||
private Integer delayCount;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package com.securitycontrol.screen.mapper;
|
||||
|
||||
import com.securitycontrol.screen.domain.SjNewConstructionProgress;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface SjNewConstructionProgressMapper {
|
||||
/**
|
||||
* 施工进度列表查询
|
||||
*/
|
||||
List<SjNewConstructionProgress> selectConstructionProgressList(
|
||||
SjNewConstructionProgress progress);
|
||||
|
||||
SjNewConstructionProgress selectProgressSummary(SjNewConstructionProgress progress);
|
||||
|
||||
List<SjNewConstructionProgress> selectProgressDetail(
|
||||
@Param("projectId") String projectId,
|
||||
@Param("gxType") String gxType,
|
||||
@Param("queryType") String queryType
|
||||
);
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
package com.securitycontrol.screen.mapper;
|
||||
|
||||
import com.securitycontrol.screen.domain.SjNewProjectSafety;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface SjNewProjectSafetyMapper {
|
||||
|
||||
List<SjNewProjectSafety> selectProjectSafetyList(SjNewProjectSafety safety);
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package com.securitycontrol.screen.mapper;
|
||||
|
||||
import com.securitycontrol.screen.domain.SjNewAsyncWarn;
|
||||
import com.securitycontrol.screen.domain.SjNewProjectQuality;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface SjNewQualityMapper{
|
||||
|
||||
|
||||
List<SjNewProjectQuality> selectProjectQualityList(SjNewProjectQuality quality);
|
||||
|
||||
List<SjNewAsyncWarn> selectAsyncWarnList(SjNewAsyncWarn warn);
|
||||
|
||||
List<SjNewProjectQuality> selectTeamPassRate(SjNewProjectQuality quality);
|
||||
|
||||
SjNewProjectQuality selectResultCount(SjNewProjectQuality quality);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package com.securitycontrol.screen.mapper;
|
||||
|
||||
import com.securitycontrol.screen.domain.WorkerDelayDTO;
|
||||
import com.securitycontrol.screen.domain.WorkerTaskSummaryVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface WorkerTaskAnalysisMapper {
|
||||
/**
|
||||
* 查询任务状态汇总
|
||||
*/
|
||||
WorkerTaskSummaryVO selectTaskSummary(WorkerTaskSummaryVO vo);
|
||||
|
||||
/**
|
||||
* 查询任务历史明细
|
||||
*/
|
||||
List<WorkerTaskSummaryVO> selectTaskDetail(WorkerTaskSummaryVO vo);
|
||||
|
||||
/**
|
||||
* 月任务延期排名(按人员)
|
||||
*/
|
||||
List<WorkerDelayDTO> selectDelayRankByPerson(WorkerTaskSummaryVO vo);
|
||||
|
||||
/**
|
||||
* 月任务延期分布(按工种)
|
||||
*/
|
||||
List<WorkerTaskSummaryVO> selectDelayDistributionByWorkType(WorkerTaskSummaryVO vo);
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package com.securitycontrol.screen.service;
|
||||
|
||||
import com.securitycontrol.screen.domain.SjNewConstructionProgress;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ISjNewConstructionProgressService{
|
||||
List<SjNewConstructionProgress> selectConstructionProgressList(
|
||||
SjNewConstructionProgress progress);
|
||||
|
||||
SjNewConstructionProgress getProgressSummary(SjNewConstructionProgress progress);
|
||||
|
||||
List<SjNewConstructionProgress> getProgressDetail(SjNewConstructionProgress progress);
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
package com.securitycontrol.screen.service;
|
||||
|
||||
import com.securitycontrol.screen.domain.SjNewProjectSafety;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ISjNewProjectSafetyService {
|
||||
|
||||
List<SjNewProjectSafety> selectProjectSafetyList(SjNewProjectSafety safety);
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package com.securitycontrol.screen.service;
|
||||
|
||||
import com.securitycontrol.screen.domain.SjNewAsyncWarn;
|
||||
import com.securitycontrol.screen.domain.SjNewProjectQuality;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ISjNewQualityService {
|
||||
|
||||
List<SjNewProjectQuality> selectQualityList(SjNewProjectQuality quality);
|
||||
|
||||
List<SjNewAsyncWarn> selectWarnList(SjNewAsyncWarn warn);
|
||||
|
||||
List<SjNewProjectQuality> teamPassRate(SjNewProjectQuality quality);
|
||||
|
||||
SjNewProjectQuality resultCount(SjNewProjectQuality quality);
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
package com.securitycontrol.screen.service;
|
||||
|
||||
import com.securitycontrol.screen.domain.WorkerDelayDTO;
|
||||
import com.securitycontrol.screen.domain.WorkerTaskSummaryVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface WorkerTaskAnalysisService {
|
||||
/**
|
||||
* 查询任务状态汇总
|
||||
*
|
||||
* @param vo 查询条件
|
||||
* @return 汇总统计结果
|
||||
*/
|
||||
WorkerTaskSummaryVO selectTaskSummary(WorkerTaskSummaryVO vo);
|
||||
|
||||
/**
|
||||
* 查询任务历史明细
|
||||
*
|
||||
* @param vo 查询条件
|
||||
* @return 明细列表
|
||||
*/
|
||||
List<WorkerTaskSummaryVO> selectTaskDetail(WorkerTaskSummaryVO vo);
|
||||
|
||||
/**
|
||||
* 月任务延期排名(按人员)
|
||||
*/
|
||||
List<WorkerDelayDTO> selectDelayRankByPerson(WorkerTaskSummaryVO vo);
|
||||
|
||||
/**
|
||||
* 月任务延期分布(按工种)
|
||||
*/
|
||||
List<WorkerTaskSummaryVO> selectDelayDistributionByWorkType(WorkerTaskSummaryVO vo);
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
package com.securitycontrol.screen.service.impl;
|
||||
|
||||
import com.securitycontrol.screen.domain.SjNewAsyncWarn;
|
||||
import com.securitycontrol.screen.domain.SjNewProjectQuality;
|
||||
import com.securitycontrol.screen.mapper.SjNewQualityMapper;
|
||||
import com.securitycontrol.screen.service.ISjNewQualityService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
@Slf4j
|
||||
@Service
|
||||
public class ISjNewQualityServiceImp implements ISjNewQualityService {
|
||||
@Resource
|
||||
private SjNewQualityMapper qualityMapper;
|
||||
|
||||
@Override
|
||||
public List<SjNewProjectQuality> selectQualityList(SjNewProjectQuality quality) {
|
||||
return qualityMapper.selectProjectQualityList(quality);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SjNewAsyncWarn> selectWarnList(SjNewAsyncWarn warn) {
|
||||
return qualityMapper.selectAsyncWarnList(warn);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SjNewProjectQuality> teamPassRate(SjNewProjectQuality quality) {
|
||||
return qualityMapper.selectTeamPassRate(quality);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SjNewProjectQuality resultCount(SjNewProjectQuality quality) {
|
||||
return qualityMapper.selectResultCount(quality);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
package com.securitycontrol.screen.service.impl;
|
||||
|
||||
import com.securitycontrol.screen.domain.SjNewConstructionProgress;
|
||||
import com.securitycontrol.screen.mapper.SjNewConstructionProgressMapper;
|
||||
import com.securitycontrol.screen.service.ISjNewConstructionProgressService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class SjNewConstructionProgressServiceImpl implements ISjNewConstructionProgressService {
|
||||
|
||||
|
||||
@Resource
|
||||
private SjNewConstructionProgressMapper mapper;
|
||||
|
||||
@Override
|
||||
public List<SjNewConstructionProgress> selectConstructionProgressList(
|
||||
SjNewConstructionProgress progress) {
|
||||
return mapper.selectConstructionProgressList(progress);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SjNewConstructionProgress getProgressSummary(SjNewConstructionProgress progress) {
|
||||
SjNewConstructionProgress vo =
|
||||
mapper.selectProgressSummary(progress);
|
||||
if (vo.getTotalCount() == null || vo.getTotalCount() == 0) {
|
||||
vo.setOverallProgress(BigDecimal.ZERO);
|
||||
} else {
|
||||
vo.setOverallProgress(
|
||||
BigDecimal.valueOf(vo.getFinishedCount())
|
||||
.divide(BigDecimal.valueOf(vo.getTotalCount()), 4, RoundingMode.HALF_UP)
|
||||
);
|
||||
}
|
||||
return vo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SjNewConstructionProgress> getProgressDetail(SjNewConstructionProgress progress) {
|
||||
String projectId = progress.getProjectId();
|
||||
String gxType = progress.getGxType();
|
||||
String queryType = progress.getQueryType();
|
||||
return mapper.selectProgressDetail(projectId, gxType, queryType);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
package com.securitycontrol.screen.service.impl;
|
||||
|
||||
import com.securitycontrol.screen.domain.SjNewProjectSafety;
|
||||
import com.securitycontrol.screen.mapper.SjNewProjectSafetyMapper;
|
||||
import com.securitycontrol.screen.service.ISjNewProjectSafetyService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class SjNewProjectSafetyServiceImpl implements ISjNewProjectSafetyService {
|
||||
|
||||
|
||||
@Resource
|
||||
private SjNewProjectSafetyMapper mapper;
|
||||
@Override
|
||||
public List<SjNewProjectSafety> selectProjectSafetyList(SjNewProjectSafety safety) {
|
||||
return mapper.selectProjectSafetyList(safety);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
package com.securitycontrol.screen.service.impl;
|
||||
|
||||
import com.securitycontrol.screen.domain.WorkerDelayDTO;
|
||||
import com.securitycontrol.screen.domain.WorkerTaskSummaryVO;
|
||||
import com.securitycontrol.screen.mapper.WorkerTaskAnalysisMapper;
|
||||
import com.securitycontrol.screen.service.WorkerTaskAnalysisService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class WorkerTaskAnalysisServiceImpl
|
||||
implements WorkerTaskAnalysisService {
|
||||
|
||||
@Autowired
|
||||
private WorkerTaskAnalysisMapper workerTaskAnalysisMapper;
|
||||
|
||||
@Override
|
||||
public WorkerTaskSummaryVO selectTaskSummary(WorkerTaskSummaryVO vo) {
|
||||
return workerTaskAnalysisMapper.selectTaskSummary(vo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WorkerTaskSummaryVO> selectTaskDetail(WorkerTaskSummaryVO vo) {
|
||||
return workerTaskAnalysisMapper.selectTaskDetail(vo);
|
||||
}
|
||||
@Override
|
||||
public List<WorkerDelayDTO> selectDelayRankByPerson(WorkerTaskSummaryVO vo) {
|
||||
return workerTaskAnalysisMapper.selectDelayRankByPerson(vo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WorkerTaskSummaryVO> selectDelayDistributionByWorkType(WorkerTaskSummaryVO vo) {
|
||||
return workerTaskAnalysisMapper.selectDelayDistributionByWorkType(vo);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,92 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.securitycontrol.screen.mapper.SjNewConstructionProgressMapper">
|
||||
|
||||
<select id="selectConstructionProgressList"
|
||||
parameterType="com.securitycontrol.screen.domain.SjNewConstructionProgress"
|
||||
resultType="com.securitycontrol.screen.domain.SjNewConstructionProgress">
|
||||
SELECT
|
||||
id,
|
||||
gx_type AS gxType,
|
||||
gx,
|
||||
plan_start_time AS planStartTime,
|
||||
plan_end_time AS planEndTime,
|
||||
in_user AS inUser,
|
||||
in_device AS inDevice,
|
||||
progress,
|
||||
end_time AS endTime,
|
||||
status,
|
||||
project_id AS projectId,
|
||||
create_time,
|
||||
update_time,
|
||||
remark
|
||||
FROM sj_new_construction_progress
|
||||
<where>
|
||||
<if test="projectId != null and projectId != ''">
|
||||
AND project_id = #{projectId}
|
||||
</if>
|
||||
<if test="gxType != null and gxType != ''">
|
||||
AND gx_type = #{gxType}
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
AND status = #{status}
|
||||
</if>
|
||||
<if test="startTime != null and startTime != ''">
|
||||
AND plan_start_time >= #{startTime}
|
||||
</if>
|
||||
<if test="endTime != null and endTime != ''">
|
||||
AND plan_end_time <= #{endTime}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY plan_start_time DESC
|
||||
</select>
|
||||
<select id="selectProgressSummary"
|
||||
resultType="com.securitycontrol.screen.domain.SjNewConstructionProgress">
|
||||
SELECT
|
||||
COUNT(1) AS totalCount,
|
||||
|
||||
SUM(
|
||||
CASE WHEN status = '1' THEN 1 ELSE 0 END
|
||||
) AS finishedCount,
|
||||
|
||||
SUM(
|
||||
CASE WHEN status = '3' THEN 1 ELSE 0 END
|
||||
) AS abnormalCount
|
||||
|
||||
FROM sj_new_construction_progress
|
||||
WHERE project_id = #{projectId}
|
||||
AND gx_type = #{gxType};
|
||||
|
||||
</select>
|
||||
<select id="selectProgressDetail" resultType="com.securitycontrol.screen.domain.SjNewConstructionProgress">
|
||||
SELECT
|
||||
id,
|
||||
gx_type AS gxType,
|
||||
gx,
|
||||
plan_start_time AS planStartTime,
|
||||
plan_end_time AS planEndTime,
|
||||
in_user AS inUser,
|
||||
in_device AS inDevice,
|
||||
progress,
|
||||
end_time AS endTime,
|
||||
status,
|
||||
remark,
|
||||
project_id AS projectId,
|
||||
create_time,
|
||||
update_time
|
||||
FROM sj_new_construction_progress
|
||||
WHERE project_id = #{projectId}
|
||||
AND gx_type = #{gxType}
|
||||
|
||||
<choose>
|
||||
<when test="queryType != null and queryType.toString() == '1'.toString()">
|
||||
AND status = '1'
|
||||
</when>
|
||||
<when test="queryType != null and queryType.toString() == '3'.toString()">
|
||||
AND status = '3'
|
||||
</when>
|
||||
</choose>
|
||||
|
||||
ORDER BY create_time ASC
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.securitycontrol.screen.mapper.SjNewProjectSafetyMapper">
|
||||
|
||||
<select id="selectProjectSafetyList" resultType="com.securitycontrol.screen.domain.SjNewProjectSafety">
|
||||
SELECT
|
||||
id,
|
||||
pro_name AS proName,
|
||||
plan_num AS planNum,
|
||||
work_location AS workLocation,
|
||||
monitor_code AS monitorCode,
|
||||
monitor_name AS monitorName,
|
||||
wd,
|
||||
sd,
|
||||
speed,
|
||||
air_quality AS airQuality,
|
||||
is_safety AS isSafety,
|
||||
analysis,
|
||||
puid,
|
||||
detection_time AS detectionTime,
|
||||
create_time
|
||||
FROM sj_new_project_safety
|
||||
<where>
|
||||
<if test="proName != null and proName != ''">
|
||||
AND pro_name LIKE CONCAT('%', #{proName}, '%')
|
||||
</if>
|
||||
<if test="planNum != null and planNum != ''">
|
||||
AND plan_num = #{planNum}
|
||||
</if>
|
||||
<if test="monitorName != null and monitorName != ''">
|
||||
AND monitor_name LIKE CONCAT('%', #{monitorName}, '%')
|
||||
</if>
|
||||
<if test="isSafety != null and isSafety != ''">
|
||||
AND is_safety = #{isSafety}
|
||||
</if>
|
||||
<if test="startTime != null and startTime != ''">
|
||||
AND detection_time >= #{startTime}
|
||||
</if>
|
||||
<if test="endTime != null and endTime != ''">
|
||||
AND detection_time <= #{endTime}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY detection_time DESC
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,116 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.securitycontrol.screen.mapper.WorkerTaskAnalysisMapper">
|
||||
|
||||
<select id="selectTaskSummary" resultType="com.securitycontrol.screen.domain.WorkerTaskSummaryVO">
|
||||
SELECT
|
||||
COUNT(1) AS totalCount,
|
||||
SUM(CASE WHEN task_status = '1' THEN 1 ELSE 0 END) AS finishedCount,
|
||||
SUM(CASE WHEN task_status = '2' THEN 1 ELSE 0 END) AS processingCount,
|
||||
SUM(CASE WHEN task_status = '3' THEN 1 ELSE 0 END) AS notStartedCount,
|
||||
SUM(CASE WHEN task_status = '4' THEN 1 ELSE 0 END) AS delayCount
|
||||
FROM sj_new_worker_analysic
|
||||
WHERE project_id = #{projectId}
|
||||
|
||||
<if test="startTime != null and startTime != ''">
|
||||
AND plan_start_time >= #{startTime}
|
||||
</if>
|
||||
|
||||
<if test="endTime != null and endTime != ''">
|
||||
AND plan_end_time >= #{endTime}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectTaskDetail" resultType="com.securitycontrol.screen.domain.WorkerTaskSummaryVO">
|
||||
SELECT
|
||||
id,
|
||||
user_name AS userName,
|
||||
team_id AS teamId,
|
||||
team_name AS teamName,
|
||||
work_content AS workContent,
|
||||
task_status AS taskStatus,
|
||||
plan_start_time AS planStartTime,
|
||||
plan_end_time AS planEndTime,
|
||||
end_time AS endTime,
|
||||
is_yq AS isYq,
|
||||
ya_day AS yaDay,
|
||||
remark,
|
||||
create_time AS createTime,
|
||||
update_time AS updateTime,
|
||||
project_id AS projectId
|
||||
FROM sj_new_worker_analysic
|
||||
WHERE project_id = #{projectId}
|
||||
|
||||
<!-- 按任务状态查询历史 -->
|
||||
<if test="taskStatus != null and taskStatus != ''">
|
||||
AND task_status = #{taskStatus}
|
||||
</if>
|
||||
|
||||
<!-- 时间范围 -->
|
||||
<if test="startTime != null and startTime != ''">
|
||||
AND plan_start_time >= #{startTime}
|
||||
</if>
|
||||
|
||||
<if test="endTime != null and endTime != ''">
|
||||
AND plan_end_time <= #{endTime}
|
||||
</if>
|
||||
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
<resultMap id="DelayRankByPersonMap" type="com.securitycontrol.screen.domain.WorkerDelayDTO">
|
||||
<!-- 映射聚合列 -->
|
||||
<result column="user_name" property="userName"/>
|
||||
<result column="delay_count" property="delayCount"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectDelayRankByPerson" resultMap="DelayRankByPersonMap">
|
||||
SELECT
|
||||
p.name AS user_name,
|
||||
COUNT(1) AS delay_count
|
||||
FROM sj_new_worker_analysic a
|
||||
LEFT JOIN sj_team_people p ON a.user_name = p.id
|
||||
WHERE a.project_id = #{projectId}
|
||||
AND a.task_status = '4'
|
||||
<if test="startTime != null and startTime != ''">
|
||||
AND a.plan_end_time >= #{startTime}
|
||||
</if>
|
||||
<if test="endTime != null and endTime != ''">
|
||||
AND a.plan_end_time <= #{endTime}
|
||||
</if>
|
||||
GROUP BY p.name
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectDelayDistributionByWorkType" resultType="com.securitycontrol.screen.domain.WorkerTaskSummaryVO">
|
||||
SELECT
|
||||
p.work_type AS workType,
|
||||
COUNT(1) AS delayCount,
|
||||
ROUND(
|
||||
COUNT(1) / (
|
||||
SELECT COUNT(1)
|
||||
FROM sj_new_worker_analysic
|
||||
WHERE project_id = #{projectId}
|
||||
AND task_status = '4'
|
||||
<if test="startTime != null and startTime != ''">
|
||||
AND STR_TO_DATE(plan_end_time, '%Y-%m-%d') >= STR_TO_DATE(#{startTime}, '%Y-%m-%d')
|
||||
</if>
|
||||
<if test="endTime != null and endTime != ''">
|
||||
AND STR_TO_DATE(plan_end_time, '%Y-%m-%d') <STR_TO_DATE(#{endTime}, '%Y-%m-%d')
|
||||
</if>
|
||||
) * 100, 2
|
||||
) AS progress
|
||||
FROM sj_new_worker_analysic a
|
||||
LEFT JOIN sj_team_people p
|
||||
ON CAST(a.user_name AS UNSIGNED) = p.id
|
||||
WHERE a.project_id = #{projectId}
|
||||
AND a.task_status = '4'
|
||||
<if test="startTime != null and startTime != ''">
|
||||
AND STR_TO_DATE(a.plan_end_time, '%Y-%m-%d') >= STR_TO_DATE(#{startTime}, '%Y-%m-%d')
|
||||
</if>
|
||||
<if test="endTime != null and endTime != ''">
|
||||
AND STR_TO_DATE(a.plan_end_time, '%Y-%m-%d') <= STR_TO_DATE(#{endTime}, '%Y-%m-%d')
|
||||
</if>
|
||||
GROUP BY p.work_type
|
||||
ORDER BY delayCount DESC
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,108 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.securitycontrol.screen.mapper.SjNewQualityMapper">
|
||||
|
||||
<!-- 工程质量分析列表 -->
|
||||
<select id="selectProjectQualityList"
|
||||
parameterType="com.securitycontrol.screen.domain.SjNewProjectQuality"
|
||||
resultType="com.securitycontrol.screen.domain.SjNewProjectQuality">
|
||||
SELECT
|
||||
id,
|
||||
team_name AS teamName,
|
||||
content,
|
||||
test_day AS testDay,
|
||||
test_result AS testResult,
|
||||
test_report AS testReport,
|
||||
del_flag AS delFlag,
|
||||
create_time
|
||||
FROM sj_new_project_quality
|
||||
WHERE del_flag = '0'
|
||||
<if test="projectId != null and projectId != ''">
|
||||
and project_id = #{projectId}
|
||||
</if>
|
||||
<if test="teamName != null and teamName != ''">
|
||||
AND team_name LIKE CONCAT('%', #{teamName}, '%')
|
||||
</if>
|
||||
<if test="testResult != null and testResult != ''">
|
||||
AND test_result = #{testResult}
|
||||
</if>
|
||||
<if test="startTestDay != null and startTestDay != ''">
|
||||
AND test_day >= #{startTestDay}
|
||||
</if>
|
||||
<if test="endTestDay != null and endTestDay != ''">
|
||||
AND test_day <= #{endTestDay}
|
||||
</if>
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
|
||||
<!-- 质量预警列表 -->
|
||||
<select id="selectAsyncWarnList"
|
||||
parameterType="com.securitycontrol.screen.domain.SjNewAsyncWarn"
|
||||
resultType="com.securitycontrol.screen.domain.SjNewAsyncWarn">
|
||||
SELECT
|
||||
id,
|
||||
tx_time AS txTime,
|
||||
tx_type AS txType,
|
||||
content,
|
||||
data_type AS dataType,
|
||||
remark,
|
||||
create_time
|
||||
FROM sj_new_async_warn
|
||||
<where>
|
||||
|
||||
<if test="dataType != null and dataType != ''">
|
||||
AND data_type = #{dataType}
|
||||
</if>
|
||||
<if test="txType != null and txType != ''">
|
||||
AND tx_type = #{txType}
|
||||
</if>
|
||||
<if test="startTestDay != null and startTestDay != ''">
|
||||
AND tx_time >= #{startTestDay}
|
||||
</if>
|
||||
<if test="endTestDay != null and endTestDay != ''">
|
||||
AND tx_time <= #{endTestDay}
|
||||
</if>
|
||||
<if test="projectId != null and projectId != ''">
|
||||
and project_id = #{projectId}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
<select id="selectTeamPassRate" resultType="com.securitycontrol.screen.domain.SjNewProjectQuality">
|
||||
SELECT
|
||||
team_name AS teamName,
|
||||
COUNT(*) AS totalCount,
|
||||
SUM(CASE WHEN test_report = '0' THEN 1 ELSE 0 END) AS passCount,
|
||||
ROUND(
|
||||
SUM(CASE WHEN test_report = '0' THEN 1 ELSE 0 END)
|
||||
/ COUNT(*) * 100, 2
|
||||
) AS passRate
|
||||
FROM sj_new_project_quality
|
||||
WHERE del_flag = '0'
|
||||
AND project_id = #{projectId}
|
||||
<if test="startTestDay != null and startTestDay != ''">
|
||||
AND test_day >= #{startTestDay}
|
||||
</if>
|
||||
<if test="endTestDay != null and endTestDay != ''">
|
||||
AND test_day <= #{endTestDay}
|
||||
</if>
|
||||
GROUP BY team_name
|
||||
</select>
|
||||
<select id="selectResultCount" resultType="com.securitycontrol.screen.domain.SjNewProjectQuality">
|
||||
SELECT
|
||||
SUM(CASE WHEN test_report = '0' THEN 1 ELSE 0 END) AS passCount,
|
||||
SUM(CASE WHEN test_report = '1' THEN 1 ELSE 0 END) AS failCount
|
||||
FROM sj_new_project_quality
|
||||
WHERE del_flag = '0'
|
||||
<if test="startTestDay != null and startTestDay != ''">
|
||||
AND test_day >= #{startTestDay}
|
||||
</if>
|
||||
<if test="endTestDay != null and endTestDay != ''">
|
||||
AND test_day <= #{endTestDay}
|
||||
</if>
|
||||
<if test="projectId != null and projectId != ''">
|
||||
AND project_id = #{projectId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue