This commit is contained in:
linfso 2024-04-27 15:34:00 +08:00
parent f2b8048f96
commit b8bd338ead
7 changed files with 575 additions and 2 deletions

View File

@ -65,8 +65,7 @@ public class EmisDestinationController extends BaseController
@JacksonFilter(include= {
"id","destCode","destName","destNameEn",
"lineCode","siteCode","lineName","countryName",
"provinceName","cityName","countyName","siteName",
"lineCode","lineName","countryName","country","siteCode","siteName",
},value= EmisDestination.class,type= JacksonFilter.JscksonFilterType.RESPONSE)
@RequestMapping("/listSimple")
public TableDataInfo listSimple(EmisDestination emisDestination)
@ -77,6 +76,27 @@ public class EmisDestinationController extends BaseController
}
/**
* 根据客户信息获取目的地站点
* @param province
* @return
*/
@RequestMapping("/getDestSite")
@JacksonFilter(include= {
"id","destCode","destName","destNameEn",
"lineCode","lineName","countryName","country","siteCode","siteName",
},value= EmisDestination.class,type= JacksonFilter.JscksonFilterType.RESPONSE)
public AjaxResult getDestSite(String lineCode,String province,String city,String county,String address)
{
// startPage();
// List<EmisDestination> list = emisDestinationService.selectEmisDestinationList(emisDestination);
// 自动匹配
return AjaxResult.success("获取成功");
}
/**
* 导出目的地列表
*/

View File

@ -0,0 +1,130 @@
/**
* @Project: emis
* @Title: EmisWarehouseInController.java
* @author linfso
* @date 2024-04-27 06:13:46
* @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 com.xdadan.erp.common.annotation.filter.jackson.JacksonFilter;
import com.xdadan.erp.emis.domain.EmisTransProduct;
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.EmisWarehouseIn;
import com.xdadan.erp.emis.service.IEmisWarehouseInService;
/**
* 进仓单Controller
*
* @author linfso
* @date 2024-04-27 06:13:46
*/
@RestController
@RequestMapping("/emis/emisWarehouseIn")
public class EmisWarehouseInController extends BaseController
{
@Autowired
private IEmisWarehouseInService emisWarehouseInService;
/**
* 查询进仓单列表
*/
@PreAuthorize("@ss.hasPermi('emis:emisWarehouseIn:list')")
@GetMapping("/list")
public TableDataInfo list(EmisWarehouseIn emisWarehouseIn)
{
startPage();
List<EmisWarehouseIn> list = emisWarehouseInService.selectEmisWarehouseInList(emisWarehouseIn);
return getDataTable(list);
}
@JacksonFilter(include= {"id","inNo","customerCode","customerName","superiorDate"},value= EmisWarehouseIn.class,type= JacksonFilter.JscksonFilterType.RESPONSE)
@RequestMapping("/listSimple")
public TableDataInfo listSimple(EmisWarehouseIn emisWarehouseIn)
{
startPage();
List<EmisWarehouseIn> list = emisWarehouseInService.selectEmisWarehouseInList(emisWarehouseIn);
return getDataTable(list);
}
/**
* 导出进仓单列表
*/
@PreAuthorize("@ss.hasPermi('emis:emisWarehouseIn:export')")
@Log(title = "进仓单", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, EmisWarehouseIn emisWarehouseIn)
{
List<EmisWarehouseIn> list = emisWarehouseInService.selectEmisWarehouseInList(emisWarehouseIn);
ExcelUtil<EmisWarehouseIn> util = new ExcelUtil<EmisWarehouseIn>(EmisWarehouseIn.class);
util.exportExcel(response, list, "进仓单数据");
}
/**
* 获取进仓单详细信息
*/
@PreAuthorize("@ss.hasPermi('emis:emisWarehouseIn:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(emisWarehouseInService.selectEmisWarehouseInById(id));
}
/**
* 新增进仓单
*/
@PreAuthorize("@ss.hasPermi('emis:emisWarehouseIn:add')")
@Log(title = "进仓单", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody EmisWarehouseIn emisWarehouseIn)
{
return toAjax(emisWarehouseInService.insertEmisWarehouseIn(emisWarehouseIn));
}
/**
* 修改进仓单
*/
@PreAuthorize("@ss.hasPermi('emis:emisWarehouseIn:edit')")
@Log(title = "进仓单", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody EmisWarehouseIn emisWarehouseIn)
{
return toAjax(emisWarehouseInService.updateEmisWarehouseIn(emisWarehouseIn));
}
/**
* 删除进仓单
*/
@PreAuthorize("@ss.hasPermi('emis:emisWarehouseIn:remove')")
@Log(title = "进仓单", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(emisWarehouseInService.deleteEmisWarehouseInByIds(ids));
}
}

View File

@ -0,0 +1,54 @@
/**
* @Project: emis
* @Title: EmisWarehouseIn.java
* @author linfso
* @date 2024-04-27 06:13:46
* @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 EmisWarehouseIn
* @Description 进仓单
* @author linfso
* @date 2024-04-27 06:13:46
*/
@Data
public class EmisWarehouseIn extends BaseEntity
{
private static final long serialVersionUID = 1L;
/* id */
private Long id;
/* 进仓单号 */
private String inNo;
/* 客户编号 */
private String customerCode;
/* 客户名称 */
private String customerName;
/* 进仓日期 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date superiorDate;
/* 序号 */
private String serialNumber;
/* 创建站点 */
private String createSite;
/* 更新站点 */
private String updateSite;
}

View File

@ -0,0 +1,70 @@
/**
* @Project: emis
* @Title: EmisWarehouseInMapper.java
* @author linfso
* @date 2024-04-27 06:13:46
* @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.EmisWarehouseIn;
/**
* @ClassName EmisWarehouseInMapper
* @Description <p> 进仓单 Mapper 接口 </p>
* @author linfso
* @date 2024-04-27 06:13:46
*/
public interface EmisWarehouseInMapper extends BaseMapper<EmisWarehouseIn>
{
/**
* 主键查询
* @param id
* @return
*/
public EmisWarehouseIn selectEmisWarehouseInById(Long id);
/**
* 查询列表
*
* @param emisWarehouseIn
* @return 集合
*/
public List<EmisWarehouseIn> selectEmisWarehouseInList(EmisWarehouseIn emisWarehouseIn);
/**
* 新增
*
* @param emisWarehouseIn
* @return
*/
public int insertEmisWarehouseIn(EmisWarehouseIn emisWarehouseIn);
/**
* 修改
*
* @param emisWarehouseIn
* @return
*/
public int updateEmisWarehouseIn(EmisWarehouseIn emisWarehouseIn);
/**
* 删除
*
* @param id 主键
* @return 结果
*/
public int deleteEmisWarehouseInById(Long id);
/**
* 批量删除
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteEmisWarehouseInByIds(Long[] ids);
}

View File

@ -0,0 +1,69 @@
/**
* @Project: emis
* @Title: EmisWarehouseInService.java
* @author linfso
* @date 2024-04-27 06:13:46
* @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.EmisWarehouseIn;
/**
* @ClassName EmisWarehouseInService
* @Description 进仓单
* @author linfso
* @date 2024-04-27 06:13:46
*/
public interface IEmisWarehouseInService
{
/**
* 主键查询
* @param id
* @return
*/
public EmisWarehouseIn selectEmisWarehouseInById(Long id);
/**
* 查询进仓单列表
*
* @param emisWarehouseIn 进仓单
* @return 进仓单集合
*/
public List<EmisWarehouseIn> selectEmisWarehouseInList(EmisWarehouseIn emisWarehouseIn);
/**
* 新增进仓单
*
* @param emisWarehouseIn 进仓单
* @return 结果
*/
public int insertEmisWarehouseIn(EmisWarehouseIn emisWarehouseIn);
/**
* 修改进仓单
*
* @param emisWarehouseIn 进仓单
* @return 结果
*/
public int updateEmisWarehouseIn(EmisWarehouseIn emisWarehouseIn);
/**
* 批量删除进仓单
*
* @param ids 需要删除的进仓单主键集合
* @return 结果
*/
public int deleteEmisWarehouseInByIds(Long[] ids);
/**
* 删除进仓单信息
*
* @param id 进仓单主键
* @return 结果
*/
public int deleteEmisWarehouseInById(Long id);
}

View File

@ -0,0 +1,104 @@
/**
* @Project: emis
* @Title: EmisWarehouseInServiceImpl.java
* @author linfso
* @date 2024-04-27 06:13:46
* @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.EmisWarehouseIn;
import com.xdadan.erp.emis.mapper.EmisWarehouseInMapper;
import com.xdadan.erp.emis.service.IEmisWarehouseInService;
/**
* 进仓单Service业务层处理
*
* @author linfso
* @date 2024-04-27 06:13:46
*/
@Service
public class EmisWarehouseInServiceImpl implements IEmisWarehouseInService
{
@Autowired
private EmisWarehouseInMapper emisWarehouseInMapper;
/**
* 查询进仓单
*
* @param id 进仓单主键
* @return 进仓单
*/
@Override
public EmisWarehouseIn selectEmisWarehouseInById(Long id)
{
return emisWarehouseInMapper.selectEmisWarehouseInById(id);
}
/**
* 查询进仓单列表
*
* @param emisWarehouseIn 进仓单
* @return 进仓单
*/
@Override
public List<EmisWarehouseIn> selectEmisWarehouseInList(EmisWarehouseIn emisWarehouseIn)
{
return emisWarehouseInMapper.selectEmisWarehouseInList(emisWarehouseIn);
}
/**
* 新增进仓单
*
* @param emisWarehouseIn 进仓单
* @return 结果
*/
@Override
public int insertEmisWarehouseIn(EmisWarehouseIn emisWarehouseIn)
{
return emisWarehouseInMapper.insertEmisWarehouseIn(emisWarehouseIn);
}
/**
* 修改进仓单
*
* @param emisWarehouseIn 进仓单
* @return 结果
*/
@Override
public int updateEmisWarehouseIn(EmisWarehouseIn emisWarehouseIn)
{
return emisWarehouseInMapper.updateEmisWarehouseIn(emisWarehouseIn);
}
/**
* 批量删除进仓单
*
* @param ids 需要删除的进仓单主键
* @return 结果
*/
@Override
public int deleteEmisWarehouseInByIds(Long[] ids)
{
return emisWarehouseInMapper.deleteEmisWarehouseInByIds(ids);
}
/**
* 删除进仓单信息
*
* @param id 进仓单主键
* @return 结果
*/
@Override
public int deleteEmisWarehouseInById(Long id)
{
return emisWarehouseInMapper.deleteEmisWarehouseInById(id);
}
}

View File

@ -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.xdadan.erp.emis.mapper.EmisWarehouseInMapper">
<resultMap type="EmisWarehouseIn" id="EmisWarehouseInResult">
<result property="id" column="id" />
<result property="inNo" column="in_no" />
<result property="customerCode" column="customer_code" />
<result property="customerName" column="customer_name" />
<result property="superiorDate" column="superior_date" />
<result property="serialNumber" column="serial_number" />
<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" />
<result property="createSite" column="create_site" />
<result property="updateSite" column="update_site" />
</resultMap>
<sql id="selectEmisWarehouseInVo">
select id, in_no, customer_code, customer_name, superior_date, serial_number, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site from emis_warehouse_in
</sql>
<select id="selectEmisWarehouseInList" parameterType="EmisWarehouseIn" resultMap="EmisWarehouseInResult">
<include refid="selectEmisWarehouseInVo"/>
<where>
<if test="id != null "> and id = #{id}</if>
<if test="inNo != null and inNo != ''"> and in_no like concat('%', #{inNo}, '%')</if>
<if test="customerCode != null and customerCode != ''"> and customer_code like concat('%', #{customerCode}, '%')</if>
<if test="customerName != null and customerName != ''"> and customer_name like concat('%', #{customerName}, '%')</if>
<if test="superiorDate != null "> and superior_date = #{superiorDate}</if>
<if test="serialNumber != null and serialNumber != ''"> and serial_number like concat('%', #{serialNumber}, '%')</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="selectEmisWarehouseInById" parameterType="Long" resultMap="EmisWarehouseInResult">
select id, in_no, customer_code, customer_name, superior_date, serial_number, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
from emis_warehouse_in a
where a.id = #{id}
</select>
<insert id="insertEmisWarehouseIn" parameterType="EmisWarehouseIn">
insert into emis_warehouse_in
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="inNo != null and inNo != ''">in_no,</if>
<if test="customerCode != null and customerCode != ''">customer_code,</if>
<if test="customerName != null and customerName != ''">customer_name,</if>
<if test="superiorDate != null">superior_date,</if>
<if test="serialNumber != null and serialNumber != ''">serial_number,</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="inNo != null and inNo != ''">#{inNo},</if>
<if test="customerCode != null and customerCode != ''">#{customerCode},</if>
<if test="customerName != null and customerName != ''">#{customerName},</if>
<if test="superiorDate != null">#{superiorDate},</if>
<if test="serialNumber != null and serialNumber != ''">#{serialNumber},</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="updateEmisWarehouseIn" parameterType="EmisWarehouseIn">
update emis_warehouse_in
<trim prefix="SET" suffixOverrides=",">
<if test="inNo != null and inNo != ''">in_no = #{inNo},</if>
<if test="customerCode != null and customerCode != ''">customer_code = #{customerCode},</if>
<if test="customerName != null and customerName != ''">customer_name = #{customerName},</if>
<if test="superiorDate != null">superior_date = #{superiorDate},</if>
<if test="serialNumber != null and serialNumber != ''">serial_number = #{serialNumber},</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="deleteEmisWarehouseInById" parameterType="Long">
delete from emis_warehouse_in where id = #{id}
</delete>
<delete id="deleteEmisWarehouseInByIds" parameterType="String">
delete from emis_warehouse_in where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>