md
This commit is contained in:
parent
a8c00a4db0
commit
a01fb568fa
@ -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: <p> 问题件类型 控制器 </p>
|
||||
*/
|
||||
|
||||
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<EmisProblemType> 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<EmisProblemType> list = emisProblemTypeService.selectEmisProblemTypeList(emisProblemType);
|
||||
ExcelUtil<EmisProblemType> util = new ExcelUtil<EmisProblemType>(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));
|
||||
}
|
||||
}
|
||||
@ -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: <p> 问题件类型 实体类 </p>
|
||||
*/
|
||||
|
||||
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;
|
||||
|
||||
}
|
||||
@ -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: <p> 问题件类型 Mapper 接口 </p>
|
||||
* <span style='color:red'> Warning : This file is generate by ai tools,don't edit!!! </span>
|
||||
*/
|
||||
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 <p> 问题件类型 Mapper 接口 </p>
|
||||
* @author linfso
|
||||
* @date 2024-01-11 05:46:42
|
||||
*/
|
||||
public interface EmisProblemTypeMapper extends BaseMapper<EmisProblemType>
|
||||
{
|
||||
/**
|
||||
* 主键查询
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
public EmisProblemType selectEmisProblemTypeById(Long id);
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*
|
||||
* @param emisProblemType
|
||||
* @return 集合
|
||||
*/
|
||||
public List<EmisProblemType> 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);
|
||||
}
|
||||
@ -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: <p> 问题件类型 服务类接口 </p>
|
||||
*/
|
||||
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<EmisProblemType> 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);
|
||||
}
|
||||
@ -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: <p> 问题件类型 实体类 </p>
|
||||
*/
|
||||
|
||||
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<EmisProblemType> 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);
|
||||
}
|
||||
|
||||
}
|
||||
121
emis-biz/src/main/resources/mapper/EmisProblemTypeMapper.xml
Normal file
121
emis-biz/src/main/resources/mapper/EmisProblemTypeMapper.xml
Normal file
@ -0,0 +1,121 @@
|
||||
<?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.xdadan.erp.emis.mapper.EmisProblemTypeMapper">
|
||||
|
||||
<resultMap type="EmisProblemType" id="EmisProblemTypeResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="typeName" column="type_name" />
|
||||
<result property="typeNameEn" column="type_name_en" />
|
||||
<result property="isSendSms" column="is_send_sms" />
|
||||
<result property="objectType" column="object_type" />
|
||||
<result property="delayDay" column="delay_day" />
|
||||
<result property="status" column="status" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="tenantId" column="tenant_id" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<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="selectEmisProblemTypeVo">
|
||||
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
|
||||
</sql>
|
||||
|
||||
<select id="selectEmisProblemTypeList" parameterType="EmisProblemType" resultMap="EmisProblemTypeResult">
|
||||
<include refid="selectEmisProblemTypeVo"/>
|
||||
<where>
|
||||
<if test="id != null "> and id = #{id}</if>
|
||||
<if test="typeName != null and typeName != ''"> and type_name like concat('%', #{typeName}, '%')</if>
|
||||
<if test="typeNameEn != null and typeNameEn != ''"> and type_name_en like concat('%', #{typeNameEn}, '%')</if>
|
||||
<if test="isSendSms != null "> and is_send_sms = #{isSendSms}</if>
|
||||
<if test="objectType != null and objectType != ''"> and object_type like concat('%', #{objectType}, '%')</if>
|
||||
<if test="delayDay != null "> and delay_day = #{delayDay}</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
<if test="remark != null and remark != ''"> and remark like concat('%', #{remark}, '%')</if>
|
||||
<if test="tenantId != null and tenantId != ''"> and tenant_id like concat('%', #{tenantId}, '%')</if>
|
||||
<if test="delFlag != null and delFlag != ''"> and del_flag like concat('%', #{delFlag}, '%')</if>
|
||||
<if test="createBy != null and createBy != ''"> and create_by like concat('%', #{createBy}, '%')</if>
|
||||
<if test="createTime != null "> and create_time = #{createTime}</if>
|
||||
<if test="updateBy != null and updateBy != ''"> and update_by like concat('%', #{updateBy}, '%')</if>
|
||||
<if test="updateTime != null "> and update_time = #{updateTime}</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectEmisProblemTypeById" parameterType="Long" resultMap="EmisProblemTypeResult">
|
||||
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 a
|
||||
where a.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertEmisProblemType" parameterType="EmisProblemType">
|
||||
insert into emis_problem_type
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="typeName != null and typeName != ''">type_name,</if>
|
||||
<if test="typeNameEn != null and typeNameEn != ''">type_name_en,</if>
|
||||
<if test="isSendSms != null">is_send_sms,</if>
|
||||
<if test="objectType != null and objectType != ''">object_type,</if>
|
||||
<if test="delayDay != null">delay_day,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
<if test="tenantId != null and tenantId != ''">tenant_id,</if>
|
||||
<if test="delFlag != null and delFlag != ''">del_flag,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="typeName != null and typeName != ''">#{typeName},</if>
|
||||
<if test="typeNameEn != null and typeNameEn != ''">#{typeNameEn},</if>
|
||||
<if test="isSendSms != null">#{isSendSms},</if>
|
||||
<if test="objectType != null and objectType != ''">#{objectType},</if>
|
||||
<if test="delayDay != null">#{delayDay},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
<if test="tenantId != null and tenantId != ''">#{tenantId},</if>
|
||||
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateEmisProblemType" parameterType="EmisProblemType">
|
||||
update emis_problem_type
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="typeName != null and typeName != ''">type_name = #{typeName},</if>
|
||||
<if test="typeNameEn != null and typeNameEn != ''">type_name_en = #{typeNameEn},</if>
|
||||
<if test="isSendSms != null">is_send_sms = #{isSendSms},</if>
|
||||
<if test="objectType != null and objectType != ''">object_type = #{objectType},</if>
|
||||
<if test="delayDay != null">delay_day = #{delayDay},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
||||
<if test="tenantId != null and tenantId != ''">tenant_id = #{tenantId},</if>
|
||||
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
|
||||
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteEmisProblemTypeById" parameterType="Long">
|
||||
delete from emis_problem_type where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteEmisProblemTypeByIds" parameterType="String">
|
||||
delete from emis_problem_type where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue
Block a user