diff --git a/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisProblemTypeController.java b/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisProblemTypeController.java new file mode 100644 index 000000000..f2f879396 --- /dev/null +++ b/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisProblemTypeController.java @@ -0,0 +1,118 @@ + +/** + * @Project: emis + * @Title: EmisProblemTypeController.java + * @author linfso + * @date 2024-01-11 05:46:42 + * @Copyright: ShangHai Duta 2022 All rights reserved. + * @version v1.0 + * @Description:

问题件类型 控制器

+ */ + +package com.xdadan.erp.web.emis; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import com.xdadan.erp.common.annotation.Log; +import com.xdadan.erp.common.core.controller.BaseController; +import com.xdadan.erp.common.core.domain.AjaxResult; +import com.xdadan.erp.common.core.page.TableDataInfo; +import com.xdadan.erp.common.enums.BusinessType; +import com.xdadan.erp.common.utils.StringUtils; +import com.xdadan.erp.common.utils.poi.ExcelUtil; + +import com.xdadan.erp.emis.domain.EmisProblemType; +import com.xdadan.erp.emis.service.IEmisProblemTypeService; + +/** + * 问题件类型Controller + * + * @author linfso + * @date 2024-01-11 05:46:42 + */ +@RestController +@RequestMapping("/emis/emisProblemType") +public class EmisProblemTypeController extends BaseController +{ + @Autowired + private IEmisProblemTypeService emisProblemTypeService; + + /** + * 查询问题件类型列表 + */ + @PreAuthorize("@ss.hasPermi('emis:emisProblemType:list')") + @GetMapping("/list") + public TableDataInfo list(EmisProblemType emisProblemType) + { + startPage(); + List list = emisProblemTypeService.selectEmisProblemTypeList(emisProblemType); + return getDataTable(list); + } + + /** + * 导出问题件类型列表 + */ + @PreAuthorize("@ss.hasPermi('emis:emisProblemType:export')") + @Log(title = "问题件类型", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, EmisProblemType emisProblemType) + { + List list = emisProblemTypeService.selectEmisProblemTypeList(emisProblemType); + ExcelUtil util = new ExcelUtil(EmisProblemType.class); + util.exportExcel(response, list, "问题件类型数据"); + } + + /** + * 获取问题件类型详细信息 + */ + @PreAuthorize("@ss.hasPermi('emis:emisProblemType:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return AjaxResult.success(emisProblemTypeService.selectEmisProblemTypeById(id)); + } + + /** + * 新增问题件类型 + */ + @PreAuthorize("@ss.hasPermi('emis:emisProblemType:add')") + @Log(title = "问题件类型", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody EmisProblemType emisProblemType) + { + return toAjax(emisProblemTypeService.insertEmisProblemType(emisProblemType)); + } + + /** + * 修改问题件类型 + */ + @PreAuthorize("@ss.hasPermi('emis:emisProblemType:edit')") + @Log(title = "问题件类型", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody EmisProblemType emisProblemType) + { + return toAjax(emisProblemTypeService.updateEmisProblemType(emisProblemType)); + } + + /** + * 删除问题件类型 + */ + @PreAuthorize("@ss.hasPermi('emis:emisProblemType:remove')") + @Log(title = "问题件类型", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(emisProblemTypeService.deleteEmisProblemTypeByIds(ids)); + } +} diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/domain/EmisProblemType.java b/emis-biz/src/main/java/com/xdadan/erp/emis/domain/EmisProblemType.java new file mode 100644 index 000000000..1b14d57b6 --- /dev/null +++ b/emis-biz/src/main/java/com/xdadan/erp/emis/domain/EmisProblemType.java @@ -0,0 +1,50 @@ +/** + * @Project: emis + * @Title: EmisProblemType.java + * @author linfso + * @date 2024-01-11 05:46:42 + * @Copyright: ShangHai Duta 2022 All rights reserved. + * @version v1.0 + * @Description:

问题件类型 实体类

+ */ + +package com.xdadan.erp.emis.domain; + +import com.fasterxml.jackson.annotation.JsonFormat; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.xdadan.erp.common.annotation.Excel; +import com.xdadan.erp.common.core.domain.BaseEntity; +import com.xdadan.erp.common.core.domain.TreeEntity; +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * @ClassName EmisProblemType + * @Description 问题件类型 + * @author linfso + * @date 2024-01-11 05:46:42 + */ + @Data +public class EmisProblemType extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /* 序号 */ + private Long id; + /* 类型名称 */ + private String typeName; + /* 英文名称 */ + private String typeNameEn; + /* 是否发送短信 */ + private Integer isSendSms; + /* 对象类型 all-全部 in-内部 out-外部 */ + private String objectType; + /* 顺延天数 */ + private Integer delayDay; + /* 启用状态 0-启用 1-停用 */ + private Integer status; + +} diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/mapper/EmisProblemTypeMapper.java b/emis-biz/src/main/java/com/xdadan/erp/emis/mapper/EmisProblemTypeMapper.java new file mode 100644 index 000000000..cf3d255aa --- /dev/null +++ b/emis-biz/src/main/java/com/xdadan/erp/emis/mapper/EmisProblemTypeMapper.java @@ -0,0 +1,70 @@ +/** + * @Project: emis + * @Title: EmisProblemTypeMapper.java + * @author linfso + * @date 2024-01-11 05:46:42 + * @Copyright: ShangHai Doitinfo 2022 All rights reserved. + * @version v1.0 + * @Description:

问题件类型 Mapper 接口

+ * Warning : This file is generate by ai tools,don't edit!!! + */ +package com.xdadan.erp.emis.mapper; + +import java.util.List; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.xdadan.erp.emis.domain.EmisProblemType; +/** + * @ClassName EmisProblemTypeMapper + * @Description

问题件类型 Mapper 接口

+ * @author linfso + * @date 2024-01-11 05:46:42 + */ +public interface EmisProblemTypeMapper extends BaseMapper +{ + /** + * 主键查询 + * @param id + * @return + */ + public EmisProblemType selectEmisProblemTypeById(Long id); + + /** + * 查询列表 + * + * @param emisProblemType + * @return 集合 + */ + public List selectEmisProblemTypeList(EmisProblemType emisProblemType); + + /** + * 新增 + * + * @param emisProblemType + * @return + */ + public int insertEmisProblemType(EmisProblemType emisProblemType); + + /** + * 修改 + * + * @param emisProblemType + * @return + */ + public int updateEmisProblemType(EmisProblemType emisProblemType); + + /** + * 删除 + * + * @param id 主键 + * @return 结果 + */ + public int deleteEmisProblemTypeById(Long id); + + /** + * 批量删除 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteEmisProblemTypeByIds(Long[] ids); +} diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/service/IEmisProblemTypeService.java b/emis-biz/src/main/java/com/xdadan/erp/emis/service/IEmisProblemTypeService.java new file mode 100644 index 000000000..373de1ac3 --- /dev/null +++ b/emis-biz/src/main/java/com/xdadan/erp/emis/service/IEmisProblemTypeService.java @@ -0,0 +1,69 @@ + /** + * @Project: emis + * @Title: EmisProblemTypeService.java + * @author linfso + * @date 2024-01-11 05:46:42 + * @Copyright: ShangHai Duta 2022 All rights reserved. + * @version v1.0 + * @Description:

问题件类型 服务类接口

+ */ +package com.xdadan.erp.emis.service; + +import java.util.List; +import com.xdadan.erp.emis.domain.EmisProblemType; + +/** + * @ClassName EmisProblemTypeService + * @Description 问题件类型 + * @author linfso + * @date 2024-01-11 05:46:42 + */ +public interface IEmisProblemTypeService +{ + /** + * 主键查询 + * @param id + * @return + */ + public EmisProblemType selectEmisProblemTypeById(Long id); + + /** + * 查询问题件类型列表 + * + * @param emisProblemType 问题件类型 + * @return 问题件类型集合 + */ + public List selectEmisProblemTypeList(EmisProblemType emisProblemType); + + /** + * 新增问题件类型 + * + * @param emisProblemType 问题件类型 + * @return 结果 + */ + public int insertEmisProblemType(EmisProblemType emisProblemType); + + /** + * 修改问题件类型 + * + * @param emisProblemType 问题件类型 + * @return 结果 + */ + public int updateEmisProblemType(EmisProblemType emisProblemType); + + /** + * 批量删除问题件类型 + * + * @param ids 需要删除的问题件类型主键集合 + * @return 结果 + */ + public int deleteEmisProblemTypeByIds(Long[] ids); + + /** + * 删除问题件类型信息 + * + * @param id 问题件类型主键 + * @return 结果 + */ + public int deleteEmisProblemTypeById(Long id); +} diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisProblemTypeServiceImpl.java b/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisProblemTypeServiceImpl.java new file mode 100644 index 000000000..f6e35287e --- /dev/null +++ b/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisProblemTypeServiceImpl.java @@ -0,0 +1,104 @@ + /** + * @Project: emis + * @Title: EmisProblemTypeServiceImpl.java + * @author linfso + * @date 2024-01-11 05:46:42 + * @Copyright: ShangHai Duta 2022 All rights reserved. + * @version v1.0 + * @Description:

问题件类型 实体类

+ */ + +package com.xdadan.erp.emis.service.impl; + +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.xdadan.erp.emis.domain.EmisProblemType; +import com.xdadan.erp.emis.mapper.EmisProblemTypeMapper; +import com.xdadan.erp.emis.service.IEmisProblemTypeService; + +/** + * 问题件类型Service业务层处理 + * + * @author linfso + * @date 2024-01-11 05:46:42 + */ +@Service +public class EmisProblemTypeServiceImpl implements IEmisProblemTypeService +{ + @Autowired + private EmisProblemTypeMapper emisProblemTypeMapper; + + /** + * 查询问题件类型 + * + * @param id 问题件类型主键 + * @return 问题件类型 + */ + @Override + public EmisProblemType selectEmisProblemTypeById(Long id) + { + return emisProblemTypeMapper.selectEmisProblemTypeById(id); + } + + /** + * 查询问题件类型列表 + * + * @param emisProblemType 问题件类型 + * @return 问题件类型 + */ + @Override + public List selectEmisProblemTypeList(EmisProblemType emisProblemType) + { + return emisProblemTypeMapper.selectEmisProblemTypeList(emisProblemType); + } + + /** + * 新增问题件类型 + * + * @param emisProblemType 问题件类型 + * @return 结果 + */ + @Override + public int insertEmisProblemType(EmisProblemType emisProblemType) + { + return emisProblemTypeMapper.insertEmisProblemType(emisProblemType); + } + + /** + * 修改问题件类型 + * + * @param emisProblemType 问题件类型 + * @return 结果 + */ + @Override + public int updateEmisProblemType(EmisProblemType emisProblemType) + { + return emisProblemTypeMapper.updateEmisProblemType(emisProblemType); + } + + /** + * 批量删除问题件类型 + * + * @param ids 需要删除的问题件类型主键 + * @return 结果 + */ + @Override + public int deleteEmisProblemTypeByIds(Long[] ids) + { + return emisProblemTypeMapper.deleteEmisProblemTypeByIds(ids); + } + + /** + * 删除问题件类型信息 + * + * @param id 问题件类型主键 + * @return 结果 + */ + @Override + public int deleteEmisProblemTypeById(Long id) + { + return emisProblemTypeMapper.deleteEmisProblemTypeById(id); + } + +} diff --git a/emis-biz/src/main/resources/mapper/EmisProblemTypeMapper.xml b/emis-biz/src/main/resources/mapper/EmisProblemTypeMapper.xml new file mode 100644 index 000000000..6226f15cf --- /dev/null +++ b/emis-biz/src/main/resources/mapper/EmisProblemTypeMapper.xml @@ -0,0 +1,121 @@ + + + + + + + + + + + + + + + + + + + + + + + select id, type_name, type_name_en, is_send_sms, object_type, delay_day, status, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time from emis_problem_type + + + + + + + + insert into emis_problem_type + + id, + type_name, + type_name_en, + is_send_sms, + object_type, + delay_day, + status, + remark, + tenant_id, + del_flag, + create_by, + create_time, + update_by, + update_time, + + + #{id}, + #{typeName}, + #{typeNameEn}, + #{isSendSms}, + #{objectType}, + #{delayDay}, + #{status}, + #{remark}, + #{tenantId}, + #{delFlag}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update emis_problem_type + + type_name = #{typeName}, + type_name_en = #{typeNameEn}, + is_send_sms = #{isSendSms}, + object_type = #{objectType}, + delay_day = #{delayDay}, + status = #{status}, + remark = #{remark}, + tenant_id = #{tenantId}, + del_flag = #{delFlag}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where id = #{id} + + + + delete from emis_problem_type where id = #{id} + + + + delete from emis_problem_type where id in + + #{id} + + + \ No newline at end of file