生产作业数据统计分析

This commit is contained in:
卢序振 2023-11-06 17:32:54 +08:00
parent bbab6d3c76
commit 1d11f2bc84
25 changed files with 1707 additions and 313 deletions

View File

@ -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<QyzyDataStatistics> list = qyzyDataStatisticsService.selectQyzyDataStatisticsList(qyzyDataStatistics);
return getDataTable(list);
}
@GetMapping("/listTop")
public TableDataInfo listTop(QyzyTop qyzyTop)
{
startPage();
List<QyzyTop> 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<QyzyDataStatistics> list = qyzyDataStatisticsService.selectQyzyDataStatisticsList(qyzyDataStatistics);
ExcelUtil<QyzyDataStatistics> util = new ExcelUtil<QyzyDataStatistics>(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));
}
}

View File

@ -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

View File

@ -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

View File

@ -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接口

View File

@ -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接口

View File

@ -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业务层处理

View File

@ -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;
/**

View File

@ -1,135 +0,0 @@
<?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.god.passenger.operation.mapper.QyzyPermitReportMapper">
<resultMap type="QyzyPermitReport" id="QyzyPermitReportResult">
<result property="id" column="id" />
<result property="applyName" column="apply_name" />
<result property="applyDept" column="apply_dept" />
<result property="phoneInfo" column="phone_info" />
<result property="applyTime" column="apply_time" />
<result property="applyReason" column="apply_reason" />
<result property="startTime" column="start_time" />
<result property="endTime" column="end_time" />
<result property="workContent" column="work_content" />
<result property="eventType" column="event_type" />
<result property="dataType" column="data_type" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="applyEvent" column="apply_event" />
<result property="workName" column="work_name" />
<result property="hazardInfo" column="hazard_info" />
<result property="safetyInfo" column="safety_info" />
</resultMap>
<sql id="selectQyzyPermitReportVo">
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
</sql>
<select id="selectQyzyPermitReportList" parameterType="QyzyPermitReport" resultMap="QyzyPermitReportResult">
<include refid="selectQyzyPermitReportVo"/>
<where>
<if test="applyName != null and applyName != ''"> and apply_name like concat('%', #{applyName}, '%')</if>
<if test="applyDept != null and applyDept != ''"> and apply_dept like concat('%', #{applyDept}, '%')</if>
<if test="phoneInfo != null and phoneInfo != ''"> and phone_info like concat('%', #{phoneInfo}, '%')</if>
<if test="params.beginApplyTime != null and params.beginApplyTime != '' and params.endApplyTime != null and params.endApplyTime != ''"> and apply_time between #{params.beginApplyTime} and #{params.endApplyTime}</if>
<if test="applyReason != null and applyReason != ''"> and apply_reason like concat('%', #{applyReason}, '%')</if>
<if test="startTime != null and startTime != ''"> and start_time &gt;= #{startTime}</if>
<if test="endTime != null and endTime != ''"> and end_time &lt;= #{endTime}</if>
<if test="workContent != null and workContent != ''"> and work_content like concat('%', #{workContent}, '%')</if>
<if test="eventType != null and eventType != ''"> and event_type like concat('%', #{eventType}, '%')</if>
<if test="dataType != null and dataType != ''"> and data_type like concat('%', #{dataType}, '%')</if>
<if test="applyEvent != null and applyEvent != ''"> and apply_event = #{applyEvent}</if>
<if test="workName != null and workName != ''"> and work_name like concat('%', #{workName}, '%')</if>
</where>
</select>
<select id="selectQyzyPermitReportById" parameterType="String" resultMap="QyzyPermitReportResult">
<include refid="selectQyzyPermitReportVo"/>
where id = #{id}
</select>
<insert id="insertQyzyPermitReport" parameterType="QyzyPermitReport">
insert into qyzy_permit_report
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="applyName != null and applyName != ''">apply_name,</if>
<if test="applyDept != null">apply_dept,</if>
<if test="phoneInfo != null">phone_info,</if>
<if test="applyTime != null and applyTime != ''">apply_time,</if>
<if test="applyReason != null">apply_reason,</if>
<if test="startTime != null and startTime != ''">start_time,</if>
<if test="endTime != null and endTime != ''">end_time,</if>
<if test="workContent != null and workContent != ''">work_content,</if>
<if test="eventType != null">event_type,</if>
<if test="dataType != null">data_type,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="applyEvent != null">apply_event,</if>
<if test="workName != null">work_name,</if>
<if test="hazardInfo != null">hazard_info,</if>
<if test="safetyInfo != null">safety_info,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="applyName != null and applyName != ''">#{applyName},</if>
<if test="applyDept != null">#{applyDept},</if>
<if test="phoneInfo != null">#{phoneInfo},</if>
<if test="applyTime != null and applyTime != ''">#{applyTime},</if>
<if test="applyReason != null">#{applyReason},</if>
<if test="startTime != null and startTime != ''">#{startTime},</if>
<if test="endTime != null and endTime != ''">#{endTime},</if>
<if test="workContent != null and workContent != ''">#{workContent},</if>
<if test="eventType != null">#{eventType},</if>
<if test="dataType != null">#{dataType},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="applyEvent != null">#{applyEvent},</if>
<if test="workName != null">#{workName},</if>
<if test="hazardInfo != null">#{hazardInfo},</if>
<if test="safetyInfo != null">#{safetyInfo},</if>
</trim>
</insert>
<update id="updateQyzyPermitReport" parameterType="QyzyPermitReport">
update qyzy_permit_report
<trim prefix="SET" suffixOverrides=",">
<if test="applyName != null and applyName != ''">apply_name = #{applyName},</if>
<if test="applyDept != null">apply_dept = #{applyDept},</if>
<if test="phoneInfo != null">phone_info = #{phoneInfo},</if>
<if test="applyTime != null and applyTime != ''">apply_time = #{applyTime},</if>
<if test="applyReason != null">apply_reason = #{applyReason},</if>
<if test="startTime != null and startTime != ''">start_time = #{startTime},</if>
<if test="endTime != null and endTime != ''">end_time = #{endTime},</if>
<if test="workContent != null and workContent != ''">work_content = #{workContent},</if>
<if test="eventType != null">event_type = #{eventType},</if>
<if test="dataType != null">data_type = #{dataType},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="applyEvent != null">apply_event = #{applyEvent},</if>
<if test="workName != null">work_name = #{workName},</if>
<if test="hazardInfo != null">hazard_info = #{hazardInfo},</if>
<if test="safetyInfo != null">safety_info = #{safetyInfo},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteQyzyPermitReportById" parameterType="String">
delete from qyzy_permit_report where id = #{id}
</delete>
<delete id="deleteQyzyPermitReportByIds" parameterType="String">
delete from qyzy_permit_report where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<update id="updateState" parameterType="String">
update qyzy_permit_report
set event_type = #{eventType}
where id = #{id}
</update>
</mapper>

View File

@ -1,122 +0,0 @@
<?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.god.passenger.operation.mapper.QyzySpecialTaskInfoMapper">
<resultMap type="QyzySpecialTaskInfo" id="QyzySpecialTaskInfoResult">
<result property="id" column="id" />
<result property="specialTaskName" column="special_task_name" />
<result property="taskType" column="task_type" />
<result property="taskArea" column="task_area" />
<result property="startTime" column="start_time" />
<result property="endTime" column="end_time" />
<result property="chargePerson" column="charge_person" />
<result property="taskInfo" column="task_info" />
<result property="taskStatus" column="task_status" />
<result property="remark" column="remark" />
<result property="dataType" column="data_type" />
<result property="permitId" column="permit_id" />
<result property="permitName" column="permit_name" />
<result property="addPerson" column="add_person" />
<result property="addTime" column="add_time" />
</resultMap>
<sql id="selectQyzySpecialTaskInfoVo">
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
</sql>
<select id="selectQyzySpecialTaskInfoList" parameterType="QyzySpecialTaskInfo" resultMap="QyzySpecialTaskInfoResult">
<include refid="selectQyzySpecialTaskInfoVo"/>
<where>
<if test="specialTaskName != null and specialTaskName != ''"> and special_task_name like concat('%', #{specialTaskName}, '%')</if>
<if test="taskType != null and taskType != ''"> and task_type like concat('%', #{taskType}, '%')</if>
<if test="taskArea != null and taskArea != ''"> and task_area like concat('%', #{taskArea}, '%')</if>
<if test="startTime != null and startTime != ''"> and start_time &gt;= #{startTime}</if>
<if test="endTime != null and endTime != ''"> and end_time &lt;= #{endTime}</if>
<if test="chargePerson != null and chargePerson != ''"> and charge_person like concat('%', #{chargePerson}, '%')</if>
<if test="taskInfo != null and taskInfo != ''"> and task_info like concat('%', #{taskInfo}, '%')</if>
<if test="taskStatus != null and taskStatus != ''"> and task_status like concat('%', #{taskStatus}, '%')</if>
<if test="dataType != null and dataType != ''"> and data_type like concat('%', #{dataType}, '%')</if>
<if test="permitId != null and permitId != ''"> and permit_id like concat('%', #{permitId}, '%')</if>
<if test="permitName != null and permitName != ''"> and permit_name like concat('%', #{permitName}, '%')</if>
<if test="addPerson != null and addPerson != ''"> and add_person like concat('%', #{addPerson}, '%')</if>
<if test="addTime != null and addTime != ''"> and add_time &gt;= #{addTime}</if>
</where>
</select>
<select id="selectQyzySpecialTaskInfoById" parameterType="String" resultMap="QyzySpecialTaskInfoResult">
<include refid="selectQyzySpecialTaskInfoVo"/>
where id = #{id}
</select>
<insert id="insertQyzySpecialTaskInfo" parameterType="QyzySpecialTaskInfo">
insert into qyzy_special_task_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="specialTaskName != null and specialTaskName != ''">special_task_name,</if>
<if test="taskType != null">task_type,</if>
<if test="taskArea != null and taskArea != ''">task_area,</if>
<if test="startTime != null">start_time,</if>
<if test="endTime != null">end_time,</if>
<if test="chargePerson != null">charge_person,</if>
<if test="taskInfo != null">task_info,</if>
<if test="taskStatus != null and taskStatus != ''">task_status,</if>
<if test="remark != null">remark,</if>
<if test="dataType != null">data_type,</if>
<if test="permitId != null">permit_id,</if>
<if test="permitName != null">permit_name,</if>
<if test="addPerson != null">add_person,</if>
<if test="addTime != null">add_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="specialTaskName != null and specialTaskName != ''">#{specialTaskName},</if>
<if test="taskType != null">#{taskType},</if>
<if test="taskArea != null and taskArea != ''">#{taskArea},</if>
<if test="startTime != null">#{startTime},</if>
<if test="endTime != null">#{endTime},</if>
<if test="chargePerson != null">#{chargePerson},</if>
<if test="taskInfo != null">#{taskInfo},</if>
<if test="taskStatus != null and taskStatus != ''">#{taskStatus},</if>
<if test="remark != null">#{remark},</if>
<if test="dataType != null">#{dataType},</if>
<if test="permitId != null">#{permitId},</if>
<if test="permitName != null">#{permitName},</if>
<if test="addPerson != null">#{addPerson},</if>
<if test="addTime != null">#{addTime},</if>
</trim>
</insert>
<update id="updateQyzySpecialTaskInfo" parameterType="QyzySpecialTaskInfo">
update qyzy_special_task_info
<trim prefix="SET" suffixOverrides=",">
<if test="specialTaskName != null and specialTaskName != ''">special_task_name = #{specialTaskName},</if>
<if test="taskType != null">task_type = #{taskType},</if>
<if test="taskArea != null and taskArea != ''">task_area = #{taskArea},</if>
<if test="startTime != null">start_time = #{startTime},</if>
<if test="endTime != null">end_time = #{endTime},</if>
<if test="chargePerson != null">charge_person = #{chargePerson},</if>
<if test="taskInfo != null">task_info = #{taskInfo},</if>
<if test="taskStatus != null and taskStatus != ''">task_status = #{taskStatus},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="dataType != null">data_type = #{dataType},</if>
<if test="permitId != null">permit_id = #{permitId},</if>
<if test="permitName != null">permit_name = #{permitName},</if>
<if test="addPerson != null">add_person = #{addPerson},</if>
<if test="addTime != null">add_time = #{addTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteQyzySpecialTaskInfoById" parameterType="String">
delete from qyzy_special_task_info where id = #{id}
</delete>
<delete id="deleteQyzySpecialTaskInfoByIds" parameterType="String">
delete from qyzy_special_task_info where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -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;
}

View File

@ -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;

View File

@ -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;

View File

@ -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;
}

View File

@ -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<QyzyDataStatistics> 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<QyzyDataStatistics> selectQyzyTop();
}

View File

@ -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接口
*

View File

@ -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接口
*

View File

@ -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<QyzyDataStatistics> selectQyzyDataStatisticsList(QyzyDataStatistics qyzyDataStatistics);
List<QyzyTop> 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);
}

View File

@ -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<QyzyDataStatistics> selectQyzyDataStatisticsList(QyzyDataStatistics qyzyDataStatistics) {
selectAdd();
return qyzyDataStatisticsMapper.selectQyzyDataStatisticsList(qyzyDataStatistics);
}
@Override
public List<QyzyTop> selectTop(QyzyTop qyzyTop) {
List<QyzyTop> list = new ArrayList<>();
List<QyzyDataStatistics> 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<QyzyPermitReport> 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<QyzySpecialTaskInfo> 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);
}
}
}
}
}

View File

@ -0,0 +1,155 @@
<?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.god.dataStatistics.mapper.QyzyDataStatisticsMapper">
<resultMap type="QyzyDataStatistics" id="QyzyDataStatisticsResult">
<result property="id" column="id"/>
<result property="addTime" column="add_time"/>
<result property="taskArea" column="task_area"/>
<result property="taskName" column="task_name"/>
<result property="typeR" column="type_r"/>
<result property="taskInfo" column="task_info"/>
<result property="addPerson" column="add_person"/>
<result property="remark" column="remark"/>
<result property="workSize" column="work_size"/>
</resultMap>
<sql id="selectQyzyDataStatisticsVo">
select id,
add_time,
task_area,
task_name,
type_r,
task_info,
add_person,
remark
from qyzy_data_statistics
</sql>
<select id="selectQyzyDataStatisticsList" parameterType="QyzyDataStatistics" resultMap="QyzyDataStatisticsResult">
<include refid="selectQyzyDataStatisticsVo"/>
<where>
<if test="addTime != null and addTime != ''"> and add_time =
#{addTime}</if>
<if test="taskArea != null and taskArea != ''"> and task_area =
#{taskArea}</if>
<if test="taskName != null and taskName != ''"> and task_name like concat('%',
#{taskName},
'%'
)</if>
<if test="typeR != null and typeR != ''"> and type_r =
#{typeR}</if>
<if test="taskInfo != null and taskInfo != ''"> and task_info =
#{taskInfo}</if>
<if test="addPerson != null and addPerson != ''"> and add_person =
#{addPerson}</if>
</where>
</select>
<select id="selectQyzyDataStatisticsById" parameterType="String" resultMap="QyzyDataStatisticsResult">
<include refid="selectQyzyDataStatisticsVo"/>
where id = #{id}
</select>
<select id="selectQyzyTop" parameterType="QyzyDataStatistics" resultMap="QyzyDataStatisticsResult">
SELECT task_area, COUNT(*) AS remark
FROM qyzy_data_statistics
GROUP BY task_area
HAVING COUNT(*) &gt;= 1
</select>
<select id="selectQyzyWorkSize" parameterType="QyzyDataStatistics" resultMap="QyzyDataStatisticsResult">
select COUNT(*) As work_size
from qyzy_data_statistics
where task_area = #{taskArea}
and type_r = '工作许可工单'
</select>
<select id="selectQyzySpecialSize" parameterType="QyzyDataStatistics" resultMap="QyzyDataStatisticsResult">
select COUNT(*) As work_size
from qyzy_data_statistics
where task_area = #{taskArea}
and type_r = '特殊作业清单'
</select>
<insert id="insertQyzyDataStatistics" parameterType="QyzyDataStatistics">
insert into qyzy_data_statistics
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id
,</if>
<if test="addTime != null">add_time
,</if>
<if test="taskArea != null">task_area
,</if>
<if test="taskName != null">task_name
,</if>
<if test="typeR != null">type_r
,</if>
<if test="taskInfo != null">task_info
,</if>
<if test="addPerson != null">add_person
,</if>
<if test="remark != null">remark
,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id}
,</if>
<if test="addTime != null">#{addTime}
,</if>
<if test="taskArea != null">#{taskArea}
,</if>
<if test="taskName != null">#{taskName}
,</if>
<if test="typeR != null">#{typeR}
,</if>
<if test="taskInfo != null">#{taskInfo}
,</if>
<if test="addPerson != null">#{addPerson}
,</if>
<if test="remark != null">#{remark}
,</if>
</trim>
</insert>
<update id="updateQyzyDataStatistics" parameterType="QyzyDataStatistics">
update qyzy_data_statistics
<trim prefix="SET" suffixOverrides=",">
<if test="addTime != null">add_time
=
#{addTime},</if>
<if test="taskArea != null">task_area
=
#{taskArea},</if>
<if test="taskName != null">task_name
=
#{taskName},</if>
<if test="typeR != null">type_r
=
#{typeR},</if>
<if test="taskInfo != null">task_info
=
#{taskInfo},</if>
<if test="addPerson != null">add_person
=
#{addPerson},</if>
<if test="remark != null">remark
=
#{remark},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteQyzyDataStatisticsById" parameterType="String">
delete
from qyzy_data_statistics
where id = #{id}
</delete>
<delete id="deleteQyzyDataStatisticsByIds" parameterType="String">
delete from qyzy_data_statistics where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,250 @@
<?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.god.dataStatistics.mapper.QyzyPermitReportMapper">
<resultMap type="com.god.dataStatistics.domain.QyzyPermitReport" id="QyzyPermitReportResult">
<result property="id" column="id"/>
<result property="applyName" column="apply_name"/>
<result property="applyDept" column="apply_dept"/>
<result property="phoneInfo" column="phone_info"/>
<result property="applyTime" column="apply_time"/>
<result property="applyReason" column="apply_reason"/>
<result property="startTime" column="start_time"/>
<result property="endTime" column="end_time"/>
<result property="workContent" column="work_content"/>
<result property="eventType" column="event_type"/>
<result property="dataType" column="data_type"/>
<result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
<result property="applyEvent" column="apply_event"/>
<result property="workName" column="work_name"/>
<result property="hazardInfo" column="hazard_info"/>
<result property="safetyInfo" column="safety_info"/>
</resultMap>
<sql id="selectQyzyPermitReportVo">
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
</sql>
<select id="selectQyzyPermitReportList" parameterType="QyzyPermitReport" resultMap="QyzyPermitReportResult">
<include refid="selectQyzyPermitReportVo"/>
<where>
<if test="applyName != null and applyName != ''"> and apply_name like concat('%',
#{applyName},
'%'
)</if>
<if test="applyDept != null and applyDept != ''"> and apply_dept like concat('%',
#{applyDept},
'%'
)</if>
<if test="phoneInfo != null and phoneInfo != ''"> and phone_info like concat('%',
#{phoneInfo},
'%'
)</if>
<if test="params.beginApplyTime != null and params.beginApplyTime != '' and params.endApplyTime != null and params.endApplyTime != ''"> and apply_time between
#{params.beginApplyTime}
and
#{params.endApplyTime}</if>
<if test="applyReason != null and applyReason != ''"> and apply_reason like concat('%',
#{applyReason},
'%'
)</if>
<if test="startTime != null and startTime != ''"> and start_time &gt;=
#{startTime}</if>
<if test="endTime != null and endTime != ''"> and end_time &lt;=
#{endTime}</if>
<if test="workContent != null and workContent != ''"> and work_content like concat('%',
#{workContent},
'%'
)</if>
<if test="eventType != null and eventType != ''"> and event_type like concat('%',
#{eventType},
'%'
)</if>
<if test="dataType != null and dataType != ''"> and data_type like concat('%',
#{dataType},
'%'
)</if>
<if test="applyEvent != null and applyEvent != ''"> and apply_event =
#{applyEvent}</if>
<if test="workName != null and workName != ''"> and work_name like concat('%',
#{workName},
'%'
)</if>
</where>
</select>
<select id="selectQyzyPermitReportById" parameterType="String" resultMap="QyzyPermitReportResult">
<include refid="selectQyzyPermitReportVo"/>
where id = #{id}
</select>
<insert id="insertQyzyPermitReport" parameterType="QyzyPermitReport">
insert into qyzy_permit_report
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id
,</if>
<if test="applyName != null and applyName != ''">apply_name
,</if>
<if test="applyDept != null">apply_dept
,</if>
<if test="phoneInfo != null">phone_info
,</if>
<if test="applyTime != null and applyTime != ''">apply_time
,</if>
<if test="applyReason != null">apply_reason
,</if>
<if test="startTime != null and startTime != ''">start_time
,</if>
<if test="endTime != null and endTime != ''">end_time
,</if>
<if test="workContent != null and workContent != ''">work_content
,</if>
<if test="eventType != null">event_type
,</if>
<if test="dataType != null">data_type
,</if>
<if test="createBy != null">create_by
,</if>
<if test="createTime != null">create_time
,</if>
<if test="applyEvent != null">apply_event
,</if>
<if test="workName != null">work_name
,</if>
<if test="hazardInfo != null">hazard_info
,</if>
<if test="safetyInfo != null">safety_info
,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id}
,</if>
<if test="applyName != null and applyName != ''">#{applyName}
,</if>
<if test="applyDept != null">#{applyDept}
,</if>
<if test="phoneInfo != null">#{phoneInfo}
,</if>
<if test="applyTime != null and applyTime != ''">#{applyTime}
,</if>
<if test="applyReason != null">#{applyReason}
,</if>
<if test="startTime != null and startTime != ''">#{startTime}
,</if>
<if test="endTime != null and endTime != ''">#{endTime}
,</if>
<if test="workContent != null and workContent != ''">#{workContent}
,</if>
<if test="eventType != null">#{eventType}
,</if>
<if test="dataType != null">#{dataType}
,</if>
<if test="createBy != null">#{createBy}
,</if>
<if test="createTime != null">#{createTime}
,</if>
<if test="applyEvent != null">#{applyEvent}
,</if>
<if test="workName != null">#{workName}
,</if>
<if test="hazardInfo != null">#{hazardInfo}
,</if>
<if test="safetyInfo != null">#{safetyInfo}
,</if>
</trim>
</insert>
<update id="updateQyzyPermitReport" parameterType="QyzyPermitReport">
update qyzy_permit_report
<trim prefix="SET" suffixOverrides=",">
<if test="applyName != null and applyName != ''">apply_name
=
#{applyName},</if>
<if test="applyDept != null">apply_dept
=
#{applyDept},</if>
<if test="phoneInfo != null">phone_info
=
#{phoneInfo},</if>
<if test="applyTime != null and applyTime != ''">apply_time
=
#{applyTime},</if>
<if test="applyReason != null">apply_reason
=
#{applyReason},</if>
<if test="startTime != null and startTime != ''">start_time
=
#{startTime},</if>
<if test="endTime != null and endTime != ''">end_time
=
#{endTime},</if>
<if test="workContent != null and workContent != ''">work_content
=
#{workContent},</if>
<if test="eventType != null">event_type
=
#{eventType},</if>
<if test="dataType != null">data_type
=
#{dataType},</if>
<if test="createBy != null">create_by
=
#{createBy},</if>
<if test="createTime != null">create_time
=
#{createTime},</if>
<if test="applyEvent != null">apply_event
=
#{applyEvent},</if>
<if test="workName != null">work_name
=
#{workName},</if>
<if test="hazardInfo != null">hazard_info
=
#{hazardInfo},</if>
<if test="safetyInfo != null">safety_info
=
#{safetyInfo},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteQyzyPermitReportById" parameterType="String">
delete
from qyzy_permit_report
where id = #{id}
</delete>
<delete id="deleteQyzyPermitReportByIds" parameterType="String">
delete from qyzy_permit_report where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<update id="updateState" parameterType="String">
update qyzy_permit_report
set event_type = #{eventType}
where id = #{id}
</update>
</mapper>

View File

@ -0,0 +1,231 @@
<?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.god.dataStatistics.mapper.QyzySpecialTaskInfoMapper">
<resultMap type="QyzySpecialTaskInfo" id="QyzySpecialTaskInfoResult">
<result property="id" column="id"/>
<result property="specialTaskName" column="special_task_name"/>
<result property="taskType" column="task_type"/>
<result property="taskArea" column="task_area"/>
<result property="startTime" column="start_time"/>
<result property="endTime" column="end_time"/>
<result property="chargePerson" column="charge_person"/>
<result property="taskInfo" column="task_info"/>
<result property="taskStatus" column="task_status"/>
<result property="remark" column="remark"/>
<result property="dataType" column="data_type"/>
<result property="permitId" column="permit_id"/>
<result property="permitName" column="permit_name"/>
<result property="addPerson" column="add_person"/>
<result property="addTime" column="add_time"/>
</resultMap>
<sql id="selectQyzySpecialTaskInfoVo">
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
</sql>
<select id="selectQyzySpecialTaskInfoList" parameterType="QyzySpecialTaskInfo"
resultMap="QyzySpecialTaskInfoResult">
<include refid="selectQyzySpecialTaskInfoVo"/>
<where>
<if test="specialTaskName != null and specialTaskName != ''"> and special_task_name like concat('%',
#{specialTaskName},
'%'
)</if>
<if test="taskType != null and taskType != ''"> and task_type like concat('%',
#{taskType},
'%'
)</if>
<if test="taskArea != null and taskArea != ''"> and task_area like concat('%',
#{taskArea},
'%'
)</if>
<if test="startTime != null and startTime != ''"> and start_time &gt;=
#{startTime}</if>
<if test="endTime != null and endTime != ''"> and end_time &lt;=
#{endTime}</if>
<if test="chargePerson != null and chargePerson != ''"> and charge_person like concat('%',
#{chargePerson},
'%'
)</if>
<if test="taskInfo != null and taskInfo != ''"> and task_info like concat('%',
#{taskInfo},
'%'
)</if>
<if test="taskStatus != null and taskStatus != ''"> and task_status like concat('%',
#{taskStatus},
'%'
)</if>
<if test="dataType != null and dataType != ''"> and data_type like concat('%',
#{dataType},
'%'
)</if>
<if test="permitId != null and permitId != ''"> and permit_id like concat('%',
#{permitId},
'%'
)</if>
<if test="permitName != null and permitName != ''"> and permit_name like concat('%',
#{permitName},
'%'
)</if>
<if test="addPerson != null and addPerson != ''"> and add_person like concat('%',
#{addPerson},
'%'
)</if>
<if test="addTime != null and addTime != ''"> and add_time &gt;=
#{addTime}</if>
</where>
</select>
<select id="selectQyzySpecialTaskInfoById" parameterType="String" resultMap="QyzySpecialTaskInfoResult">
<include refid="selectQyzySpecialTaskInfoVo"/>
where id = #{id}
</select>
<insert id="insertQyzySpecialTaskInfo" parameterType="QyzySpecialTaskInfo">
insert into qyzy_special_task_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id
,</if>
<if test="specialTaskName != null and specialTaskName != ''">special_task_name
,</if>
<if test="taskType != null">task_type
,</if>
<if test="taskArea != null and taskArea != ''">task_area
,</if>
<if test="startTime != null">start_time
,</if>
<if test="endTime != null">end_time
,</if>
<if test="chargePerson != null">charge_person
,</if>
<if test="taskInfo != null">task_info
,</if>
<if test="taskStatus != null and taskStatus != ''">task_status
,</if>
<if test="remark != null">remark
,</if>
<if test="dataType != null">data_type
,</if>
<if test="permitId != null">permit_id
,</if>
<if test="permitName != null">permit_name
,</if>
<if test="addPerson != null">add_person
,</if>
<if test="addTime != null">add_time
,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id}
,</if>
<if test="specialTaskName != null and specialTaskName != ''">#{specialTaskName}
,</if>
<if test="taskType != null">#{taskType}
,</if>
<if test="taskArea != null and taskArea != ''">#{taskArea}
,</if>
<if test="startTime != null">#{startTime}
,</if>
<if test="endTime != null">#{endTime}
,</if>
<if test="chargePerson != null">#{chargePerson}
,</if>
<if test="taskInfo != null">#{taskInfo}
,</if>
<if test="taskStatus != null and taskStatus != ''">#{taskStatus}
,</if>
<if test="remark != null">#{remark}
,</if>
<if test="dataType != null">#{dataType}
,</if>
<if test="permitId != null">#{permitId}
,</if>
<if test="permitName != null">#{permitName}
,</if>
<if test="addPerson != null">#{addPerson}
,</if>
<if test="addTime != null">#{addTime}
,</if>
</trim>
</insert>
<update id="updateQyzySpecialTaskInfo" parameterType="QyzySpecialTaskInfo">
update qyzy_special_task_info
<trim prefix="SET" suffixOverrides=",">
<if test="specialTaskName != null and specialTaskName != ''">special_task_name
=
#{specialTaskName},</if>
<if test="taskType != null">task_type
=
#{taskType},</if>
<if test="taskArea != null and taskArea != ''">task_area
=
#{taskArea},</if>
<if test="startTime != null">start_time
=
#{startTime},</if>
<if test="endTime != null">end_time
=
#{endTime},</if>
<if test="chargePerson != null">charge_person
=
#{chargePerson},</if>
<if test="taskInfo != null">task_info
=
#{taskInfo},</if>
<if test="taskStatus != null and taskStatus != ''">task_status
=
#{taskStatus},</if>
<if test="remark != null">remark
=
#{remark},</if>
<if test="dataType != null">data_type
=
#{dataType},</if>
<if test="permitId != null">permit_id
=
#{permitId},</if>
<if test="permitName != null">permit_name
=
#{permitName},</if>
<if test="addPerson != null">add_person
=
#{addPerson},</if>
<if test="addTime != null">add_time
=
#{addTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteQyzySpecialTaskInfoById" parameterType="String">
delete
from qyzy_special_task_info
where id = #{id}
</delete>
<delete id="deleteQyzySpecialTaskInfoByIds" parameterType="String">
delete from qyzy_special_task_info where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -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'
})
}

View File

@ -0,0 +1,304 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="时间" prop="addTime">
<el-date-picker clearable
v-model="queryParams.addTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择时间">
</el-date-picker>
</el-form-item>
<el-form-item label="区域地点" prop="taskArea">
<el-input
v-model="queryParams.taskArea"
placeholder="请输入区域地点"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="类型" prop="typeR">
<el-input
v-model="queryParams.typeR"
placeholder="请输入类型"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="primary"-->
<!-- plain-->
<!-- icon="el-icon-plus"-->
<!-- size="mini"-->
<!-- @click="handleAdd"-->
<!-- v-hasPermi="['dataStatistics:qyzyDataStatistics:add']"-->
<!-- >新增</el-button>-->
<!-- </el-col>-->
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['dataStatistics:qyzyDataStatistics:edit']"
>修改</el-button>
</el-col>
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="danger"-->
<!-- plain-->
<!-- icon="el-icon-delete"-->
<!-- size="mini"-->
<!-- :disabled="multiple"-->
<!-- @click="handleDelete"-->
<!-- v-hasPermi="['dataStatistics:qyzyDataStatistics:remove']"-->
<!-- >删除</el-button>-->
<!-- </el-col>-->
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['dataStatistics:qyzyDataStatistics:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="qyzyDataStatisticsList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="时间" align="center" prop="addTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.addTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="区域地点" align="center" prop="taskArea" />
<el-table-column label="作业名称" align="center" prop="taskName" />
<el-table-column label="类型" align="center" prop="typeR" />
<el-table-column label="作业内容" align="center" prop="taskInfo" />
<el-table-column label="添加人" align="center" prop="addPerson" />
<!-- <el-table-column label="备注" align="center" prop="remark" />-->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['dataStatistics:qyzyDataStatistics:edit']"
>修改</el-button>
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-delete"-->
<!-- @click="handleDelete(scope.row)"-->
<!-- v-hasPermi="['dataStatistics:qyzyDataStatistics:remove']"-->
<!-- >删除</el-button>-->
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改生产作业数分类统计对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="时间" prop="addTime">
<el-date-picker clearable
v-model="form.addTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择时间">
</el-date-picker>
</el-form-item>
<el-form-item label="区域地点" prop="taskArea">
<el-input v-model="form.taskArea" placeholder="请输入区域地点" />
</el-form-item>
<el-form-item label="作业名称" prop="taskName">
<el-input v-model="form.taskName" placeholder="请输入作业名称" />
</el-form-item>
<el-form-item label="类型" prop="typeR">
<el-input v-model="form.typeR" placeholder="请输入类型" />
</el-form-item>
<el-form-item label="作业内容" prop="taskInfo">
<el-input v-model="form.taskInfo" placeholder="请输入作业内容" />
</el-form-item>
<el-form-item label="添加人" prop="addPerson">
<el-input v-model="form.addPerson" placeholder="请输入添加人" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listQyzyDataStatistics, getQyzyDataStatistics, delQyzyDataStatistics, addQyzyDataStatistics, updateQyzyDataStatistics } from "@/api/dataStatistics/qyzyDataStatistics";
export default {
name: "QyzyDataStatistics",
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
qyzyDataStatisticsList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
addTime: null,
taskArea: null,
taskName: null,
typeR: null,
taskInfo: null,
addPerson: null,
},
//
form: {},
//
rules: {
}
};
},
created() {
this.getList();
},
methods: {
/** 查询生产作业数分类统计列表 */
getList() {
this.loading = true;
listQyzyDataStatistics(this.queryParams).then(response => {
this.qyzyDataStatisticsList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
addTime: null,
taskArea: null,
taskName: null,
typeR: null,
taskInfo: null,
addPerson: null,
remark: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加生产作业数分类统计";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getQyzyDataStatistics(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改生产作业数分类统计";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateQyzyDataStatistics(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addQyzyDataStatistics(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除生产作业数分类统计编号为"' + ids + '"的数据项?').then(function() {
return delQyzyDataStatistics(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('dataStatistics/qyzyDataStatistics/export', {
...this.queryParams
}, `qyzyDataStatistics_${new Date().getTime()}.xlsx`)
}
}
};
</script>

View File

@ -0,0 +1,205 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="区域地点" prop="taskArea">
<el-input
v-model="queryParams.taskArea"
placeholder="请输入区域地点"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="类型" prop="typeR">
<el-input
v-model="queryParams.typeR"
placeholder="请输入类型"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['dataStatistics:qyzyDataStatistics:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="qyzyDataStatisticsList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="区域地点" align="center" prop="taskArea" />
<el-table-column label="工作许可数量" align="center" prop="workSize" />
<el-table-column label="特殊作业数量" align="center" prop="specialSize" />
<el-table-column label="总数量" align="center" prop="allSize" />
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import {
listQyzyDataStatistics,
getQyzyDataStatistics,
delQyzyDataStatistics,
addQyzyDataStatistics,
updateQyzyDataStatistics,
listTop
} from '@/api/dataStatistics/qyzyDataStatistics'
export default {
name: "QyzyDataStatistics",
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
qyzyDataStatisticsList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
taskArea: null,
workSize: null,
specialSize: null,
allSize: null
},
//
form: {},
//
rules: {
}
};
},
created() {
this.getList();
},
methods: {
/** 查询生产作业数分类统计列表 */
getList() {
this.loading = true;
listTop(this.queryParams).then(response => {
this.qyzyDataStatisticsList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
taskArea: null,
workSize: null,
specialSize: null,
allSize: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加生产作业数分类统计";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getQyzyDataStatistics(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改生产作业数分类统计";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateQyzyDataStatistics(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addQyzyDataStatistics(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除生产作业数分类统计编号为"' + ids + '"的数据项?').then(function() {
return delQyzyDataStatistics(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('dataStatistics/qyzyDataStatistics/export', {
...this.queryParams
}, `qyzyDataStatistics_${new Date().getTime()}.xlsx`)
}
}
};
</script>

View File

@ -144,9 +144,6 @@
<el-form-item label="问题描述" prop="problem">
<el-input v-model="form.problem" placeholder="请输入问题描述" />
</el-form-item>
<!-- <el-form-item label="备注" prop="remark">-->
<!-- <el-input v-model="form.remark" placeholder="请输入备注" />-->
<!-- </el-form-item>-->
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>