This commit is contained in:
linfso 2024-06-16 19:21:40 +08:00
parent 26dfa369f7
commit 1571790ceb
6 changed files with 589 additions and 0 deletions

View File

@ -0,0 +1,134 @@
/**
* @Project: emis
* @Title: EmisWaybillAjustTypeController.java
* @author linfso
* @date 2024-06-16 11:19:50
* @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.EmisWaybillAjustType;
import com.xdadan.erp.emis.service.IEmisWaybillAjustTypeService;
/**
* 运单字段调整类型Controller
*
* @author linfso
* @date 2024-06-16 11:19:50
*/
@RestController
@RequestMapping("/emis/emisWaybillAjustType")
public class EmisWaybillAjustTypeController extends BaseController
{
@Autowired
private IEmisWaybillAjustTypeService emisWaybillAjustTypeService;
/**
* 查询运单字段调整类型列表
*/
@PreAuthorize("@ss.hasPermi('emis:emisWaybillAjustType:list')")
@GetMapping("/list")
public TableDataInfo list(EmisWaybillAjustType emisWaybillAjustType)
{
startPage();
List<EmisWaybillAjustType> list = emisWaybillAjustTypeService.selectEmisWaybillAjustTypeList(emisWaybillAjustType);
return getDataTable(list);
}
/**
* 检查是否重复
*
* @param emisWaybillAjustType
* @return 数量
*/
@PreAuthorize("@ss.hasPermi('emis:emisWaybillAjustType:list')")
@GetMapping("/checkUnique")
public AjaxResult checkUnique(EmisWaybillAjustType emisWaybillAjustType)
{
int cnt=emisWaybillAjustTypeService.checkUnique(emisWaybillAjustType);
return AjaxResult.success("检查成功",cnt);
}
/**
* 导出运单字段调整类型列表
*/
@PreAuthorize("@ss.hasPermi('emis:emisWaybillAjustType:export')")
@Log(title = "运单字段调整类型", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, EmisWaybillAjustType emisWaybillAjustType)
{
List<EmisWaybillAjustType> list = emisWaybillAjustTypeService.selectEmisWaybillAjustTypeList(emisWaybillAjustType);
ExcelUtil<EmisWaybillAjustType> util = new ExcelUtil<EmisWaybillAjustType>(EmisWaybillAjustType.class);
util.exportExcel(response, list, "运单字段调整类型数据");
}
/**
* 获取运单字段调整类型详细信息
*/
@PreAuthorize("@ss.hasPermi('emis:emisWaybillAjustType:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(emisWaybillAjustTypeService.selectEmisWaybillAjustTypeById(id));
}
/**
* 新增运单字段调整类型
*/
@PreAuthorize("@ss.hasPermi('emis:emisWaybillAjustType:add')")
@Log(title = "运单字段调整类型", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody EmisWaybillAjustType emisWaybillAjustType)
{
return toAjax(emisWaybillAjustTypeService.insertEmisWaybillAjustType(emisWaybillAjustType));
}
/**
* 修改运单字段调整类型
*/
@PreAuthorize("@ss.hasPermi('emis:emisWaybillAjustType:edit')")
@Log(title = "运单字段调整类型", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody EmisWaybillAjustType emisWaybillAjustType)
{
return toAjax(emisWaybillAjustTypeService.updateEmisWaybillAjustType(emisWaybillAjustType));
}
/**
* 删除运单字段调整类型
*/
@PreAuthorize("@ss.hasPermi('emis:emisWaybillAjustType:remove')")
@Log(title = "运单字段调整类型", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(emisWaybillAjustTypeService.deleteEmisWaybillAjustTypeByIds(ids));
}
}

View File

@ -0,0 +1,47 @@
/**
* @Project: emis
* @Title: EmisWaybillAjustType.java
* @author linfso
* @date 2024-06-16 11:19:50
* @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.math.BigDecimal;
import java.util.Date;
import lombok.Data;
/**
* @ClassName EmisWaybillAjustType
* @Description 运单字段调整类型
* @author linfso
* @date 2024-06-16 11:19:50
*/
@Data
public class EmisWaybillAjustType extends BaseEntity
{
private static final long serialVersionUID = 1L;
/* id */
private Long id;
/* 类型代码 */
private String typeCode;
/* 类型名称 */
private String typeName;
/* 1-运单调整 2-费用调整 */
private String typeNote;
/* 所属中心 */
private String centerCode;
}

View File

@ -0,0 +1,80 @@
/**
* @Project: emis
* @Title: EmisWaybillAjustTypeMapper.java
* @author linfso
* @date 2024-06-16 11:19:50
* @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.EmisWaybillAjustType;
/**
* @ClassName EmisWaybillAjustTypeMapper
* @Description <p> 运单字段调整类型 Mapper 接口 </p>
* @author linfso
* @date 2024-06-16 11:19:50
*/
public interface EmisWaybillAjustTypeMapper extends BaseMapper<EmisWaybillAjustType>
{
/**
* 主键查询
* @param id
* @return
*/
public EmisWaybillAjustType selectEmisWaybillAjustTypeById(Long id);
/**
* 查询列表
*
* @param emisWaybillAjustType
* @return 集合
*/
public List<EmisWaybillAjustType> selectEmisWaybillAjustTypeList(EmisWaybillAjustType emisWaybillAjustType);
/**
* 检查是否重复
*
* @param emisWaybillAjustType
* @return 数量
*/
public int checkUnique(EmisWaybillAjustType emisWaybillAjustType);
/**
* 新增
*
* @param emisWaybillAjustType
* @return
*/
public int insertEmisWaybillAjustType(EmisWaybillAjustType emisWaybillAjustType);
/**
* 修改
*
* @param emisWaybillAjustType
* @return
*/
public int updateEmisWaybillAjustType(EmisWaybillAjustType emisWaybillAjustType);
/**
* 删除
*
* @param id 主键
* @return 结果
*/
public int deleteEmisWaybillAjustTypeById(Long id);
/**
* 批量删除
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteEmisWaybillAjustTypeByIds(Long[] ids);
}

View File

@ -0,0 +1,78 @@
/**
* @Project: emis
* @Title: EmisWaybillAjustTypeService.java
* @author linfso
* @date 2024-06-16 11:19:50
* @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.EmisWaybillAjustType;
/**
* @ClassName EmisWaybillAjustTypeService
* @Description 运单字段调整类型
* @author linfso
* @date 2024-06-16 11:19:50
*/
public interface IEmisWaybillAjustTypeService
{
/**
* 主键查询
* @param id
* @return
*/
public EmisWaybillAjustType selectEmisWaybillAjustTypeById(Long id);
/**
* 查询运单字段调整类型列表
*
* @param emisWaybillAjustType 运单字段调整类型
* @return 运单字段调整类型集合
*/
public List<EmisWaybillAjustType> selectEmisWaybillAjustTypeList(EmisWaybillAjustType emisWaybillAjustType);
/**
* 检查是否重复
*
* @param emisWaybillAjustType
* @return 数量
*/
public int checkUnique(EmisWaybillAjustType emisWaybillAjustType);
/**
* 新增运单字段调整类型
*
* @param emisWaybillAjustType 运单字段调整类型
* @return 结果
*/
public int insertEmisWaybillAjustType(EmisWaybillAjustType emisWaybillAjustType);
/**
* 修改运单字段调整类型
*
* @param emisWaybillAjustType 运单字段调整类型
* @return 结果
*/
public int updateEmisWaybillAjustType(EmisWaybillAjustType emisWaybillAjustType);
/**
* 批量删除运单字段调整类型
*
* @param ids 需要删除的运单字段调整类型主键集合
* @return 结果
*/
public int deleteEmisWaybillAjustTypeByIds(Long[] ids);
/**
* 删除运单字段调整类型信息
*
* @param id 运单字段调整类型主键
* @return 结果
*/
public int deleteEmisWaybillAjustTypeById(Long id);
}

View File

@ -0,0 +1,117 @@
/**
* @Project: emis
* @Title: EmisWaybillAjustTypeServiceImpl.java
* @author linfso
* @date 2024-06-16 11:19:50
* @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.EmisWaybillAjustType;
import com.xdadan.erp.emis.mapper.EmisWaybillAjustTypeMapper;
import com.xdadan.erp.emis.service.IEmisWaybillAjustTypeService;
/**
* 运单字段调整类型Service业务层处理
*
* @author linfso
* @date 2024-06-16 11:19:50
*/
@Service
public class EmisWaybillAjustTypeServiceImpl implements IEmisWaybillAjustTypeService
{
@Autowired
private EmisWaybillAjustTypeMapper emisWaybillAjustTypeMapper;
/**
* 查询运单字段调整类型
*
* @param id 运单字段调整类型主键
* @return 运单字段调整类型
*/
@Override
public EmisWaybillAjustType selectEmisWaybillAjustTypeById(Long id)
{
return emisWaybillAjustTypeMapper.selectEmisWaybillAjustTypeById(id);
}
/**
* 查询运单字段调整类型列表
*
* @param emisWaybillAjustType 运单字段调整类型
* @return 运单字段调整类型
*/
@Override
public List<EmisWaybillAjustType> selectEmisWaybillAjustTypeList(EmisWaybillAjustType emisWaybillAjustType)
{
return emisWaybillAjustTypeMapper.selectEmisWaybillAjustTypeList(emisWaybillAjustType);
}
/**
* 检查是否重复
*
* @param emisWaybillAjustType
* @return 数量
*/
@Override
public int checkUnique(EmisWaybillAjustType emisWaybillAjustType)
{
return emisWaybillAjustTypeMapper.checkUnique(emisWaybillAjustType);
}
/**
* 新增运单字段调整类型
*
* @param emisWaybillAjustType 运单字段调整类型
* @return 结果
*/
@Override
public int insertEmisWaybillAjustType(EmisWaybillAjustType emisWaybillAjustType)
{
return emisWaybillAjustTypeMapper.insertEmisWaybillAjustType(emisWaybillAjustType);
}
/**
* 修改运单字段调整类型
*
* @param emisWaybillAjustType 运单字段调整类型
* @return 结果
*/
@Override
public int updateEmisWaybillAjustType(EmisWaybillAjustType emisWaybillAjustType)
{
return emisWaybillAjustTypeMapper.updateEmisWaybillAjustType(emisWaybillAjustType);
}
/**
* 批量删除运单字段调整类型
*
* @param ids 需要删除的运单字段调整类型主键
* @return 结果
*/
@Override
public int deleteEmisWaybillAjustTypeByIds(Long[] ids)
{
return emisWaybillAjustTypeMapper.deleteEmisWaybillAjustTypeByIds(ids);
}
/**
* 删除运单字段调整类型信息
*
* @param id 运单字段调整类型主键
* @return 结果
*/
@Override
public int deleteEmisWaybillAjustTypeById(Long id)
{
return emisWaybillAjustTypeMapper.deleteEmisWaybillAjustTypeById(id);
}
}

View File

@ -0,0 +1,133 @@
<?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.EmisWaybillAjustTypeMapper">
<resultMap type="EmisWaybillAjustType" id="EmisWaybillAjustTypeResult">
<result property="id" column="id" />
<result property="typeCode" column="type_code" />
<result property="typeName" column="type_name" />
<result property="typeNote" column="type_note" />
<result property="centerCode" column="center_code" />
</resultMap>
<sql id="selectEmisWaybillAjustTypeVo">
select id, type_code, type_name, type_note, center_code, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site from emis_waybill_ajust_type
</sql>
<select id="selectEmisWaybillAjustTypeList" parameterType="EmisWaybillAjustType" resultMap="EmisWaybillAjustTypeResult">
<include refid="selectEmisWaybillAjustTypeVo"/>
<where>
del_flag='0'
<if test="id != null "> and id = #{id}</if>
<if test="typeCode != null and typeCode != ''"> and type_code like concat('%', #{typeCode}, '%')</if>
<if test="typeName != null and typeName != ''"> and type_name like concat('%', #{typeName}, '%')</if>
<if test="typeNote != null and typeNote != ''"> and type_note like concat('%', #{typeNote}, '%')</if>
<if test="centerCode != null and centerCode != ''"> and center_code like concat('%', #{centerCode}, '%')</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>
<if test="createSite != null and createSite != ''"> and create_site like concat('%', #{createSite}, '%')</if>
<if test="updateSite != null and updateSite != ''"> and update_site like concat('%', #{updateSite}, '%')</if>
</where>
order by create_time desc
</select>
<select id="checkUnique" parameterType="EmisWaybillAjustType" resultType="int">
select count(1) from emis_waybill_ajust_type
where del_flag='0'
and id = #{id}
and type_code = #{typeCode}
and type_name = #{typeName}
and type_note = #{typeNote}
and center_code = #{centerCode}
and remark = #{remark}
and tenant_id = #{tenantId}
and del_flag = #{delFlag}
and create_by = #{createBy}
and create_time = #{createTime}
and update_by = #{updateBy}
and update_time = #{updateTime}
and create_site = #{createSite}
and update_site = #{updateSite}
limit 1
</select>
<select id="selectEmisWaybillAjustTypeById" parameterType="Long" resultMap="EmisWaybillAjustTypeResult">
select id, type_code, type_name, type_note, center_code, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
from emis_waybill_ajust_type a
where a.id = #{id}
</select>
<insert id="insertEmisWaybillAjustType" parameterType="EmisWaybillAjustType" useGeneratedKeys="true" keyProperty="id">
insert into emis_waybill_ajust_type
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="typeCode != null and typeCode != ''">type_code,</if>
<if test="typeName != null and typeName != ''">type_name,</if>
<if test="typeNote != null and typeNote != ''">type_note,</if>
<if test="centerCode != null and centerCode != ''">center_code,</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>
<if test="createSite != null and createSite != ''">create_site,</if>
<if test="updateSite != null and updateSite != ''">update_site,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="typeCode != null and typeCode != ''">#{typeCode},</if>
<if test="typeName != null and typeName != ''">#{typeName},</if>
<if test="typeNote != null and typeNote != ''">#{typeNote},</if>
<if test="centerCode != null and centerCode != ''">#{centerCode},</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>
<if test="createSite != null and createSite != ''">#{createSite},</if>
<if test="updateSite != null and updateSite != ''">#{updateSite},</if>
</trim>
</insert>
<update id="updateEmisWaybillAjustType" parameterType="EmisWaybillAjustType">
update emis_waybill_ajust_type
<trim prefix="SET" suffixOverrides=",">
<if test="typeCode != null and typeCode != ''">type_code = #{typeCode},</if>
<if test="typeName != null and typeName != ''">type_name = #{typeName},</if>
<if test="typeNote != null and typeNote != ''">type_note = #{typeNote},</if>
<if test="centerCode != null and centerCode != ''">center_code = #{centerCode},</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>
<if test="createSite != null and createSite != ''">create_site = #{createSite},</if>
<if test="updateSite != null and updateSite != ''">update_site = #{updateSite},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteEmisWaybillAjustTypeById" parameterType="Long">
delete from emis_waybill_ajust_type where id = #{id}
</delete>
<delete id="deleteEmisWaybillAjustTypeByIds" parameterType="String">
delete from emis_waybill_ajust_type where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>