From 12d330109489501bcfa7a664f3218727b8d4079b Mon Sep 17 00:00:00 2001
From: huangjiayang <5265313@qq.com>
Date: 星期一, 21 四月 2025 17:35:21 +0800
Subject: [PATCH] 【ADD】增加事件管理相关CRUD代码
---
aps-modules/aps-core/src/main/java/com/aps/core/controller/basicData/ApsWorkEventController.java | 98 ++++++++
aps-modules/aps-core/src/main/java/com/aps/core/mapper/ApsWorkEventMapper.java | 62 +++++
aps-modules/aps-core/src/main/java/com/aps/core/domain/ApsWorkEvent.java | 196 +++++++++++++++++
aps-modules/aps-core/src/main/resources/mapper/core/ApsWorkEventMapper.xml | 119 ++++++++++
aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsWorkEventServiceImpl.java | 100 +++++++++
aps-modules/aps-core/src/main/java/com/aps/core/service/IApsWorkEventService.java | 62 +++++
6 files changed, 637 insertions(+), 0 deletions(-)
diff --git a/aps-modules/aps-core/src/main/java/com/aps/core/controller/basicData/ApsWorkEventController.java b/aps-modules/aps-core/src/main/java/com/aps/core/controller/basicData/ApsWorkEventController.java
new file mode 100644
index 0000000..37ac004
--- /dev/null
+++ b/aps-modules/aps-core/src/main/java/com/aps/core/controller/basicData/ApsWorkEventController.java
@@ -0,0 +1,98 @@
+package com.aps.core.controller.basicData;
+
+import com.aps.common.core.utils.poi.ExcelUtil;
+import com.aps.common.core.web.controller.BaseController;
+import com.aps.common.core.web.domain.AjaxResult;
+import com.aps.common.core.web.page.TableDataInfo;
+import com.aps.common.log.annotation.Log;
+import com.aps.common.log.enums.BusinessType;
+import com.aps.common.security.annotation.RequiresPermissions;
+import com.aps.core.domain.ApsWorkEvent;
+import com.aps.core.service.IApsWorkEventService;
+import jakarta.servlet.http.HttpServletResponse;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 浜嬩欢绠$悊Controller
+ *
+ * @author hjy
+ * @date 2025-04-21
+ */
+@RestController
+@RequestMapping("/event")
+public class ApsWorkEventController extends BaseController
+{
+ @Autowired
+ private IApsWorkEventService apsWorkEventService;
+
+ /**
+ * 鏌ヨ浜嬩欢绠$悊鍒楄〃
+ */
+ @RequiresPermissions("basicData:event:list")
+ @GetMapping("/list")
+ public TableDataInfo list(ApsWorkEvent apsWorkEvent)
+ {
+ startPage();
+ List<ApsWorkEvent> list = apsWorkEventService.selectApsWorkEventList(apsWorkEvent);
+ return getDataTable(list);
+ }
+
+ /**
+ * 瀵煎嚭浜嬩欢绠$悊鍒楄〃
+ */
+ @RequiresPermissions("basicData:event:export")
+ @Log(title = "浜嬩欢绠$悊", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ public void export(HttpServletResponse response, ApsWorkEvent apsWorkEvent)
+ {
+ List<ApsWorkEvent> list = apsWorkEventService.selectApsWorkEventList(apsWorkEvent);
+ ExcelUtil<ApsWorkEvent> util = new ExcelUtil<ApsWorkEvent>(ApsWorkEvent.class);
+ util.exportExcel(response, list, "浜嬩欢绠$悊鏁版嵁");
+ }
+
+ /**
+ * 鑾峰彇浜嬩欢绠$悊璇︾粏淇℃伅
+ */
+ @RequiresPermissions("basicData:event:query")
+ @GetMapping(value = "/{id}")
+ public AjaxResult getInfo(@PathVariable("id") Long id)
+ {
+ return success(apsWorkEventService.selectApsWorkEventById(id));
+ }
+
+ /**
+ * 鏂板浜嬩欢绠$悊
+ */
+ @RequiresPermissions("basicData:event:add")
+ @Log(title = "浜嬩欢绠$悊", businessType = BusinessType.INSERT)
+ @PostMapping
+ public AjaxResult add(@RequestBody ApsWorkEvent apsWorkEvent)
+ {
+ return toAjax(apsWorkEventService.insertApsWorkEvent(apsWorkEvent));
+ }
+
+ /**
+ * 淇敼浜嬩欢绠$悊
+ */
+ @RequiresPermissions("basicData:event:edit")
+ @Log(title = "浜嬩欢绠$悊", businessType = BusinessType.UPDATE)
+ @PutMapping
+ public AjaxResult edit(@RequestBody ApsWorkEvent apsWorkEvent)
+ {
+ return toAjax(apsWorkEventService.updateApsWorkEvent(apsWorkEvent));
+ }
+
+ /**
+ * 鍒犻櫎浜嬩欢绠$悊
+ */
+ @RequiresPermissions("basicData:event:remove")
+ @Log(title = "浜嬩欢绠$悊", businessType = BusinessType.DELETE)
+ @DeleteMapping("/{ids}")
+ public AjaxResult remove(@PathVariable Long[] ids)
+ {
+ return toAjax(apsWorkEventService.deleteApsWorkEventByIds(ids));
+ }
+}
diff --git a/aps-modules/aps-core/src/main/java/com/aps/core/domain/ApsWorkEvent.java b/aps-modules/aps-core/src/main/java/com/aps/core/domain/ApsWorkEvent.java
new file mode 100644
index 0000000..9061bcf
--- /dev/null
+++ b/aps-modules/aps-core/src/main/java/com/aps/core/domain/ApsWorkEvent.java
@@ -0,0 +1,196 @@
+package com.aps.core.domain;
+
+import com.aps.common.core.annotation.Excel;
+import com.aps.common.core.web.domain.BaseEntity;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+import java.util.Date;
+
+/**
+ * 浜嬩欢绠$悊瀵硅薄 aps_work_event
+ *
+ * @author hjy
+ * @date 2025-04-21
+ */
+public class ApsWorkEvent extends BaseEntity
+{
+ private static final long serialVersionUID = 1L;
+
+ /** $column.columnComment */
+ private Long id;
+
+ /** 浜嬩欢鎻忚堪 */
+ @Excel(name = "浜嬩欢鎻忚堪")
+ private String description;
+
+ /** 鎸佺画鏃堕暱 */
+ @Excel(name = "鎸佺画鏃堕暱")
+ private String duration;
+
+ /** 浜嬩欢寮�濮嬫棩鏈� */
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ @Excel(name = "浜嬩欢寮�濮嬫棩鏈�", width = 30, dateFormat = "yyyy-MM-dd")
+ private Date startDate;
+
+ /** 浜嬩欢缁撴潫鏃ユ湡 */
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ @Excel(name = "浜嬩欢缁撴潫鏃ユ湡", width = 30, dateFormat = "yyyy-MM-dd")
+ private Date endDate;
+
+ /** 浜嬩欢寮�濮嬫椂闂� */
+ @Excel(name = "浜嬩欢寮�濮嬫椂闂�")
+ private String startTime;
+
+ /** 浜嬩欢缁撴潫浜嬩欢 */
+ @Excel(name = "浜嬩欢缁撴潫浜嬩欢")
+ private String endTime;
+
+ /** 閫傜敤宸ュ巶 */
+ @Excel(name = "閫傜敤宸ュ巶")
+ private String applicableFactory;
+
+ /** 閫傜敤杞﹂棿 */
+ @Excel(name = "閫傜敤杞﹂棿")
+ private String applicableWorkshop;
+
+ /** 閫傜敤宸ュ簭 */
+ @Excel(name = "閫傜敤宸ュ簭")
+ private String applicableProcess;
+
+ /** 閫傜敤鏃ュ巻 */
+ @Excel(name = "閫傜敤鏃ュ巻")
+ private String applicableCalendar;
+
+ public void setId(Long id)
+ {
+ this.id = id;
+ }
+
+ public Long getId()
+ {
+ return id;
+ }
+
+ public void setDescription(String description)
+ {
+ this.description = description;
+ }
+
+ public String getDescription()
+ {
+ return description;
+ }
+
+ public void setDuration(String duration)
+ {
+ this.duration = duration;
+ }
+
+ public String getDuration()
+ {
+ return duration;
+ }
+
+ public void setStartDate(Date startDate)
+ {
+ this.startDate = startDate;
+ }
+
+ public Date getStartDate()
+ {
+ return startDate;
+ }
+
+ public void setEndDate(Date endDate)
+ {
+ this.endDate = endDate;
+ }
+
+ public Date getEndDate()
+ {
+ return endDate;
+ }
+
+ public void setStartTime(String startTime)
+ {
+ this.startTime = startTime;
+ }
+
+ public String getStartTime()
+ {
+ return startTime;
+ }
+
+ public void setEndTime(String endTime)
+ {
+ this.endTime = endTime;
+ }
+
+ public String getEndTime()
+ {
+ return endTime;
+ }
+
+ public void setApplicableFactory(String applicableFactory)
+ {
+ this.applicableFactory = applicableFactory;
+ }
+
+ public String getApplicableFactory()
+ {
+ return applicableFactory;
+ }
+
+ public void setApplicableWorkshop(String applicableWorkshop)
+ {
+ this.applicableWorkshop = applicableWorkshop;
+ }
+
+ public String getApplicableWorkshop()
+ {
+ return applicableWorkshop;
+ }
+
+ public void setApplicableProcess(String applicableProcess)
+ {
+ this.applicableProcess = applicableProcess;
+ }
+
+ public String getApplicableProcess()
+ {
+ return applicableProcess;
+ }
+
+ public void setApplicableCalendar(String applicableCalendar)
+ {
+ this.applicableCalendar = applicableCalendar;
+ }
+
+ public String getApplicableCalendar()
+ {
+ return applicableCalendar;
+ }
+
+ @Override
+ public String toString() {
+ return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+ .append("id", getId())
+ .append("description", getDescription())
+ .append("duration", getDuration())
+ .append("startDate", getStartDate())
+ .append("endDate", getEndDate())
+ .append("startTime", getStartTime())
+ .append("endTime", getEndTime())
+ .append("applicableFactory", getApplicableFactory())
+ .append("applicableWorkshop", getApplicableWorkshop())
+ .append("applicableProcess", getApplicableProcess())
+ .append("applicableCalendar", getApplicableCalendar())
+ .append("createBy", getCreateBy())
+ .append("createTime", getCreateTime())
+ .append("updateBy", getUpdateBy())
+ .append("updateTime", getUpdateTime())
+ .toString();
+ }
+}
diff --git a/aps-modules/aps-core/src/main/java/com/aps/core/mapper/ApsWorkEventMapper.java b/aps-modules/aps-core/src/main/java/com/aps/core/mapper/ApsWorkEventMapper.java
new file mode 100644
index 0000000..79566fb
--- /dev/null
+++ b/aps-modules/aps-core/src/main/java/com/aps/core/mapper/ApsWorkEventMapper.java
@@ -0,0 +1,62 @@
+package com.aps.core.mapper;
+
+import com.aps.core.domain.ApsWorkEvent;
+
+import java.util.List;
+
+/**
+ * 浜嬩欢绠$悊Mapper鎺ュ彛
+ *
+ * @author hjy
+ * @date 2025-04-21
+ */
+public interface ApsWorkEventMapper
+{
+ /**
+ * 鏌ヨ浜嬩欢绠$悊
+ *
+ * @param id 浜嬩欢绠$悊涓婚敭
+ * @return 浜嬩欢绠$悊
+ */
+ public ApsWorkEvent selectApsWorkEventById(Long id);
+
+ /**
+ * 鏌ヨ浜嬩欢绠$悊鍒楄〃
+ *
+ * @param apsWorkEvent 浜嬩欢绠$悊
+ * @return 浜嬩欢绠$悊闆嗗悎
+ */
+ public List<ApsWorkEvent> selectApsWorkEventList(ApsWorkEvent apsWorkEvent);
+
+ /**
+ * 鏂板浜嬩欢绠$悊
+ *
+ * @param apsWorkEvent 浜嬩欢绠$悊
+ * @return 缁撴灉
+ */
+ public int insertApsWorkEvent(ApsWorkEvent apsWorkEvent);
+
+ /**
+ * 淇敼浜嬩欢绠$悊
+ *
+ * @param apsWorkEvent 浜嬩欢绠$悊
+ * @return 缁撴灉
+ */
+ public int updateApsWorkEvent(ApsWorkEvent apsWorkEvent);
+
+ /**
+ * 鍒犻櫎浜嬩欢绠$悊
+ *
+ * @param id 浜嬩欢绠$悊涓婚敭
+ * @return 缁撴灉
+ */
+ public int deleteApsWorkEventById(Long id);
+
+ /**
+ * 鎵归噺鍒犻櫎浜嬩欢绠$悊
+ *
+ * @param ids 闇�瑕佸垹闄ょ殑鏁版嵁涓婚敭闆嗗悎
+ * @return 缁撴灉
+ */
+ public int deleteApsWorkEventByIds(Long[] ids);
+}
diff --git a/aps-modules/aps-core/src/main/java/com/aps/core/service/IApsWorkEventService.java b/aps-modules/aps-core/src/main/java/com/aps/core/service/IApsWorkEventService.java
new file mode 100644
index 0000000..51c5d75
--- /dev/null
+++ b/aps-modules/aps-core/src/main/java/com/aps/core/service/IApsWorkEventService.java
@@ -0,0 +1,62 @@
+package com.aps.core.service;
+
+import com.aps.core.domain.ApsWorkEvent;
+
+import java.util.List;
+
+/**
+ * 浜嬩欢绠$悊Service鎺ュ彛
+ *
+ * @author hjy
+ * @date 2025-04-21
+ */
+public interface IApsWorkEventService
+{
+ /**
+ * 鏌ヨ浜嬩欢绠$悊
+ *
+ * @param id 浜嬩欢绠$悊涓婚敭
+ * @return 浜嬩欢绠$悊
+ */
+ public ApsWorkEvent selectApsWorkEventById(Long id);
+
+ /**
+ * 鏌ヨ浜嬩欢绠$悊鍒楄〃
+ *
+ * @param apsWorkEvent 浜嬩欢绠$悊
+ * @return 浜嬩欢绠$悊闆嗗悎
+ */
+ public List<ApsWorkEvent> selectApsWorkEventList(ApsWorkEvent apsWorkEvent);
+
+ /**
+ * 鏂板浜嬩欢绠$悊
+ *
+ * @param apsWorkEvent 浜嬩欢绠$悊
+ * @return 缁撴灉
+ */
+ public int insertApsWorkEvent(ApsWorkEvent apsWorkEvent);
+
+ /**
+ * 淇敼浜嬩欢绠$悊
+ *
+ * @param apsWorkEvent 浜嬩欢绠$悊
+ * @return 缁撴灉
+ */
+ public int updateApsWorkEvent(ApsWorkEvent apsWorkEvent);
+
+ /**
+ * 鎵归噺鍒犻櫎浜嬩欢绠$悊
+ *
+ * @param ids 闇�瑕佸垹闄ょ殑浜嬩欢绠$悊涓婚敭闆嗗悎
+ * @return 缁撴灉
+ */
+ public int deleteApsWorkEventByIds(Long[] ids);
+
+ /**
+ * 鍒犻櫎浜嬩欢绠$悊淇℃伅
+ *
+ * @param id 浜嬩欢绠$悊涓婚敭
+ * @return 缁撴灉
+ */
+ public int deleteApsWorkEventById(Long id);
+}
diff --git a/aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsWorkEventServiceImpl.java b/aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsWorkEventServiceImpl.java
new file mode 100644
index 0000000..91be434
--- /dev/null
+++ b/aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsWorkEventServiceImpl.java
@@ -0,0 +1,100 @@
+package com.aps.core.service.impl;
+
+import com.aps.common.core.utils.DateUtils;
+import com.aps.common.security.utils.SecurityUtils;
+import com.aps.core.domain.ApsWorkEvent;
+import com.aps.core.mapper.ApsWorkEventMapper;
+import com.aps.core.service.IApsWorkEventService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 浜嬩欢绠$悊Service涓氬姟灞傚鐞�
+ *
+ * @author hjy
+ * @date 2025-04-21
+ */
+@Service
+public class ApsWorkEventServiceImpl implements IApsWorkEventService
+{
+ @Autowired
+ private ApsWorkEventMapper apsWorkEventMapper;
+
+ /**
+ * 鏌ヨ浜嬩欢绠$悊
+ *
+ * @param id 浜嬩欢绠$悊涓婚敭
+ * @return 浜嬩欢绠$悊
+ */
+ @Override
+ public ApsWorkEvent selectApsWorkEventById(Long id)
+ {
+ return apsWorkEventMapper.selectApsWorkEventById(id);
+ }
+
+ /**
+ * 鏌ヨ浜嬩欢绠$悊鍒楄〃
+ *
+ * @param apsWorkEvent 浜嬩欢绠$悊
+ * @return 浜嬩欢绠$悊
+ */
+ @Override
+ public List<ApsWorkEvent> selectApsWorkEventList(ApsWorkEvent apsWorkEvent)
+ {
+ return apsWorkEventMapper.selectApsWorkEventList(apsWorkEvent);
+ }
+
+ /**
+ * 鏂板浜嬩欢绠$悊
+ *
+ * @param apsWorkEvent 浜嬩欢绠$悊
+ * @return 缁撴灉
+ */
+ @Override
+ public int insertApsWorkEvent(ApsWorkEvent apsWorkEvent)
+ {
+ apsWorkEvent.setCreateTime(DateUtils.getNowDate());
+ apsWorkEvent.setCreateBy(SecurityUtils.getUsername());
+ return apsWorkEventMapper.insertApsWorkEvent(apsWorkEvent);
+ }
+
+ /**
+ * 淇敼浜嬩欢绠$悊
+ *
+ * @param apsWorkEvent 浜嬩欢绠$悊
+ * @return 缁撴灉
+ */
+ @Override
+ public int updateApsWorkEvent(ApsWorkEvent apsWorkEvent)
+ {
+ apsWorkEvent.setUpdateTime(DateUtils.getNowDate());
+ apsWorkEvent.setUpdateBy(SecurityUtils.getUsername());
+ return apsWorkEventMapper.updateApsWorkEvent(apsWorkEvent);
+ }
+
+ /**
+ * 鎵归噺鍒犻櫎浜嬩欢绠$悊
+ *
+ * @param ids 闇�瑕佸垹闄ょ殑浜嬩欢绠$悊涓婚敭
+ * @return 缁撴灉
+ */
+ @Override
+ public int deleteApsWorkEventByIds(Long[] ids)
+ {
+ return apsWorkEventMapper.deleteApsWorkEventByIds(ids);
+ }
+
+ /**
+ * 鍒犻櫎浜嬩欢绠$悊淇℃伅
+ *
+ * @param id 浜嬩欢绠$悊涓婚敭
+ * @return 缁撴灉
+ */
+ @Override
+ public int deleteApsWorkEventById(Long id)
+ {
+ return apsWorkEventMapper.deleteApsWorkEventById(id);
+ }
+}
diff --git a/aps-modules/aps-core/src/main/resources/mapper/core/ApsWorkEventMapper.xml b/aps-modules/aps-core/src/main/resources/mapper/core/ApsWorkEventMapper.xml
new file mode 100644
index 0000000..aa4aad6
--- /dev/null
+++ b/aps-modules/aps-core/src/main/resources/mapper/core/ApsWorkEventMapper.xml
@@ -0,0 +1,119 @@
+<?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.aps.core.mapper.ApsWorkEventMapper">
+
+ <resultMap type="ApsWorkEvent" id="ApsWorkEventResult">
+ <result property="id" column="id" />
+ <result property="description" column="description" />
+ <result property="duration" column="duration" />
+ <result property="startDate" column="start_date" />
+ <result property="endDate" column="end_date" />
+ <result property="startTime" column="start_time" />
+ <result property="endTime" column="end_time" />
+ <result property="applicableFactory" column="applicable_factory" />
+ <result property="applicableWorkshop" column="applicable_workshop" />
+ <result property="applicableProcess" column="applicable_process" />
+ <result property="applicableCalendar" column="applicable_calendar" />
+ <result property="createBy" column="create_by" />
+ <result property="createTime" column="create_time" />
+ <result property="updateBy" column="update_by" />
+ <result property="updateTime" column="update_time" />
+ </resultMap>
+
+ <sql id="selectApsWorkEventVo">
+ select id, description, duration, start_date, end_date, start_time, end_time, applicable_factory, applicable_workshop, applicable_process, applicable_calendar, create_by, create_time, update_by, update_time from aps_work_event
+ </sql>
+
+ <select id="selectApsWorkEventList" parameterType="ApsWorkEvent" resultMap="ApsWorkEventResult">
+ <include refid="selectApsWorkEventVo"/>
+ <where>
+ <if test="description != null and description != ''"> and description like concat('%', #{description}, '%')</if>
+ <if test="duration != null and duration != ''"> and duration = #{duration}</if>
+ <if test="startDate != null "> and start_date = #{startDate}</if>
+ <if test="endDate != null "> and end_date = #{endDate}</if>
+ <if test="startTime != null and startTime != ''"> and start_time = #{startTime}</if>
+ <if test="endTime != null and endTime != ''"> and end_time = #{endTime}</if>
+ <if test="applicableFactory != null and applicableFactory != ''"> and applicable_factory = #{applicableFactory}</if>
+ <if test="applicableWorkshop != null and applicableWorkshop != ''"> and applicable_workshop = #{applicableWorkshop}</if>
+ <if test="applicableProcess != null and applicableProcess != ''"> and applicable_process = #{applicableProcess}</if>
+ <if test="applicableCalendar != null and applicableCalendar != ''"> and applicable_calendar = #{applicableCalendar}</if>
+ </where>
+ </select>
+
+ <select id="selectApsWorkEventById" parameterType="Long" resultMap="ApsWorkEventResult">
+ <include refid="selectApsWorkEventVo"/>
+ where id = #{id}
+ </select>
+
+ <insert id="insertApsWorkEvent" parameterType="ApsWorkEvent">
+ insert into aps_work_event
+ <trim prefix="(" suffix=")" suffixOverrides=",">
+ <if test="id != null">id,</if>
+ <if test="description != null and description != ''">description,</if>
+ <if test="duration != null and duration != ''">duration,</if>
+ <if test="startDate != null">start_date,</if>
+ <if test="endDate != null">end_date,</if>
+ <if test="startTime != null and startTime != ''">start_time,</if>
+ <if test="endTime != null and endTime != ''">end_time,</if>
+ <if test="applicableFactory != null and applicableFactory != ''">applicable_factory,</if>
+ <if test="applicableWorkshop != null and applicableWorkshop != ''">applicable_workshop,</if>
+ <if test="applicableProcess != null and applicableProcess != ''">applicable_process,</if>
+ <if test="applicableCalendar != null and applicableCalendar != ''">applicable_calendar,</if>
+ <if test="createBy != null">create_by,</if>
+ <if test="createTime != null">create_time,</if>
+ <if test="updateBy != null">update_by,</if>
+ <if test="updateTime != null">update_time,</if>
+ </trim>
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
+ <if test="id != null">#{id},</if>
+ <if test="description != null and description != ''">#{description},</if>
+ <if test="duration != null and duration != ''">#{duration},</if>
+ <if test="startDate != null">#{startDate},</if>
+ <if test="endDate != null">#{endDate},</if>
+ <if test="startTime != null and startTime != ''">#{startTime},</if>
+ <if test="endTime != null and endTime != ''">#{endTime},</if>
+ <if test="applicableFactory != null and applicableFactory != ''">#{applicableFactory},</if>
+ <if test="applicableWorkshop != null and applicableWorkshop != ''">#{applicableWorkshop},</if>
+ <if test="applicableProcess != null and applicableProcess != ''">#{applicableProcess},</if>
+ <if test="applicableCalendar != null and applicableCalendar != ''">#{applicableCalendar},</if>
+ <if test="createBy != null">#{createBy},</if>
+ <if test="createTime != null">#{createTime},</if>
+ <if test="updateBy != null">#{updateBy},</if>
+ <if test="updateTime != null">#{updateTime},</if>
+ </trim>
+ </insert>
+
+ <update id="updateApsWorkEvent" parameterType="ApsWorkEvent">
+ update aps_work_event
+ <trim prefix="SET" suffixOverrides=",">
+ <if test="description != null and description != ''">description = #{description},</if>
+ <if test="duration != null and duration != ''">duration = #{duration},</if>
+ <if test="startDate != null">start_date = #{startDate},</if>
+ <if test="endDate != null">end_date = #{endDate},</if>
+ <if test="startTime != null and startTime != ''">start_time = #{startTime},</if>
+ <if test="endTime != null and endTime != ''">end_time = #{endTime},</if>
+ <if test="applicableFactory != null and applicableFactory != ''">applicable_factory = #{applicableFactory},</if>
+ <if test="applicableWorkshop != null and applicableWorkshop != ''">applicable_workshop = #{applicableWorkshop},</if>
+ <if test="applicableProcess != null and applicableProcess != ''">applicable_process = #{applicableProcess},</if>
+ <if test="applicableCalendar != null and applicableCalendar != ''">applicable_calendar = #{applicableCalendar},</if>
+ <if test="createBy != null">create_by = #{createBy},</if>
+ <if test="createTime != null">create_time = #{createTime},</if>
+ <if test="updateBy != null">update_by = #{updateBy},</if>
+ <if test="updateTime != null">update_time = #{updateTime},</if>
+ </trim>
+ where id = #{id}
+ </update>
+
+ <delete id="deleteApsWorkEventById" parameterType="Long">
+ delete from aps_work_event where id = #{id}
+ </delete>
+
+ <delete id="deleteApsWorkEventByIds" parameterType="String">
+ delete from aps_work_event where id in
+ <foreach item="id" collection="array" open="(" separator="," close=")">
+ #{id}
+ </foreach>
+ </delete>
+</mapper>
\ No newline at end of file
--
Gitblit v1.9.3