Browse Source
委外加工 委外订单、领料、入库 修改添加委外订单、领料和入库页面,补全出入库所需字段; 去除委外订单mapper中子表相关; 新增委外订单子表mapper; 修改委外订单controller,审核通过后生成应付账款记录; 新增委外订单根据子表生成应付账款记录service方法; 修改委外领料service,补全出库单字段;dev
王晓迪
2 months ago
18 changed files with 403 additions and 124 deletions
@ -0,0 +1,95 @@ |
|||
package com.ruoyi.system.mapper; |
|||
|
|||
import java.util.List; |
|||
import com.ruoyi.system.domain.OutsourceOrderDetail; |
|||
|
|||
/** |
|||
* 委外订单详情Mapper接口 |
|||
* |
|||
* @author ruoyi |
|||
* @date 2024-09-24 |
|||
*/ |
|||
public interface OutsourceOrderDetailMapper |
|||
{ |
|||
/** |
|||
* 查询委外订单详情 |
|||
* |
|||
* @param outsourceOrderDetailId 委外订单详情ID |
|||
* @return 委外订单详情 |
|||
*/ |
|||
public OutsourceOrderDetail selectOutsourceOrderDetailById(Long outsourceOrderDetailId); |
|||
|
|||
/** |
|||
* 查询委外订单详情列表 |
|||
* |
|||
* @param outsourceOrderDetail 委外订单详情 |
|||
* @return 委外订单详情集合 |
|||
*/ |
|||
public List<OutsourceOrderDetail> selectOutsourceOrderDetailList(OutsourceOrderDetail outsourceOrderDetail); |
|||
|
|||
/** |
|||
* 新增委外订单详情 |
|||
* |
|||
* @param outsourceOrderDetail 委外订单详情 |
|||
* @return 结果 |
|||
*/ |
|||
public int insertOutsourceOrderDetail(OutsourceOrderDetail outsourceOrderDetail); |
|||
|
|||
/** |
|||
* 修改委外订单详情 |
|||
* |
|||
* @param outsourceOrderDetail 委外订单详情 |
|||
* @return 结果 |
|||
*/ |
|||
public int updateOutsourceOrderDetail(OutsourceOrderDetail outsourceOrderDetail); |
|||
|
|||
/** |
|||
* 删除委外订单详情 |
|||
* |
|||
* @param outsourceOrderDetailId 委外订单详情ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteOutsourceOrderDetailById(Long outsourceOrderDetailId); |
|||
|
|||
/** |
|||
* 批量删除委外订单详情 |
|||
* |
|||
* @param outsourceOrderDetailIds 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteOutsourceOrderDetailByIds(String[] outsourceOrderDetailIds); |
|||
|
|||
/** |
|||
* 作废委外订单详情 |
|||
* |
|||
* @param outsourceOrderDetailId 委外订单详情ID |
|||
* @return 结果 |
|||
*/ |
|||
public int cancelOutsourceOrderDetailById(Long outsourceOrderDetailId); |
|||
|
|||
/** |
|||
* 恢复委外订单详情 |
|||
* |
|||
* @param outsourceOrderDetailId 委外订单详情ID |
|||
* @return 结果 |
|||
*/ |
|||
public int restoreOutsourceOrderDetailById(Long outsourceOrderDetailId); |
|||
|
|||
/** |
|||
* 批量新增委外订单详情 |
|||
* |
|||
* @param outsourceOrderDetailList 委外订单详情列表 |
|||
* @return 结果 |
|||
*/ |
|||
public int batchOutsourceOrderDetail(List<OutsourceOrderDetail> outsourceOrderDetailList); |
|||
|
|||
/** |
|||
* 通过委外订单主键删除委外订单详情信息 |
|||
* |
|||
* @param outsourceOrderNo 委外订单ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteOutsourceOrderDetailByOutsourceOrderNo(String outsourceOrderNo); |
|||
|
|||
public int deleteOutsourceOrderDetailByOutsourceOrderNos(String[] outsourceOrderNos); |
|||
} |
@ -0,0 +1,167 @@ |
|||
<?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.ruoyi.system.mapper.OutsourceOrderDetailMapper"> |
|||
|
|||
<resultMap type="OutsourceOrderDetail" id="OutsourceOrderDetailResult"> |
|||
<result property="outsourceOrderDetailId" column="outsource_order_detail_id" /> |
|||
<result property="outsourceOrderNo" column="outsource_order_no" /> |
|||
<result property="materialNo" column="material_no" /> |
|||
<result property="outsourceProcessNo" column="outsource_process_no" /> |
|||
<result property="outsourceProcessName" column="outsource_process_name" /> |
|||
<result property="chargeUnit" column="charge_unit" /> |
|||
<result property="singleMaterial" column="single_material" /> |
|||
<result property="deliveryTime" column="delivery_time" /> |
|||
<result property="actualOutsourceAmount" column="actual_outsource_amount" /> |
|||
<result property="materialRmb" column="material_rmb" /> |
|||
<result property="materialNoRmb" column="material_no_rmb" /> |
|||
<result property="supplierCode" column="supplier_code" /> |
|||
<result property="supplierName" column="supplier_name" /> |
|||
<result property="closedStatus" column="closed_status" /> |
|||
<result property="remitStatus" column="remit_status" /> |
|||
<result property="rmbSum" column="rmb_sum" /> |
|||
<result property="noRmbSum" column="no_rmb_sum" /> |
|||
<result property="correlationCodes" column="correlation_codes" /> |
|||
<result property="plannedOutsourceAmount" column="planned_outsource_amount" /> |
|||
</resultMap> |
|||
|
|||
<sql id="selectOutsourceOrderDetailVo"> |
|||
select outsource_order_detail_id, outsource_order_no, material_no, outsource_process_no, outsource_process_name, charge_unit, single_material, delivery_time, actual_outsource_amount, material_rmb, material_no_rmb, supplier_code, supplier_name, closed_status, remit_status, rmb_sum, no_rmb_sum, correlation_codes, planned_outsource_amount from outsource_order_detail |
|||
</sql> |
|||
|
|||
<select id="selectOutsourceOrderDetailList" parameterType="OutsourceOrderDetail" resultMap="OutsourceOrderDetailResult"> |
|||
<include refid="selectOutsourceOrderDetailVo"/> |
|||
<where> |
|||
<if test="outsourceOrderNo != null and outsourceOrderNo != ''"> and outsource_order_no = #{outsourceOrderNo}</if> |
|||
<if test="materialNo != null and materialNo != ''"> and material_no = #{materialNo}</if> |
|||
<if test="outsourceProcessNo != null and outsourceProcessNo != ''"> and outsource_process_no = #{outsourceProcessNo}</if> |
|||
<if test="outsourceProcessName != null and outsourceProcessName != ''"> and outsource_process_name like concat('%', #{outsourceProcessName}, '%')</if> |
|||
<if test="chargeUnit != null and chargeUnit != ''"> and charge_unit = #{chargeUnit}</if> |
|||
<if test="singleMaterial != null "> and single_material = #{singleMaterial}</if> |
|||
<if test="deliveryTime != null and deliveryTime != ''"> and delivery_time = #{deliveryTime}</if> |
|||
<if test="actualOutsourceAmount != null "> and actual_outsource_amount = #{actualOutsourceAmount}</if> |
|||
<if test="materialRmb != null "> and material_rmb = #{materialRmb}</if> |
|||
<if test="materialNoRmb != null "> and material_no_rmb = #{materialNoRmb}</if> |
|||
<if test="supplierCode != null and supplierCode != ''"> and supplier_code = #{supplierCode}</if> |
|||
<if test="supplierName != null and supplierName != ''"> and supplier_name like concat('%', #{supplierName}, '%')</if> |
|||
<if test="closedStatus != null and closedStatus != ''"> and closed_status = #{closedStatus}</if> |
|||
<if test="remitStatus != null and remitStatus != ''"> and remit_status = #{remitStatus}</if> |
|||
<if test="rmbSum != null "> and rmb_sum = #{rmbSum}</if> |
|||
<if test="noRmbSum != null "> and no_rmb_sum = #{noRmbSum}</if> |
|||
<if test="correlationCodes != null and correlationCodes != ''"> and correlation_codes = #{correlationCodes}</if> |
|||
<if test="plannedOutsourceAmount != null "> and planned_outsource_amount = #{plannedOutsourceAmount}</if> |
|||
</where> |
|||
</select> |
|||
|
|||
<select id="selectOutsourceOrderDetailById" parameterType="Long" resultMap="OutsourceOrderDetailResult"> |
|||
<include refid="selectOutsourceOrderDetailVo"/> |
|||
where outsource_order_detail_id = #{outsourceOrderDetailId} |
|||
</select> |
|||
|
|||
<insert id="insertOutsourceOrderDetail" parameterType="OutsourceOrderDetail" useGeneratedKeys="true" keyProperty="outsourceOrderDetailId"> |
|||
insert into outsource_order_detail |
|||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|||
<if test="outsourceOrderNo != null and outsourceOrderNo != ''">outsource_order_no,</if> |
|||
<if test="materialNo != null and materialNo != ''">material_no,</if> |
|||
<if test="outsourceProcessNo != null and outsourceProcessNo != ''">outsource_process_no,</if> |
|||
<if test="outsourceProcessName != null">outsource_process_name,</if> |
|||
<if test="chargeUnit != null">charge_unit,</if> |
|||
<if test="singleMaterial != null">single_material,</if> |
|||
<if test="deliveryTime != null">delivery_time,</if> |
|||
<if test="actualOutsourceAmount != null">actual_outsource_amount,</if> |
|||
<if test="materialRmb != null">material_rmb,</if> |
|||
<if test="materialNoRmb != null">material_no_rmb,</if> |
|||
<if test="supplierCode != null">supplier_code,</if> |
|||
<if test="supplierName != null">supplier_name,</if> |
|||
<if test="closedStatus != null">closed_status,</if> |
|||
<if test="remitStatus != null">remit_status,</if> |
|||
<if test="rmbSum != null">rmb_sum,</if> |
|||
<if test="noRmbSum != null">no_rmb_sum,</if> |
|||
<if test="correlationCodes != null">correlation_codes,</if> |
|||
<if test="plannedOutsourceAmount != null">planned_outsource_amount,</if> |
|||
</trim> |
|||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|||
<if test="outsourceOrderNo != null and outsourceOrderNo != ''">#{outsourceOrderNo},</if> |
|||
<if test="materialNo != null and materialNo != ''">#{materialNo},</if> |
|||
<if test="outsourceProcessNo != null and outsourceProcessNo != ''">#{outsourceProcessNo},</if> |
|||
<if test="outsourceProcessName != null">#{outsourceProcessName},</if> |
|||
<if test="chargeUnit != null">#{chargeUnit},</if> |
|||
<if test="singleMaterial != null">#{singleMaterial},</if> |
|||
<if test="deliveryTime != null">#{deliveryTime},</if> |
|||
<if test="actualOutsourceAmount != null">#{actualOutsourceAmount},</if> |
|||
<if test="materialRmb != null">#{materialRmb},</if> |
|||
<if test="materialNoRmb != null">#{materialNoRmb},</if> |
|||
<if test="supplierCode != null">#{supplierCode},</if> |
|||
<if test="supplierName != null">#{supplierName},</if> |
|||
<if test="closedStatus != null">#{closedStatus},</if> |
|||
<if test="remitStatus != null">#{remitStatus},</if> |
|||
<if test="rmbSum != null">#{rmbSum},</if> |
|||
<if test="noRmbSum != null">#{noRmbSum},</if> |
|||
<if test="correlationCodes != null">#{correlationCodes},</if> |
|||
<if test="plannedOutsourceAmount != null">#{plannedOutsourceAmount},</if> |
|||
</trim> |
|||
</insert> |
|||
|
|||
<update id="updateOutsourceOrderDetail" parameterType="OutsourceOrderDetail"> |
|||
update outsource_order_detail |
|||
<trim prefix="SET" suffixOverrides=","> |
|||
<if test="outsourceOrderNo != null and outsourceOrderNo != ''">outsource_order_no = #{outsourceOrderNo},</if> |
|||
<if test="materialNo != null and materialNo != ''">material_no = #{materialNo},</if> |
|||
<if test="outsourceProcessNo != null and outsourceProcessNo != ''">outsource_process_no = #{outsourceProcessNo},</if> |
|||
<if test="outsourceProcessName != null">outsource_process_name = #{outsourceProcessName},</if> |
|||
<if test="chargeUnit != null">charge_unit = #{chargeUnit},</if> |
|||
<if test="singleMaterial != null">single_material = #{singleMaterial},</if> |
|||
<if test="deliveryTime != null">delivery_time = #{deliveryTime},</if> |
|||
<if test="actualOutsourceAmount != null">actual_outsource_amount = #{actualOutsourceAmount},</if> |
|||
<if test="materialRmb != null">material_rmb = #{materialRmb},</if> |
|||
<if test="materialNoRmb != null">material_no_rmb = #{materialNoRmb},</if> |
|||
<if test="supplierCode != null">supplier_code = #{supplierCode},</if> |
|||
<if test="supplierName != null">supplier_name = #{supplierName},</if> |
|||
<if test="closedStatus != null">closed_status = #{closedStatus},</if> |
|||
<if test="remitStatus != null">remit_status = #{remitStatus},</if> |
|||
<if test="rmbSum != null">rmb_sum = #{rmbSum},</if> |
|||
<if test="noRmbSum != null">no_rmb_sum = #{noRmbSum},</if> |
|||
<if test="correlationCodes != null">correlation_codes = #{correlationCodes},</if> |
|||
<if test="plannedOutsourceAmount != null">planned_outsource_amount = #{plannedOutsourceAmount},</if> |
|||
</trim> |
|||
where outsource_order_detail_id = #{outsourceOrderDetailId} |
|||
</update> |
|||
|
|||
<delete id="deleteOutsourceOrderDetailById" parameterType="Long"> |
|||
delete from outsource_order_detail where outsource_order_detail_id = #{outsourceOrderDetailId} |
|||
</delete> |
|||
|
|||
<delete id="deleteOutsourceOrderDetailByIds" parameterType="String"> |
|||
delete from outsource_order_detail where outsource_order_detail_id in |
|||
<foreach item="outsourceOrderDetailId" collection="array" open="(" separator="," close=")"> |
|||
#{outsourceOrderDetailId} |
|||
</foreach> |
|||
</delete> |
|||
|
|||
<update id="cancelOutsourceOrderDetailById" parameterType="Long"> |
|||
update outsource_order_detail set del_flag = '1' where outsource_order_detail_id = #{outsourceOrderDetailId} |
|||
</update> |
|||
|
|||
<update id="restoreOutsourceOrderDetailById" parameterType="Long"> |
|||
update outsource_order_detail set del_flag = '0' where outsource_order_detail_id = #{outsourceOrderDetailId} |
|||
</update> |
|||
|
|||
<delete id="deleteOutsourceOrderDetailByOutsourceOrderNos" parameterType="String"> |
|||
delete from outsource_order_detail where outsource_order_no in |
|||
<foreach item="outsourceOrderNo" collection="array" open="(" separator="," close=")"> |
|||
#{outsourceOrderNo} |
|||
</foreach> |
|||
</delete> |
|||
|
|||
<delete id="deleteOutsourceOrderDetailByOutsourceOrderNo" parameterType="String"> |
|||
delete from outsource_order_detail where outsource_order_no = #{outsourceOrderNo} |
|||
</delete> |
|||
|
|||
<insert id="batchOutsourceOrderDetail"> |
|||
insert into outsource_order_detail( outsource_order_detail_id, outsource_order_no, material_no, outsource_process_no, outsource_process_name, charge_unit, single_material, delivery_time, actual_outsource_amount, material_rmb, material_no_rmb, supplier_code, supplier_name, closed_status, remit_status, rmb_sum, no_rmb_sum, correlation_codes,planned_outsource_amount) values |
|||
<foreach item="item" index="index" collection="list" separator=","> |
|||
( #{item.outsourceOrderDetailId}, #{item.outsourceOrderNo}, #{item.materialNo}, #{item.outsourceProcessNo}, #{item.outsourceProcessName}, #{item.chargeUnit}, #{item.singleMaterial}, #{item.deliveryTime}, #{item.actualOutsourceAmount}, #{item.materialRmb}, #{item.materialNoRmb}, #{item.supplierCode}, #{item.supplierName}, #{item.closedStatus}, #{item.remitStatus}, #{item.rmbSum}, #{item.noRmbSum}, #{item.correlationCodes},#{item.plannedOutsourceAmount}) |
|||
</foreach> |
|||
</insert> |
|||
</mapper> |
Loading…
Reference in new issue