diff --git a/God-Vue-master/god-admin/src/main/java/com/god/web/controller/dataStatistics/QyzyDataStatisticsController.java b/God-Vue-master/god-admin/src/main/java/com/god/web/controller/dataStatistics/QyzyDataStatisticsController.java new file mode 100644 index 00000000..016c809e --- /dev/null +++ b/God-Vue-master/god-admin/src/main/java/com/god/web/controller/dataStatistics/QyzyDataStatisticsController.java @@ -0,0 +1,107 @@ +package com.god.web.controller.dataStatistics; + +import com.god.common.annotation.Log; +import com.god.common.core.controller.BaseController; +import com.god.common.core.domain.AjaxResult; +import com.god.common.core.page.TableDataInfo; +import com.god.common.enums.BusinessType; +import com.god.common.utils.poi.ExcelUtil; +import com.god.dataStatistics.domain.QyzyDataStatistics; +import com.god.dataStatistics.domain.QyzyTop; +import com.god.dataStatistics.service.IQyzyDataStatisticsService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +/** + * 生产作业数分类统计Controller + * + * @author Lxz + * @date 2023-11-06 + */ +@RestController +@RequestMapping("/dataStatistics/qyzyDataStatistics") +public class QyzyDataStatisticsController extends BaseController +{ + @Autowired + private IQyzyDataStatisticsService qyzyDataStatisticsService; + + /** + * 查询生产作业数分类统计列表 + */ + @PreAuthorize("@ss.hasPermi('dataStatistics:qyzyDataStatistics:list')") + @GetMapping("/list") + public TableDataInfo list(QyzyDataStatistics qyzyDataStatistics) + { + startPage(); + List list = qyzyDataStatisticsService.selectQyzyDataStatisticsList(qyzyDataStatistics); + return getDataTable(list); + } + + @GetMapping("/listTop") + public TableDataInfo listTop(QyzyTop qyzyTop) + { + startPage(); + List list = qyzyDataStatisticsService.selectTop(qyzyTop); + return getDataTable(list); + } + + /** + * 导出生产作业数分类统计列表 + */ + @PreAuthorize("@ss.hasPermi('dataStatistics:qyzyDataStatistics:export')") + @Log(title = "生产作业数分类统计", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, QyzyDataStatistics qyzyDataStatistics) + { + List list = qyzyDataStatisticsService.selectQyzyDataStatisticsList(qyzyDataStatistics); + ExcelUtil util = new ExcelUtil(QyzyDataStatistics.class); + util.exportExcel(response, list, "生产作业数分类统计数据"); + } + + /** + * 获取生产作业数分类统计详细信息 + */ + @PreAuthorize("@ss.hasPermi('dataStatistics:qyzyDataStatistics:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") String id) + { + return success(qyzyDataStatisticsService.selectQyzyDataStatisticsById(id)); + } + + /** + * 新增生产作业数分类统计 + */ + @PreAuthorize("@ss.hasPermi('dataStatistics:qyzyDataStatistics:add')") + @Log(title = "生产作业数分类统计", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody QyzyDataStatistics qyzyDataStatistics) + { + return toAjax(qyzyDataStatisticsService.insertQyzyDataStatistics(qyzyDataStatistics)); + } + + /** + * 修改生产作业数分类统计 + */ + @PreAuthorize("@ss.hasPermi('dataStatistics:qyzyDataStatistics:edit')") + @Log(title = "生产作业数分类统计", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody QyzyDataStatistics qyzyDataStatistics) + { + return toAjax(qyzyDataStatisticsService.updateQyzyDataStatistics(qyzyDataStatistics)); + } + + /** + * 删除生产作业数分类统计 + */ + @PreAuthorize("@ss.hasPermi('dataStatistics:qyzyDataStatistics:remove')") + @Log(title = "生产作业数分类统计", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable String[] ids) + { + return toAjax(qyzyDataStatisticsService.deleteQyzyDataStatisticsByIds(ids)); + } +} diff --git a/God-Vue-master/god-admin/src/main/java/com/god/web/controller/operation/QyzyPermitReportController.java b/God-Vue-master/god-admin/src/main/java/com/god/web/controller/operation/QyzyPermitReportController.java index 12234e05..6651c77f 100644 --- a/God-Vue-master/god-admin/src/main/java/com/god/web/controller/operation/QyzyPermitReportController.java +++ b/God-Vue-master/god-admin/src/main/java/com/god/web/controller/operation/QyzyPermitReportController.java @@ -1,25 +1,19 @@ package com.god.web.controller.operation; -import java.util.List; -import javax.servlet.http.HttpServletResponse; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; import com.god.common.annotation.Log; import com.god.common.core.controller.BaseController; import com.god.common.core.domain.AjaxResult; -import com.god.common.enums.BusinessType; -import com.god.passenger.operation.domain.QyzyPermitReport; -import com.god.passenger.operation.service.IQyzyPermitReportService; -import com.god.common.utils.poi.ExcelUtil; import com.god.common.core.page.TableDataInfo; +import com.god.common.enums.BusinessType; +import com.god.common.utils.poi.ExcelUtil; +import com.god.dataStatistics.domain.QyzyPermitReport; +import com.god.passenger.operation.service.IQyzyPermitReportService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; /** * 工作许可报备Controller diff --git a/God-Vue-master/god-admin/src/main/java/com/god/web/controller/operation/QyzySpecialTaskInfoController.java b/God-Vue-master/god-admin/src/main/java/com/god/web/controller/operation/QyzySpecialTaskInfoController.java index 617e66c6..5f65bb91 100644 --- a/God-Vue-master/god-admin/src/main/java/com/god/web/controller/operation/QyzySpecialTaskInfoController.java +++ b/God-Vue-master/god-admin/src/main/java/com/god/web/controller/operation/QyzySpecialTaskInfoController.java @@ -1,26 +1,19 @@ package com.god.web.controller.operation; -import java.util.List; -import javax.servlet.http.HttpServletResponse; - -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; import com.god.common.annotation.Log; import com.god.common.core.controller.BaseController; import com.god.common.core.domain.AjaxResult; -import com.god.common.enums.BusinessType; -import com.god.passenger.operation.domain.QyzySpecialTaskInfo; -import com.god.passenger.operation.service.IQyzySpecialTaskInfoService; -import com.god.common.utils.poi.ExcelUtil; import com.god.common.core.page.TableDataInfo; +import com.god.common.enums.BusinessType; +import com.god.common.utils.poi.ExcelUtil; +import com.god.dataStatistics.domain.QyzySpecialTaskInfo; +import com.god.passenger.operation.service.IQyzySpecialTaskInfoService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; /** * 特殊作业清单Controller diff --git a/God-Vue-master/god-passenger/src/main/java/com/god/passenger/operation/service/IQyzyPermitReportService.java b/God-Vue-master/god-passenger/src/main/java/com/god/passenger/operation/service/IQyzyPermitReportService.java index 2aa7edfd..2bf7da7e 100644 --- a/God-Vue-master/god-passenger/src/main/java/com/god/passenger/operation/service/IQyzyPermitReportService.java +++ b/God-Vue-master/god-passenger/src/main/java/com/god/passenger/operation/service/IQyzyPermitReportService.java @@ -1,7 +1,8 @@ package com.god.passenger.operation.service; +import com.god.dataStatistics.domain.QyzyPermitReport; + import java.util.List; -import com.god.passenger.operation.domain.QyzyPermitReport; /** * 工作许可报备Service接口 diff --git a/God-Vue-master/god-passenger/src/main/java/com/god/passenger/operation/service/IQyzySpecialTaskInfoService.java b/God-Vue-master/god-passenger/src/main/java/com/god/passenger/operation/service/IQyzySpecialTaskInfoService.java index 5896f6c4..d4ddcd01 100644 --- a/God-Vue-master/god-passenger/src/main/java/com/god/passenger/operation/service/IQyzySpecialTaskInfoService.java +++ b/God-Vue-master/god-passenger/src/main/java/com/god/passenger/operation/service/IQyzySpecialTaskInfoService.java @@ -1,7 +1,7 @@ package com.god.passenger.operation.service; import java.util.List; -import com.god.passenger.operation.domain.QyzySpecialTaskInfo; +import com.god.dataStatistics.domain.QyzySpecialTaskInfo; /** * 特殊作业清单Service接口 diff --git a/God-Vue-master/god-passenger/src/main/java/com/god/passenger/operation/service/impl/QyzyPermitReportServiceImpl.java b/God-Vue-master/god-passenger/src/main/java/com/god/passenger/operation/service/impl/QyzyPermitReportServiceImpl.java index 666fd3e9..36c31aea 100644 --- a/God-Vue-master/god-passenger/src/main/java/com/god/passenger/operation/service/impl/QyzyPermitReportServiceImpl.java +++ b/God-Vue-master/god-passenger/src/main/java/com/god/passenger/operation/service/impl/QyzyPermitReportServiceImpl.java @@ -1,13 +1,12 @@ package com.god.passenger.operation.service.impl; -import java.util.HashMap; -import java.util.List; - import com.god.common.utils.DateUtils; import com.god.common.utils.SecurityUtils; import com.god.common.utils.StringUtils; import com.god.common.utils.uuid.IdUtils; -import com.god.passenger.operation.listener.WorkPermitApplyListener; +import com.god.dataStatistics.domain.QyzyPermitReport; +import com.god.dataStatistics.mapper.QyzyPermitReportMapper; +import com.god.passenger.operation.service.IQyzyPermitReportService; import org.flowable.engine.IdentityService; import org.flowable.engine.RuntimeService; import org.flowable.engine.runtime.ProcessInstance; @@ -15,11 +14,10 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import com.god.passenger.operation.mapper.QyzyPermitReportMapper; -import com.god.passenger.operation.domain.QyzyPermitReport; -import com.god.passenger.operation.service.IQyzyPermitReportService; import javax.annotation.Resource; +import java.util.HashMap; +import java.util.List; /** * 工作许可报备Service业务层处理 diff --git a/God-Vue-master/god-passenger/src/main/java/com/god/passenger/operation/service/impl/QyzySpecialTaskInfoServiceImpl.java b/God-Vue-master/god-passenger/src/main/java/com/god/passenger/operation/service/impl/QyzySpecialTaskInfoServiceImpl.java index f52ac42d..02b5cd2c 100644 --- a/God-Vue-master/god-passenger/src/main/java/com/god/passenger/operation/service/impl/QyzySpecialTaskInfoServiceImpl.java +++ b/God-Vue-master/god-passenger/src/main/java/com/god/passenger/operation/service/impl/QyzySpecialTaskInfoServiceImpl.java @@ -6,8 +6,8 @@ import com.god.common.utils.StringUtils; import com.god.common.utils.uuid.IdUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import com.god.passenger.operation.mapper.QyzySpecialTaskInfoMapper; -import com.god.passenger.operation.domain.QyzySpecialTaskInfo; +import com.god.dataStatistics.mapper.QyzySpecialTaskInfoMapper; +import com.god.dataStatistics.domain.QyzySpecialTaskInfo; import com.god.passenger.operation.service.IQyzySpecialTaskInfoService; /** diff --git a/God-Vue-master/god-passenger/src/main/resources/mapper/operation/QyzyPermitReportMapper.xml b/God-Vue-master/god-passenger/src/main/resources/mapper/operation/QyzyPermitReportMapper.xml deleted file mode 100644 index f24d00a5..00000000 --- a/God-Vue-master/god-passenger/src/main/resources/mapper/operation/QyzyPermitReportMapper.xml +++ /dev/null @@ -1,135 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - select id, apply_name, apply_dept, phone_info, apply_time, apply_reason, start_time, end_time, work_content, event_type, data_type, create_by, create_time , apply_event, work_name, hazard_info, safety_info from qyzy_permit_report - - - - - - - - insert into qyzy_permit_report - - id, - apply_name, - apply_dept, - phone_info, - apply_time, - apply_reason, - start_time, - end_time, - work_content, - event_type, - data_type, - create_by, - create_time, - apply_event, - work_name, - hazard_info, - safety_info, - - - #{id}, - #{applyName}, - #{applyDept}, - #{phoneInfo}, - #{applyTime}, - #{applyReason}, - #{startTime}, - #{endTime}, - #{workContent}, - #{eventType}, - #{dataType}, - #{createBy}, - #{createTime}, - #{applyEvent}, - #{workName}, - #{hazardInfo}, - #{safetyInfo}, - - - - - update qyzy_permit_report - - apply_name = #{applyName}, - apply_dept = #{applyDept}, - phone_info = #{phoneInfo}, - apply_time = #{applyTime}, - apply_reason = #{applyReason}, - start_time = #{startTime}, - end_time = #{endTime}, - work_content = #{workContent}, - event_type = #{eventType}, - data_type = #{dataType}, - create_by = #{createBy}, - create_time = #{createTime}, - apply_event = #{applyEvent}, - work_name = #{workName}, - hazard_info = #{hazardInfo}, - safety_info = #{safetyInfo}, - - where id = #{id} - - - - delete from qyzy_permit_report where id = #{id} - - - - delete from qyzy_permit_report where id in - - #{id} - - - - - update qyzy_permit_report - set event_type = #{eventType} - where id = #{id} - - \ No newline at end of file diff --git a/God-Vue-master/god-passenger/src/main/resources/mapper/operation/QyzySpecialTaskInfoMapper.xml b/God-Vue-master/god-passenger/src/main/resources/mapper/operation/QyzySpecialTaskInfoMapper.xml deleted file mode 100644 index 03278e8f..00000000 --- a/God-Vue-master/god-passenger/src/main/resources/mapper/operation/QyzySpecialTaskInfoMapper.xml +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - select id, special_task_name, task_type, task_area, start_time, end_time, charge_person, task_info, task_status, remark, data_type, permit_id, permit_name, add_person, add_time from qyzy_special_task_info - - - - - - - - insert into qyzy_special_task_info - - id, - special_task_name, - task_type, - task_area, - start_time, - end_time, - charge_person, - task_info, - task_status, - remark, - data_type, - permit_id, - permit_name, - add_person, - add_time, - - - #{id}, - #{specialTaskName}, - #{taskType}, - #{taskArea}, - #{startTime}, - #{endTime}, - #{chargePerson}, - #{taskInfo}, - #{taskStatus}, - #{remark}, - #{dataType}, - #{permitId}, - #{permitName}, - #{addPerson}, - #{addTime}, - - - - - update qyzy_special_task_info - - special_task_name = #{specialTaskName}, - task_type = #{taskType}, - task_area = #{taskArea}, - start_time = #{startTime}, - end_time = #{endTime}, - charge_person = #{chargePerson}, - task_info = #{taskInfo}, - task_status = #{taskStatus}, - remark = #{remark}, - data_type = #{dataType}, - permit_id = #{permitId}, - permit_name = #{permitName}, - add_person = #{addPerson}, - add_time = #{addTime}, - - where id = #{id} - - - - delete from qyzy_special_task_info where id = #{id} - - - - delete from qyzy_special_task_info where id in - - #{id} - - - \ No newline at end of file diff --git a/God-Vue-master/god-system/src/main/java/com/god/dataStatistics/domain/QyzyDataStatistics.java b/God-Vue-master/god-system/src/main/java/com/god/dataStatistics/domain/QyzyDataStatistics.java new file mode 100644 index 00000000..0e307ed0 --- /dev/null +++ b/God-Vue-master/god-system/src/main/java/com/god/dataStatistics/domain/QyzyDataStatistics.java @@ -0,0 +1,49 @@ +package com.god.dataStatistics.domain; + +import com.god.common.annotation.Excel; +import com.god.common.core.domain.BaseEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 生产作业数分类统计对象 qyzy_data_statistics + * + * @author Lxz + * @date 2023-11-06 + */ +@EqualsAndHashCode(callSuper = true) +@Data +public class QyzyDataStatistics extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键 */ + private String id; + + /** 时间 */ + @Excel(name = "时间") + private String addTime; + + /** 区域地点 */ + @Excel(name = "区域地点") + private String taskArea; + + /** 作业名称 */ + @Excel(name = "作业名称") + private String taskName; + + /** 类型 */ + @Excel(name = "类型") + private String typeR; + + /** 作业内容 */ + @Excel(name = "作业内容") + private String taskInfo; + + /** 添加人 */ + @Excel(name = "添加人") + private String addPerson; + private String workSize; + + private String specialSize; +} diff --git a/God-Vue-master/god-passenger/src/main/java/com/god/passenger/operation/domain/QyzyPermitReport.java b/God-Vue-master/god-system/src/main/java/com/god/dataStatistics/domain/QyzyPermitReport.java similarity index 99% rename from God-Vue-master/god-passenger/src/main/java/com/god/passenger/operation/domain/QyzyPermitReport.java rename to God-Vue-master/god-system/src/main/java/com/god/dataStatistics/domain/QyzyPermitReport.java index 8ff04524..54cdba44 100644 --- a/God-Vue-master/god-passenger/src/main/java/com/god/passenger/operation/domain/QyzyPermitReport.java +++ b/God-Vue-master/god-system/src/main/java/com/god/dataStatistics/domain/QyzyPermitReport.java @@ -1,4 +1,4 @@ -package com.god.passenger.operation.domain; +package com.god.dataStatistics.domain; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; diff --git a/God-Vue-master/god-passenger/src/main/java/com/god/passenger/operation/domain/QyzySpecialTaskInfo.java b/God-Vue-master/god-system/src/main/java/com/god/dataStatistics/domain/QyzySpecialTaskInfo.java similarity index 99% rename from God-Vue-master/god-passenger/src/main/java/com/god/passenger/operation/domain/QyzySpecialTaskInfo.java rename to God-Vue-master/god-system/src/main/java/com/god/dataStatistics/domain/QyzySpecialTaskInfo.java index 92a8d3cc..bf7610e7 100644 --- a/God-Vue-master/god-passenger/src/main/java/com/god/passenger/operation/domain/QyzySpecialTaskInfo.java +++ b/God-Vue-master/god-system/src/main/java/com/god/dataStatistics/domain/QyzySpecialTaskInfo.java @@ -1,4 +1,4 @@ -package com.god.passenger.operation.domain; +package com.god.dataStatistics.domain; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; diff --git a/God-Vue-master/god-system/src/main/java/com/god/dataStatistics/domain/QyzyTop.java b/God-Vue-master/god-system/src/main/java/com/god/dataStatistics/domain/QyzyTop.java new file mode 100644 index 00000000..bd7345ed --- /dev/null +++ b/God-Vue-master/god-system/src/main/java/com/god/dataStatistics/domain/QyzyTop.java @@ -0,0 +1,22 @@ +package com.god.dataStatistics.domain; + +import com.god.common.core.domain.BaseEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + + +@EqualsAndHashCode(callSuper = true) +@Data +public class QyzyTop extends BaseEntity { + /** + * 作业区域 + */ + private String taskArea; + + private String workSize; + + private String specialSize; + + private String allSize; + +} diff --git a/God-Vue-master/god-system/src/main/java/com/god/dataStatistics/mapper/QyzyDataStatisticsMapper.java b/God-Vue-master/god-system/src/main/java/com/god/dataStatistics/mapper/QyzyDataStatisticsMapper.java new file mode 100644 index 00000000..0109db4b --- /dev/null +++ b/God-Vue-master/god-system/src/main/java/com/god/dataStatistics/mapper/QyzyDataStatisticsMapper.java @@ -0,0 +1,67 @@ +package com.god.dataStatistics.mapper; + +import com.god.dataStatistics.domain.QyzyDataStatistics; + +import java.util.List; + +/** + * 生产作业数分类统计Mapper接口 + * + * @author Lxz + * @date 2023-11-06 + */ +public interface QyzyDataStatisticsMapper { + /** + * 查询生产作业数分类统计 + * + * @param id 生产作业数分类统计主键 + * @return 生产作业数分类统计 + */ + public QyzyDataStatistics selectQyzyDataStatisticsById(String id); + + public QyzyDataStatistics selectQyzyWorkSize(String taskArea); + + public QyzyDataStatistics selectQyzySpecialSize(String taskArea); + + /** + * 查询生产作业数分类统计列表 + * + * @param qyzyDataStatistics 生产作业数分类统计 + * @return 生产作业数分类统计集合 + */ + public List selectQyzyDataStatisticsList(QyzyDataStatistics qyzyDataStatistics); + + /** + * 新增生产作业数分类统计 + * + * @param qyzyDataStatistics 生产作业数分类统计 + * @return 结果 + */ + public int insertQyzyDataStatistics(QyzyDataStatistics qyzyDataStatistics); + + /** + * 修改生产作业数分类统计 + * + * @param qyzyDataStatistics 生产作业数分类统计 + * @return 结果 + */ + public int updateQyzyDataStatistics(QyzyDataStatistics qyzyDataStatistics); + + /** + * 删除生产作业数分类统计 + * + * @param id 生产作业数分类统计主键 + * @return 结果 + */ + public int deleteQyzyDataStatisticsById(String id); + + /** + * 批量删除生产作业数分类统计 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteQyzyDataStatisticsByIds(String[] ids); + + List selectQyzyTop(); +} diff --git a/God-Vue-master/god-passenger/src/main/java/com/god/passenger/operation/mapper/QyzyPermitReportMapper.java b/God-Vue-master/god-system/src/main/java/com/god/dataStatistics/mapper/QyzyPermitReportMapper.java similarity index 93% rename from God-Vue-master/god-passenger/src/main/java/com/god/passenger/operation/mapper/QyzyPermitReportMapper.java rename to God-Vue-master/god-system/src/main/java/com/god/dataStatistics/mapper/QyzyPermitReportMapper.java index 293ab597..71ba577d 100644 --- a/God-Vue-master/god-passenger/src/main/java/com/god/passenger/operation/mapper/QyzyPermitReportMapper.java +++ b/God-Vue-master/god-system/src/main/java/com/god/dataStatistics/mapper/QyzyPermitReportMapper.java @@ -1,10 +1,10 @@ -package com.god.passenger.operation.mapper; +package com.god.dataStatistics.mapper; + +import com.god.dataStatistics.domain.QyzyPermitReport; +import org.apache.ibatis.annotations.Param; import java.util.List; -import com.god.passenger.operation.domain.QyzyPermitReport; -import org.apache.ibatis.annotations.Param; - /** * 工作许可报备Mapper接口 * diff --git a/God-Vue-master/god-passenger/src/main/java/com/god/passenger/operation/mapper/QyzySpecialTaskInfoMapper.java b/God-Vue-master/god-system/src/main/java/com/god/dataStatistics/mapper/QyzySpecialTaskInfoMapper.java similarity index 93% rename from God-Vue-master/god-passenger/src/main/java/com/god/passenger/operation/mapper/QyzySpecialTaskInfoMapper.java rename to God-Vue-master/god-system/src/main/java/com/god/dataStatistics/mapper/QyzySpecialTaskInfoMapper.java index 28b244df..5c546cce 100644 --- a/God-Vue-master/god-passenger/src/main/java/com/god/passenger/operation/mapper/QyzySpecialTaskInfoMapper.java +++ b/God-Vue-master/god-system/src/main/java/com/god/dataStatistics/mapper/QyzySpecialTaskInfoMapper.java @@ -1,9 +1,9 @@ -package com.god.passenger.operation.mapper; +package com.god.dataStatistics.mapper; + +import com.god.dataStatistics.domain.QyzySpecialTaskInfo; import java.util.List; -import com.god.passenger.operation.domain.QyzySpecialTaskInfo; - /** * 特殊作业清单Mapper接口 * diff --git a/God-Vue-master/god-system/src/main/java/com/god/dataStatistics/service/IQyzyDataStatisticsService.java b/God-Vue-master/god-system/src/main/java/com/god/dataStatistics/service/IQyzyDataStatisticsService.java new file mode 100644 index 00000000..5a64442d --- /dev/null +++ b/God-Vue-master/god-system/src/main/java/com/god/dataStatistics/service/IQyzyDataStatisticsService.java @@ -0,0 +1,65 @@ +package com.god.dataStatistics.service; + +import com.god.dataStatistics.domain.QyzyDataStatistics; +import com.god.dataStatistics.domain.QyzyTop; + +import java.util.List; + +/** + * 生产作业数分类统计Service接口 + * + * @author Lxz + * @date 2023-11-06 + */ +public interface IQyzyDataStatisticsService +{ + /** + * 查询生产作业数分类统计 + * + * @param id 生产作业数分类统计主键 + * @return 生产作业数分类统计 + */ + public QyzyDataStatistics selectQyzyDataStatisticsById(String id); + + /** + * 查询生产作业数分类统计列表 + * + * @param qyzyDataStatistics 生产作业数分类统计 + * @return 生产作业数分类统计集合 + */ + public List selectQyzyDataStatisticsList(QyzyDataStatistics qyzyDataStatistics); + + List selectTop(QyzyTop qyzyTop); + + /** + * 新增生产作业数分类统计 + * + * @param qyzyDataStatistics 生产作业数分类统计 + * @return 结果 + */ + public int insertQyzyDataStatistics(QyzyDataStatistics qyzyDataStatistics); + + /** + * 修改生产作业数分类统计 + * + * @param qyzyDataStatistics 生产作业数分类统计 + * @return 结果 + */ + public int updateQyzyDataStatistics(QyzyDataStatistics qyzyDataStatistics); + + /** + * 批量删除生产作业数分类统计 + * + * @param ids 需要删除的生产作业数分类统计主键集合 + * @return 结果 + */ + public int deleteQyzyDataStatisticsByIds(String[] ids); + + /** + * 删除生产作业数分类统计信息 + * + * @param id 生产作业数分类统计主键 + * @return 结果 + */ + public int deleteQyzyDataStatisticsById(String id); +} diff --git a/God-Vue-master/god-system/src/main/java/com/god/dataStatistics/service/impl/QyzyDataStatisticsServiceImpl.java b/God-Vue-master/god-system/src/main/java/com/god/dataStatistics/service/impl/QyzyDataStatisticsServiceImpl.java new file mode 100644 index 00000000..a49ade79 --- /dev/null +++ b/God-Vue-master/god-system/src/main/java/com/god/dataStatistics/service/impl/QyzyDataStatisticsServiceImpl.java @@ -0,0 +1,161 @@ +package com.god.dataStatistics.service.impl; + +import com.god.common.utils.SecurityUtils; +import com.god.common.utils.uuid.IdUtils; +import com.god.dataStatistics.domain.QyzyDataStatistics; +import com.god.dataStatistics.domain.QyzyPermitReport; +import com.god.dataStatistics.domain.QyzySpecialTaskInfo; +import com.god.dataStatistics.domain.QyzyTop; +import com.god.dataStatistics.mapper.QyzyDataStatisticsMapper; +import com.god.dataStatistics.mapper.QyzyPermitReportMapper; +import com.god.dataStatistics.mapper.QyzySpecialTaskInfoMapper; +import com.god.dataStatistics.service.IQyzyDataStatisticsService; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.ArrayList; +import java.util.Comparator; +import java.util.List; + +/** + * 生产作业数分类统计Service业务层处理 + * + * @author Lxz + * @date 2023-11-06 + */ +@Service +public class QyzyDataStatisticsServiceImpl implements IQyzyDataStatisticsService { + @Resource + private QyzyDataStatisticsMapper qyzyDataStatisticsMapper; + @Resource + private QyzyPermitReportMapper qyzyPermitReportMapper; + @Resource + private QyzySpecialTaskInfoMapper qyzySpecialTaskInfoMapper; + + /** + * 查询生产作业数分类统计 + * + * @param id 生产作业数分类统计主键 + * @return 生产作业数分类统计 + */ + @Override + public QyzyDataStatistics selectQyzyDataStatisticsById(String id) { + return qyzyDataStatisticsMapper.selectQyzyDataStatisticsById(id); + } + + /** + * 查询生产作业数分类统计列表 + * + * @param qyzyDataStatistics 生产作业数分类统计 + * @return 生产作业数分类统计 + */ + @Override + public List selectQyzyDataStatisticsList(QyzyDataStatistics qyzyDataStatistics) { + selectAdd(); + return qyzyDataStatisticsMapper.selectQyzyDataStatisticsList(qyzyDataStatistics); + } + + @Override + public List selectTop(QyzyTop qyzyTop) { + List list = new ArrayList<>(); + List qyzyDataStatistics = qyzyDataStatisticsMapper.selectQyzyTop(); + for (QyzyDataStatistics qyzyDataStatistic : qyzyDataStatistics) { + QyzyTop qyzyTop1 = new QyzyTop(); + qyzyTop1.setTaskArea(qyzyDataStatistic.getTaskArea()); + qyzyTop1.setWorkSize(qyzyDataStatisticsMapper.selectQyzyWorkSize(qyzyDataStatistic.getTaskArea()).getWorkSize()); + qyzyTop1.setSpecialSize(qyzyDataStatisticsMapper.selectQyzySpecialSize(qyzyDataStatistic.getTaskArea()).getWorkSize()); + qyzyTop1.setAllSize(qyzyDataStatistic.getRemark()); + list.add(qyzyTop1); + } + list.sort(Comparator.comparing(QyzyTop::getAllSize).reversed()); + return list; + } + + /** + * 新增生产作业数分类统计 + * + * @param qyzyDataStatistics 生产作业数分类统计 + * @return 结果 + */ + @Override + public int insertQyzyDataStatistics(QyzyDataStatistics qyzyDataStatistics) { + qyzyDataStatistics.setId(IdUtils.fastUUID()); + return qyzyDataStatisticsMapper.insertQyzyDataStatistics(qyzyDataStatistics); + } + + /** + * 修改生产作业数分类统计 + * + * @param qyzyDataStatistics 生产作业数分类统计 + * @return 结果 + */ + @Override + public int updateQyzyDataStatistics(QyzyDataStatistics qyzyDataStatistics) { + return qyzyDataStatisticsMapper.updateQyzyDataStatistics(qyzyDataStatistics); + } + + /** + * 批量删除生产作业数分类统计 + * + * @param ids 需要删除的生产作业数分类统计主键 + * @return 结果 + */ + @Override + public int deleteQyzyDataStatisticsByIds(String[] ids) { + return qyzyDataStatisticsMapper.deleteQyzyDataStatisticsByIds(ids); + } + + /** + * 删除生产作业数分类统计信息 + * + * @param id 生产作业数分类统计主键 + * @return 结果 + */ + @Override + public int deleteQyzyDataStatisticsById(String id) { + return qyzyDataStatisticsMapper.deleteQyzyDataStatisticsById(id); + } + + void selectAdd() { + //查询工作许可工单 + QyzyPermitReport qyzyPermitReport = new QyzyPermitReport(); + List qyzyPermitReports = qyzyPermitReportMapper.selectQyzyPermitReportList(qyzyPermitReport); + for (QyzyPermitReport permitReport : qyzyPermitReports) { + if (!permitReport.getId().isEmpty() && "工作清单".equals(permitReport.getDataType())) { + QyzyDataStatistics qyzyDataStatistics = qyzyDataStatisticsMapper.selectQyzyDataStatisticsById(permitReport.getId()); + if (qyzyDataStatistics == null) { + QyzyDataStatistics dataStatistics = new QyzyDataStatistics(); + dataStatistics.setId(permitReport.getId()); + dataStatistics.setAddTime(permitReport.getStartTime()); + dataStatistics.setTaskArea(permitReport.getApplyName()); + dataStatistics.setTaskName(permitReport.getWorkName()); + dataStatistics.setTypeR("工作许可工单"); + dataStatistics.setTaskInfo(permitReport.getWorkContent()); + dataStatistics.setAddPerson(SecurityUtils.getUsername()); + qyzyDataStatisticsMapper.insertQyzyDataStatistics(dataStatistics); + } + } + } + //查询特殊作业清单 + QyzySpecialTaskInfo qyzySpecialTaskInfo = new QyzySpecialTaskInfo(); + List qyzySpecialTaskInfos = qyzySpecialTaskInfoMapper.selectQyzySpecialTaskInfoList(qyzySpecialTaskInfo); + for (QyzySpecialTaskInfo specialTaskInfo : qyzySpecialTaskInfos) { + if (!specialTaskInfo.getId().isEmpty()) { + QyzyDataStatistics qyzyDataStatistics = qyzyDataStatisticsMapper.selectQyzyDataStatisticsById(specialTaskInfo.getId()); + if (qyzyDataStatistics == null) { + QyzyDataStatistics dataStatistics = new QyzyDataStatistics(); + dataStatistics.setId(specialTaskInfo.getId()); + dataStatistics.setAddTime(specialTaskInfo.getStartTime()); + dataStatistics.setTaskArea(specialTaskInfo.getTaskArea()); + dataStatistics.setTaskName(specialTaskInfo.getSpecialTaskName()); + dataStatistics.setTypeR("特殊作业清单"); + dataStatistics.setTaskInfo(specialTaskInfo.getTaskInfo()); + dataStatistics.setAddPerson(SecurityUtils.getUsername()); + qyzyDataStatisticsMapper.insertQyzyDataStatistics(dataStatistics); + } + } + } + } + + +} diff --git a/God-Vue-master/god-system/src/main/resources/mapper/dataStatistics/QyzyDataStatisticsMapper.xml b/God-Vue-master/god-system/src/main/resources/mapper/dataStatistics/QyzyDataStatisticsMapper.xml new file mode 100644 index 00000000..6b5c6085 --- /dev/null +++ b/God-Vue-master/god-system/src/main/resources/mapper/dataStatistics/QyzyDataStatisticsMapper.xml @@ -0,0 +1,155 @@ + + + + + + + + + + + + + + + + + + select id, + add_time, + task_area, + task_name, + type_r, + task_info, + add_person, + remark + from qyzy_data_statistics + + + + + + + + + + + + insert into qyzy_data_statistics + + id + , + add_time + , + task_area + , + task_name + , + type_r + , + task_info + , + add_person + , + remark + , + + + #{id} + , + #{addTime} + , + #{taskArea} + , + #{taskName} + , + #{typeR} + , + #{taskInfo} + , + #{addPerson} + , + #{remark} + , + + + + + update qyzy_data_statistics + + add_time + = + #{addTime}, + task_area + = + #{taskArea}, + task_name + = + #{taskName}, + type_r + = + #{typeR}, + task_info + = + #{taskInfo}, + add_person + = + #{addPerson}, + remark + = + #{remark}, + + where id = #{id} + + + + delete + from qyzy_data_statistics + where id = #{id} + + + + delete from qyzy_data_statistics where id in + + #{id} + + + \ No newline at end of file diff --git a/God-Vue-master/god-system/src/main/resources/mapper/dataStatistics/QyzyPermitReportMapper.xml b/God-Vue-master/god-system/src/main/resources/mapper/dataStatistics/QyzyPermitReportMapper.xml new file mode 100644 index 00000000..b0031343 --- /dev/null +++ b/God-Vue-master/god-system/src/main/resources/mapper/dataStatistics/QyzyPermitReportMapper.xml @@ -0,0 +1,250 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + select id, + apply_name, + apply_dept, + phone_info, + apply_time, + apply_reason, + start_time, + end_time, + work_content, + event_type, + data_type, + create_by, + create_time, + apply_event, + work_name, + hazard_info, + safety_info + from qyzy_permit_report + + + + + + + + insert into qyzy_permit_report + + id + , + apply_name + , + apply_dept + , + phone_info + , + apply_time + , + apply_reason + , + start_time + , + end_time + , + work_content + , + event_type + , + data_type + , + create_by + , + create_time + , + apply_event + , + work_name + , + hazard_info + , + safety_info + , + + + #{id} + , + #{applyName} + , + #{applyDept} + , + #{phoneInfo} + , + #{applyTime} + , + #{applyReason} + , + #{startTime} + , + #{endTime} + , + #{workContent} + , + #{eventType} + , + #{dataType} + , + #{createBy} + , + #{createTime} + , + #{applyEvent} + , + #{workName} + , + #{hazardInfo} + , + #{safetyInfo} + , + + + + + update qyzy_permit_report + + apply_name + = + #{applyName}, + apply_dept + = + #{applyDept}, + phone_info + = + #{phoneInfo}, + apply_time + = + #{applyTime}, + apply_reason + = + #{applyReason}, + start_time + = + #{startTime}, + end_time + = + #{endTime}, + work_content + = + #{workContent}, + event_type + = + #{eventType}, + data_type + = + #{dataType}, + create_by + = + #{createBy}, + create_time + = + #{createTime}, + apply_event + = + #{applyEvent}, + work_name + = + #{workName}, + hazard_info + = + #{hazardInfo}, + safety_info + = + #{safetyInfo}, + + where id = #{id} + + + + delete + from qyzy_permit_report + where id = #{id} + + + + delete from qyzy_permit_report where id in + + #{id} + + + + + update qyzy_permit_report + set event_type = #{eventType} + where id = #{id} + + \ No newline at end of file diff --git a/God-Vue-master/god-system/src/main/resources/mapper/dataStatistics/QyzySpecialTaskInfoMapper.xml b/God-Vue-master/god-system/src/main/resources/mapper/dataStatistics/QyzySpecialTaskInfoMapper.xml new file mode 100644 index 00000000..99f87d5b --- /dev/null +++ b/God-Vue-master/god-system/src/main/resources/mapper/dataStatistics/QyzySpecialTaskInfoMapper.xml @@ -0,0 +1,231 @@ + + + + + + + + + + + + + + + + + + + + + + + + select id, + special_task_name, + task_type, + task_area, + start_time, + end_time, + charge_person, + task_info, + task_status, + remark, + data_type, + permit_id, + permit_name, + add_person, + add_time + from qyzy_special_task_info + + + + + + + + insert into qyzy_special_task_info + + id + , + special_task_name + , + task_type + , + task_area + , + start_time + , + end_time + , + charge_person + , + task_info + , + task_status + , + remark + , + data_type + , + permit_id + , + permit_name + , + add_person + , + add_time + , + + + #{id} + , + #{specialTaskName} + , + #{taskType} + , + #{taskArea} + , + #{startTime} + , + #{endTime} + , + #{chargePerson} + , + #{taskInfo} + , + #{taskStatus} + , + #{remark} + , + #{dataType} + , + #{permitId} + , + #{permitName} + , + #{addPerson} + , + #{addTime} + , + + + + + update qyzy_special_task_info + + special_task_name + = + #{specialTaskName}, + task_type + = + #{taskType}, + task_area + = + #{taskArea}, + start_time + = + #{startTime}, + end_time + = + #{endTime}, + charge_person + = + #{chargePerson}, + task_info + = + #{taskInfo}, + task_status + = + #{taskStatus}, + remark + = + #{remark}, + data_type + = + #{dataType}, + permit_id + = + #{permitId}, + permit_name + = + #{permitName}, + add_person + = + #{addPerson}, + add_time + = + #{addTime}, + + where id = #{id} + + + + delete + from qyzy_special_task_info + where id = #{id} + + + + delete from qyzy_special_task_info where id in + + #{id} + + + \ No newline at end of file diff --git a/god-ui/src/api/dataStatistics/qyzyDataStatistics.js b/god-ui/src/api/dataStatistics/qyzyDataStatistics.js new file mode 100644 index 00000000..5876bdaa --- /dev/null +++ b/god-ui/src/api/dataStatistics/qyzyDataStatistics.js @@ -0,0 +1,52 @@ +import request from '@/utils/request' + +// 查询生产作业数分类统计列表 +export function listQyzyDataStatistics(query) { + return request({ + url: '/dataStatistics/qyzyDataStatistics/list', + method: 'get', + params: query + }) +} + +export function listTop(query) { + return request({ + url: '/dataStatistics/qyzyDataStatistics/listTop', + method: 'get', + params: query + }) +} + +// 查询生产作业数分类统计详细 +export function getQyzyDataStatistics(id) { + return request({ + url: '/dataStatistics/qyzyDataStatistics/' + id, + method: 'get' + }) +} + +// 新增生产作业数分类统计 +export function addQyzyDataStatistics(data) { + return request({ + url: '/dataStatistics/qyzyDataStatistics', + method: 'post', + data: data + }) +} + +// 修改生产作业数分类统计 +export function updateQyzyDataStatistics(data) { + return request({ + url: '/dataStatistics/qyzyDataStatistics', + method: 'put', + data: data + }) +} + +// 删除生产作业数分类统计 +export function delQyzyDataStatistics(id) { + return request({ + url: '/dataStatistics/qyzyDataStatistics/' + id, + method: 'delete' + }) +} diff --git a/god-ui/src/views/dataStatistics/qyzyDataStatistics/index.vue b/god-ui/src/views/dataStatistics/qyzyDataStatistics/index.vue new file mode 100644 index 00000000..c30faaa8 --- /dev/null +++ b/god-ui/src/views/dataStatistics/qyzyDataStatistics/index.vue @@ -0,0 +1,304 @@ + + + diff --git a/god-ui/src/views/dataStatistics/qyzyDataStatisticsTop/index.vue b/god-ui/src/views/dataStatistics/qyzyDataStatisticsTop/index.vue new file mode 100644 index 00000000..53b53575 --- /dev/null +++ b/god-ui/src/views/dataStatistics/qyzyDataStatisticsTop/index.vue @@ -0,0 +1,205 @@ + + + diff --git a/god-ui/src/views/safetySupervision/qyzySupervisionInspection/index.vue b/god-ui/src/views/safetySupervision/qyzySupervisionInspection/index.vue index 3deeb2b6..1bd81e7e 100644 --- a/god-ui/src/views/safetySupervision/qyzySupervisionInspection/index.vue +++ b/god-ui/src/views/safetySupervision/qyzySupervisionInspection/index.vue @@ -144,9 +144,6 @@ - - -