feat(production): 新增安灯模块
- 新增安灯看板配置实体类、控制器、服务层和数据访问层 - 新增安灯事件实体类,支持多种事件状态与处理流程 - 新增安灯派工记录实体类及相关接口实现 - 实现基础的增删改查、导出Excel等功能 - 配置MyBatis映射文件支持数据库操作 - 提供RESTful API用于前后端交互master
parent
a7cfea450a
commit
2584433878
@ -0,0 +1,108 @@
|
||||
package com.aucma.production.controller;
|
||||
|
||||
import com.aucma.common.annotation.Log;
|
||||
import com.aucma.common.core.controller.BaseController;
|
||||
import com.aucma.common.core.domain.AjaxResult;
|
||||
import com.aucma.common.core.page.TableDataInfo;
|
||||
import com.aucma.common.enums.BusinessType;
|
||||
import com.aucma.common.utils.DateUtils;
|
||||
import com.aucma.common.utils.poi.ExcelUtil;
|
||||
import com.aucma.production.domain.AndonBoardConfig;
|
||||
import com.aucma.production.service.IAndonBoardConfigService;
|
||||
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 Yinq
|
||||
* @date 2025-10-28
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/production/andonBoardConfig" )
|
||||
public class AndonBoardConfigController extends BaseController {
|
||||
@Autowired
|
||||
private IAndonBoardConfigService andonBoardConfigService;
|
||||
|
||||
/**
|
||||
* 查询安灯看板配置列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('production:andonBoardConfig:list')" )
|
||||
@GetMapping("/list" )
|
||||
public TableDataInfo list(AndonBoardConfig andonBoardConfig) {
|
||||
startPage();
|
||||
List<AndonBoardConfig> list = andonBoardConfigService.selectAndonBoardConfigList(andonBoardConfig);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出安灯看板配置列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('production:andonBoardConfig:export')" )
|
||||
@Log(title = "安灯看板配置" , businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export" )
|
||||
public void export(HttpServletResponse response, AndonBoardConfig andonBoardConfig) {
|
||||
List<AndonBoardConfig> list = andonBoardConfigService.selectAndonBoardConfigList(andonBoardConfig);
|
||||
ExcelUtil<AndonBoardConfig> util = new ExcelUtil<AndonBoardConfig>(AndonBoardConfig. class);
|
||||
util.exportExcel(response, list, "安灯看板配置数据" );
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取安灯看板配置详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('production:andonBoardConfig:query')" )
|
||||
@GetMapping(value = "/{boardId}" )
|
||||
public AjaxResult getInfo(@PathVariable("boardId" ) Long boardId) {
|
||||
return success(andonBoardConfigService.selectAndonBoardConfigByBoardId(boardId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增安灯看板配置
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('production:andonBoardConfig:add')" )
|
||||
@Log(title = "安灯看板配置" , businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody AndonBoardConfig andonBoardConfig) {
|
||||
andonBoardConfig.setCreateBy(getUsername());
|
||||
andonBoardConfig.setCreateTime(DateUtils.getNowDate());
|
||||
return toAjax(andonBoardConfigService.insertAndonBoardConfig(andonBoardConfig));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改安灯看板配置
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('production:andonBoardConfig:edit')" )
|
||||
@Log(title = "安灯看板配置" , businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody AndonBoardConfig andonBoardConfig) {
|
||||
andonBoardConfig.setUpdateBy(getUsername());
|
||||
andonBoardConfig.setUpdateTime(DateUtils.getNowDate());
|
||||
return toAjax(andonBoardConfigService.updateAndonBoardConfig(andonBoardConfig));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除安灯看板配置
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('production:andonBoardConfig:remove')" )
|
||||
@Log(title = "安灯看板配置" , businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{boardIds}" )
|
||||
public AjaxResult remove(@PathVariable Long[] boardIds) {
|
||||
return toAjax(andonBoardConfigService.deleteAndonBoardConfigByBoardIds(boardIds));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询安灯看板配置列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('production:andonBoardConfig:list')" )
|
||||
@GetMapping("/getAndonBoardConfigList" )
|
||||
public AjaxResult getAndonBoardConfigList(AndonBoardConfig andonBoardConfig) {
|
||||
List<AndonBoardConfig> list = andonBoardConfigService.selectAndonBoardConfigList(andonBoardConfig);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,148 @@
|
||||
package com.aucma.production.controller;
|
||||
|
||||
import com.aucma.common.annotation.Log;
|
||||
import com.aucma.common.core.controller.BaseController;
|
||||
import com.aucma.common.core.domain.AjaxResult;
|
||||
import com.aucma.common.core.page.TableDataInfo;
|
||||
import com.aucma.common.enums.BusinessType;
|
||||
import com.aucma.common.utils.DateUtils;
|
||||
import com.aucma.common.utils.poi.ExcelUtil;
|
||||
import com.aucma.production.domain.AndonEvent;
|
||||
import com.aucma.production.service.IAndonEventService;
|
||||
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 Yinq
|
||||
* @date 2025-10-28
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/production/andonEvent" )
|
||||
public class AndonEventController extends BaseController {
|
||||
@Autowired
|
||||
private IAndonEventService andonEventService;
|
||||
|
||||
/**
|
||||
* 查询安灯事件列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('production:andonEvent:list')" )
|
||||
@GetMapping("/list" )
|
||||
public TableDataInfo list(AndonEvent andonEvent) {
|
||||
startPage();
|
||||
List<AndonEvent> list = andonEventService.selectAndonEventList(andonEvent);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出安灯事件列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('production:andonEvent:export')" )
|
||||
@Log(title = "安灯事件" , businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export" )
|
||||
public void export(HttpServletResponse response, AndonEvent andonEvent) {
|
||||
List<AndonEvent> list = andonEventService.selectAndonEventList(andonEvent);
|
||||
ExcelUtil<AndonEvent> util = new ExcelUtil<AndonEvent>(AndonEvent. class);
|
||||
util.exportExcel(response, list, "安灯事件数据" );
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取安灯事件详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('production:andonEvent:query')" )
|
||||
@GetMapping(value = "/{eventId}" )
|
||||
public AjaxResult getInfo(@PathVariable("eventId" ) Long eventId) {
|
||||
return success(andonEventService.selectAndonEventByEventId(eventId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增安灯事件
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('production:andonEvent:add')" )
|
||||
@Log(title = "安灯事件" , businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody AndonEvent andonEvent) {
|
||||
andonEvent.setCreateBy(getUsername());
|
||||
andonEvent.setCreateTime(DateUtils.getNowDate());
|
||||
return toAjax(andonEventService.insertAndonEvent(andonEvent));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改安灯事件
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('production:andonEvent:edit')" )
|
||||
@Log(title = "安灯事件" , businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody AndonEvent andonEvent) {
|
||||
andonEvent.setUpdateBy(getUsername());
|
||||
andonEvent.setUpdateTime(DateUtils.getNowDate());
|
||||
return toAjax(andonEventService.updateAndonEvent(andonEvent));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除安灯事件
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('production:andonEvent:remove')" )
|
||||
@Log(title = "安灯事件" , businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{eventIds}" )
|
||||
public AjaxResult remove(@PathVariable Long[] eventIds) {
|
||||
return toAjax(andonEventService.deleteAndonEventByEventIds(eventIds));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询安灯事件列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('production:andonEvent:list')" )
|
||||
@GetMapping("/getAndonEventList" )
|
||||
public AjaxResult getAndonEventList(AndonEvent andonEvent) {
|
||||
List<AndonEvent> list = andonEventService.selectAndonEventList(andonEvent);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 确认安灯事件
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('production:andonEvent:edit')" )
|
||||
@Log(title = "安灯事件确认" , businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/acknowledge/{eventId}" )
|
||||
public AjaxResult acknowledge(@PathVariable Long eventId) {
|
||||
return toAjax(andonEventService.acknowledgeEvent(eventId, getUsername()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 开始处理安灯事件
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('production:andonEvent:edit')" )
|
||||
@Log(title = "安灯事件开始处理" , businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/startProcess/{eventId}" )
|
||||
public AjaxResult startProcess(@PathVariable Long eventId) {
|
||||
return toAjax(andonEventService.startProcessEvent(eventId, getUsername()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 完成安灯事件
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('production:andonEvent:edit')" )
|
||||
@Log(title = "安灯事件完成" , businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/complete/{eventId}" )
|
||||
public AjaxResult complete(@PathVariable Long eventId, @RequestParam(required = false) String resolution) {
|
||||
return toAjax(andonEventService.completeEvent(eventId, resolution, getUsername()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消安灯事件
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('production:andonEvent:edit')" )
|
||||
@Log(title = "安灯事件取消" , businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/cancel/{eventId}" )
|
||||
public AjaxResult cancel(@PathVariable Long eventId, @RequestParam(required = false) String cancelReason) {
|
||||
return toAjax(andonEventService.cancelEvent(eventId, cancelReason, getUsername()));
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,108 @@
|
||||
package com.aucma.production.controller;
|
||||
|
||||
import com.aucma.common.annotation.Log;
|
||||
import com.aucma.common.core.controller.BaseController;
|
||||
import com.aucma.common.core.domain.AjaxResult;
|
||||
import com.aucma.common.core.page.TableDataInfo;
|
||||
import com.aucma.common.enums.BusinessType;
|
||||
import com.aucma.common.utils.DateUtils;
|
||||
import com.aucma.common.utils.poi.ExcelUtil;
|
||||
import com.aucma.production.domain.AndonRule;
|
||||
import com.aucma.production.service.IAndonRuleService;
|
||||
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 Yinq
|
||||
* @date 2025-10-28
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/production/andonRule" )
|
||||
public class AndonRuleController extends BaseController {
|
||||
@Autowired
|
||||
private IAndonRuleService andonRuleService;
|
||||
|
||||
/**
|
||||
* 查询安灯规则配置列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('production:andonRule:list')" )
|
||||
@GetMapping("/list" )
|
||||
public TableDataInfo list(AndonRule andonRule) {
|
||||
startPage();
|
||||
List<AndonRule> list = andonRuleService.selectAndonRuleList(andonRule);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出安灯规则配置列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('production:andonRule:export')" )
|
||||
@Log(title = "安灯规则配置" , businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export" )
|
||||
public void export(HttpServletResponse response, AndonRule andonRule) {
|
||||
List<AndonRule> list = andonRuleService.selectAndonRuleList(andonRule);
|
||||
ExcelUtil<AndonRule> util = new ExcelUtil<AndonRule>(AndonRule. class);
|
||||
util.exportExcel(response, list, "安灯规则配置数据" );
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取安灯规则配置详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('production:andonRule:query')" )
|
||||
@GetMapping(value = "/{ruleId}" )
|
||||
public AjaxResult getInfo(@PathVariable("ruleId" ) Long ruleId) {
|
||||
return success(andonRuleService.selectAndonRuleByRuleId(ruleId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增安灯规则配置
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('production:andonRule:add')" )
|
||||
@Log(title = "安灯规则配置" , businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody AndonRule andonRule) {
|
||||
andonRule.setCreateBy(getUsername());
|
||||
andonRule.setCreateTime(DateUtils.getNowDate());
|
||||
return toAjax(andonRuleService.insertAndonRule(andonRule));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改安灯规则配置
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('production:andonRule:edit')" )
|
||||
@Log(title = "安灯规则配置" , businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody AndonRule andonRule) {
|
||||
andonRule.setUpdateBy(getUsername());
|
||||
andonRule.setUpdateTime(DateUtils.getNowDate());
|
||||
return toAjax(andonRuleService.updateAndonRule(andonRule));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除安灯规则配置
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('production:andonRule:remove')" )
|
||||
@Log(title = "安灯规则配置" , businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ruleIds}" )
|
||||
public AjaxResult remove(@PathVariable Long[] ruleIds) {
|
||||
return toAjax(andonRuleService.deleteAndonRuleByRuleIds(ruleIds));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询安灯规则配置列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('production:andonRule:list')" )
|
||||
@GetMapping("/getAndonRuleList" )
|
||||
public AjaxResult getAndonRuleList(AndonRule andonRule) {
|
||||
List<AndonRule> list = andonRuleService.selectAndonRuleList(andonRule);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,62 @@
|
||||
package com.aucma.production.mapper;
|
||||
|
||||
import com.aucma.production.domain.AndonBoardConfig;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 安灯看板配置Mapper接口
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2025-10-28
|
||||
*/
|
||||
public interface AndonBoardConfigMapper
|
||||
{
|
||||
/**
|
||||
* 查询安灯看板配置
|
||||
*
|
||||
* @param boardId 安灯看板配置主键
|
||||
* @return 安灯看板配置
|
||||
*/
|
||||
public AndonBoardConfig selectAndonBoardConfigByBoardId(Long boardId);
|
||||
|
||||
/**
|
||||
* 查询安灯看板配置列表
|
||||
*
|
||||
* @param andonBoardConfig 安灯看板配置
|
||||
* @return 安灯看板配置集合
|
||||
*/
|
||||
public List<AndonBoardConfig> selectAndonBoardConfigList(AndonBoardConfig andonBoardConfig);
|
||||
|
||||
/**
|
||||
* 新增安灯看板配置
|
||||
*
|
||||
* @param andonBoardConfig 安灯看板配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAndonBoardConfig(AndonBoardConfig andonBoardConfig);
|
||||
|
||||
/**
|
||||
* 修改安灯看板配置
|
||||
*
|
||||
* @param andonBoardConfig 安灯看板配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateAndonBoardConfig(AndonBoardConfig andonBoardConfig);
|
||||
|
||||
/**
|
||||
* 删除安灯看板配置
|
||||
*
|
||||
* @param boardId 安灯看板配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAndonBoardConfigByBoardId(Long boardId);
|
||||
|
||||
/**
|
||||
* 批量删除安灯看板配置
|
||||
*
|
||||
* @param boardIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAndonBoardConfigByBoardIds(Long[] boardIds);
|
||||
}
|
||||
@ -0,0 +1,62 @@
|
||||
package com.aucma.production.mapper;
|
||||
|
||||
import com.aucma.production.domain.AndonEvent;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 安灯事件Mapper接口
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2025-10-28
|
||||
*/
|
||||
public interface AndonEventMapper
|
||||
{
|
||||
/**
|
||||
* 查询安灯事件
|
||||
*
|
||||
* @param eventId 安灯事件主键
|
||||
* @return 安灯事件
|
||||
*/
|
||||
public AndonEvent selectAndonEventByEventId(Long eventId);
|
||||
|
||||
/**
|
||||
* 查询安灯事件列表
|
||||
*
|
||||
* @param andonEvent 安灯事件
|
||||
* @return 安灯事件集合
|
||||
*/
|
||||
public List<AndonEvent> selectAndonEventList(AndonEvent andonEvent);
|
||||
|
||||
/**
|
||||
* 新增安灯事件
|
||||
*
|
||||
* @param andonEvent 安灯事件
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAndonEvent(AndonEvent andonEvent);
|
||||
|
||||
/**
|
||||
* 修改安灯事件
|
||||
*
|
||||
* @param andonEvent 安灯事件
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateAndonEvent(AndonEvent andonEvent);
|
||||
|
||||
/**
|
||||
* 删除安灯事件
|
||||
*
|
||||
* @param eventId 安灯事件主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAndonEventByEventId(Long eventId);
|
||||
|
||||
/**
|
||||
* 批量删除安灯事件
|
||||
*
|
||||
* @param eventIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAndonEventByEventIds(Long[] eventIds);
|
||||
}
|
||||
@ -0,0 +1,62 @@
|
||||
package com.aucma.production.mapper;
|
||||
|
||||
import com.aucma.production.domain.AndonRule;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 安灯规则配置Mapper接口
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2025-10-28
|
||||
*/
|
||||
public interface AndonRuleMapper
|
||||
{
|
||||
/**
|
||||
* 查询安灯规则配置
|
||||
*
|
||||
* @param ruleId 安灯规则配置主键
|
||||
* @return 安灯规则配置
|
||||
*/
|
||||
public AndonRule selectAndonRuleByRuleId(Long ruleId);
|
||||
|
||||
/**
|
||||
* 查询安灯规则配置列表
|
||||
*
|
||||
* @param andonRule 安灯规则配置
|
||||
* @return 安灯规则配置集合
|
||||
*/
|
||||
public List<AndonRule> selectAndonRuleList(AndonRule andonRule);
|
||||
|
||||
/**
|
||||
* 新增安灯规则配置
|
||||
*
|
||||
* @param andonRule 安灯规则配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAndonRule(AndonRule andonRule);
|
||||
|
||||
/**
|
||||
* 修改安灯规则配置
|
||||
*
|
||||
* @param andonRule 安灯规则配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateAndonRule(AndonRule andonRule);
|
||||
|
||||
/**
|
||||
* 删除安灯规则配置
|
||||
*
|
||||
* @param ruleId 安灯规则配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAndonRuleByRuleId(Long ruleId);
|
||||
|
||||
/**
|
||||
* 批量删除安灯规则配置
|
||||
*
|
||||
* @param ruleIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAndonRuleByRuleIds(Long[] ruleIds);
|
||||
}
|
||||
@ -0,0 +1,62 @@
|
||||
package com.aucma.production.service;
|
||||
|
||||
import com.aucma.production.domain.AndonBoardConfig;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 安灯看板配置Service接口
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2025-10-28
|
||||
*/
|
||||
public interface IAndonBoardConfigService
|
||||
{
|
||||
/**
|
||||
* 查询安灯看板配置
|
||||
*
|
||||
* @param boardId 安灯看板配置主键
|
||||
* @return 安灯看板配置
|
||||
*/
|
||||
public AndonBoardConfig selectAndonBoardConfigByBoardId(Long boardId);
|
||||
|
||||
/**
|
||||
* 查询安灯看板配置列表
|
||||
*
|
||||
* @param andonBoardConfig 安灯看板配置
|
||||
* @return 安灯看板配置集合
|
||||
*/
|
||||
public List<AndonBoardConfig> selectAndonBoardConfigList(AndonBoardConfig andonBoardConfig);
|
||||
|
||||
/**
|
||||
* 新增安灯看板配置
|
||||
*
|
||||
* @param andonBoardConfig 安灯看板配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAndonBoardConfig(AndonBoardConfig andonBoardConfig);
|
||||
|
||||
/**
|
||||
* 修改安灯看板配置
|
||||
*
|
||||
* @param andonBoardConfig 安灯看板配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateAndonBoardConfig(AndonBoardConfig andonBoardConfig);
|
||||
|
||||
/**
|
||||
* 批量删除安灯看板配置
|
||||
*
|
||||
* @param boardIds 需要删除的安灯看板配置主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAndonBoardConfigByBoardIds(Long[] boardIds);
|
||||
|
||||
/**
|
||||
* 删除安灯看板配置信息
|
||||
*
|
||||
* @param boardId 安灯看板配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAndonBoardConfigByBoardId(Long boardId);
|
||||
}
|
||||
@ -0,0 +1,100 @@
|
||||
package com.aucma.production.service;
|
||||
|
||||
import com.aucma.production.domain.AndonEvent;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 安灯事件Service接口
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2025-10-28
|
||||
*/
|
||||
public interface IAndonEventService
|
||||
{
|
||||
/**
|
||||
* 查询安灯事件
|
||||
*
|
||||
* @param eventId 安灯事件主键
|
||||
* @return 安灯事件
|
||||
*/
|
||||
public AndonEvent selectAndonEventByEventId(Long eventId);
|
||||
|
||||
/**
|
||||
* 查询安灯事件列表
|
||||
*
|
||||
* @param andonEvent 安灯事件
|
||||
* @return 安灯事件集合
|
||||
*/
|
||||
public List<AndonEvent> selectAndonEventList(AndonEvent andonEvent);
|
||||
|
||||
/**
|
||||
* 新增安灯事件
|
||||
*
|
||||
* @param andonEvent 安灯事件
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAndonEvent(AndonEvent andonEvent);
|
||||
|
||||
/**
|
||||
* 修改安灯事件
|
||||
*
|
||||
* @param andonEvent 安灯事件
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateAndonEvent(AndonEvent andonEvent);
|
||||
|
||||
/**
|
||||
* 批量删除安灯事件
|
||||
*
|
||||
* @param eventIds 需要删除的安灯事件主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAndonEventByEventIds(Long[] eventIds);
|
||||
|
||||
/**
|
||||
* 删除安灯事件信息
|
||||
*
|
||||
* @param eventId 安灯事件主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAndonEventByEventId(Long eventId);
|
||||
|
||||
/**
|
||||
* 确认安灯事件
|
||||
*
|
||||
* @param eventId 事件ID
|
||||
* @param ackBy 确认人
|
||||
* @return 结果
|
||||
*/
|
||||
public int acknowledgeEvent(Long eventId, String ackBy);
|
||||
|
||||
/**
|
||||
* 开始处理安灯事件
|
||||
*
|
||||
* @param eventId 事件ID
|
||||
* @param operator 操作人
|
||||
* @return 结果
|
||||
*/
|
||||
public int startProcessEvent(Long eventId, String operator);
|
||||
|
||||
/**
|
||||
* 完成安灯事件
|
||||
*
|
||||
* @param eventId 事件ID
|
||||
* @param resolution 解决措施
|
||||
* @param operator 操作人
|
||||
* @return 结果
|
||||
*/
|
||||
public int completeEvent(Long eventId, String resolution, String operator);
|
||||
|
||||
/**
|
||||
* 取消安灯事件
|
||||
*
|
||||
* @param eventId 事件ID
|
||||
* @param cancelReason 取消原因
|
||||
* @param operator 操作人
|
||||
* @return 结果
|
||||
*/
|
||||
public int cancelEvent(Long eventId, String cancelReason, String operator);
|
||||
}
|
||||
@ -0,0 +1,62 @@
|
||||
package com.aucma.production.service;
|
||||
|
||||
import com.aucma.production.domain.AndonRule;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 安灯规则配置Service接口
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2025-10-28
|
||||
*/
|
||||
public interface IAndonRuleService
|
||||
{
|
||||
/**
|
||||
* 查询安灯规则配置
|
||||
*
|
||||
* @param ruleId 安灯规则配置主键
|
||||
* @return 安灯规则配置
|
||||
*/
|
||||
public AndonRule selectAndonRuleByRuleId(Long ruleId);
|
||||
|
||||
/**
|
||||
* 查询安灯规则配置列表
|
||||
*
|
||||
* @param andonRule 安灯规则配置
|
||||
* @return 安灯规则配置集合
|
||||
*/
|
||||
public List<AndonRule> selectAndonRuleList(AndonRule andonRule);
|
||||
|
||||
/**
|
||||
* 新增安灯规则配置
|
||||
*
|
||||
* @param andonRule 安灯规则配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAndonRule(AndonRule andonRule);
|
||||
|
||||
/**
|
||||
* 修改安灯规则配置
|
||||
*
|
||||
* @param andonRule 安灯规则配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateAndonRule(AndonRule andonRule);
|
||||
|
||||
/**
|
||||
* 批量删除安灯规则配置
|
||||
*
|
||||
* @param ruleIds 需要删除的安灯规则配置主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAndonRuleByRuleIds(Long[] ruleIds);
|
||||
|
||||
/**
|
||||
* 删除安灯规则配置信息
|
||||
*
|
||||
* @param ruleId 安灯规则配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAndonRuleByRuleId(Long ruleId);
|
||||
}
|
||||
@ -0,0 +1,97 @@
|
||||
package com.aucma.production.service.impl;
|
||||
|
||||
import com.aucma.common.utils.DateUtils;
|
||||
import com.aucma.production.domain.AndonBoardConfig;
|
||||
import com.aucma.production.mapper.AndonBoardConfigMapper;
|
||||
import com.aucma.production.service.IAndonBoardConfigService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 安灯看板配置Service业务层处理
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2025-10-28
|
||||
*/
|
||||
@Service
|
||||
public class AndonBoardConfigServiceImpl implements IAndonBoardConfigService
|
||||
{
|
||||
@Autowired
|
||||
private AndonBoardConfigMapper andonBoardConfigMapper;
|
||||
|
||||
/**
|
||||
* 查询安灯看板配置
|
||||
*
|
||||
* @param boardId 安灯看板配置主键
|
||||
* @return 安灯看板配置
|
||||
*/
|
||||
@Override
|
||||
public AndonBoardConfig selectAndonBoardConfigByBoardId(Long boardId)
|
||||
{
|
||||
return andonBoardConfigMapper.selectAndonBoardConfigByBoardId(boardId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询安灯看板配置列表
|
||||
*
|
||||
* @param andonBoardConfig 安灯看板配置
|
||||
* @return 安灯看板配置
|
||||
*/
|
||||
@Override
|
||||
public List<AndonBoardConfig> selectAndonBoardConfigList(AndonBoardConfig andonBoardConfig)
|
||||
{
|
||||
return andonBoardConfigMapper.selectAndonBoardConfigList(andonBoardConfig);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增安灯看板配置
|
||||
*
|
||||
* @param andonBoardConfig 安灯看板配置
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertAndonBoardConfig(AndonBoardConfig andonBoardConfig)
|
||||
{
|
||||
andonBoardConfig.setCreateTime(DateUtils.getNowDate());
|
||||
return andonBoardConfigMapper.insertAndonBoardConfig(andonBoardConfig);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改安灯看板配置
|
||||
*
|
||||
* @param andonBoardConfig 安灯看板配置
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateAndonBoardConfig(AndonBoardConfig andonBoardConfig)
|
||||
{
|
||||
andonBoardConfig.setUpdateTime(DateUtils.getNowDate());
|
||||
return andonBoardConfigMapper.updateAndonBoardConfig(andonBoardConfig);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除安灯看板配置
|
||||
*
|
||||
* @param boardIds 需要删除的安灯看板配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteAndonBoardConfigByBoardIds(Long[] boardIds)
|
||||
{
|
||||
return andonBoardConfigMapper.deleteAndonBoardConfigByBoardIds(boardIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除安灯看板配置信息
|
||||
*
|
||||
* @param boardId 安灯看板配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteAndonBoardConfigByBoardId(Long boardId)
|
||||
{
|
||||
return andonBoardConfigMapper.deleteAndonBoardConfigByBoardId(boardId);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,97 @@
|
||||
package com.aucma.production.service.impl;
|
||||
|
||||
import com.aucma.common.utils.DateUtils;
|
||||
import com.aucma.production.domain.AndonRule;
|
||||
import com.aucma.production.mapper.AndonRuleMapper;
|
||||
import com.aucma.production.service.IAndonRuleService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 安灯规则配置Service业务层处理
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2025-10-28
|
||||
*/
|
||||
@Service
|
||||
public class AndonRuleServiceImpl implements IAndonRuleService
|
||||
{
|
||||
@Autowired
|
||||
private AndonRuleMapper andonRuleMapper;
|
||||
|
||||
/**
|
||||
* 查询安灯规则配置
|
||||
*
|
||||
* @param ruleId 安灯规则配置主键
|
||||
* @return 安灯规则配置
|
||||
*/
|
||||
@Override
|
||||
public AndonRule selectAndonRuleByRuleId(Long ruleId)
|
||||
{
|
||||
return andonRuleMapper.selectAndonRuleByRuleId(ruleId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询安灯规则配置列表
|
||||
*
|
||||
* @param andonRule 安灯规则配置
|
||||
* @return 安灯规则配置
|
||||
*/
|
||||
@Override
|
||||
public List<AndonRule> selectAndonRuleList(AndonRule andonRule)
|
||||
{
|
||||
return andonRuleMapper.selectAndonRuleList(andonRule);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增安灯规则配置
|
||||
*
|
||||
* @param andonRule 安灯规则配置
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertAndonRule(AndonRule andonRule)
|
||||
{
|
||||
andonRule.setCreateTime(DateUtils.getNowDate());
|
||||
return andonRuleMapper.insertAndonRule(andonRule);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改安灯规则配置
|
||||
*
|
||||
* @param andonRule 安灯规则配置
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateAndonRule(AndonRule andonRule)
|
||||
{
|
||||
andonRule.setUpdateTime(DateUtils.getNowDate());
|
||||
return andonRuleMapper.updateAndonRule(andonRule);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除安灯规则配置
|
||||
*
|
||||
* @param ruleIds 需要删除的安灯规则配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteAndonRuleByRuleIds(Long[] ruleIds)
|
||||
{
|
||||
return andonRuleMapper.deleteAndonRuleByRuleIds(ruleIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除安灯规则配置信息
|
||||
*
|
||||
* @param ruleId 安灯规则配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteAndonRuleByRuleId(Long ruleId)
|
||||
{
|
||||
return andonRuleMapper.deleteAndonRuleByRuleId(ruleId);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,111 @@
|
||||
<?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.aucma.production.mapper.AndonBoardConfigMapper">
|
||||
|
||||
<resultMap type="AndonBoardConfig" id="AndonBoardConfigResult">
|
||||
<result property="boardId" column="board_id" />
|
||||
<result property="boardCode" column="board_code" />
|
||||
<result property="boardName" column="board_name" />
|
||||
<result property="productLineCode" column="product_line_code" />
|
||||
<result property="stationCode" column="station_code" />
|
||||
<result property="displayFields" column="display_fields" />
|
||||
<result property="refreshIntervalSec" column="refresh_interval_sec" />
|
||||
<result property="isFlag" column="is_flag" />
|
||||
<result property="remark" column="remark" />
|
||||
<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="selectAndonBoardConfigVo">
|
||||
select board_id, board_code, board_name, product_line_code, station_code, display_fields, refresh_interval_sec, is_flag, remark, create_by, create_time, update_by, update_time from andon_board_config
|
||||
</sql>
|
||||
|
||||
<select id="selectAndonBoardConfigList" parameterType="AndonBoardConfig" resultMap="AndonBoardConfigResult">
|
||||
<include refid="selectAndonBoardConfigVo"/>
|
||||
<where>
|
||||
<if test="boardCode != null and boardCode != ''"> and board_code = #{boardCode}</if>
|
||||
<if test="boardName != null and boardName != ''"> and board_name like concat(concat('%', #{boardName}), '%')</if>
|
||||
<if test="productLineCode != null and productLineCode != ''"> and product_line_code = #{productLineCode}</if>
|
||||
<if test="stationCode != null and stationCode != ''"> and station_code = #{stationCode}</if>
|
||||
<if test="displayFields != null and displayFields != ''"> and display_fields = #{displayFields}</if>
|
||||
<if test="refreshIntervalSec != null "> and refresh_interval_sec = #{refreshIntervalSec}</if>
|
||||
<if test="isFlag != null and isFlag != ''"> and is_flag = #{isFlag}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectAndonBoardConfigByBoardId" parameterType="Long" resultMap="AndonBoardConfigResult">
|
||||
<include refid="selectAndonBoardConfigVo"/>
|
||||
where board_id = #{boardId}
|
||||
</select>
|
||||
|
||||
<insert id="insertAndonBoardConfig" parameterType="AndonBoardConfig">
|
||||
<selectKey keyProperty="boardId" resultType="long" order="BEFORE">
|
||||
SELECT ANDON_BOARD_CONFIG_SEQ.NEXTVAL as boardId FROM DUAL
|
||||
</selectKey>
|
||||
insert into andon_board_config
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="boardId != null">board_id,</if>
|
||||
<if test="boardCode != null and boardCode != ''">board_code,</if>
|
||||
<if test="boardName != null and boardName != ''">board_name,</if>
|
||||
<if test="productLineCode != null">product_line_code,</if>
|
||||
<if test="stationCode != null">station_code,</if>
|
||||
<if test="displayFields != null">display_fields,</if>
|
||||
<if test="refreshIntervalSec != null">refresh_interval_sec,</if>
|
||||
<if test="isFlag != null and isFlag != ''">is_flag,</if>
|
||||
<if test="remark != null">remark,</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="boardId != null">#{boardId},</if>
|
||||
<if test="boardCode != null and boardCode != ''">#{boardCode},</if>
|
||||
<if test="boardName != null and boardName != ''">#{boardName},</if>
|
||||
<if test="productLineCode != null">#{productLineCode},</if>
|
||||
<if test="stationCode != null">#{stationCode},</if>
|
||||
<if test="displayFields != null">#{displayFields},</if>
|
||||
<if test="refreshIntervalSec != null">#{refreshIntervalSec},</if>
|
||||
<if test="isFlag != null and isFlag != ''">#{isFlag},</if>
|
||||
<if test="remark != null">#{remark},</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="updateAndonBoardConfig" parameterType="AndonBoardConfig">
|
||||
update andon_board_config
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="boardCode != null and boardCode != ''">board_code = #{boardCode},</if>
|
||||
<if test="boardName != null and boardName != ''">board_name = #{boardName},</if>
|
||||
<if test="productLineCode != null">product_line_code = #{productLineCode},</if>
|
||||
<if test="stationCode != null">station_code = #{stationCode},</if>
|
||||
<if test="displayFields != null">display_fields = #{displayFields},</if>
|
||||
<if test="refreshIntervalSec != null">refresh_interval_sec = #{refreshIntervalSec},</if>
|
||||
<if test="isFlag != null and isFlag != ''">is_flag = #{isFlag},</if>
|
||||
<if test="remark != null">remark = #{remark},</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 board_id = #{boardId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteAndonBoardConfigByBoardId" parameterType="Long">
|
||||
delete from andon_board_config where board_id = #{boardId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteAndonBoardConfigByBoardIds" parameterType="String">
|
||||
delete from andon_board_config where board_id in
|
||||
<foreach item="boardId" collection="array" open="(" separator="," close=")">
|
||||
#{boardId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@ -0,0 +1,126 @@
|
||||
<?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.aucma.production.mapper.AndonEventAssignmentMapper">
|
||||
|
||||
<resultMap type="AndonEventAssignment" id="AndonEventAssignmentResult">
|
||||
<result property="assignmentId" column="assignment_id" />
|
||||
<result property="eventId" column="event_id" />
|
||||
<result property="assigneeUserId" column="assignee_user_id" />
|
||||
<result property="assigneeUserName" column="assignee_user_name" />
|
||||
<result property="assigneeRoleKey" column="assignee_role_key" />
|
||||
<result property="assigneeTeamCode" column="assignee_team_code" />
|
||||
<result property="assignedTime" column="assigned_time" />
|
||||
<result property="acceptTime" column="accept_time" />
|
||||
<result property="finishTime" column="finish_time" />
|
||||
<result property="status" column="status" />
|
||||
<result property="isFlag" column="is_flag" />
|
||||
<result property="remark" column="remark" />
|
||||
<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="selectAndonEventAssignmentVo">
|
||||
select assignment_id, event_id, assignee_user_id, assignee_user_name, assignee_role_key, assignee_team_code, assigned_time, accept_time, finish_time, status, is_flag, remark, create_by, create_time, update_by, update_time from andon_event_assignment
|
||||
</sql>
|
||||
|
||||
<select id="selectAndonEventAssignmentList" parameterType="AndonEventAssignment" resultMap="AndonEventAssignmentResult">
|
||||
<include refid="selectAndonEventAssignmentVo"/>
|
||||
<where>
|
||||
<if test="eventId != null "> and event_id = #{eventId}</if>
|
||||
<if test="assigneeUserId != null "> and assignee_user_id = #{assigneeUserId}</if>
|
||||
<if test="assigneeUserName != null and assigneeUserName != ''"> and assignee_user_name like concat(concat('%', #{assigneeUserName}), '%')</if>
|
||||
<if test="assigneeRoleKey != null and assigneeRoleKey != ''"> and assignee_role_key = #{assigneeRoleKey}</if>
|
||||
<if test="assigneeTeamCode != null and assigneeTeamCode != ''"> and assignee_team_code = #{assigneeTeamCode}</if>
|
||||
<if test="assignedTime != null "> and assigned_time = #{assignedTime}</if>
|
||||
<if test="acceptTime != null "> and accept_time = #{acceptTime}</if>
|
||||
<if test="finishTime != null "> and finish_time = #{finishTime}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="isFlag != null and isFlag != ''"> and is_flag = #{isFlag}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectAndonEventAssignmentByAssignmentId" parameterType="Long" resultMap="AndonEventAssignmentResult">
|
||||
<include refid="selectAndonEventAssignmentVo"/>
|
||||
where assignment_id = #{assignmentId}
|
||||
</select>
|
||||
|
||||
<insert id="insertAndonEventAssignment" parameterType="AndonEventAssignment">
|
||||
<selectKey keyProperty="assignmentId" resultType="long" order="BEFORE">
|
||||
SELECT ANDON_EVENT_ASSIGNMENT_SEQ.NEXTVAL as assignmentId FROM DUAL
|
||||
</selectKey>
|
||||
insert into andon_event_assignment
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="assignmentId != null">assignment_id,</if>
|
||||
<if test="eventId != null">event_id,</if>
|
||||
<if test="assigneeUserId != null">assignee_user_id,</if>
|
||||
<if test="assigneeUserName != null">assignee_user_name,</if>
|
||||
<if test="assigneeRoleKey != null">assignee_role_key,</if>
|
||||
<if test="assigneeTeamCode != null">assignee_team_code,</if>
|
||||
<if test="assignedTime != null">assigned_time,</if>
|
||||
<if test="acceptTime != null">accept_time,</if>
|
||||
<if test="finishTime != null">finish_time,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="isFlag != null and isFlag != ''">is_flag,</if>
|
||||
<if test="remark != null">remark,</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="assignmentId != null">#{assignmentId},</if>
|
||||
<if test="eventId != null">#{eventId},</if>
|
||||
<if test="assigneeUserId != null">#{assigneeUserId},</if>
|
||||
<if test="assigneeUserName != null">#{assigneeUserName},</if>
|
||||
<if test="assigneeRoleKey != null">#{assigneeRoleKey},</if>
|
||||
<if test="assigneeTeamCode != null">#{assigneeTeamCode},</if>
|
||||
<if test="assignedTime != null">#{assignedTime},</if>
|
||||
<if test="acceptTime != null">#{acceptTime},</if>
|
||||
<if test="finishTime != null">#{finishTime},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="isFlag != null and isFlag != ''">#{isFlag},</if>
|
||||
<if test="remark != null">#{remark},</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="updateAndonEventAssignment" parameterType="AndonEventAssignment">
|
||||
update andon_event_assignment
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="eventId != null">event_id = #{eventId},</if>
|
||||
<if test="assigneeUserId != null">assignee_user_id = #{assigneeUserId},</if>
|
||||
<if test="assigneeUserName != null">assignee_user_name = #{assigneeUserName},</if>
|
||||
<if test="assigneeRoleKey != null">assignee_role_key = #{assigneeRoleKey},</if>
|
||||
<if test="assigneeTeamCode != null">assignee_team_code = #{assigneeTeamCode},</if>
|
||||
<if test="assignedTime != null">assigned_time = #{assignedTime},</if>
|
||||
<if test="acceptTime != null">accept_time = #{acceptTime},</if>
|
||||
<if test="finishTime != null">finish_time = #{finishTime},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="isFlag != null and isFlag != ''">is_flag = #{isFlag},</if>
|
||||
<if test="remark != null">remark = #{remark},</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 assignment_id = #{assignmentId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteAndonEventAssignmentByAssignmentId" parameterType="Long">
|
||||
delete from andon_event_assignment where assignment_id = #{assignmentId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteAndonEventAssignmentByAssignmentIds" parameterType="String">
|
||||
delete from andon_event_assignment where assignment_id in
|
||||
<foreach item="assignmentId" collection="array" open="(" separator="," close=")">
|
||||
#{assignmentId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@ -0,0 +1,106 @@
|
||||
<?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.aucma.production.mapper.AndonEventLogMapper">
|
||||
|
||||
<resultMap type="AndonEventLog" id="AndonEventLogResult">
|
||||
<result property="logId" column="log_id" />
|
||||
<result property="eventId" column="event_id" />
|
||||
<result property="operation" column="operation" />
|
||||
<result property="content" column="content" />
|
||||
<result property="operatorUserId" column="operator_user_id" />
|
||||
<result property="operatorUserName" column="operator_user_name" />
|
||||
<result property="operationTime" column="operation_time" />
|
||||
<result property="remark" column="remark" />
|
||||
<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="selectAndonEventLogVo">
|
||||
select log_id, event_id, operation, content, operator_user_id, operator_user_name, operation_time, remark, create_by, create_time, update_by, update_time from andon_event_log
|
||||
</sql>
|
||||
|
||||
<select id="selectAndonEventLogList" parameterType="AndonEventLog" resultMap="AndonEventLogResult">
|
||||
<include refid="selectAndonEventLogVo"/>
|
||||
<where>
|
||||
<if test="eventId != null "> and event_id = #{eventId}</if>
|
||||
<if test="operation != null and operation != ''"> and operation = #{operation}</if>
|
||||
<if test="content != null and content != ''"> and content = #{content}</if>
|
||||
<if test="operatorUserId != null "> and operator_user_id = #{operatorUserId}</if>
|
||||
<if test="operatorUserName != null and operatorUserName != ''"> and operator_user_name like concat(concat('%', #{operatorUserName}), '%')</if>
|
||||
<if test="operationTime != null "> and operation_time = #{operationTime}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectAndonEventLogByLogId" parameterType="Long" resultMap="AndonEventLogResult">
|
||||
<include refid="selectAndonEventLogVo"/>
|
||||
where log_id = #{logId}
|
||||
</select>
|
||||
|
||||
<insert id="insertAndonEventLog" parameterType="AndonEventLog">
|
||||
<selectKey keyProperty="logId" resultType="long" order="BEFORE">
|
||||
SELECT ANDON_EVENT_LOG_SEQ.NEXTVAL as logId FROM DUAL
|
||||
</selectKey>
|
||||
insert into andon_event_log
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="logId != null">log_id,</if>
|
||||
<if test="eventId != null">event_id,</if>
|
||||
<if test="operation != null and operation != ''">operation,</if>
|
||||
<if test="content != null">content,</if>
|
||||
<if test="operatorUserId != null">operator_user_id,</if>
|
||||
<if test="operatorUserName != null">operator_user_name,</if>
|
||||
<if test="operationTime != null">operation_time,</if>
|
||||
<if test="remark != null">remark,</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="logId != null">#{logId},</if>
|
||||
<if test="eventId != null">#{eventId},</if>
|
||||
<if test="operation != null and operation != ''">#{operation},</if>
|
||||
<if test="content != null">#{content},</if>
|
||||
<if test="operatorUserId != null">#{operatorUserId},</if>
|
||||
<if test="operatorUserName != null">#{operatorUserName},</if>
|
||||
<if test="operationTime != null">#{operationTime},</if>
|
||||
<if test="remark != null">#{remark},</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="updateAndonEventLog" parameterType="AndonEventLog">
|
||||
update andon_event_log
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="eventId != null">event_id = #{eventId},</if>
|
||||
<if test="operation != null and operation != ''">operation = #{operation},</if>
|
||||
<if test="content != null">content = #{content},</if>
|
||||
<if test="operatorUserId != null">operator_user_id = #{operatorUserId},</if>
|
||||
<if test="operatorUserName != null">operator_user_name = #{operatorUserName},</if>
|
||||
<if test="operationTime != null">operation_time = #{operationTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</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 log_id = #{logId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteAndonEventLogByLogId" parameterType="Long">
|
||||
delete from andon_event_log where log_id = #{logId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteAndonEventLogByLogIds" parameterType="String">
|
||||
delete from andon_event_log where log_id in
|
||||
<foreach item="logId" collection="array" open="(" separator="," close=")">
|
||||
#{logId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@ -0,0 +1,201 @@
|
||||
<?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.aucma.production.mapper.AndonEventMapper">
|
||||
|
||||
<resultMap type="AndonEvent" id="AndonEventResult">
|
||||
<result property="eventId" column="event_id" />
|
||||
<result property="callCode" column="call_code" />
|
||||
<result property="callTypeCode" column="call_type_code" />
|
||||
<result property="sourceType" column="source_type" />
|
||||
<result property="sourceRefId" column="source_ref_id" />
|
||||
<result property="productLineCode" column="product_line_code" />
|
||||
<result property="stationCode" column="station_code" />
|
||||
<result property="teamCode" column="team_code" />
|
||||
<result property="orderCode" column="order_code" />
|
||||
<result property="materialCode" column="material_code" />
|
||||
<result property="deviceId" column="device_id" />
|
||||
<result property="deviceCode" column="device_code" />
|
||||
<result property="priority" column="priority" />
|
||||
<result property="eventStatus" column="event_status" />
|
||||
<result property="description" column="description" />
|
||||
<result property="ackBy" column="ack_by" />
|
||||
<result property="ackTime" column="ack_time" />
|
||||
<result property="responseStartTime" column="response_start_time" />
|
||||
<result property="responseEndTime" column="response_end_time" />
|
||||
<result property="resolution" column="resolution" />
|
||||
<result property="cancelReason" column="cancel_reason" />
|
||||
<result property="escalateLevel" column="escalate_level" />
|
||||
<result property="escalateTime" column="escalate_time" />
|
||||
<result property="ackDeadline" column="ack_deadline" />
|
||||
<result property="resolveDeadline" column="resolve_deadline" />
|
||||
<result property="isFlag" column="is_flag" />
|
||||
<result property="remark" column="remark" />
|
||||
<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="selectAndonEventVo">
|
||||
select event_id, call_code, call_type_code, source_type, source_ref_id, product_line_code, station_code, team_code, order_code, material_code, device_id, device_code, priority, event_status, description, ack_by, ack_time, response_start_time, response_end_time, resolution, cancel_reason, escalate_level, escalate_time, ack_deadline, resolve_deadline, is_flag, remark, create_by, create_time, update_by, update_time from andon_event
|
||||
</sql>
|
||||
|
||||
<select id="selectAndonEventList" parameterType="AndonEvent" resultMap="AndonEventResult">
|
||||
<include refid="selectAndonEventVo"/>
|
||||
<where>
|
||||
<if test="callCode != null and callCode != ''"> and call_code = #{callCode}</if>
|
||||
<if test="callTypeCode != null and callTypeCode != ''"> and call_type_code = #{callTypeCode}</if>
|
||||
<if test="sourceType != null and sourceType != ''"> and source_type = #{sourceType}</if>
|
||||
<if test="sourceRefId != null "> and source_ref_id = #{sourceRefId}</if>
|
||||
<if test="productLineCode != null and productLineCode != ''"> and product_line_code = #{productLineCode}</if>
|
||||
<if test="stationCode != null and stationCode != ''"> and station_code = #{stationCode}</if>
|
||||
<if test="teamCode != null and teamCode != ''"> and team_code = #{teamCode}</if>
|
||||
<if test="orderCode != null and orderCode != ''"> and order_code = #{orderCode}</if>
|
||||
<if test="materialCode != null and materialCode != ''"> and material_code = #{materialCode}</if>
|
||||
<if test="deviceId != null "> and device_id = #{deviceId}</if>
|
||||
<if test="deviceCode != null and deviceCode != ''"> and device_code = #{deviceCode}</if>
|
||||
<if test="priority != null "> and priority = #{priority}</if>
|
||||
<if test="eventStatus != null and eventStatus != ''"> and event_status = #{eventStatus}</if>
|
||||
<if test="description != null and description != ''"> and description = #{description}</if>
|
||||
<if test="ackBy != null and ackBy != ''"> and ack_by = #{ackBy}</if>
|
||||
<if test="ackTime != null "> and ack_time = #{ackTime}</if>
|
||||
<if test="responseStartTime != null "> and response_start_time = #{responseStartTime}</if>
|
||||
<if test="responseEndTime != null "> and response_end_time = #{responseEndTime}</if>
|
||||
<if test="resolution != null and resolution != ''"> and resolution = #{resolution}</if>
|
||||
<if test="cancelReason != null and cancelReason != ''"> and cancel_reason = #{cancelReason}</if>
|
||||
<if test="escalateLevel != null "> and escalate_level = #{escalateLevel}</if>
|
||||
<if test="escalateTime != null "> and escalate_time = #{escalateTime}</if>
|
||||
<if test="ackDeadline != null "> and ack_deadline = #{ackDeadline}</if>
|
||||
<if test="resolveDeadline != null "> and resolve_deadline = #{resolveDeadline}</if>
|
||||
<if test="isFlag != null and isFlag != ''"> and is_flag = #{isFlag}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectAndonEventByEventId" parameterType="Long" resultMap="AndonEventResult">
|
||||
<include refid="selectAndonEventVo"/>
|
||||
where event_id = #{eventId}
|
||||
</select>
|
||||
|
||||
<insert id="insertAndonEvent" parameterType="AndonEvent">
|
||||
<selectKey keyProperty="eventId" resultType="long" order="BEFORE">
|
||||
SELECT ANDON_EVENT_SEQ.NEXTVAL as eventId FROM DUAL
|
||||
</selectKey>
|
||||
insert into andon_event
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="eventId != null">event_id,</if>
|
||||
<if test="callCode != null and callCode != ''">call_code,</if>
|
||||
<if test="callTypeCode != null and callTypeCode != ''">call_type_code,</if>
|
||||
<if test="sourceType != null and sourceType != ''">source_type,</if>
|
||||
<if test="sourceRefId != null">source_ref_id,</if>
|
||||
<if test="productLineCode != null">product_line_code,</if>
|
||||
<if test="stationCode != null">station_code,</if>
|
||||
<if test="teamCode != null">team_code,</if>
|
||||
<if test="orderCode != null">order_code,</if>
|
||||
<if test="materialCode != null">material_code,</if>
|
||||
<if test="deviceId != null">device_id,</if>
|
||||
<if test="deviceCode != null">device_code,</if>
|
||||
<if test="priority != null">priority,</if>
|
||||
<if test="eventStatus != null and eventStatus != ''">event_status,</if>
|
||||
<if test="description != null">description,</if>
|
||||
<if test="ackBy != null">ack_by,</if>
|
||||
<if test="ackTime != null">ack_time,</if>
|
||||
<if test="responseStartTime != null">response_start_time,</if>
|
||||
<if test="responseEndTime != null">response_end_time,</if>
|
||||
<if test="resolution != null">resolution,</if>
|
||||
<if test="cancelReason != null">cancel_reason,</if>
|
||||
<if test="escalateLevel != null">escalate_level,</if>
|
||||
<if test="escalateTime != null">escalate_time,</if>
|
||||
<if test="ackDeadline != null">ack_deadline,</if>
|
||||
<if test="resolveDeadline != null">resolve_deadline,</if>
|
||||
<if test="isFlag != null and isFlag != ''">is_flag,</if>
|
||||
<if test="remark != null">remark,</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="eventId != null">#{eventId},</if>
|
||||
<if test="callCode != null and callCode != ''">#{callCode},</if>
|
||||
<if test="callTypeCode != null and callTypeCode != ''">#{callTypeCode},</if>
|
||||
<if test="sourceType != null and sourceType != ''">#{sourceType},</if>
|
||||
<if test="sourceRefId != null">#{sourceRefId},</if>
|
||||
<if test="productLineCode != null">#{productLineCode},</if>
|
||||
<if test="stationCode != null">#{stationCode},</if>
|
||||
<if test="teamCode != null">#{teamCode},</if>
|
||||
<if test="orderCode != null">#{orderCode},</if>
|
||||
<if test="materialCode != null">#{materialCode},</if>
|
||||
<if test="deviceId != null">#{deviceId},</if>
|
||||
<if test="deviceCode != null">#{deviceCode},</if>
|
||||
<if test="priority != null">#{priority},</if>
|
||||
<if test="eventStatus != null and eventStatus != ''">#{eventStatus},</if>
|
||||
<if test="description != null">#{description},</if>
|
||||
<if test="ackBy != null">#{ackBy},</if>
|
||||
<if test="ackTime != null">#{ackTime},</if>
|
||||
<if test="responseStartTime != null">#{responseStartTime},</if>
|
||||
<if test="responseEndTime != null">#{responseEndTime},</if>
|
||||
<if test="resolution != null">#{resolution},</if>
|
||||
<if test="cancelReason != null">#{cancelReason},</if>
|
||||
<if test="escalateLevel != null">#{escalateLevel},</if>
|
||||
<if test="escalateTime != null">#{escalateTime},</if>
|
||||
<if test="ackDeadline != null">#{ackDeadline},</if>
|
||||
<if test="resolveDeadline != null">#{resolveDeadline},</if>
|
||||
<if test="isFlag != null and isFlag != ''">#{isFlag},</if>
|
||||
<if test="remark != null">#{remark},</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="updateAndonEvent" parameterType="AndonEvent">
|
||||
update andon_event
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="callCode != null and callCode != ''">call_code = #{callCode},</if>
|
||||
<if test="callTypeCode != null and callTypeCode != ''">call_type_code = #{callTypeCode},</if>
|
||||
<if test="sourceType != null and sourceType != ''">source_type = #{sourceType},</if>
|
||||
<if test="sourceRefId != null">source_ref_id = #{sourceRefId},</if>
|
||||
<if test="productLineCode != null">product_line_code = #{productLineCode},</if>
|
||||
<if test="stationCode != null">station_code = #{stationCode},</if>
|
||||
<if test="teamCode != null">team_code = #{teamCode},</if>
|
||||
<if test="orderCode != null">order_code = #{orderCode},</if>
|
||||
<if test="materialCode != null">material_code = #{materialCode},</if>
|
||||
<if test="deviceId != null">device_id = #{deviceId},</if>
|
||||
<if test="deviceCode != null">device_code = #{deviceCode},</if>
|
||||
<if test="priority != null">priority = #{priority},</if>
|
||||
<if test="eventStatus != null and eventStatus != ''">event_status = #{eventStatus},</if>
|
||||
<if test="description != null">description = #{description},</if>
|
||||
<if test="ackBy != null">ack_by = #{ackBy},</if>
|
||||
<if test="ackTime != null">ack_time = #{ackTime},</if>
|
||||
<if test="responseStartTime != null">response_start_time = #{responseStartTime},</if>
|
||||
<if test="responseEndTime != null">response_end_time = #{responseEndTime},</if>
|
||||
<if test="resolution != null">resolution = #{resolution},</if>
|
||||
<if test="cancelReason != null">cancel_reason = #{cancelReason},</if>
|
||||
<if test="escalateLevel != null">escalate_level = #{escalateLevel},</if>
|
||||
<if test="escalateTime != null">escalate_time = #{escalateTime},</if>
|
||||
<if test="ackDeadline != null">ack_deadline = #{ackDeadline},</if>
|
||||
<if test="resolveDeadline != null">resolve_deadline = #{resolveDeadline},</if>
|
||||
<if test="isFlag != null and isFlag != ''">is_flag = #{isFlag},</if>
|
||||
<if test="remark != null">remark = #{remark},</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 event_id = #{eventId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteAndonEventByEventId" parameterType="Long">
|
||||
delete from andon_event where event_id = #{eventId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteAndonEventByEventIds" parameterType="String">
|
||||
delete from andon_event where event_id in
|
||||
<foreach item="eventId" collection="array" open="(" separator="," close=")">
|
||||
#{eventId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@ -0,0 +1,151 @@
|
||||
<?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.aucma.production.mapper.AndonRuleMapper">
|
||||
|
||||
<resultMap type="AndonRule" id="AndonRuleResult">
|
||||
<result property="ruleId" column="rule_id" />
|
||||
<result property="ruleName" column="rule_name" />
|
||||
<result property="callTypeCode" column="call_type_code" />
|
||||
<result property="productLineCode" column="product_line_code" />
|
||||
<result property="stationCode" column="station_code" />
|
||||
<result property="teamCode" column="team_code" />
|
||||
<result property="sourceType" column="source_type" />
|
||||
<result property="ackTimeoutMin" column="ack_timeout_min" />
|
||||
<result property="resolveTimeoutMin" column="resolve_timeout_min" />
|
||||
<result property="priorityDefault" column="priority_default" />
|
||||
<result property="notifyRoles" column="notify_roles" />
|
||||
<result property="notifyUsers" column="notify_users" />
|
||||
<result property="escalateLevels" column="escalate_levels" />
|
||||
<result property="effectiveBeginTime" column="effective_begin_time" />
|
||||
<result property="effectiveEndTime" column="effective_end_time" />
|
||||
<result property="isFlag" column="is_flag" />
|
||||
<result property="remark" column="remark" />
|
||||
<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="selectAndonRuleVo">
|
||||
select rule_id, rule_name, call_type_code, product_line_code, station_code, team_code, source_type, ack_timeout_min, resolve_timeout_min, priority_default, notify_roles, notify_users, escalate_levels, effective_begin_time, effective_end_time, is_flag, remark, create_by, create_time, update_by, update_time from andon_rule
|
||||
</sql>
|
||||
|
||||
<select id="selectAndonRuleList" parameterType="AndonRule" resultMap="AndonRuleResult">
|
||||
<include refid="selectAndonRuleVo"/>
|
||||
<where>
|
||||
<if test="ruleName != null and ruleName != ''"> and rule_name like concat(concat('%', #{ruleName}), '%')</if>
|
||||
<if test="callTypeCode != null and callTypeCode != ''"> and call_type_code = #{callTypeCode}</if>
|
||||
<if test="productLineCode != null and productLineCode != ''"> and product_line_code = #{productLineCode}</if>
|
||||
<if test="stationCode != null and stationCode != ''"> and station_code = #{stationCode}</if>
|
||||
<if test="teamCode != null and teamCode != ''"> and team_code = #{teamCode}</if>
|
||||
<if test="sourceType != null and sourceType != ''"> and source_type = #{sourceType}</if>
|
||||
<if test="ackTimeoutMin != null "> and ack_timeout_min = #{ackTimeoutMin}</if>
|
||||
<if test="resolveTimeoutMin != null "> and resolve_timeout_min = #{resolveTimeoutMin}</if>
|
||||
<if test="priorityDefault != null "> and priority_default = #{priorityDefault}</if>
|
||||
<if test="notifyRoles != null and notifyRoles != ''"> and notify_roles = #{notifyRoles}</if>
|
||||
<if test="notifyUsers != null and notifyUsers != ''"> and notify_users = #{notifyUsers}</if>
|
||||
<if test="escalateLevels != null and escalateLevels != ''"> and escalate_levels = #{escalateLevels}</if>
|
||||
<if test="effectiveBeginTime != null "> and effective_begin_time = #{effectiveBeginTime}</if>
|
||||
<if test="effectiveEndTime != null "> and effective_end_time = #{effectiveEndTime}</if>
|
||||
<if test="isFlag != null and isFlag != ''"> and is_flag = #{isFlag}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectAndonRuleByRuleId" parameterType="Long" resultMap="AndonRuleResult">
|
||||
<include refid="selectAndonRuleVo"/>
|
||||
where rule_id = #{ruleId}
|
||||
</select>
|
||||
|
||||
<insert id="insertAndonRule" parameterType="AndonRule">
|
||||
<selectKey keyProperty="ruleId" resultType="long" order="BEFORE">
|
||||
SELECT ANDON_RULE_SEQ.NEXTVAL as ruleId FROM DUAL
|
||||
</selectKey>
|
||||
insert into andon_rule
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="ruleId != null">rule_id,</if>
|
||||
<if test="ruleName != null and ruleName != ''">rule_name,</if>
|
||||
<if test="callTypeCode != null and callTypeCode != ''">call_type_code,</if>
|
||||
<if test="productLineCode != null">product_line_code,</if>
|
||||
<if test="stationCode != null">station_code,</if>
|
||||
<if test="teamCode != null">team_code,</if>
|
||||
<if test="sourceType != null">source_type,</if>
|
||||
<if test="ackTimeoutMin != null">ack_timeout_min,</if>
|
||||
<if test="resolveTimeoutMin != null">resolve_timeout_min,</if>
|
||||
<if test="priorityDefault != null">priority_default,</if>
|
||||
<if test="notifyRoles != null">notify_roles,</if>
|
||||
<if test="notifyUsers != null">notify_users,</if>
|
||||
<if test="escalateLevels != null">escalate_levels,</if>
|
||||
<if test="effectiveBeginTime != null">effective_begin_time,</if>
|
||||
<if test="effectiveEndTime != null">effective_end_time,</if>
|
||||
<if test="isFlag != null and isFlag != ''">is_flag,</if>
|
||||
<if test="remark != null">remark,</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="ruleId != null">#{ruleId},</if>
|
||||
<if test="ruleName != null and ruleName != ''">#{ruleName},</if>
|
||||
<if test="callTypeCode != null and callTypeCode != ''">#{callTypeCode},</if>
|
||||
<if test="productLineCode != null">#{productLineCode},</if>
|
||||
<if test="stationCode != null">#{stationCode},</if>
|
||||
<if test="teamCode != null">#{teamCode},</if>
|
||||
<if test="sourceType != null">#{sourceType},</if>
|
||||
<if test="ackTimeoutMin != null">#{ackTimeoutMin},</if>
|
||||
<if test="resolveTimeoutMin != null">#{resolveTimeoutMin},</if>
|
||||
<if test="priorityDefault != null">#{priorityDefault},</if>
|
||||
<if test="notifyRoles != null">#{notifyRoles},</if>
|
||||
<if test="notifyUsers != null">#{notifyUsers},</if>
|
||||
<if test="escalateLevels != null">#{escalateLevels},</if>
|
||||
<if test="effectiveBeginTime != null">#{effectiveBeginTime},</if>
|
||||
<if test="effectiveEndTime != null">#{effectiveEndTime},</if>
|
||||
<if test="isFlag != null and isFlag != ''">#{isFlag},</if>
|
||||
<if test="remark != null">#{remark},</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="updateAndonRule" parameterType="AndonRule">
|
||||
update andon_rule
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="ruleName != null and ruleName != ''">rule_name = #{ruleName},</if>
|
||||
<if test="callTypeCode != null and callTypeCode != ''">call_type_code = #{callTypeCode},</if>
|
||||
<if test="productLineCode != null">product_line_code = #{productLineCode},</if>
|
||||
<if test="stationCode != null">station_code = #{stationCode},</if>
|
||||
<if test="teamCode != null">team_code = #{teamCode},</if>
|
||||
<if test="sourceType != null">source_type = #{sourceType},</if>
|
||||
<if test="ackTimeoutMin != null">ack_timeout_min = #{ackTimeoutMin},</if>
|
||||
<if test="resolveTimeoutMin != null">resolve_timeout_min = #{resolveTimeoutMin},</if>
|
||||
<if test="priorityDefault != null">priority_default = #{priorityDefault},</if>
|
||||
<if test="notifyRoles != null">notify_roles = #{notifyRoles},</if>
|
||||
<if test="notifyUsers != null">notify_users = #{notifyUsers},</if>
|
||||
<if test="escalateLevels != null">escalate_levels = #{escalateLevels},</if>
|
||||
<if test="effectiveBeginTime != null">effective_begin_time = #{effectiveBeginTime},</if>
|
||||
<if test="effectiveEndTime != null">effective_end_time = #{effectiveEndTime},</if>
|
||||
<if test="isFlag != null and isFlag != ''">is_flag = #{isFlag},</if>
|
||||
<if test="remark != null">remark = #{remark},</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 rule_id = #{ruleId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteAndonRuleByRuleId" parameterType="Long">
|
||||
delete from andon_rule where rule_id = #{ruleId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteAndonRuleByRuleIds" parameterType="String">
|
||||
delete from andon_rule where rule_id in
|
||||
<foreach item="ruleId" collection="array" open="(" separator="," close=")">
|
||||
#{ruleId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue