diff --git a/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisWaybillAjustTypeController.java b/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisWaybillAjustTypeController.java new file mode 100644 index 000000000..a67be403b --- /dev/null +++ b/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisWaybillAjustTypeController.java @@ -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:

运单字段调整类型 控制器

+ */ + +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 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 list = emisWaybillAjustTypeService.selectEmisWaybillAjustTypeList(emisWaybillAjustType); + ExcelUtil util = new ExcelUtil(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)); + } +} diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/domain/EmisWaybillAjustType.java b/emis-biz/src/main/java/com/xdadan/erp/emis/domain/EmisWaybillAjustType.java new file mode 100644 index 000000000..51b1d619f --- /dev/null +++ b/emis-biz/src/main/java/com/xdadan/erp/emis/domain/EmisWaybillAjustType.java @@ -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:

运单字段调整类型 实体类

+ */ + +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; + +} diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/mapper/EmisWaybillAjustTypeMapper.java b/emis-biz/src/main/java/com/xdadan/erp/emis/mapper/EmisWaybillAjustTypeMapper.java new file mode 100644 index 000000000..bfe9796b4 --- /dev/null +++ b/emis-biz/src/main/java/com/xdadan/erp/emis/mapper/EmisWaybillAjustTypeMapper.java @@ -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:

运单字段调整类型 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.EmisWaybillAjustType; +/** + * @ClassName EmisWaybillAjustTypeMapper + * @Description

运单字段调整类型 Mapper 接口

+ * @author linfso + * @date 2024-06-16 11:19:50 + */ +public interface EmisWaybillAjustTypeMapper extends BaseMapper +{ + /** + * 主键查询 + * @param id + * @return + */ + public EmisWaybillAjustType selectEmisWaybillAjustTypeById(Long id); + + /** + * 查询列表 + * + * @param emisWaybillAjustType + * @return 集合 + */ + public List 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); +} diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/service/IEmisWaybillAjustTypeService.java b/emis-biz/src/main/java/com/xdadan/erp/emis/service/IEmisWaybillAjustTypeService.java new file mode 100644 index 000000000..915623d9d --- /dev/null +++ b/emis-biz/src/main/java/com/xdadan/erp/emis/service/IEmisWaybillAjustTypeService.java @@ -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:

运单字段调整类型 服务类接口

+ */ +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 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); +} diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisWaybillAjustTypeServiceImpl.java b/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisWaybillAjustTypeServiceImpl.java new file mode 100644 index 000000000..b44d2249c --- /dev/null +++ b/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisWaybillAjustTypeServiceImpl.java @@ -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:

运单字段调整类型 实体类

+ */ + +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 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); + } + +} diff --git a/emis-biz/src/main/resources/mapper/EmisWaybillAjustTypeMapper.xml b/emis-biz/src/main/resources/mapper/EmisWaybillAjustTypeMapper.xml new file mode 100644 index 000000000..1b68135d7 --- /dev/null +++ b/emis-biz/src/main/resources/mapper/EmisWaybillAjustTypeMapper.xml @@ -0,0 +1,133 @@ + + + + + + + + + + + + + + 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 + + + + + + + + + + insert into emis_waybill_ajust_type + + 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, + + + #{id}, + #{typeCode}, + #{typeName}, + #{typeNote}, + #{centerCode}, + #{remark}, + #{tenantId}, + #{delFlag}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{createSite}, + #{updateSite}, + + + + + update emis_waybill_ajust_type + + type_code = #{typeCode}, + type_name = #{typeName}, + type_note = #{typeNote}, + center_code = #{centerCode}, + remark = #{remark}, + tenant_id = #{tenantId}, + del_flag = #{delFlag}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + create_site = #{createSite}, + update_site = #{updateSite}, + + where id = #{id} + + + + delete from emis_waybill_ajust_type where id = #{id} + + + + delete from emis_waybill_ajust_type where id in + + #{id} + + + \ No newline at end of file