parent
4ecb79a0d2
commit
fe63a324d6
@ -0,0 +1,61 @@
|
||||
package com.hw.mes.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.hw.mes.domain.MesOrderBind;
|
||||
|
||||
/**
|
||||
* 采购销售订单绑定信息Mapper接口
|
||||
*
|
||||
* @author xins
|
||||
* @date 2024-05-16
|
||||
*/
|
||||
public interface MesOrderBindMapper
|
||||
{
|
||||
/**
|
||||
* 查询采购销售订单绑定信息
|
||||
*
|
||||
* @param orderBindId 采购销售订单绑定信息主键
|
||||
* @return 采购销售订单绑定信息
|
||||
*/
|
||||
public MesOrderBind selectMesOrderBindByOrderBindId(Long orderBindId);
|
||||
|
||||
/**
|
||||
* 查询采购销售订单绑定信息列表
|
||||
*
|
||||
* @param mesOrderBind 采购销售订单绑定信息
|
||||
* @return 采购销售订单绑定信息集合
|
||||
*/
|
||||
public List<MesOrderBind> selectMesOrderBindList(MesOrderBind mesOrderBind);
|
||||
|
||||
/**
|
||||
* 新增采购销售订单绑定信息
|
||||
*
|
||||
* @param mesOrderBind 采购销售订单绑定信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMesOrderBind(MesOrderBind mesOrderBind);
|
||||
|
||||
/**
|
||||
* 修改采购销售订单绑定信息
|
||||
*
|
||||
* @param mesOrderBind 采购销售订单绑定信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMesOrderBind(MesOrderBind mesOrderBind);
|
||||
|
||||
/**
|
||||
* 删除采购销售订单绑定信息
|
||||
*
|
||||
* @param orderBindId 采购销售订单绑定信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesOrderBindByOrderBindId(Long orderBindId);
|
||||
|
||||
/**
|
||||
* 批量删除采购销售订单绑定信息
|
||||
*
|
||||
* @param orderBindIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesOrderBindByOrderBindIds(Long[] orderBindIds);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.hw.mes.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.hw.mes.domain.MesOrderBind;
|
||||
|
||||
/**
|
||||
* 采购销售订单绑定信息Service接口
|
||||
*
|
||||
* @author xins
|
||||
* @date 2024-05-16
|
||||
*/
|
||||
public interface IMesOrderBindService
|
||||
{
|
||||
/**
|
||||
* 查询采购销售订单绑定信息
|
||||
*
|
||||
* @param orderBindId 采购销售订单绑定信息主键
|
||||
* @return 采购销售订单绑定信息
|
||||
*/
|
||||
public MesOrderBind selectMesOrderBindByOrderBindId(Long orderBindId);
|
||||
|
||||
/**
|
||||
* 查询采购销售订单绑定信息列表
|
||||
*
|
||||
* @param mesOrderBind 采购销售订单绑定信息
|
||||
* @return 采购销售订单绑定信息集合
|
||||
*/
|
||||
public List<MesOrderBind> selectMesOrderBindList(MesOrderBind mesOrderBind);
|
||||
|
||||
/**
|
||||
* 新增采购销售订单绑定信息
|
||||
*
|
||||
* @param mesOrderBind 采购销售订单绑定信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMesOrderBind(MesOrderBind mesOrderBind);
|
||||
|
||||
/**
|
||||
* 修改采购销售订单绑定信息
|
||||
*
|
||||
* @param mesOrderBind 采购销售订单绑定信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMesOrderBind(MesOrderBind mesOrderBind);
|
||||
|
||||
/**
|
||||
* 批量删除采购销售订单绑定信息
|
||||
*
|
||||
* @param orderBindIds 需要删除的采购销售订单绑定信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesOrderBindByOrderBindIds(Long[] orderBindIds);
|
||||
|
||||
/**
|
||||
* 删除采购销售订单绑定信息信息
|
||||
*
|
||||
* @param orderBindId 采购销售订单绑定信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesOrderBindByOrderBindId(Long orderBindId);
|
||||
}
|
@ -0,0 +1,96 @@
|
||||
package com.hw.mes.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.hw.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.hw.mes.mapper.MesOrderBindMapper;
|
||||
import com.hw.mes.domain.MesOrderBind;
|
||||
import com.hw.mes.service.IMesOrderBindService;
|
||||
|
||||
/**
|
||||
* 采购销售订单绑定信息Service业务层处理
|
||||
*
|
||||
* @author xins
|
||||
* @date 2024-05-16
|
||||
*/
|
||||
@Service
|
||||
public class MesOrderBindServiceImpl implements IMesOrderBindService
|
||||
{
|
||||
@Autowired
|
||||
private MesOrderBindMapper mesOrderBindMapper;
|
||||
|
||||
/**
|
||||
* 查询采购销售订单绑定信息
|
||||
*
|
||||
* @param orderBindId 采购销售订单绑定信息主键
|
||||
* @return 采购销售订单绑定信息
|
||||
*/
|
||||
@Override
|
||||
public MesOrderBind selectMesOrderBindByOrderBindId(Long orderBindId)
|
||||
{
|
||||
return mesOrderBindMapper.selectMesOrderBindByOrderBindId(orderBindId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询采购销售订单绑定信息列表
|
||||
*
|
||||
* @param mesOrderBind 采购销售订单绑定信息
|
||||
* @return 采购销售订单绑定信息
|
||||
*/
|
||||
@Override
|
||||
public List<MesOrderBind> selectMesOrderBindList(MesOrderBind mesOrderBind)
|
||||
{
|
||||
return mesOrderBindMapper.selectMesOrderBindList(mesOrderBind);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增采购销售订单绑定信息
|
||||
*
|
||||
* @param mesOrderBind 采购销售订单绑定信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertMesOrderBind(MesOrderBind mesOrderBind)
|
||||
{
|
||||
mesOrderBind.setCreateTime(DateUtils.getNowDate());
|
||||
return mesOrderBindMapper.insertMesOrderBind(mesOrderBind);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改采购销售订单绑定信息
|
||||
*
|
||||
* @param mesOrderBind 采购销售订单绑定信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateMesOrderBind(MesOrderBind mesOrderBind)
|
||||
{
|
||||
mesOrderBind.setUpdateTime(DateUtils.getNowDate());
|
||||
return mesOrderBindMapper.updateMesOrderBind(mesOrderBind);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除采购销售订单绑定信息
|
||||
*
|
||||
* @param orderBindIds 需要删除的采购销售订单绑定信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteMesOrderBindByOrderBindIds(Long[] orderBindIds)
|
||||
{
|
||||
return mesOrderBindMapper.deleteMesOrderBindByOrderBindIds(orderBindIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除采购销售订单绑定信息信息
|
||||
*
|
||||
* @param orderBindId 采购销售订单绑定信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteMesOrderBindByOrderBindId(Long orderBindId)
|
||||
{
|
||||
return mesOrderBindMapper.deleteMesOrderBindByOrderBindId(orderBindId);
|
||||
}
|
||||
}
|
@ -0,0 +1,131 @@
|
||||
<?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.hw.mes.mapper.MesOrderBindMapper">
|
||||
|
||||
<resultMap type="MesOrderBind" id="MesOrderBindResult">
|
||||
<result property="orderBindId" column="order_bind_id" />
|
||||
<result property="safeFlag" column="safe_flag" />
|
||||
<result property="saleOrderId" column="sale_order_id" />
|
||||
<result property="saleOrderCode" column="sale_order_code" />
|
||||
<result property="productId" column="product_id" />
|
||||
<result property="productCode" column="product_code" />
|
||||
<result property="productName" column="product_name" />
|
||||
<result property="purchaseOrderId" column="purchase_order_id" />
|
||||
<result property="poNo" column="po_no" />
|
||||
<result property="materialId" column="material_id" />
|
||||
<result property="materialCode" column="material_code" />
|
||||
<result property="materialName" column="material_name" />
|
||||
<result property="bindAmount" column="bind_amount" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectMesOrderBindVo">
|
||||
select order_bind_id, safe_flag, sale_order_id, sale_order_code, product_id, product_code, product_name, purchase_order_id, po_no, material_id, material_code, material_name, bind_amount, remark, create_by, create_time, update_by, update_time from mes_order_bind
|
||||
</sql>
|
||||
|
||||
<select id="selectMesOrderBindList" parameterType="MesOrderBind" resultMap="MesOrderBindResult">
|
||||
<include refid="selectMesOrderBindVo"/>
|
||||
<where>
|
||||
<if test="safeFlag != null and safeFlag != ''"> and safe_flag = #{safeFlag}</if>
|
||||
<if test="saleOrderId != null "> and sale_order_id = #{saleOrderId}</if>
|
||||
<if test="saleOrderCode != null and saleOrderCode != ''"> and sale_order_code = #{saleOrderCode}</if>
|
||||
<if test="productId != null "> and product_id = #{productId}</if>
|
||||
<if test="productCode != null and productCode != ''"> and product_code = #{productCode}</if>
|
||||
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
|
||||
<if test="purchaseOrderId != null "> and purchase_order_id = #{purchaseOrderId}</if>
|
||||
<if test="poNo != null and poNo != ''"> and po_no = #{poNo}</if>
|
||||
<if test="materialId != null "> and material_id = #{materialId}</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="bindAmount != null "> and bind_amount = #{bindAmount}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectMesOrderBindByOrderBindId" parameterType="Long" resultMap="MesOrderBindResult">
|
||||
<include refid="selectMesOrderBindVo"/>
|
||||
where order_bind_id = #{orderBindId}
|
||||
</select>
|
||||
|
||||
<insert id="insertMesOrderBind" parameterType="MesOrderBind" useGeneratedKeys="true" keyProperty="orderBindId">
|
||||
insert into mes_order_bind
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="safeFlag != null and safeFlag != ''">safe_flag,</if>
|
||||
<if test="saleOrderId != null">sale_order_id,</if>
|
||||
<if test="saleOrderCode != null">sale_order_code,</if>
|
||||
<if test="productId != null">product_id,</if>
|
||||
<if test="productCode != null">product_code,</if>
|
||||
<if test="productName != null">product_name,</if>
|
||||
<if test="purchaseOrderId != null">purchase_order_id,</if>
|
||||
<if test="poNo != null">po_no,</if>
|
||||
<if test="materialId != null">material_id,</if>
|
||||
<if test="materialCode != null">material_code,</if>
|
||||
<if test="materialName != null">material_name,</if>
|
||||
<if test="bindAmount != null">bind_amount,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="safeFlag != null and safeFlag != ''">#{safeFlag},</if>
|
||||
<if test="saleOrderId != null">#{saleOrderId},</if>
|
||||
<if test="saleOrderCode != null">#{saleOrderCode},</if>
|
||||
<if test="productId != null">#{productId},</if>
|
||||
<if test="productCode != null">#{productCode},</if>
|
||||
<if test="productName != null">#{productName},</if>
|
||||
<if test="purchaseOrderId != null">#{purchaseOrderId},</if>
|
||||
<if test="poNo != null">#{poNo},</if>
|
||||
<if test="materialId != null">#{materialId},</if>
|
||||
<if test="materialCode != null">#{materialCode},</if>
|
||||
<if test="materialName != null">#{materialName},</if>
|
||||
<if test="bindAmount != null">#{bindAmount},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateMesOrderBind" parameterType="MesOrderBind">
|
||||
update mes_order_bind
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="safeFlag != null and safeFlag != ''">safe_flag = #{safeFlag},</if>
|
||||
<if test="saleOrderId != null">sale_order_id = #{saleOrderId},</if>
|
||||
<if test="saleOrderCode != null">sale_order_code = #{saleOrderCode},</if>
|
||||
<if test="productId != null">product_id = #{productId},</if>
|
||||
<if test="productCode != null">product_code = #{productCode},</if>
|
||||
<if test="productName != null">product_name = #{productName},</if>
|
||||
<if test="purchaseOrderId != null">purchase_order_id = #{purchaseOrderId},</if>
|
||||
<if test="poNo != null">po_no = #{poNo},</if>
|
||||
<if test="materialId != null">material_id = #{materialId},</if>
|
||||
<if test="materialCode != null">material_code = #{materialCode},</if>
|
||||
<if test="materialName != null">material_name = #{materialName},</if>
|
||||
<if test="bindAmount != null">bind_amount = #{bindAmount},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where order_bind_id = #{orderBindId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteMesOrderBindByOrderBindId" parameterType="Long">
|
||||
delete from mes_order_bind where order_bind_id = #{orderBindId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteMesOrderBindByOrderBindIds" parameterType="String">
|
||||
delete from mes_order_bind where order_bind_id in
|
||||
<foreach item="orderBindId" collection="array" open="(" separator="," close=")">
|
||||
#{orderBindId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
Loading…
Reference in New Issue