md
This commit is contained in:
parent
59f2ad5854
commit
c2f6930248
@ -0,0 +1,134 @@
|
||||
|
||||
/**
|
||||
* @Project: emis
|
||||
* @Title: EmisMaterialController.java
|
||||
* @author linfso
|
||||
* @date 2024-05-26 15:33:32
|
||||
* @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.EmisMaterial;
|
||||
import com.xdadan.erp.emis.service.IEmisMaterialService;
|
||||
|
||||
/**
|
||||
* 物料类型Controller
|
||||
*
|
||||
* @author linfso
|
||||
* @date 2024-05-26 15:33:32
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/emis/emisMaterial")
|
||||
public class EmisMaterialController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IEmisMaterialService emisMaterialService;
|
||||
|
||||
/**
|
||||
* 查询物料类型列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('emis:emisMaterial:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(EmisMaterial emisMaterial)
|
||||
{
|
||||
startPage();
|
||||
List<EmisMaterial> list = emisMaterialService.selectEmisMaterialList(emisMaterial);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 检查是否重复
|
||||
*
|
||||
* @param emisMaterial
|
||||
* @return 数量
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('emis:emisMaterial:list')")
|
||||
@GetMapping("/checkUnique")
|
||||
public AjaxResult checkUnique(EmisMaterial emisMaterial)
|
||||
{
|
||||
int cnt=emisMaterialService.checkUnique(emisMaterial);
|
||||
return AjaxResult.success("检查成功",cnt);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导出物料类型列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('emis:emisMaterial:export')")
|
||||
@Log(title = "物料类型", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, EmisMaterial emisMaterial)
|
||||
{
|
||||
List<EmisMaterial> list = emisMaterialService.selectEmisMaterialList(emisMaterial);
|
||||
ExcelUtil<EmisMaterial> util = new ExcelUtil<EmisMaterial>(EmisMaterial.class);
|
||||
util.exportExcel(response, list, "物料类型数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取物料类型详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('emis:emisMaterial:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(emisMaterialService.selectEmisMaterialById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增物料类型
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('emis:emisMaterial:add')")
|
||||
@Log(title = "物料类型", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody EmisMaterial emisMaterial)
|
||||
{
|
||||
return toAjax(emisMaterialService.insertEmisMaterial(emisMaterial));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改物料类型
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('emis:emisMaterial:edit')")
|
||||
@Log(title = "物料类型", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody EmisMaterial emisMaterial)
|
||||
{
|
||||
return toAjax(emisMaterialService.updateEmisMaterial(emisMaterial));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除物料类型
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('emis:emisMaterial:remove')")
|
||||
@Log(title = "物料类型", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(emisMaterialService.deleteEmisMaterialByIds(ids));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,71 @@
|
||||
/**
|
||||
* @Project: emis
|
||||
* @Title: EmisMaterial.java
|
||||
* @author linfso
|
||||
* @date 2024-05-26 15:33:32
|
||||
* @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 EmisMaterial
|
||||
* @Description 物料类型
|
||||
* @author linfso
|
||||
* @date 2024-05-26 15:33:32
|
||||
*/
|
||||
@Data
|
||||
public class EmisMaterial extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/* 序号 */
|
||||
private Long id;
|
||||
/* 物料编号 */
|
||||
private String materialCode;
|
||||
/* 物料名称 */
|
||||
private String materialName;
|
||||
/* 物料英文名称 */
|
||||
private String materialNameEn;
|
||||
/* 是否列表 */
|
||||
private String blList;
|
||||
/* 单个数量 */
|
||||
private Integer unitNumber;
|
||||
/* 出售价格 */
|
||||
private BigDecimal unitPrice;
|
||||
/* 采购价格 */
|
||||
private BigDecimal stockPrice;
|
||||
/* 计量单位 */
|
||||
private String goodsUnit;
|
||||
/* 数量 */
|
||||
private Integer quantity;
|
||||
/* 库存预警 */
|
||||
private Integer alertNumber;
|
||||
/* 最低申购数量 */
|
||||
private Integer lowQuantity;
|
||||
/* 是否需要运单发放 */
|
||||
private String blNeedbill;
|
||||
/* 是否提供给网点申请 1-是 */
|
||||
private String blApply;
|
||||
/* 是否提供给运单发放 */
|
||||
private String blSend;
|
||||
/* 启用状态 1-启用 0-停用 */
|
||||
private String blEnable;
|
||||
/* 排序 */
|
||||
private Integer orderNum;
|
||||
|
||||
}
|
||||
@ -0,0 +1,80 @@
|
||||
/**
|
||||
* @Project: emis
|
||||
* @Title: EmisMaterialMapper.java
|
||||
* @author linfso
|
||||
* @date 2024-05-26 15:33:32
|
||||
* @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.EmisMaterial;
|
||||
/**
|
||||
* @ClassName EmisMaterialMapper
|
||||
* @Description <p> 物料类型 Mapper 接口 </p>
|
||||
* @author linfso
|
||||
* @date 2024-05-26 15:33:32
|
||||
*/
|
||||
public interface EmisMaterialMapper extends BaseMapper<EmisMaterial>
|
||||
{
|
||||
/**
|
||||
* 主键查询
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
public EmisMaterial selectEmisMaterialById(Long id);
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*
|
||||
* @param emisMaterial
|
||||
* @return 集合
|
||||
*/
|
||||
public List<EmisMaterial> selectEmisMaterialList(EmisMaterial emisMaterial);
|
||||
|
||||
|
||||
/**
|
||||
* 检查是否重复
|
||||
*
|
||||
* @param emisMaterial
|
||||
* @return 数量
|
||||
*/
|
||||
public int checkUnique(EmisMaterial emisMaterial);
|
||||
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*
|
||||
* @param emisMaterial
|
||||
* @return
|
||||
*/
|
||||
public int insertEmisMaterial(EmisMaterial emisMaterial);
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*
|
||||
* @param emisMaterial
|
||||
* @return
|
||||
*/
|
||||
public int updateEmisMaterial(EmisMaterial emisMaterial);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmisMaterialById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmisMaterialByIds(Long[] ids);
|
||||
}
|
||||
@ -0,0 +1,78 @@
|
||||
/**
|
||||
* @Project: emis
|
||||
* @Title: EmisMaterialService.java
|
||||
* @author linfso
|
||||
* @date 2024-05-26 15:33:32
|
||||
* @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.EmisMaterial;
|
||||
|
||||
/**
|
||||
* @ClassName EmisMaterialService
|
||||
* @Description 物料类型
|
||||
* @author linfso
|
||||
* @date 2024-05-26 15:33:32
|
||||
*/
|
||||
public interface IEmisMaterialService
|
||||
{
|
||||
/**
|
||||
* 主键查询
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
public EmisMaterial selectEmisMaterialById(Long id);
|
||||
|
||||
/**
|
||||
* 查询物料类型列表
|
||||
*
|
||||
* @param emisMaterial 物料类型
|
||||
* @return 物料类型集合
|
||||
*/
|
||||
public List<EmisMaterial> selectEmisMaterialList(EmisMaterial emisMaterial);
|
||||
|
||||
|
||||
/**
|
||||
* 检查是否重复
|
||||
*
|
||||
* @param emisMaterial
|
||||
* @return 数量
|
||||
*/
|
||||
public int checkUnique(EmisMaterial emisMaterial);
|
||||
|
||||
/**
|
||||
* 新增物料类型
|
||||
*
|
||||
* @param emisMaterial 物料类型
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEmisMaterial(EmisMaterial emisMaterial);
|
||||
|
||||
/**
|
||||
* 修改物料类型
|
||||
*
|
||||
* @param emisMaterial 物料类型
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEmisMaterial(EmisMaterial emisMaterial);
|
||||
|
||||
/**
|
||||
* 批量删除物料类型
|
||||
*
|
||||
* @param ids 需要删除的物料类型主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmisMaterialByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除物料类型信息
|
||||
*
|
||||
* @param id 物料类型主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmisMaterialById(Long id);
|
||||
}
|
||||
@ -0,0 +1,117 @@
|
||||
/**
|
||||
* @Project: emis
|
||||
* @Title: EmisMaterialServiceImpl.java
|
||||
* @author linfso
|
||||
* @date 2024-05-26 15:33:32
|
||||
* @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.EmisMaterial;
|
||||
import com.xdadan.erp.emis.mapper.EmisMaterialMapper;
|
||||
import com.xdadan.erp.emis.service.IEmisMaterialService;
|
||||
|
||||
/**
|
||||
* 物料类型Service业务层处理
|
||||
*
|
||||
* @author linfso
|
||||
* @date 2024-05-26 15:33:32
|
||||
*/
|
||||
@Service
|
||||
public class EmisMaterialServiceImpl implements IEmisMaterialService
|
||||
{
|
||||
@Autowired
|
||||
private EmisMaterialMapper emisMaterialMapper;
|
||||
|
||||
/**
|
||||
* 查询物料类型
|
||||
*
|
||||
* @param id 物料类型主键
|
||||
* @return 物料类型
|
||||
*/
|
||||
@Override
|
||||
public EmisMaterial selectEmisMaterialById(Long id)
|
||||
{
|
||||
return emisMaterialMapper.selectEmisMaterialById(id);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询物料类型列表
|
||||
*
|
||||
* @param emisMaterial 物料类型
|
||||
* @return 物料类型
|
||||
*/
|
||||
@Override
|
||||
public List<EmisMaterial> selectEmisMaterialList(EmisMaterial emisMaterial)
|
||||
{
|
||||
return emisMaterialMapper.selectEmisMaterialList(emisMaterial);
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查是否重复
|
||||
*
|
||||
* @param emisMaterial
|
||||
* @return 数量
|
||||
*/
|
||||
@Override
|
||||
public int checkUnique(EmisMaterial emisMaterial)
|
||||
{
|
||||
return emisMaterialMapper.checkUnique(emisMaterial);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增物料类型
|
||||
*
|
||||
* @param emisMaterial 物料类型
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertEmisMaterial(EmisMaterial emisMaterial)
|
||||
{
|
||||
return emisMaterialMapper.insertEmisMaterial(emisMaterial);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改物料类型
|
||||
*
|
||||
* @param emisMaterial 物料类型
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateEmisMaterial(EmisMaterial emisMaterial)
|
||||
{
|
||||
return emisMaterialMapper.updateEmisMaterial(emisMaterial);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除物料类型
|
||||
*
|
||||
* @param ids 需要删除的物料类型主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteEmisMaterialByIds(Long[] ids)
|
||||
{
|
||||
return emisMaterialMapper.deleteEmisMaterialByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除物料类型信息
|
||||
*
|
||||
* @param id 物料类型主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteEmisMaterialById(Long id)
|
||||
{
|
||||
return emisMaterialMapper.deleteEmisMaterialById(id);
|
||||
}
|
||||
|
||||
}
|
||||
214
emis-biz/src/main/resources/mapper/EmisMaterialMapper.xml
Normal file
214
emis-biz/src/main/resources/mapper/EmisMaterialMapper.xml
Normal file
@ -0,0 +1,214 @@
|
||||
<?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.EmisMaterialMapper">
|
||||
|
||||
<resultMap type="EmisMaterial" id="EmisMaterialResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="materialCode" column="material_code" />
|
||||
<result property="materialName" column="material_name" />
|
||||
<result property="materialNameEn" column="material_name_en" />
|
||||
<result property="blList" column="bl_list" />
|
||||
<result property="unitNumber" column="unit_number" />
|
||||
<result property="unitPrice" column="unit_price" />
|
||||
<result property="stockPrice" column="stock_price" />
|
||||
<result property="goodsUnit" column="goods_unit" />
|
||||
<result property="quantity" column="quantity" />
|
||||
<result property="alertNumber" column="alert_number" />
|
||||
<result property="lowQuantity" column="low_quantity" />
|
||||
<result property="blNeedbill" column="bl_needbill" />
|
||||
<result property="blApply" column="bl_apply" />
|
||||
<result property="blSend" column="bl_send" />
|
||||
<result property="blEnable" column="bl_enable" />
|
||||
<result property="orderNum" column="order_num" />
|
||||
<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="selectEmisMaterialVo">
|
||||
select id, material_code, material_name, material_name_en, bl_list, unit_number, unit_price, stock_price, goods_unit, quantity, alert_number, low_quantity, bl_needbill, bl_apply, bl_send, bl_enable, order_num, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site from emis_material
|
||||
</sql>
|
||||
|
||||
<select id="selectEmisMaterialList" parameterType="EmisMaterial" resultMap="EmisMaterialResult">
|
||||
<include refid="selectEmisMaterialVo"/>
|
||||
<where>
|
||||
del_flag='0'
|
||||
<if test="id != null "> and id = #{id}</if>
|
||||
<if test="materialCode != null and materialCode != ''"> and material_code like concat('%', #{materialCode}, '%')</if>
|
||||
<if test="materialName != null and materialName != ''"> and material_name like concat('%', #{materialName}, '%')</if>
|
||||
<if test="materialNameEn != null and materialNameEn != ''"> and material_name_en like concat('%', #{materialNameEn}, '%')</if>
|
||||
<if test="blList != null and blList != ''"> and bl_list = #{blList}</if>
|
||||
<if test="unitNumber != null "> and unit_number = #{unitNumber}</if>
|
||||
<if test="unitPrice != null "> and unit_price = #{unitPrice}</if>
|
||||
<if test="stockPrice != null "> and stock_price = #{stockPrice}</if>
|
||||
<if test="goodsUnit != null and goodsUnit != ''"> and goods_unit = #{goodsUnit}</if>
|
||||
<if test="quantity != null "> and quantity = #{quantity}</if>
|
||||
<if test="alertNumber != null "> and alert_number = #{alertNumber}</if>
|
||||
<if test="lowQuantity != null "> and low_quantity = #{lowQuantity}</if>
|
||||
<if test="blNeedbill != null and blNeedbill != ''"> and bl_needbill = #{blNeedbill}</if>
|
||||
<if test="blApply != null and blApply != ''"> and bl_apply = #{blApply}</if>
|
||||
<if test="blSend != null and blSend != ''"> and bl_send = #{blSend}</if>
|
||||
<if test="blEnable != null and blEnable != ''"> and bl_enable = #{blEnable}</if>
|
||||
<if test="orderNum != null "> and order_num = #{orderNum}</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="EmisMaterial" resultType="int">
|
||||
select count(1) from emis_material
|
||||
where del_flag='0'
|
||||
and id = #{id}
|
||||
and material_code = #{materialCode}
|
||||
and material_name = #{materialName}
|
||||
and material_name_en = #{materialNameEn}
|
||||
and bl_list = #{blList}
|
||||
and unit_number = #{unitNumber}
|
||||
and unit_price = #{unitPrice}
|
||||
and stock_price = #{stockPrice}
|
||||
and goods_unit = #{goodsUnit}
|
||||
and quantity = #{quantity}
|
||||
and alert_number = #{alertNumber}
|
||||
and low_quantity = #{lowQuantity}
|
||||
and bl_needbill = #{blNeedbill}
|
||||
and bl_apply = #{blApply}
|
||||
and bl_send = #{blSend}
|
||||
and bl_enable = #{blEnable}
|
||||
and order_num = #{orderNum}
|
||||
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="selectEmisMaterialById" parameterType="Long" resultMap="EmisMaterialResult">
|
||||
select id, material_code, material_name, material_name_en, bl_list, unit_number, unit_price, stock_price, goods_unit, quantity, alert_number, low_quantity, bl_needbill, bl_apply, bl_send, bl_enable, order_num, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
|
||||
from emis_material a
|
||||
where a.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertEmisMaterial" parameterType="EmisMaterial" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into emis_material
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="materialCode != null and materialCode != ''">material_code,</if>
|
||||
<if test="materialName != null and materialName != ''">material_name,</if>
|
||||
<if test="materialNameEn != null and materialNameEn != ''">material_name_en,</if>
|
||||
<if test="blList != null and blList != ''">bl_list,</if>
|
||||
<if test="unitNumber != null">unit_number,</if>
|
||||
<if test="unitPrice != null">unit_price,</if>
|
||||
<if test="stockPrice != null">stock_price,</if>
|
||||
<if test="goodsUnit != null and goodsUnit != ''">goods_unit,</if>
|
||||
<if test="quantity != null">quantity,</if>
|
||||
<if test="alertNumber != null">alert_number,</if>
|
||||
<if test="lowQuantity != null">low_quantity,</if>
|
||||
<if test="blNeedbill != null and blNeedbill != ''">bl_needbill,</if>
|
||||
<if test="blApply != null and blApply != ''">bl_apply,</if>
|
||||
<if test="blSend != null and blSend != ''">bl_send,</if>
|
||||
<if test="blEnable != null and blEnable != ''">bl_enable,</if>
|
||||
<if test="orderNum != null">order_num,</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="materialCode != null and materialCode != ''">#{materialCode},</if>
|
||||
<if test="materialName != null and materialName != ''">#{materialName},</if>
|
||||
<if test="materialNameEn != null and materialNameEn != ''">#{materialNameEn},</if>
|
||||
<if test="blList != null and blList != ''">#{blList},</if>
|
||||
<if test="unitNumber != null">#{unitNumber},</if>
|
||||
<if test="unitPrice != null">#{unitPrice},</if>
|
||||
<if test="stockPrice != null">#{stockPrice},</if>
|
||||
<if test="goodsUnit != null and goodsUnit != ''">#{goodsUnit},</if>
|
||||
<if test="quantity != null">#{quantity},</if>
|
||||
<if test="alertNumber != null">#{alertNumber},</if>
|
||||
<if test="lowQuantity != null">#{lowQuantity},</if>
|
||||
<if test="blNeedbill != null and blNeedbill != ''">#{blNeedbill},</if>
|
||||
<if test="blApply != null and blApply != ''">#{blApply},</if>
|
||||
<if test="blSend != null and blSend != ''">#{blSend},</if>
|
||||
<if test="blEnable != null and blEnable != ''">#{blEnable},</if>
|
||||
<if test="orderNum != null">#{orderNum},</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="updateEmisMaterial" parameterType="EmisMaterial">
|
||||
update emis_material
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="materialCode != null and materialCode != ''">material_code = #{materialCode},</if>
|
||||
<if test="materialName != null and materialName != ''">material_name = #{materialName},</if>
|
||||
<if test="materialNameEn != null and materialNameEn != ''">material_name_en = #{materialNameEn},</if>
|
||||
<if test="blList != null and blList != ''">bl_list = #{blList},</if>
|
||||
<if test="unitNumber != null">unit_number = #{unitNumber},</if>
|
||||
<if test="unitPrice != null">unit_price = #{unitPrice},</if>
|
||||
<if test="stockPrice != null">stock_price = #{stockPrice},</if>
|
||||
<if test="goodsUnit != null and goodsUnit != ''">goods_unit = #{goodsUnit},</if>
|
||||
<if test="quantity != null">quantity = #{quantity},</if>
|
||||
<if test="alertNumber != null">alert_number = #{alertNumber},</if>
|
||||
<if test="lowQuantity != null">low_quantity = #{lowQuantity},</if>
|
||||
<if test="blNeedbill != null and blNeedbill != ''">bl_needbill = #{blNeedbill},</if>
|
||||
<if test="blApply != null and blApply != ''">bl_apply = #{blApply},</if>
|
||||
<if test="blSend != null and blSend != ''">bl_send = #{blSend},</if>
|
||||
<if test="blEnable != null and blEnable != ''">bl_enable = #{blEnable},</if>
|
||||
<if test="orderNum != null">order_num = #{orderNum},</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="deleteEmisMaterialById" parameterType="Long">
|
||||
delete from emis_material where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteEmisMaterialByIds" parameterType="String">
|
||||
delete from emis_material where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue
Block a user