This commit is contained in:
LEED
2025-07-19 11:29:07 +08:00
parent 4c1521bda0
commit a9895296f0
45 changed files with 929 additions and 70 deletions

View File

@@ -3,6 +3,7 @@ package com.xinda.itsm.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.xinda.common.core.domain.entity.SysUser;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
@@ -41,11 +42,13 @@ public class DutyController extends BaseController
/**
* 查询值班管理列表
*/
@PreAuthorize("@ss.hasPermi('itsm:duty:list')")
// @PreAuthorize("@ss.hasPermi('itsm:duty:list')")
@GetMapping("/list")
@ApiOperation("查询值班管理列表")
public TableDataInfo list(Duty duty)
{
SysUser user = getLoginUser().getUser();
duty.setTenantId(user.getDeptId());
startPage();
List<Duty> list = dutyService.selectDutyList(duty);
return getDataTable(list);
@@ -83,6 +86,8 @@ public class DutyController extends BaseController
@ApiOperation("新增值班管理")
public AjaxResult add(@RequestBody Duty duty)
{
SysUser user = getLoginUser().getUser();
duty.setTenantId(user.getDeptId());
return toAjax(dutyService.insertDuty(duty));
}

View File

@@ -3,6 +3,7 @@ package com.xinda.itsm.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.xinda.common.core.domain.entity.SysUser;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
@@ -39,11 +40,13 @@ public class ExampleReportController extends BaseController
/**
* 查询例报管理列表
*/
@PreAuthorize("@ss.hasPermi('itsm:report:list')")
// @PreAuthorize("@ss.hasPermi('itsm:report:list')")
@GetMapping("/list")
@ApiOperation("查询例报管理列表")
public TableDataInfo list(ExampleReport exampleReport)
{
SysUser user = getLoginUser().getUser();
exampleReport.setTenantId(user.getDeptId());
startPage();
List<ExampleReport> list = exampleReportService.selectExampleReportList(exampleReport);
return getDataTable(list);
@@ -81,6 +84,8 @@ public class ExampleReportController extends BaseController
@ApiOperation("新增例报管理")
public AjaxResult add(@RequestBody ExampleReport exampleReport)
{
SysUser user = getLoginUser().getUser();
exampleReport.setTenantId(user.getDeptId());
return toAjax(exampleReportService.insertExampleReport(exampleReport));
}

View File

@@ -3,6 +3,7 @@ package com.xinda.itsm.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.xinda.common.core.domain.entity.SysUser;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
@@ -41,11 +42,13 @@ public class InspectionPlanController extends BaseController
/**
* 查询巡检计划列表
*/
@PreAuthorize("@ss.hasPermi('itsm:plan:list')")
//@PreAuthorize("@ss.hasPermi('itsm:plan:list')")
@GetMapping("/list")
@ApiOperation("查询巡检计划列表")
public TableDataInfo list(InspectionPlan inspectionPlan)
{
SysUser user = getLoginUser().getUser();
inspectionPlan.setTenantId(user.getDeptId());
startPage();
List<InspectionPlan> list = inspectionPlanService.selectInspectionPlanList(inspectionPlan);
return getDataTable(list);
@@ -83,6 +86,8 @@ public class InspectionPlanController extends BaseController
@ApiOperation("新增巡检计划")
public AjaxResult add(@RequestBody InspectionPlan inspectionPlan)
{
SysUser user = getLoginUser().getUser();
inspectionPlan.setTenantId(user.getDeptId());
return toAjax(inspectionPlanService.insertInspectionPlan(inspectionPlan));
}

View File

@@ -3,6 +3,7 @@ package com.xinda.itsm.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.xinda.common.core.domain.entity.SysUser;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
@@ -41,11 +42,13 @@ public class InspectionRecordController extends BaseController
/**
* 查询巡检记录列表
*/
@PreAuthorize("@ss.hasPermi('itsm:record:list')")
//@PreAuthorize("@ss.hasPermi('itsm:record:list')")
@GetMapping("/list")
@ApiOperation("查询巡检记录列表")
public TableDataInfo list(InspectionRecord inspectionRecord)
{
SysUser user = getLoginUser().getUser();
inspectionRecord.setTenantId(user.getDeptId());
startPage();
List<InspectionRecord> list = inspectionRecordService.selectInspectionRecordList(inspectionRecord);
return getDataTable(list);
@@ -83,6 +86,8 @@ public class InspectionRecordController extends BaseController
@ApiOperation("新增巡检记录")
public AjaxResult add(@RequestBody InspectionRecord inspectionRecord)
{
SysUser user = getLoginUser().getUser();
inspectionRecord.setTenantId(user.getDeptId());
return toAjax(inspectionRecordService.insertInspectionRecord(inspectionRecord));
}

View File

@@ -3,6 +3,7 @@ package com.xinda.itsm.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.xinda.common.core.domain.entity.SysUser;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
@@ -41,11 +42,13 @@ public class PrePlanController extends BaseController
/**
* 查询预案管理列表
*/
@PreAuthorize("@ss.hasPermi('itsm:prePlan:list')")
//@PreAuthorize("@ss.hasPermi('itsm:prePlan:list')")
@GetMapping("/list")
@ApiOperation("查询预案管理列表")
public TableDataInfo list(PrePlan prePlan)
{
SysUser user = getLoginUser().getUser();
prePlan.setTenantId(user.getDeptId());
startPage();
List<PrePlan> list = prePlanService.selectPrePlanList(prePlan);
return getDataTable(list);
@@ -83,6 +86,8 @@ public class PrePlanController extends BaseController
@ApiOperation("新增预案管理")
public AjaxResult add(@RequestBody PrePlan prePlan)
{
SysUser user = getLoginUser().getUser();
prePlan.setTenantId(user.getDeptId());
return toAjax(prePlanService.insertPrePlan(prePlan));
}

View File

@@ -3,6 +3,7 @@ package com.xinda.itsm.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.xinda.common.core.domain.entity.SysUser;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
@@ -41,11 +42,13 @@ public class ProcessInfoController extends BaseController
/**
* 查询流程管理列表
*/
@PreAuthorize("@ss.hasPermi('itsm:process:list')")
//@PreAuthorize("@ss.hasPermi('itsm:process:list')")
@GetMapping("/list")
@ApiOperation("查询流程管理列表")
public TableDataInfo list(ProcessInfo processInfo)
{
SysUser user = getLoginUser().getUser();
processInfo.setTenantId(user.getDeptId());
startPage();
List<ProcessInfo> list = processInfoService.selectProcessInfoList(processInfo);
return getDataTable(list);
@@ -83,6 +86,8 @@ public class ProcessInfoController extends BaseController
@ApiOperation("新增流程管理")
public AjaxResult add(@RequestBody ProcessInfo processInfo)
{
SysUser user = getLoginUser().getUser();
processInfo.setTenantId(user.getDeptId());
return toAjax(processInfoService.insertProcessInfo(processInfo));
}

View File

@@ -3,6 +3,7 @@ package com.xinda.itsm.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.xinda.common.core.domain.entity.SysUser;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
@@ -41,11 +42,13 @@ public class RegulationInfoController extends BaseController
/**
* 查询制度管理列表
*/
@PreAuthorize("@ss.hasPermi('itsm:regulation:list')")
//@PreAuthorize("@ss.hasPermi('itsm:regulation:list')")
@GetMapping("/list")
@ApiOperation("查询制度管理列表")
public TableDataInfo list(RegulationInfo regulationInfo)
{
SysUser user = getLoginUser().getUser();
regulationInfo.setTenantId(user.getDeptId());
startPage();
List<RegulationInfo> list = regulationInfoService.selectRegulationInfoList(regulationInfo);
return getDataTable(list);
@@ -83,6 +86,8 @@ public class RegulationInfoController extends BaseController
@ApiOperation("新增制度管理")
public AjaxResult add(@RequestBody RegulationInfo regulationInfo)
{
SysUser user = getLoginUser().getUser();
regulationInfo.setTenantId(user.getDeptId());
return toAjax(regulationInfoService.insertRegulationInfo(regulationInfo));
}

View File

@@ -3,6 +3,7 @@ package com.xinda.itsm.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.xinda.common.core.domain.entity.SysUser;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
@@ -41,11 +42,13 @@ public class RepairOrderController extends BaseController
/**
* 查询维修工单列表
*/
@PreAuthorize("@ss.hasPermi('itsm:order:list')")
//@PreAuthorize("@ss.hasPermi('itsm:order:list')")
@GetMapping("/list")
@ApiOperation("查询维修工单列表")
public TableDataInfo list(RepairOrder repairOrder)
{
SysUser user = getLoginUser().getUser();
repairOrder.setTenantId(user.getDeptId());
startPage();
List<RepairOrder> list = repairOrderService.selectRepairOrderList(repairOrder);
return getDataTable(list);
@@ -72,6 +75,7 @@ public class RepairOrderController extends BaseController
@ApiOperation("获取维修工单详细信息")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(repairOrderService.selectRepairOrderById(id));
}
@@ -83,6 +87,8 @@ public class RepairOrderController extends BaseController
@ApiOperation("新增维修工单")
public AjaxResult add(@RequestBody RepairOrder repairOrder)
{
SysUser user = getLoginUser().getUser();
repairOrder.setTenantId(user.getDeptId());
return toAjax(repairOrderService.insertRepairOrder(repairOrder));
}

View File

@@ -3,6 +3,7 @@ package com.xinda.itsm.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.xinda.common.core.domain.entity.SysUser;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
@@ -41,11 +42,13 @@ public class ScheduleController extends BaseController
/**
* 查询调度计划管理列表
*/
@PreAuthorize("@ss.hasPermi('itsm:schedule:list')")
//@PreAuthorize("@ss.hasPermi('itsm:schedule:list')")
@GetMapping("/list")
@ApiOperation("查询调度计划管理列表")
public TableDataInfo list(Schedule schedule)
{
SysUser user = getLoginUser().getUser();
schedule.setTenantId(user.getDeptId());
startPage();
List<Schedule> list = scheduleService.selectScheduleList(schedule);
return getDataTable(list);
@@ -83,6 +86,8 @@ public class ScheduleController extends BaseController
@ApiOperation("新增调度计划管理")
public AjaxResult add(@RequestBody Schedule schedule)
{
SysUser user = getLoginUser().getUser();
schedule.setTenantId(user.getDeptId());
return toAjax(scheduleService.insertSchedule(schedule));
}

View File

@@ -3,6 +3,7 @@ package com.xinda.itsm.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.xinda.common.core.domain.entity.SysUser;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
@@ -41,11 +42,13 @@ public class StandardInfoController extends BaseController
/**
* 查询作业规范列表
*/
@PreAuthorize("@ss.hasPermi('itsm:standardInfo:list')")
//@PreAuthorize("@ss.hasPermi('itsm:standard:list')")
@GetMapping("/list")
@ApiOperation("查询作业规范列表")
public TableDataInfo list(StandardInfo standardInfo)
{
SysUser user = getLoginUser().getUser();
standardInfo.setTenantId(user.getDeptId());
startPage();
List<StandardInfo> list = standardInfoService.selectStandardInfoList(standardInfo);
return getDataTable(list);
@@ -55,7 +58,7 @@ public class StandardInfoController extends BaseController
* 导出作业规范列表
*/
@ApiOperation("导出作业规范列表")
@PreAuthorize("@ss.hasPermi('itsm:standardInfo:export')")
@PreAuthorize("@ss.hasPermi('itsm:standard:export')")
@PostMapping("/export")
public void export(HttpServletResponse response, StandardInfo standardInfo)
{
@@ -67,7 +70,7 @@ public class StandardInfoController extends BaseController
/**
* 获取作业规范详细信息
*/
@PreAuthorize("@ss.hasPermi('itsm:standardInfo:query')")
@PreAuthorize("@ss.hasPermi('itsm:standard:query')")
@GetMapping(value = "/{standardId}")
@ApiOperation("获取作业规范详细信息")
public AjaxResult getInfo(@PathVariable("standardId") Long standardId)
@@ -78,18 +81,20 @@ public class StandardInfoController extends BaseController
/**
* 新增作业规范
*/
@PreAuthorize("@ss.hasPermi('itsm:standardInfo:add')")
@PreAuthorize("@ss.hasPermi('itsm:standard:add')")
@PostMapping
@ApiOperation("新增作业规范")
public AjaxResult add(@RequestBody StandardInfo standardInfo)
{
SysUser user = getLoginUser().getUser();
standardInfo.setTenantId(user.getDeptId());
return toAjax(standardInfoService.insertStandardInfo(standardInfo));
}
/**
* 修改作业规范
*/
@PreAuthorize("@ss.hasPermi('itsm:standardInfo:edit')")
@PreAuthorize("@ss.hasPermi('itsm:standard:edit')")
@PutMapping
@ApiOperation("修改作业规范")
public AjaxResult edit(@RequestBody StandardInfo standardInfo)
@@ -100,7 +105,7 @@ public class StandardInfoController extends BaseController
/**
* 删除作业规范
*/
@PreAuthorize("@ss.hasPermi('itsm:standardInfo:remove')")
@PreAuthorize("@ss.hasPermi('itsm:standard:remove')")
@DeleteMapping("/{standardIds}")
@ApiOperation("删除作业规范")
public AjaxResult remove(@PathVariable Long[] standardIds)

View File

@@ -52,5 +52,7 @@ private static final long serialVersionUID = 1L;
@Excel(name = "替班人员")
@ApiModelProperty("替班人员")
private String relief;
/** 租户id */
@Excel(name = "租户id")
private Long tenantId;
}

View File

@@ -66,5 +66,7 @@ private static final long serialVersionUID = 1L;
@Excel(name = "结束日期", width = 30, dateFormat = "yyyy-MM-dd")
@ApiModelProperty("结束日期")
private Date endDate;
/** 租户id */
@Excel(name = "租户id")
private Long tenantId;
}

View File

@@ -81,5 +81,7 @@ private static final long serialVersionUID = 1L;
@Excel(name = "状态", readConverterExp = "0=正常,1=停用")
@ApiModelProperty("状态")
private String status;
/** 租户id */
@Excel(name = "租户id")
private Long tenantId;
}

View File

@@ -87,4 +87,7 @@ private static final long serialVersionUID = 1L;
@ApiModelProperty("巡检备注")
private String inspectionRemark;
/** 租户id */
@Excel(name = "租户id")
private Long tenantId;
}

View File

@@ -57,5 +57,7 @@ private static final long serialVersionUID = 1L;
@Excel(name = "预案关键词")
@ApiModelProperty("预案关键词")
private String keywords;
/** 租户id */
@Excel(name = "租户id")
private Long tenantId;
}

View File

@@ -50,5 +50,7 @@ private static final long serialVersionUID = 1L;
@Excel(name = "处理人")
@ApiModelProperty("处理人")
private Long handlePerson;
/** 租户id */
@Excel(name = "租户id")
private Long tenantId;
}

View File

@@ -55,5 +55,7 @@ private static final long serialVersionUID = 1L;
@Excel(name = "上传时间", width = 30, dateFormat = "yyyy-MM-dd")
@ApiModelProperty("上传时间")
private Date uploadTime;
/** 租户id */
@Excel(name = "租户id")
private Long tenantId;
}

View File

@@ -78,5 +78,7 @@ private static final long serialVersionUID = 1L;
@Excel(name = "工单备注")
@ApiModelProperty("工单备注")
private String orderRemark;
/** 租户id */
@Excel(name = "租户id")
private Long tenantId;
}

View File

@@ -128,5 +128,7 @@ private static final long serialVersionUID = 1L;
@Excel(name = "负责人")
@ApiModelProperty("负责人")
private String head;
/** 租户id */
@Excel(name = "租户id")
private Long tenantId;
}

View File

@@ -42,5 +42,7 @@ private static final long serialVersionUID = 1L;
@Excel(name = "规范文件")
@ApiModelProperty("规范文件")
private String docOssId;
/** 租户id */
@Excel(name = "租户id")
private Long tenantId;
}

View File

@@ -74,6 +74,7 @@ public class InspectionPlanServiceImpl implements IInspectionPlanService
processDateRange(inspectionPlan.getStartDate(), inspectionPlan.getEndDate(), dateList::add);
for(Date date : dateList){
InspectionRecord inspectionRecord = getBasicRecord(inspectionPlan, date, "");
inspectionRecord.setTenantId(inspectionPlan.getTenantId());
inspectionRecord.setCreateTime(DateUtils.getNowDate());
inspectionRecord.setCreateBy(loginUser.getUsername());
inspectionRecordMapper.insertInspectionRecord(inspectionRecord);
@@ -153,6 +154,7 @@ public class InspectionPlanServiceImpl implements IInspectionPlanService
record.setInspectionPerson(inspectionPlan.getInspectionPerson());
record.setPlanId(inspectionPlan.getId());
record.setUserId(inspectionPlan.getUserId());
record.setTenantId(inspectionPlan.getTenantId());
record.setInspectionCycle(cycle);
record.setCycle(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, now));
return record;

View File

@@ -17,10 +17,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="tenantId" column="tenant_id" />
</resultMap>
<sql id="selectDutyVo">
select duty_id, duty_date, on_duty, duty_period, type, status, relief, remark, create_by, create_time, update_by, update_time from duty
select duty_id, duty_date, on_duty, duty_period, type, status, relief, remark, create_by, create_time, update_by, update_time,tenant_id from duty
</sql>
<select id="selectDutyList" parameterType="Duty" resultMap="DutyResult">
@@ -32,6 +33,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="type != null and type != ''"> and type = #{type}</if>
<if test="status != null and status != ''"> and status = #{status}</if>
<if test="relief != null and relief != ''"> and relief = #{relief}</if>
<if test="tenantId != null ">
and ( tenant_id in (SELECT dept_id FROM sys_dept
WHERE FIND_IN_SET(#{tenantId}, ancestors) OR dept_id = #{tenantId})
)
</if>
</where>
</select>
@@ -55,6 +61,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="tenantId != null">tenant_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="dutyId != null">#{dutyId},</if>
@@ -69,6 +76,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="tenantId != null">#{tenantId},</if>
</trim>
</insert>
@@ -86,6 +94,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="tenantId != null">tenant_id = #{tenantId},</if>
</trim>
where duty_id = #{dutyId}
</update>

View File

@@ -18,6 +18,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateTime" column="update_time" />
<result property="startDate" column="start_date" />
<result property="endDate" column="end_date" />
<result property="tenantId" column="tenant_id" />
</resultMap>
<sql id="selectExampleReportVo">
@@ -35,6 +36,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="receiver != null and receiver != ''"> and receiver = #{receiver}</if>
<if test="startDate != null "> and start_date = #{startDate}</if>
<if test="endDate != null "> and end_date = #{endDate}</if>
<if test="tenantId != null ">
and ( tenant_id in (SELECT dept_id FROM sys_dept
WHERE FIND_IN_SET(#{tenantId}, ancestors) OR dept_id = #{tenantId})
)
</if>
</where>
</select>
@@ -59,6 +65,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">update_time,</if>
<if test="startDate != null">start_date,</if>
<if test="endDate != null">end_date,</if>
<if test="tenantId != null">tenant_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="exampleReportId != null">#{exampleReportId},</if>
@@ -74,6 +81,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">#{updateTime},</if>
<if test="startDate != null">#{startDate},</if>
<if test="endDate != null">#{endDate},</if>
<if test="tenantId != null">#{tenantId},</if>
</trim>
</insert>
@@ -92,6 +100,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="startDate != null">start_date = #{startDate},</if>
<if test="endDate != null">end_date = #{endDate},</if>
<if test="tenantId != null">tenant_id = #{tenantId},</if>
</trim>
where example_report_id = #{exampleReportId}
</update>

View File

@@ -22,10 +22,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="tenantId" column="tenant_id" />
</resultMap>
<sql id="selectInspectionPlanVo">
select id, plan_name, plan_content, project_name, start_date, end_date, inspection_cycle, inspection_person,inspection, user_id, set_date, set_time, status, create_by, create_time, update_by, update_time from inspection_plan
select id, plan_name, plan_content, project_name, start_date, end_date, inspection_cycle, inspection_person,inspection, user_id, set_date, set_time, status, create_by, create_time, update_by, update_time,tenant_id from inspection_plan
</sql>
<select id="selectInspectionPlanList" parameterType="InspectionPlan" resultMap="InspectionPlanResult">
@@ -43,6 +44,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="setDate != null and setDate != ''"> and set_date = #{setDate}</if>
<if test="setTime != null and setTime != ''"> and set_time = #{setTime}</if>
<if test="status != null and status != ''"> and status = #{status}</if>
<if test="tenantId != null ">
and ( tenant_id in (SELECT dept_id FROM sys_dept
WHERE FIND_IN_SET(#{tenantId}, ancestors) OR dept_id = #{tenantId})
)
</if>
</where>
</select>
@@ -71,6 +77,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="tenantId != null">tenant_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
@@ -90,6 +97,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="tenantId != null">#{tenantId},</if>
</trim>
</insert>
@@ -112,6 +120,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="tenantId != null">tenant_id = #{tenantId},</if>
</trim>
where id = #{id}
</update>

View File

@@ -22,10 +22,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="tenantId" column="tenant_id" />
</resultMap>
<sql id="selectInspectionRecordVo">
select id, plan_id, plan_name, plan_content, project_name, plan_time, inspection_time, inspection_person, user_id, inspection_cycle, cycle, inspection_status, inspection_remark, create_by, create_time, update_by, update_time from inspection_record
select id, plan_id, plan_name, plan_content, project_name, plan_time, inspection_time, inspection_person, user_id, inspection_cycle, cycle, inspection_status, inspection_remark, create_by, create_time, update_by, update_time,tenant_id from inspection_record
</sql>
<select id="selectInspectionRecordList" parameterType="InspectionRecord" resultMap="InspectionRecordResult">
@@ -43,6 +44,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="cycle != null and cycle != ''"> and cycle = #{cycle}</if>
<if test="inspectionStatus != null and inspectionStatus != ''"> and inspection_status = #{inspectionStatus}</if>
<if test="inspectionRemark != null and inspectionRemark != ''"> and inspection_remark = #{inspectionRemark}</if>
<if test="tenantId != null ">
and ( tenant_id in (SELECT dept_id FROM sys_dept
WHERE FIND_IN_SET(#{tenantId}, ancestors) OR dept_id = #{tenantId})
)
</if>
</where>
</select>
@@ -71,6 +77,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="tenantId != null">tenant_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
@@ -90,6 +97,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="tenantId != null">#{tenantId},</if>
</trim>
</insert>
@@ -112,6 +120,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="tenantId != null">tenant_id = #{tenantId},</if>
</trim>
where id = #{id}
</update>

View File

@@ -17,10 +17,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="tenantId" column="tenant_id" />
</resultMap>
<sql id="selectPrePlanVo">
select pre_plan_id, number, type, station, device, content, prepared_by, keywords, create_by, create_time, update_by, update_time from pre_plan
select pre_plan_id, number, type, station, device, content, prepared_by, keywords, create_by, create_time, update_by, update_time,tenant_id from pre_plan
</sql>
<select id="selectPrePlanList" parameterType="PrePlan" resultMap="PrePlanResult">
@@ -33,6 +34,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="content != null and content != ''"> and content = #{content}</if>
<if test="preparedBy != null and preparedBy != ''"> and prepared_by = #{preparedBy}</if>
<if test="keywords != null and keywords != ''"> and keywords = #{keywords}</if>
<if test="tenantId != null ">
and ( tenant_id in (SELECT dept_id FROM sys_dept
WHERE FIND_IN_SET(#{tenantId}, ancestors) OR dept_id = #{tenantId})
)
</if>
</where>
</select>
@@ -56,6 +62,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="tenantId != null">tenant_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="prePlanId != null">#{prePlanId},</if>
@@ -70,6 +77,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="tenantId != null">#{tenantId},</if>
</trim>
</insert>
@@ -87,6 +95,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="tenantId != null">tenant_id = #{tenantId},</if>
</trim>
where pre_plan_id = #{prePlanId}
</update>

View File

@@ -16,10 +16,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="tenantId" column="tenant_id" />
</resultMap>
<sql id="selectProcessInfoVo">
select process_id, event_name, event_type, touch_time, handle_result, handle_person, remark, create_by, create_time, update_by, update_time from process_info
select process_id, event_name, event_type, touch_time, handle_result, handle_person, remark, create_by, create_time, update_by, update_time,tenant_id from process_info
</sql>
<select id="selectProcessInfoList" parameterType="ProcessInfo" resultMap="ProcessInfoResult">
@@ -30,6 +31,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="touchTime != null "> and touch_time = #{touchTime}</if>
<if test="handleResult != null and handleResult != ''"> and handle_result = #{handleResult}</if>
<if test="handlePerson != null "> and handle_person = #{handlePerson}</if>
<if test="tenantId != null ">
and ( tenant_id in (SELECT dept_id FROM sys_dept
WHERE FIND_IN_SET(#{tenantId}, ancestors) OR dept_id = #{tenantId})
)
</if>
</where>
</select>
@@ -52,6 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="tenantId != null">tenant_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="processId != null">#{processId},</if>
@@ -65,6 +72,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="tenantId != null">#{tenantId},</if>
</trim>
</insert>
@@ -81,6 +89,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="tenantId != null">tenant_id = #{tenantId},</if>
</trim>
where process_id = #{processId}
</update>

View File

@@ -17,10 +17,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="tenantId" column="tenant_id" />
</resultMap>
<sql id="selectRegulationInfoVo">
select regulation_id, regulation_code, regulation_name, regulation_describe, regulation_type, doc_oss_id, upload_time, remark, create_by, create_time, update_by, update_time from regulation_info
select regulation_id, regulation_code, regulation_name, regulation_describe, regulation_type, doc_oss_id, upload_time, remark, create_by, create_time, update_by, update_time,tenant_id from regulation_info
</sql>
<select id="selectRegulationInfoList" parameterType="RegulationInfo" resultMap="RegulationInfoResult">
@@ -32,6 +33,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="regulationType != null and regulationType != ''"> and regulation_type = #{regulationType}</if>
<if test="docOssId != null and docOssId != ''"> and doc_oss_id = #{docOssId}</if>
<if test="uploadTime != null "> and upload_time = #{uploadTime}</if>
<if test="tenantId != null ">
and ( tenant_id in (SELECT dept_id FROM sys_dept
WHERE FIND_IN_SET(#{tenantId}, ancestors) OR dept_id = #{tenantId})
)
</if>
</where>
</select>
@@ -55,6 +61,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="tenantId != null">tenant_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="regulationId != null">#{regulationId},</if>
@@ -69,6 +76,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="tenantId != null">#{tenantId},</if>
</trim>
</insert>
@@ -86,6 +94,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="tenantId != null">tenant_id = #{tenantId},</if>
</trim>
where regulation_id = #{regulationId}
</update>

View File

@@ -21,10 +21,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="tenantId" column="tenant_id" />
</resultMap>
<sql id="selectRepairOrderVo">
select id, order_no, order_content, project_name, assign_time, finish_time, finish_by,respon, annex, user_id, order_status, order_remark, create_by, create_time, update_by, update_time from repair_order
select id, order_no, order_content, project_name, assign_time, finish_time, finish_by,respon, annex, user_id, order_status, order_remark, create_by, create_time, update_by, update_time,tenant_id from repair_order
</sql>
<select id="selectRepairOrderList" parameterType="RepairOrder" resultMap="RepairOrderResult">
@@ -41,6 +42,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="userId != null "> and user_id = #{userId}</if>
<if test="orderStatus != null and orderStatus != ''"> and order_status = #{orderStatus}</if>
<if test="orderRemark != null and orderRemark != ''"> and order_remark = #{orderRemark}</if>
<if test="tenantId != null ">
and ( tenant_id in (SELECT dept_id FROM sys_dept
WHERE FIND_IN_SET(#{tenantId}, ancestors) OR dept_id = #{tenantId})
)
</if>
</where>
</select>
@@ -68,6 +74,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="tenantId != null">tenant_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
@@ -86,6 +93,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="tenantId != null">#{tenantId},</if>
</trim>
</insert>
@@ -107,6 +115,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="tenantId != null">tenant_id = #{tenantId},</if>
</trim>
where id = #{id}
</update>

View File

@@ -31,10 +31,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="tenantId" column="tenant_id" />
</resultMap>
<sql id="selectScheduleVo">
select schedule_id, number, type, cycle, station, status, is_timeout, name, source, content, start_time, end_time, first_reminder, second_reminder, operator, commencement_time, terminator, resolution_time, resolution_content, prepared_by, head, remark, create_by, create_time, update_by, update_time from schedule
select schedule_id, number, type, cycle, station, status, is_timeout, name, source, content, start_time, end_time, first_reminder, second_reminder, operator, commencement_time, terminator, resolution_time, resolution_content, prepared_by, head, remark, create_by, create_time, update_by, update_time,tenant_id from schedule
</sql>
<select id="selectScheduleList" parameterType="Schedule" resultMap="ScheduleResult">
@@ -60,6 +61,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="resolutionContent != null and resolutionContent != ''"> and resolution_content = #{resolutionContent}</if>
<if test="preparedBy != null and preparedBy != ''"> and prepared_by = #{preparedBy}</if>
<if test="head != null and head != ''"> and head = #{head}</if>
<if test="tenantId != null ">
and ( tenant_id in (SELECT dept_id FROM sys_dept
WHERE FIND_IN_SET(#{tenantId}, ancestors) OR dept_id = #{tenantId})
)
</if>
</where>
</select>
@@ -97,6 +103,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="tenantId != null">tenant_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="scheduleId != null">#{scheduleId},</if>
@@ -125,6 +132,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="tenantId != null">#{tenantId},</if>
</trim>
</insert>
@@ -156,6 +164,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="tenantId != null">tenant_id = #{tenantId},</if>
</trim>
where schedule_id = #{scheduleId}
</update>

View File

@@ -15,10 +15,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="tenantId" column="tenant_id" />
</resultMap>
<sql id="selectStandardInfoVo">
select standard_id, standard_code, standard_name, standard_describe, doc_oss_id, remark, create_by, create_time, update_by, update_time from standard_info
select standard_id, standard_code, standard_name, standard_describe, doc_oss_id, remark, create_by, create_time, update_by, update_time,tenant_id from standard_info
</sql>
<select id="selectStandardInfoList" parameterType="StandardInfo" resultMap="StandardInfoResult">
@@ -28,6 +29,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="standardName != null and standardName != ''"> and standard_name like concat('%', #{standardName}, '%')</if>
<if test="standardDescribe != null and standardDescribe != ''"> and standard_describe = #{standardDescribe}</if>
<if test="docOssId != null and docOssId != ''"> and doc_oss_id = #{docOssId}</if>
<if test="tenantId != null ">
and ( tenant_id in (SELECT dept_id FROM sys_dept
WHERE FIND_IN_SET(#{tenantId}, ancestors) OR dept_id = #{tenantId})
)
</if>
</where>
</select>
@@ -49,6 +55,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="tenantId != null">tenant_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="standardId != null">#{standardId},</if>
@@ -61,6 +68,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="tenantId != null">#{tenantId},</if>
</trim>
</insert>
@@ -76,6 +84,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="tenantId != null">tenant_id = #{tenantId},</if>
</trim>
where standard_id = #{standardId}
</update>