DX
4 days ago
33 changed files with 884 additions and 89 deletions
@ -0,0 +1,23 @@
|
||||
package com.ruoyi.web.controller.app.vo; |
||||
|
||||
|
||||
import com.ruoyi.common.core.domain.AjaxResult; |
||||
import com.ruoyi.system.service.ISysDeptService; |
||||
import lombok.extern.slf4j.Slf4j; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.web.bind.annotation.GetMapping; |
||||
import org.springframework.web.bind.annotation.RequestMapping; |
||||
import org.springframework.web.bind.annotation.RestController; |
||||
|
||||
@RestController |
||||
@RequestMapping("/app/dept") |
||||
@Slf4j |
||||
public class DeptController { |
||||
@Autowired |
||||
private ISysDeptService iSysDeptService; |
||||
|
||||
@GetMapping("/list") |
||||
public AjaxResult deptList() { |
||||
return AjaxResult.success(iSysDeptService.selectSimpleList()); |
||||
} |
||||
} |
@ -0,0 +1,32 @@
|
||||
package com.ruoyi.common.core.page; |
||||
|
||||
import lombok.Data; |
||||
|
||||
import javax.validation.constraints.Min; |
||||
import javax.validation.constraints.Max; |
||||
import javax.validation.constraints.NotNull; |
||||
import java.io.Serializable; |
||||
|
||||
@Data |
||||
public class PageParam implements Serializable { |
||||
|
||||
private static final Integer PAGE_NO = 1; |
||||
private static final Integer PAGE_SIZE = 10; |
||||
|
||||
/** |
||||
* 每页条数 - 不分页 |
||||
* |
||||
* 例如说,导出接口,可以设置 {@link #pageSize} 为 -1 不分页,查询所有数据。 |
||||
*/ |
||||
public static final Integer PAGE_SIZE_NONE = -1; |
||||
|
||||
@NotNull(message = "页码不能为空") |
||||
@Min(value = 1, message = "页码最小值为 1") |
||||
private Integer pageNo = PAGE_NO; |
||||
|
||||
@NotNull(message = "每页条数不能为空") |
||||
@Min(value = 1, message = "每页条数最小值为 1") |
||||
@Max(value = 100, message = "每页条数最大值为 100") |
||||
private Integer pageSize = PAGE_SIZE; |
||||
|
||||
} |
@ -0,0 +1,167 @@
|
||||
package com.ruoyi.system.domain; |
||||
|
||||
import java.util.Date; |
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
import com.baomidou.mybatisplus.annotation.IdType; |
||||
import com.baomidou.mybatisplus.annotation.TableId; |
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import com.ruoyi.common.annotation.Excel; |
||||
import com.ruoyi.common.core.domain.BaseEntity; |
||||
import org.apache.commons.lang3.builder.ToStringBuilder; |
||||
import org.apache.commons.lang3.builder.ToStringStyle; |
||||
|
||||
/** |
||||
* 企业检查记录,用于记录与企业相关的环保检查信息。对象 enterprise_inspections |
||||
* |
||||
* @author ruoyi |
||||
* @date 2025-01-15 |
||||
*/ |
||||
@TableName("enterprise_inspections") |
||||
public class EnterpriseInspections extends BaseEntity { |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
/** |
||||
* 检查记录ID,主键 |
||||
*/ |
||||
@TableId(value = "id", type = IdType.AUTO) |
||||
private Long id; |
||||
|
||||
/** |
||||
* 任务ID |
||||
*/ |
||||
@Excel(name = "任务ID") |
||||
private Long taskId; |
||||
|
||||
/** |
||||
* 企业ID |
||||
*/ |
||||
@Excel(name = "企业ID") |
||||
private Long enterpriseId; |
||||
|
||||
/** |
||||
* 检查状态 |
||||
*/ |
||||
@Excel(name = "检查状态") |
||||
private String status; |
||||
|
||||
/** |
||||
* 检查日期 |
||||
*/ |
||||
@JsonFormat(pattern = "yyyy-MM-dd") |
||||
@Excel(name = "检查日期", width = 30, dateFormat = "yyyy-MM-dd") |
||||
private Date date; |
||||
|
||||
/** |
||||
* 检查结果 |
||||
*/ |
||||
@Excel(name = "检查结果") |
||||
private String result; |
||||
|
||||
/** |
||||
* 备注,检查执行或结果的详细说明 |
||||
*/ |
||||
@Excel(name = "备注,检查执行或结果的详细说明") |
||||
private String remarks; |
||||
|
||||
/** |
||||
* 检查人员签到位置信息,格式:经纬度 |
||||
*/ |
||||
@Excel(name = "检查人员签到位置信息,格式:经纬度") |
||||
private String gpsLocation; |
||||
|
||||
/** |
||||
* 检查人员ID |
||||
*/ |
||||
@Excel(name = "检查人员ID") |
||||
private Long creator; |
||||
|
||||
public Long getId() { |
||||
return id; |
||||
} |
||||
|
||||
public void setId(Long id) { |
||||
this.id = id; |
||||
} |
||||
|
||||
public Long getTaskId() { |
||||
return taskId; |
||||
} |
||||
|
||||
public void setTaskId(Long taskId) { |
||||
this.taskId = taskId; |
||||
} |
||||
|
||||
public Long getEnterpriseId() { |
||||
return enterpriseId; |
||||
} |
||||
|
||||
public void setEnterpriseId(Long enterpriseId) { |
||||
this.enterpriseId = enterpriseId; |
||||
} |
||||
|
||||
public String getStatus() { |
||||
return status; |
||||
} |
||||
|
||||
public void setStatus(String status) { |
||||
this.status = status; |
||||
} |
||||
|
||||
public Date getDate() { |
||||
return date; |
||||
} |
||||
|
||||
public void setDate(Date date) { |
||||
this.date = date; |
||||
} |
||||
|
||||
public String getResult() { |
||||
return result; |
||||
} |
||||
|
||||
public void setResult(String result) { |
||||
this.result = result; |
||||
} |
||||
|
||||
public String getRemarks() { |
||||
return remarks; |
||||
} |
||||
|
||||
public void setRemarks(String remarks) { |
||||
this.remarks = remarks; |
||||
} |
||||
|
||||
public String getGpsLocation() { |
||||
return gpsLocation; |
||||
} |
||||
|
||||
public void setGpsLocation(String gpsLocation) { |
||||
this.gpsLocation = gpsLocation; |
||||
} |
||||
|
||||
public Long getCreator() { |
||||
return creator; |
||||
} |
||||
|
||||
public void setCreator(Long creator) { |
||||
this.creator = creator; |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) |
||||
.append("id", getId()) |
||||
.append("taskId", getTaskId()) |
||||
.append("enterpriseId", getEnterpriseId()) |
||||
.append("status", getStatus()) |
||||
.append("date", getDate()) |
||||
.append("result", getResult()) |
||||
.append("remarks", getRemarks()) |
||||
.append("gpsLocation", getGpsLocation()) |
||||
.append("creator", getCreator()) |
||||
.append("createTime", getCreateTime()) |
||||
.append("updateTime", getUpdateTime()) |
||||
.toString(); |
||||
} |
||||
} |
@ -0,0 +1,95 @@
|
||||
package com.ruoyi.system.domain; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType; |
||||
import com.baomidou.mybatisplus.annotation.TableId; |
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import com.ruoyi.common.core.domain.BaseEntity; |
||||
import lombok.Data; |
||||
import org.apache.commons.lang3.builder.ToStringBuilder; |
||||
import org.apache.commons.lang3.builder.ToStringStyle; |
||||
|
||||
/** |
||||
* 任务分配,用于记录每个任务的执行人员及其状态。对象 task_assignments |
||||
* |
||||
* @author ruoyi |
||||
* @date 2025-01-15 |
||||
*/ |
||||
@TableName("task_assignments") |
||||
@Data |
||||
public class TaskAssignments extends BaseEntity |
||||
{ |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
/** 主键 */ |
||||
@TableId(value = "id",type = IdType.AUTO) |
||||
private Long id; |
||||
|
||||
/** 任务ID */ |
||||
private Long taskId; |
||||
|
||||
/** 执行人员ID */ |
||||
private Long userId; |
||||
|
||||
/** 重新分配人ID,可为空 */ |
||||
private Long reassignedBy; |
||||
|
||||
/** 任务状态 */ |
||||
private Integer status; |
||||
|
||||
public void setId(Long id) |
||||
{ |
||||
this.id = id; |
||||
} |
||||
|
||||
public Long getId() |
||||
{ |
||||
return id; |
||||
} |
||||
public void setTaskId(Long taskId) |
||||
{ |
||||
this.taskId = taskId; |
||||
} |
||||
|
||||
public Long getTaskId() |
||||
{ |
||||
return taskId; |
||||
} |
||||
public void setUserId(Long userId) |
||||
{ |
||||
this.userId = userId; |
||||
} |
||||
|
||||
public Long getUserId() |
||||
{ |
||||
return userId; |
||||
} |
||||
public void setReassignedBy(Long reassignedBy) |
||||
{ |
||||
this.reassignedBy = reassignedBy; |
||||
} |
||||
|
||||
public Long getReassignedBy() |
||||
{ |
||||
return reassignedBy; |
||||
} |
||||
public void setStatus(Integer status) |
||||
{ |
||||
this.status = status; |
||||
} |
||||
|
||||
public Integer getStatus() |
||||
{ |
||||
return status; |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
||||
.append("id", getId()) |
||||
.append("taskId", getTaskId()) |
||||
.append("userId", getUserId()) |
||||
.append("reassignedBy", getReassignedBy()) |
||||
.append("status", getStatus()) |
||||
.toString(); |
||||
} |
||||
} |
@ -0,0 +1,17 @@
|
||||
package com.ruoyi.system.domain.dto; |
||||
|
||||
import lombok.Data; |
||||
|
||||
@Data |
||||
public class TaskPageDto { |
||||
//任务
|
||||
private String title; |
||||
//执行周期
|
||||
private Integer execCycle; |
||||
//类型
|
||||
private Integer type; |
||||
//任务进度
|
||||
private String completionProgress; |
||||
//范围
|
||||
private Integer scope ; |
||||
} |
@ -0,0 +1,21 @@
|
||||
package com.ruoyi.system.domain.vo; |
||||
|
||||
import lombok.Data; |
||||
|
||||
@Data |
||||
public class TaskAppSelectVo { |
||||
//任务名称
|
||||
private String taskName; |
||||
//任务倒计时
|
||||
private String descTime; |
||||
//任务描述
|
||||
private String description; |
||||
//任务进度
|
||||
private String completionProgress; |
||||
//任务状态
|
||||
private String taskStatus; |
||||
//任务类型
|
||||
private String taskType; |
||||
//任务优先级
|
||||
private String taskPriority; |
||||
} |
@ -0,0 +1,12 @@
|
||||
package com.ruoyi.system.domain.vo; |
||||
|
||||
import lombok.Data; |
||||
|
||||
import java.time.LocalDate; |
||||
import java.util.List; |
||||
|
||||
@Data |
||||
public class TaskInsertEnterprisesVo { |
||||
private Long taskId; |
||||
private List<Long> enterprisesList; |
||||
} |
@ -0,0 +1,11 @@
|
||||
package com.ruoyi.system.domain.vo; |
||||
|
||||
import com.ruoyi.common.core.page.PageParam; |
||||
|
||||
import java.time.LocalDate; |
||||
|
||||
public class TaskPageVo { |
||||
private String title; |
||||
private LocalDate startDate; |
||||
private LocalDate endDate; |
||||
} |
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.system.mapper; |
||||
|
||||
import java.util.List; |
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import com.ruoyi.system.domain.EnterpriseInspections; |
||||
|
||||
/** |
||||
* 企业检查记录,用于记录与企业相关的环保检查信息。Mapper接口 |
||||
* |
||||
* @author ruoyi |
||||
* @date 2025-01-15 |
||||
*/ |
||||
public interface EnterpriseInspectionsMapper extends BaseMapper<EnterpriseInspections> { |
||||
/** |
||||
* 查询企业检查记录,用于记录与企业相关的环保检查信息。 |
||||
* |
||||
* @param id 企业检查记录,用于记录与企业相关的环保检查信息。主键 |
||||
* @return 企业检查记录,用于记录与企业相关的环保检查信息。 |
||||
*/ |
||||
public EnterpriseInspections selectEnterpriseInspectionsById(Long id); |
||||
|
||||
/** |
||||
* 查询企业检查记录,用于记录与企业相关的环保检查信息。列表 |
||||
* |
||||
* @param enterpriseInspections 企业检查记录,用于记录与企业相关的环保检查信息。 |
||||
* @return 企业检查记录,用于记录与企业相关的环保检查信息。集合 |
||||
*/ |
||||
public List<EnterpriseInspections> selectEnterpriseInspectionsList(EnterpriseInspections enterpriseInspections); |
||||
|
||||
/** |
||||
* 新增企业检查记录,用于记录与企业相关的环保检查信息。 |
||||
* |
||||
* @param enterpriseInspections 企业检查记录,用于记录与企业相关的环保检查信息。 |
||||
* @return 结果 |
||||
*/ |
||||
public int insertEnterpriseInspections(EnterpriseInspections enterpriseInspections); |
||||
|
||||
/** |
||||
* 修改企业检查记录,用于记录与企业相关的环保检查信息。 |
||||
* |
||||
* @param enterpriseInspections 企业检查记录,用于记录与企业相关的环保检查信息。 |
||||
* @return 结果 |
||||
*/ |
||||
public int updateEnterpriseInspections(EnterpriseInspections enterpriseInspections); |
||||
|
||||
/** |
||||
* 删除企业检查记录,用于记录与企业相关的环保检查信息。 |
||||
* |
||||
* @param id 企业检查记录,用于记录与企业相关的环保检查信息。主键 |
||||
* @return 结果 |
||||
*/ |
||||
public int deleteEnterpriseInspectionsById(Long id); |
||||
|
||||
/** |
||||
* 批量删除企业检查记录,用于记录与企业相关的环保检查信息。 |
||||
* |
||||
* @param ids 需要删除的数据主键集合 |
||||
* @return 结果 |
||||
*/ |
||||
public int deleteEnterpriseInspectionsByIds(Long[] ids); |
||||
} |
@ -0,0 +1,14 @@
|
||||
package com.ruoyi.system.mapper; |
||||
|
||||
import java.util.List; |
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import com.ruoyi.system.domain.TaskAssignments; |
||||
|
||||
/** |
||||
* 任务分配,用于记录每个任务的执行人员及其状态。Mapper接口 |
||||
* |
||||
* @author ruoyi |
||||
* @date 2025-01-15 |
||||
*/ |
||||
public interface TaskAssignmentsMapper extends BaseMapper<TaskAssignments> { |
||||
} |
@ -0,0 +1,14 @@
|
||||
package com.ruoyi.system.service; |
||||
|
||||
import java.util.List; |
||||
import com.ruoyi.system.domain.EnterpriseInspections; |
||||
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
||||
/** |
||||
* 企业检查记录,用于记录与企业相关的环保检查信息。Service接口 |
||||
* |
||||
* @author ruoyi |
||||
* @date 2025-01-15 |
||||
*/ |
||||
public interface IEnterpriseInspectionsService extends IService<EnterpriseInspections> { |
||||
} |
@ -0,0 +1,14 @@
|
||||
package com.ruoyi.system.service; |
||||
|
||||
import java.util.List; |
||||
import com.ruoyi.system.domain.TaskAssignments; |
||||
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
||||
/** |
||||
* 任务分配,用于记录每个任务的执行人员及其状态。Service接口 |
||||
* |
||||
* @author ruoyi |
||||
* @date 2025-01-15 |
||||
*/ |
||||
public interface ITaskAssignmentsService extends IService<TaskAssignments> { |
||||
} |
@ -0,0 +1,21 @@
|
||||
package com.ruoyi.system.service.impl; |
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
||||
import com.ruoyi.common.utils.DateUtils; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.stereotype.Service; |
||||
import com.ruoyi.system.mapper.EnterpriseInspectionsMapper; |
||||
import com.ruoyi.system.domain.EnterpriseInspections; |
||||
import com.ruoyi.system.service.IEnterpriseInspectionsService; |
||||
|
||||
/** |
||||
* 企业检查记录,用于记录与企业相关的环保检查信息。Service业务层处理 |
||||
* |
||||
* @author ruoyi |
||||
* @date 2025-01-15 |
||||
*/ |
||||
@Service |
||||
public class EnterpriseInspectionsServiceImpl extends ServiceImpl<EnterpriseInspectionsMapper, EnterpriseInspections> implements IEnterpriseInspectionsService { |
||||
|
||||
} |
@ -0,0 +1,20 @@
|
||||
package com.ruoyi.system.service.impl; |
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
import java.util.List; |
||||
|
||||
import com.ruoyi.system.service.ITaskAssignmentsService; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.stereotype.Service; |
||||
import com.ruoyi.system.mapper.TaskAssignmentsMapper; |
||||
import com.ruoyi.system.domain.TaskAssignments; |
||||
|
||||
/** |
||||
* 任务分配,用于记录每个任务的执行人员及其状态。Service业务层处理 |
||||
* |
||||
* @author ruoyi |
||||
* @date 2025-01-15 |
||||
*/ |
||||
@Service |
||||
public class TaskAssignmentsServiceImpl extends ServiceImpl<TaskAssignmentsMapper, TaskAssignments> implements ITaskAssignmentsService { |
||||
} |
@ -0,0 +1,99 @@
|
||||
<?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.ruoyi.system.mapper.EnterpriseInspectionsMapper"> |
||||
|
||||
<resultMap type="EnterpriseInspections" id="EnterpriseInspectionsResult"> |
||||
<result property="id" column="id" /> |
||||
<result property="taskId" column="task_id" /> |
||||
<result property="enterpriseId" column="enterprise_id" /> |
||||
<result property="status" column="status" /> |
||||
<result property="date" column="date" /> |
||||
<result property="result" column="result" /> |
||||
<result property="remarks" column="remarks" /> |
||||
<result property="gpsLocation" column="gps_location" /> |
||||
<result property="creator" column="creator" /> |
||||
<result property="createTime" column="create_time" /> |
||||
<result property="updateTime" column="update_time" /> |
||||
</resultMap> |
||||
|
||||
<sql id="selectEnterpriseInspectionsVo"> |
||||
select id, task_id, enterprise_id, status, date, result, remarks, gps_location, creator, create_time, update_time from enterprise_inspections |
||||
</sql> |
||||
|
||||
<select id="selectEnterpriseInspectionsList" parameterType="EnterpriseInspections" resultMap="EnterpriseInspectionsResult"> |
||||
<include refid="selectEnterpriseInspectionsVo"/> |
||||
<where> |
||||
<if test="taskId != null "> and task_id = #{taskId}</if> |
||||
<if test="enterpriseId != null "> and enterprise_id = #{enterpriseId}</if> |
||||
<if test="status != null and status != ''"> and status = #{status}</if> |
||||
<if test="date != null "> and date = #{date}</if> |
||||
<if test="result != null and result != ''"> and result = #{result}</if> |
||||
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if> |
||||
<if test="gpsLocation != null and gpsLocation != ''"> and gps_location = #{gpsLocation}</if> |
||||
<if test="creator != null "> and creator = #{creator}</if> |
||||
</where> |
||||
</select> |
||||
|
||||
<select id="selectEnterpriseInspectionsById" parameterType="Long" resultMap="EnterpriseInspectionsResult"> |
||||
<include refid="selectEnterpriseInspectionsVo"/> |
||||
where id = #{id} |
||||
</select> |
||||
|
||||
<insert id="insertEnterpriseInspections" parameterType="EnterpriseInspections" useGeneratedKeys="true" keyProperty="id"> |
||||
insert into enterprise_inspections |
||||
<trim prefix="(" suffix=")" suffixOverrides=","> |
||||
<if test="taskId != null">task_id,</if> |
||||
<if test="enterpriseId != null">enterprise_id,</if> |
||||
<if test="status != null and status != ''">status,</if> |
||||
<if test="date != null">date,</if> |
||||
<if test="result != null and result != ''">result,</if> |
||||
<if test="remarks != null">remarks,</if> |
||||
<if test="gpsLocation != null">gps_location,</if> |
||||
<if test="creator != null">creator,</if> |
||||
<if test="createTime != null">create_time,</if> |
||||
<if test="updateTime != null">update_time,</if> |
||||
</trim> |
||||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
||||
<if test="taskId != null">#{taskId},</if> |
||||
<if test="enterpriseId != null">#{enterpriseId},</if> |
||||
<if test="status != null and status != ''">#{status},</if> |
||||
<if test="date != null">#{date},</if> |
||||
<if test="result != null and result != ''">#{result},</if> |
||||
<if test="remarks != null">#{remarks},</if> |
||||
<if test="gpsLocation != null">#{gpsLocation},</if> |
||||
<if test="creator != null">#{creator},</if> |
||||
<if test="createTime != null">#{createTime},</if> |
||||
<if test="updateTime != null">#{updateTime},</if> |
||||
</trim> |
||||
</insert> |
||||
|
||||
<update id="updateEnterpriseInspections" parameterType="EnterpriseInspections"> |
||||
update enterprise_inspections |
||||
<trim prefix="SET" suffixOverrides=","> |
||||
<if test="taskId != null">task_id = #{taskId},</if> |
||||
<if test="enterpriseId != null">enterprise_id = #{enterpriseId},</if> |
||||
<if test="status != null and status != ''">status = #{status},</if> |
||||
<if test="date != null">date = #{date},</if> |
||||
<if test="result != null and result != ''">result = #{result},</if> |
||||
<if test="remarks != null">remarks = #{remarks},</if> |
||||
<if test="gpsLocation != null">gps_location = #{gpsLocation},</if> |
||||
<if test="creator != null">creator = #{creator},</if> |
||||
<if test="createTime != null">create_time = #{createTime},</if> |
||||
<if test="updateTime != null">update_time = #{updateTime},</if> |
||||
</trim> |
||||
where id = #{id} |
||||
</update> |
||||
|
||||
<delete id="deleteEnterpriseInspectionsById" parameterType="Long"> |
||||
delete from enterprise_inspections where id = #{id} |
||||
</delete> |
||||
|
||||
<delete id="deleteEnterpriseInspectionsByIds" parameterType="String"> |
||||
delete from enterprise_inspections where id in |
||||
<foreach item="id" collection="array" open="(" separator="," close=")"> |
||||
#{id} |
||||
</foreach> |
||||
</delete> |
||||
</mapper> |
Loading…
Reference in new issue