白坯原材料采购单
parent
897a9e83a5
commit
5cb2adad8f
@ -0,0 +1,104 @@
|
||||
package com.op.wms.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
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.op.wms.domain.BpProcureOrder;
|
||||
import com.op.wms.service.IBpProcureOrderService;
|
||||
import com.op.common.log.annotation.Log;
|
||||
import com.op.common.core.web.controller.BaseController;
|
||||
import com.op.common.core.web.domain.AjaxResult;
|
||||
import com.op.common.log.enums.BusinessType;
|
||||
import com.op.common.core.utils.poi.ExcelUtil;
|
||||
import com.op.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 白坯原材料采购单Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-11-04
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/bpprocure")
|
||||
public class BpProcureOrderController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IBpProcureOrderService bpProcureOrderService;
|
||||
|
||||
/**
|
||||
* 查询白坯原材料采购单列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('wms:bpprocure:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(BpProcureOrder bpProcureOrder)
|
||||
{
|
||||
startPage();
|
||||
List<BpProcureOrder> list = bpProcureOrderService.selectBpProcureOrderList(bpProcureOrder);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出白坯原材料采购单列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('wms:bpprocure:export')")
|
||||
@Log(title = "白坯原材料采购单", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, BpProcureOrder bpProcureOrder)
|
||||
{
|
||||
List<BpProcureOrder> list = bpProcureOrderService.selectBpProcureOrderList(bpProcureOrder);
|
||||
ExcelUtil<BpProcureOrder> util = new ExcelUtil<BpProcureOrder>(BpProcureOrder.class);
|
||||
util.exportExcel(response, list, "白坯原材料采购单数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取白坯原材料采购单详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('wms:bpprocure:query')")
|
||||
@GetMapping(value = "/{ID}")
|
||||
public AjaxResult getInfo(@PathVariable("ID") String ID)
|
||||
{
|
||||
return success(bpProcureOrderService.selectBpProcureOrderByID(ID));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增白坯原材料采购单
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('wms:bpprocure:add')")
|
||||
@Log(title = "白坯原材料采购单", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody BpProcureOrder bpProcureOrder)
|
||||
{
|
||||
return toAjax(bpProcureOrderService.insertBpProcureOrder(bpProcureOrder));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改白坯原材料采购单
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('wms:bpprocure:edit')")
|
||||
@Log(title = "白坯原材料采购单", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody BpProcureOrder bpProcureOrder)
|
||||
{
|
||||
return toAjax(bpProcureOrderService.updateBpProcureOrder(bpProcureOrder));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除白坯原材料采购单
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('wms:bpprocure:remove')")
|
||||
@Log(title = "白坯原材料采购单", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{IDs}")
|
||||
public AjaxResult remove(@PathVariable String[] IDs)
|
||||
{
|
||||
return toAjax(bpProcureOrderService.deleteBpProcureOrderByIDs(IDs));
|
||||
}
|
||||
}
|
@ -0,0 +1,219 @@
|
||||
package com.op.wms.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.op.common.core.annotation.Excel;
|
||||
import com.op.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 白坯原材料采购单对象 bp_procure_order
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-11-04
|
||||
*/
|
||||
public class BpProcureOrder extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** ID */
|
||||
private String ID;
|
||||
|
||||
/** 采购单号 */
|
||||
@Excel(name = "采购单号")
|
||||
private String procureCode;
|
||||
|
||||
/** 物料编码 */
|
||||
@Excel(name = "物料编码")
|
||||
private String materialCode;
|
||||
|
||||
/** 物料名称 */
|
||||
@Excel(name = "物料名称")
|
||||
private String materialName;
|
||||
|
||||
/** 供应商 */
|
||||
@Excel(name = "供应商")
|
||||
private String supplyName;
|
||||
|
||||
/** 计划数量 */
|
||||
@Excel(name = "计划数量")
|
||||
private Long planNumber;
|
||||
|
||||
/** 已入库数量 */
|
||||
@Excel(name = "已入库数量")
|
||||
private Long realityNumber;
|
||||
|
||||
/** 单位 */
|
||||
@Excel(name = "单位")
|
||||
private String unit;
|
||||
|
||||
/** 价格 */
|
||||
@Excel(name = "价格")
|
||||
private Long price;
|
||||
|
||||
/** 用户自定义1 */
|
||||
@Excel(name = "用户自定义1")
|
||||
private String attr1;
|
||||
|
||||
/** 用户自定义2 */
|
||||
@Excel(name = "用户自定义2")
|
||||
private String attr2;
|
||||
|
||||
/** 用户自定义3 */
|
||||
@Excel(name = "用户自定义3")
|
||||
private String attr3;
|
||||
|
||||
/** 用户自定义4 */
|
||||
@Excel(name = "用户自定义4")
|
||||
private String attr4;
|
||||
|
||||
/** 用户自定义5 */
|
||||
@Excel(name = "用户自定义5")
|
||||
private String attr5;
|
||||
|
||||
public void setID(String ID)
|
||||
{
|
||||
this.ID = ID;
|
||||
}
|
||||
|
||||
public String getID()
|
||||
{
|
||||
return ID;
|
||||
}
|
||||
public void setProcureCode(String procureCode)
|
||||
{
|
||||
this.procureCode = procureCode;
|
||||
}
|
||||
|
||||
public String getProcureCode()
|
||||
{
|
||||
return procureCode;
|
||||
}
|
||||
public void setMaterialCode(String materialCode)
|
||||
{
|
||||
this.materialCode = materialCode;
|
||||
}
|
||||
|
||||
public String getMaterialCode()
|
||||
{
|
||||
return materialCode;
|
||||
}
|
||||
public void setMaterialName(String materialName)
|
||||
{
|
||||
this.materialName = materialName;
|
||||
}
|
||||
|
||||
public String getMaterialName()
|
||||
{
|
||||
return materialName;
|
||||
}
|
||||
public void setSupplyName(String supplyName)
|
||||
{
|
||||
this.supplyName = supplyName;
|
||||
}
|
||||
|
||||
public String getSupplyName()
|
||||
{
|
||||
return supplyName;
|
||||
}
|
||||
public void setPlanNumber(Long planNumber)
|
||||
{
|
||||
this.planNumber = planNumber;
|
||||
}
|
||||
|
||||
public Long getPlanNumber()
|
||||
{
|
||||
return planNumber;
|
||||
}
|
||||
public void setRealityNumber(Long realityNumber)
|
||||
{
|
||||
this.realityNumber = realityNumber;
|
||||
}
|
||||
|
||||
public Long getRealityNumber()
|
||||
{
|
||||
return realityNumber;
|
||||
}
|
||||
public void setUnit(String unit)
|
||||
{
|
||||
this.unit = unit;
|
||||
}
|
||||
|
||||
public String getUnit()
|
||||
{
|
||||
return unit;
|
||||
}
|
||||
public void setPrice(Long price)
|
||||
{
|
||||
this.price = price;
|
||||
}
|
||||
|
||||
public Long getPrice()
|
||||
{
|
||||
return price;
|
||||
}
|
||||
public void setAttr1(String attr1)
|
||||
{
|
||||
this.attr1 = attr1;
|
||||
}
|
||||
|
||||
public String getAttr1()
|
||||
{
|
||||
return attr1;
|
||||
}
|
||||
public void setAttr2(String attr2)
|
||||
{
|
||||
this.attr2 = attr2;
|
||||
}
|
||||
|
||||
public String getAttr2()
|
||||
{
|
||||
return attr2;
|
||||
}
|
||||
public void setAttr3(String attr3)
|
||||
{
|
||||
this.attr3 = attr3;
|
||||
}
|
||||
|
||||
public String getAttr3()
|
||||
{
|
||||
return attr3;
|
||||
}
|
||||
public void setAttr4(String attr4)
|
||||
{
|
||||
this.attr4 = attr4;
|
||||
}
|
||||
|
||||
public String getAttr4()
|
||||
{
|
||||
return attr4;
|
||||
}
|
||||
public void setAttr5(String attr5)
|
||||
{
|
||||
this.attr5 = attr5;
|
||||
}
|
||||
|
||||
public String getAttr5()
|
||||
{
|
||||
return attr5;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("ID", getID())
|
||||
.append("procureCode", getProcureCode())
|
||||
.append("materialCode", getMaterialCode())
|
||||
.append("materialName", getMaterialName())
|
||||
.append("supplyName", getSupplyName())
|
||||
.append("planNumber", getPlanNumber())
|
||||
.append("realityNumber", getRealityNumber())
|
||||
.append("unit", getUnit())
|
||||
.append("price", getPrice())
|
||||
.append("attr1", getAttr1())
|
||||
.append("attr2", getAttr2())
|
||||
.append("attr3", getAttr3())
|
||||
.append("attr4", getAttr4())
|
||||
.append("attr5", getAttr5())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.op.wms.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.op.wms.domain.BpProcureOrder;
|
||||
|
||||
/**
|
||||
* 白坯原材料采购单Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-11-04
|
||||
*/
|
||||
public interface BpProcureOrderMapper
|
||||
{
|
||||
/**
|
||||
* 查询白坯原材料采购单
|
||||
*
|
||||
* @param ID 白坯原材料采购单主键
|
||||
* @return 白坯原材料采购单
|
||||
*/
|
||||
public BpProcureOrder selectBpProcureOrderByID(String ID);
|
||||
|
||||
/**
|
||||
* 查询白坯原材料采购单列表
|
||||
*
|
||||
* @param bpProcureOrder 白坯原材料采购单
|
||||
* @return 白坯原材料采购单集合
|
||||
*/
|
||||
public List<BpProcureOrder> selectBpProcureOrderList(BpProcureOrder bpProcureOrder);
|
||||
|
||||
/**
|
||||
* 新增白坯原材料采购单
|
||||
*
|
||||
* @param bpProcureOrder 白坯原材料采购单
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBpProcureOrder(BpProcureOrder bpProcureOrder);
|
||||
|
||||
/**
|
||||
* 修改白坯原材料采购单
|
||||
*
|
||||
* @param bpProcureOrder 白坯原材料采购单
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBpProcureOrder(BpProcureOrder bpProcureOrder);
|
||||
|
||||
/**
|
||||
* 删除白坯原材料采购单
|
||||
*
|
||||
* @param ID 白坯原材料采购单主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBpProcureOrderByID(String ID);
|
||||
|
||||
/**
|
||||
* 批量删除白坯原材料采购单
|
||||
*
|
||||
* @param IDs 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBpProcureOrderByIDs(String[] IDs);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.op.wms.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.op.wms.domain.BpProcureOrder;
|
||||
|
||||
/**
|
||||
* 白坯原材料采购单Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-11-04
|
||||
*/
|
||||
public interface IBpProcureOrderService
|
||||
{
|
||||
/**
|
||||
* 查询白坯原材料采购单
|
||||
*
|
||||
* @param ID 白坯原材料采购单主键
|
||||
* @return 白坯原材料采购单
|
||||
*/
|
||||
public BpProcureOrder selectBpProcureOrderByID(String ID);
|
||||
|
||||
/**
|
||||
* 查询白坯原材料采购单列表
|
||||
*
|
||||
* @param bpProcureOrder 白坯原材料采购单
|
||||
* @return 白坯原材料采购单集合
|
||||
*/
|
||||
public List<BpProcureOrder> selectBpProcureOrderList(BpProcureOrder bpProcureOrder);
|
||||
|
||||
/**
|
||||
* 新增白坯原材料采购单
|
||||
*
|
||||
* @param bpProcureOrder 白坯原材料采购单
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBpProcureOrder(BpProcureOrder bpProcureOrder);
|
||||
|
||||
/**
|
||||
* 修改白坯原材料采购单
|
||||
*
|
||||
* @param bpProcureOrder 白坯原材料采购单
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBpProcureOrder(BpProcureOrder bpProcureOrder);
|
||||
|
||||
/**
|
||||
* 批量删除白坯原材料采购单
|
||||
*
|
||||
* @param IDs 需要删除的白坯原材料采购单主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBpProcureOrderByIDs(String[] IDs);
|
||||
|
||||
/**
|
||||
* 删除白坯原材料采购单信息
|
||||
*
|
||||
* @param ID 白坯原材料采购单主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBpProcureOrderByID(String ID);
|
||||
}
|
@ -0,0 +1,109 @@
|
||||
package com.op.wms.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.op.common.core.utils.uuid.IdUtils;
|
||||
import com.op.wms.domain.BaseProduct;
|
||||
import com.op.wms.mapper.BaseProductMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.op.wms.mapper.BpProcureOrderMapper;
|
||||
import com.op.wms.domain.BpProcureOrder;
|
||||
import com.op.wms.service.IBpProcureOrderService;
|
||||
|
||||
/**
|
||||
* 白坯原材料采购单Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-11-04
|
||||
*/
|
||||
@Service
|
||||
public class BpProcureOrderServiceImpl implements IBpProcureOrderService
|
||||
{
|
||||
@Autowired
|
||||
private BpProcureOrderMapper bpProcureOrderMapper;
|
||||
@Autowired
|
||||
private BaseProductMapper baseProductMapper;
|
||||
|
||||
/**
|
||||
* 查询白坯原材料采购单
|
||||
*
|
||||
* @param ID 白坯原材料采购单主键
|
||||
* @return 白坯原材料采购单
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public BpProcureOrder selectBpProcureOrderByID(String ID)
|
||||
{
|
||||
return bpProcureOrderMapper.selectBpProcureOrderByID(ID);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询白坯原材料采购单列表
|
||||
*
|
||||
* @param bpProcureOrder 白坯原材料采购单
|
||||
* @return 白坯原材料采购单
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public List<BpProcureOrder> selectBpProcureOrderList(BpProcureOrder bpProcureOrder)
|
||||
{
|
||||
return bpProcureOrderMapper.selectBpProcureOrderList(bpProcureOrder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增白坯原材料采购单
|
||||
*
|
||||
* @param bpProcureOrder 白坯原材料采购单
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int insertBpProcureOrder(BpProcureOrder bpProcureOrder)
|
||||
{
|
||||
bpProcureOrder.setID(IdUtils.fastSimpleUUID());
|
||||
BaseProduct baseProduct = baseProductMapper.selectBaseProductByProductName(bpProcureOrder.getMaterialName());
|
||||
bpProcureOrder.setMaterialCode(baseProduct.getProductCode());
|
||||
return bpProcureOrderMapper.insertBpProcureOrder(bpProcureOrder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改白坯原材料采购单
|
||||
*
|
||||
* @param bpProcureOrder 白坯原材料采购单
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int updateBpProcureOrder(BpProcureOrder bpProcureOrder)
|
||||
{
|
||||
return bpProcureOrderMapper.updateBpProcureOrder(bpProcureOrder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除白坯原材料采购单
|
||||
*
|
||||
* @param IDs 需要删除的白坯原材料采购单主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int deleteBpProcureOrderByIDs(String[] IDs)
|
||||
{
|
||||
return bpProcureOrderMapper.deleteBpProcureOrderByIDs(IDs);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除白坯原材料采购单信息
|
||||
*
|
||||
* @param ID 白坯原材料采购单主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int deleteBpProcureOrderByID(String ID)
|
||||
{
|
||||
return bpProcureOrderMapper.deleteBpProcureOrderByID(ID);
|
||||
}
|
||||
}
|
@ -0,0 +1,118 @@
|
||||
<?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.op.wms.mapper.BpProcureOrderMapper">
|
||||
|
||||
<resultMap type="BpProcureOrder" id="BpProcureOrderResult">
|
||||
<result property="ID" column="ID" />
|
||||
<result property="procureCode" column="procure_code" />
|
||||
<result property="materialCode" column="material_code" />
|
||||
<result property="materialName" column="material_name" />
|
||||
<result property="supplyName" column="supply_name" />
|
||||
<result property="planNumber" column="plan_number" />
|
||||
<result property="realityNumber" column="reality_number" />
|
||||
<result property="unit" column="unit" />
|
||||
<result property="price" column="price" />
|
||||
<result property="attr1" column="attr1" />
|
||||
<result property="attr2" column="attr2" />
|
||||
<result property="attr3" column="attr3" />
|
||||
<result property="attr4" column="attr4" />
|
||||
<result property="attr5" column="attr5" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBpProcureOrderVo">
|
||||
select ID, procure_code, material_code, material_name, supply_name, plan_number, reality_number, unit, price, attr1, attr2, attr3, attr4, attr5 from bp_procure_order
|
||||
</sql>
|
||||
|
||||
<select id="selectBpProcureOrderList" parameterType="BpProcureOrder" resultMap="BpProcureOrderResult">
|
||||
<include refid="selectBpProcureOrderVo"/>
|
||||
<where>
|
||||
<if test="procureCode != null and procureCode != ''"> and procure_code = #{procureCode}</if>
|
||||
<if test="materialCode != null and materialCode != ''"> and material_code = #{materialCode}</if>
|
||||
<if test="materialName != null and materialName != ''"> and material_name like concat('%', #{materialName}, '%')</if>
|
||||
<if test="supplyName != null and supplyName != ''"> and supply_name like concat('%', #{supplyName}, '%')</if>
|
||||
<if test="planNumber != null "> and plan_number = #{planNumber}</if>
|
||||
<if test="realityNumber != null "> and reality_number = #{realityNumber}</if>
|
||||
<if test="unit != null and unit != ''"> and unit = #{unit}</if>
|
||||
<if test="price != null "> and price = #{price}</if>
|
||||
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
|
||||
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
|
||||
<if test="attr3 != null and attr3 != ''"> and attr3 = #{attr3}</if>
|
||||
<if test="attr4 != null and attr4 != ''"> and attr4 = #{attr4}</if>
|
||||
<if test="attr5 != null and attr5 != ''"> and attr5 = #{attr5}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBpProcureOrderByID" parameterType="String" resultMap="BpProcureOrderResult">
|
||||
<include refid="selectBpProcureOrderVo"/>
|
||||
where ID = #{ID}
|
||||
</select>
|
||||
|
||||
<insert id="insertBpProcureOrder" parameterType="BpProcureOrder">
|
||||
insert into bp_procure_order
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="ID != null">ID,</if>
|
||||
<if test="procureCode != null">procure_code,</if>
|
||||
<if test="materialCode != null">material_code,</if>
|
||||
<if test="materialName != null">material_name,</if>
|
||||
<if test="supplyName != null">supply_name,</if>
|
||||
<if test="planNumber != null">plan_number,</if>
|
||||
<if test="realityNumber != null">reality_number,</if>
|
||||
<if test="unit != null">unit,</if>
|
||||
<if test="price != null">price,</if>
|
||||
<if test="attr1 != null">attr1,</if>
|
||||
<if test="attr2 != null">attr2,</if>
|
||||
<if test="attr3 != null">attr3,</if>
|
||||
<if test="attr4 != null">attr4,</if>
|
||||
<if test="attr5 != null">attr5,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="ID != null">#{ID},</if>
|
||||
<if test="procureCode != null">#{procureCode},</if>
|
||||
<if test="materialCode != null">#{materialCode},</if>
|
||||
<if test="materialName != null">#{materialName},</if>
|
||||
<if test="supplyName != null">#{supplyName},</if>
|
||||
<if test="planNumber != null">#{planNumber},</if>
|
||||
<if test="realityNumber != null">#{realityNumber},</if>
|
||||
<if test="unit != null">#{unit},</if>
|
||||
<if test="price != null">#{price},</if>
|
||||
<if test="attr1 != null">#{attr1},</if>
|
||||
<if test="attr2 != null">#{attr2},</if>
|
||||
<if test="attr3 != null">#{attr3},</if>
|
||||
<if test="attr4 != null">#{attr4},</if>
|
||||
<if test="attr5 != null">#{attr5},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBpProcureOrder" parameterType="BpProcureOrder">
|
||||
update bp_procure_order
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="procureCode != null">procure_code = #{procureCode},</if>
|
||||
<if test="materialCode != null">material_code = #{materialCode},</if>
|
||||
<if test="materialName != null">material_name = #{materialName},</if>
|
||||
<if test="supplyName != null">supply_name = #{supplyName},</if>
|
||||
<if test="planNumber != null">plan_number = #{planNumber},</if>
|
||||
<if test="realityNumber != null">reality_number = #{realityNumber},</if>
|
||||
<if test="unit != null">unit = #{unit},</if>
|
||||
<if test="price != null">price = #{price},</if>
|
||||
<if test="attr1 != null">attr1 = #{attr1},</if>
|
||||
<if test="attr2 != null">attr2 = #{attr2},</if>
|
||||
<if test="attr3 != null">attr3 = #{attr3},</if>
|
||||
<if test="attr4 != null">attr4 = #{attr4},</if>
|
||||
<if test="attr5 != null">attr5 = #{attr5},</if>
|
||||
</trim>
|
||||
where ID = #{ID}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBpProcureOrderByID" parameterType="String">
|
||||
delete from bp_procure_order where ID = #{ID}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBpProcureOrderByIDs" parameterType="String">
|
||||
delete from bp_procure_order where ID in
|
||||
<foreach item="ID" collection="array" open="(" separator="," close=")">
|
||||
#{ID}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
Loading…
Reference in New Issue