廖井涛
2024-02-20 fa0f799ec8ade03779863ff5b3cce4c822a76f0d
编辑提交程序
1个文件已修改
6个文件已添加
502 ■■■■■ 已修改文件
north-glass-erp/.idea/dataSources.local.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/target/classes/mapper/sd/Delivery.xml 245 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/target/classes/mapper/sd/DeliveryDetail.xml 165 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/target/classes/mapper/sd/OrderGlassDetailMapper.xml 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/target/classes/mapper/sd/OrderProcessDetail.xml 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/target/classes/mapper/sd/ProductDetail.xml 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/target/classes/mapper/userInfo/SysError.xml 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/.idea/dataSources.local.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="dataSourceStorageLocal" created-in="IU-232.9559.62">
  <component name="dataSourceStorageLocal" created-in="IU-232.8660.185">
    <data-source name="@localhost [2]" uuid="165c5447-d19a-4aaf-af5f-cee92ae696c2">
      <database-info product="MySQL" version="8.0.22" jdbc-version="4.2" driver-name="MySQL Connector/J" driver-version="mysql-connector-java-8.0.25 (Revision: 08be9e9b4cba6aa115f9b27b215887af40b159e0)" dbms="MYSQL" exact-version="8.0.22" exact-driver-version="8.0">
        <extra-name-characters>#@</extra-name-characters>
north-glass-erp/target/classes/mapper/sd/Delivery.xml
New file
@@ -0,0 +1,245 @@
<?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.example.erp.mapper.sd.DeliveryMapper">
    <resultMap id="selectOrderInventory" type="com.example.erp.entity.sd.Order">
        <result column="create_order" property="createOrder"/>
        <result column="process_review" property="processReview"/>
        <result column="order_review" property="orderReview"/>
        <result column="production_order" property="productionOrder"/>
        <result column="processing_card" property="processingCard"/>
        <result column="warehousing" property="warehousing"/>
        <result column="delivery" property="delivery"/>
        <result column="order_id" property="orderId"/>
        <result column="customer_id" property="customerId"/>
        <result column="customer_name" property="customerName"/>
        <result column="quantity" property="quantity"/>
        <result column="project" property="project"/>
        <result column="batch" property="batch"/>
        <result column="money" property="money"/>
        <result column="area" property="area"/>
        <result column="create_time" property="createTime"/>
        <result column="pack_type" property="packType"/>
        <result column="order_type" property="orderType"/>
        <result column="creator" property="creator"/>
        <result column="quantity_available" property="finishedGoodsInventory.quantityAvailable"/>
    </resultMap>
    <update id="updatedelivery">
        update sd.delivery set area=#{area},quantity=#{quantity},money=#{money} where delivery_id=#{oddNumber}
    </update>
    <select id="getmaximum" >
        select count(*) from sd.delivery where  date(create_time)=CURDATE()
    </select>
    <insert id="insertDelivery"  useGeneratedKeys="true" >
        insert into sd.delivery(delivery_state,stock_state,delivery_id,order_id,project,customer_id,customer_name,
            delivery_date,pay_method,pay_date,salesman_id,salesman,creator_id,creator,contacts,contact_number,delivery_address,
                                area,quantity,money,remarks,create_time)
        values (
                   0,0,#{number} ,#{orderId},#{delivery.project},#{delivery.customerId},#{delivery.customerName},#{delivery.deliveryDate},#{delivery.payMethod},
                #{delivery.payDate},#{delivery.salesmanId},#{delivery.salesman},#{delivery.creatorId},#{delivery.creator},#{delivery.contacts},#{delivery.contactNumber},#{delivery.deliveryAddress},
                   0,0,0,#{delivery.remarks},now()
               )
    </insert>
    <select id="getSelectOrderInventory" resultMap="selectOrderInventory">
        select o.create_order,
        o.process_review,
        o.order_review,
        o.production_order,
        o.processing_card,
        o.warehousing,
        o.delivery,
        o.order_id,
        o.customer_id,
        o.customer_name,
        o.quantity,
        sum(fgi.quantity_available) as quantity_available,
        o.project,
        o.batch,
        o.money,
        o.area,
        o.create_time,
        o.pack_type,
        o.order_type,
        o.creator
        from sd.`order` o
        left join mm.finished_goods_inventory fgi on o.order_id = fgi.order_id
        <where>
            fgi.quantity_available > 0
            <if test="order.orderId != null and order.orderId != ''">
                and o.order_id REGEXP #{order.orderId}
            </if>
            <if test="order.customerId != null and order.customerId != ''">
                and o.customer_id REGEXP #{order.customerId}
            </if>
            <if test="order.customerName != null and order.customerName != ''">
                and o.customer_name REGEXP #{order.customerName}
            </if>
            <if test="order.quantity != null and order.quantity != ''">
                and o.quantity REGEXP #{order.quantity}
            </if>
            <if test="order.project != null and order.project != ''">
                and o.project REGEXP #{order.project}
            </if>
            <if test="order.batch != null and order.batch != ''">
                and o.batch REGEXP #{order.batch}
            </if>
            <if test="order.money != null and order.money != ''">
                and o.money REGEXP #{order.money}
            </if>
            <if test="order.area != null and order.area != ''">
                and o.area REGEXP #{order.area}
            </if>
            <if test="order.packType != null and order.packType != ''">
                and o.pack_type REGEXP #{order.packType}
            </if>
            <if test="order.orderType != null and order.orderType != ''">
                and o.order_type REGEXP #{order.orderType}
            </if>
            <if test="order.creator != null and order.creator != ''">
                and o.creator REGEXP #{order.creator}
            </if>
            <if test="order.createTime != null and order.createTime != ''">
                and o.create_time REGEXP #{order.createTime}
            </if>
            <if test="order.finishedGoodsInventory.quantityAvailable != null and order.finishedGoodsInventory.quantityAvailable != ''">
                and fgi.quantity_available REGEXP #{order.finishedGoodsInventory.quantityAvailable}
            </if>
        </where>
        group by o.order_id
        limit #{offset},#{pageSize};
    </select>
    <select id="getSelectOrderInventoryPageTotal" >
        select CEILING(count(zu.order_id)/#{pageSize}) from
        (select o.create_order,o.process_review,o.order_review,o.production_order,
        o.processing_card,o.warehousing,o.delivery,o.order_id,o.customer_id,
        o.customer_name,o.quantity,sum(fgi.quantity_available),o.project,o.batch,
        o.money,o.area,o.create_time,o.pack_type,o.order_type,o.creator
        from sd.`order` o left join mm.finished_goods_inventory fgi on o.order_id=fgi.order_id
        <where>
            fgi.quantity_available > 0
            <if test="order.orderId != null and order.orderId != ''">
                and o.order_id REGEXP #{order.orderId}
            </if>
            <if test="order.customerId != null and order.customerId != ''">
                and o.customer_id REGEXP #{order.customerId}
            </if>
            <if test="order.customerName != null and order.customerName != ''">
                and o.customer_name REGEXP #{order.customerName}
            </if>
            <if test="order.quantity != null and order.quantity != ''">
                and o.quantity REGEXP #{order.quantity}
            </if>
            <if test="order.project != null and order.project != ''">
                and o.project REGEXP #{order.project}
            </if>
            <if test="order.batch != null and order.batch != ''">
                and o.batch REGEXP #{order.batch}
            </if>
            <if test="order.money != null and order.money != ''">
                and o.money REGEXP #{order.money}
            </if>
            <if test="order.area != null and order.area != ''">
                and o.area REGEXP #{order.area}
            </if>
            <if test="order.packType != null and order.packType != ''">
                and o.pack_type REGEXP #{order.packType}
            </if>
            <if test="order.orderType != null and order.orderType != ''">
                and o.order_type REGEXP #{order.orderType}
            </if>
            <if test="order.creator != null and order.creator != ''">
                and o.creator REGEXP #{order.creator}
            </if>
            <if test="order.createTime != null and order.createTime != ''">
                and o.create_time REGEXP #{order.createTime}
            </if>
            <if test="order.finishedGoodsInventory.quantityAvailable != null and order.finishedGoodsInventory.quantityAvailable != ''">
                and fgi.quantity_available REGEXP #{order.finishedGoodsInventory.quantityAvailable}
            </if>
        </where>
        group by o.order_id) as zu
        limit #{offset},#{pageSize};
    </select>
    <select id="getseletShippingOrderDetaildelivery" >
        select
        d.customer_id,d.customer_name,d.project,d.pay_method,d.pay_date,d.contacts,d.contact_number,
        d.delivery_address,d.remarks,d.create_time,d.delivery_date,d.creator,d.salesman,d.salesman_id
        from sd.delivery d
        <where>
            <if test="orderDetail.deliveryDetail.deliveryId != null and orderDetail.deliveryDetail.deliveryId != ''">
                and d.delivery_id regexp #{orderDetail.deliveryDetail.deliveryId}
            </if>
        </where>
        limit 0,1
    </select>
    <select id="getseletShippingOrderDetaildeliverys" >
        select customer_id,customer_name,project,salesman,salesman_id from sd.`order`
        <where>
            <if test="orderDetail.orderId != null and orderDetail.orderId != ''">
                and order_id regexp #{orderDetail.orderId}
            </if>
         </where>
        limit 0,1
    </select>
    <select id="getseletShippingOrder">
        select * from sd.delivery d
        <where>
            <if test="delivery.deliveryId != null and delivery.deliveryId != ''">
                and d.delivery_id regexp #{delivery.deliveryId}
            </if>
            <if test="delivery.creator != null and delivery.creator != ''">
                and d.creator regexp #{delivery.creator}
            </if>
            <if test="delivery.deliveryDate != null and delivery.deliveryDate != ''">
                and d.delivery_date regexp #{delivery.deliveryDate}
            </if>
            <if test="delivery.customerId != null and delivery.customerId != ''">
                and d.customer_id regexp #{delivery.customerId}
            </if>
            <if test="delivery.customerName != null and delivery.customerName != ''">
                and d.customer_name regexp #{delivery.customerName}
            </if>
            <if test="delivery.project != null and delivery.project != ''">
                and d.project regexp #{delivery.project}
            </if>
            <if test="delivery.orderId != null and delivery.orderId != ''">
                and d.order_id regexp #{delivery.orderId}
            </if>
            <if test="delivery.payMethod != null and delivery.payMethod != ''">
                and d.pay_method regexp #{delivery.payMethod}
            </if>
            <if test="delivery.quantity != null and delivery.quantity != ''">
                and d.quantity regexp #{delivery.quantity}
            </if>
            <if test="delivery.area != null and delivery.area != ''">
                and d.area regexp #{delivery.area}
            </if>
        </where>
    </select>
    <select id="getseletShippingOrderPageTotal">
        select
            CEILING(count(id)/#{pageSize})
        from sd.delivery
</select>
</mapper>
north-glass-erp/target/classes/mapper/sd/DeliveryDetail.xml
New file
@@ -0,0 +1,165 @@
<?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.example.erp.mapper.sd.DeliveryDetailMapper">
    <resultMap id="selectDeliveryFinishedGoodsInventoryOrderDetail" type="com.example.erp.entity.sd.OrderDetail">
        <result column="order_id" property="orderId"/>
        <result column="order_number" property="orderNumber"/>
        <result column="o_quantity" property="quantity"/>
        <result column="building_number" property="buildingNumber"/>
        <result column="product_name" property="productName"/>
        <result column="product_id" property="productId"/>
        <result column="price" property="price"/>
        <result column="width" property="width"/>
        <result column="height" property="height"/>
        <result column="shape" property="shape"/>
        <result column="gross_area" property="grossArea"/>
        <result column="compute_area" property="computeArea"/>
        <result column="compute_gross_area" property="computeGrossArea"/>
        <result column="processing_note" property="processingNote"/>
        <result column="edging_type" property="edgingType"/>
        <result column="perimeter" property="perimeter"/>
        <result column="delivery_num" property="deliveryNum"/>
        <result column="delivery_id" property="deliveryDetail.deliveryid"/>
        <result column="d_quantity" property="deliveryDetail.quantity"/>
        <result column="money" property="deliveryDetail.money"/>
        <result column="delivery_detail_remakes" property="deliveryDetail.deliveryDetailRemakes"/>
        <result column="batch" property="order.batch"/>
        <result column="t_quantity" property="order.quantity"/>
        <result column="customer_id" property="delivery.customerId"/>
        <result column="customer_name" property="delivery.customerName"/>
        <result column="project" property="delivery.project"/>
        <result column="pay_method" property="delivery.payMethod"/>
        <result column="pay_date" property="delivery.payDate"/>
        <result column="contacts" property="delivery.contacts"/>
        <result column="contact_number" property="delivery.contactNumber"/>
        <result column="delivery_address" property="delivery.deliveryAddress"/>
        <result column="remarks" property="delivery.remarks"/>
        <result column="create_time" property="delivery.createTime"/>
        <result column="delivery_date" property="delivery.deliveryDate"/>
        <result column="creator" property="delivery.creator"/>
        <result column="quantity_available" property="finishedGoodsInventory.quantityAvailable"/>
        <result column="storage_region" property="finishedGoodsInventory.storageRegion"/>
        <result column="actual_signal_area" property="finishedGoodsInventory.actualSignalArea"/>
    </resultMap>
    <update id="updateOrderDetailDeliveryNum">
        update sd.order_detail set delivery_num=#{finishedGoodsInventory.quantityAvailable} where order_id=#{orderId} and order_number=#{orderNumber}
    </update>
    <select id="getdeliveryDetailmaximum" >
        select count(*) from sd.delivery_detail where  delivery_id=#{deliveryId}
    </select>
    <insert id="insertDeliveryDetail"  useGeneratedKeys="true" >
        insert into sd.delivery_detail (delivery_id,delivery_number,order_number,
                                        area,order_id,quantity,money,delivery_detail_remakes,delivery_detail_state,create_time)
        values (
                   #{number} ,#{deliveryNumber},#{orderDetail.orderNumber},#{orderDetail.computeGrossArea},
                #{orderDetail.orderId},#{orderDetail.finishedGoodsInventory.quantityAvailable},
                #{orderDetail.price}*#{orderDetail.finishedGoodsInventory.quantityAvailable},'',1,now()
               )
    </insert>
    <select id="getseletShippingOrderDetail" resultMap="selectDeliveryFinishedGoodsInventoryOrderDetail">
        select od.order_id,o.batch,fgi.quantity_available,od.quantity-dd.quantity as t_quantity,od.quantity as o_quantity,dd.quantity
        as d_quantity,od.building_number,od.product_id,od.product_name,od.price,fgi.storage_region,dd.money,od.width,
        od.height,od.shape,fgi.actual_signal_area,od.gross_area,od.compute_area,od.compute_gross_area,
        od.processing_note,od.edging_type,od.perimeter,dd.delivery_detail_remakes
        from sd.delivery_detail dd
        left join sd.delivery d on dd.delivery_id=d.delivery_id
        left join sd.order_detail od on dd.order_id=od.order_id and dd.order_number=od.order_number
        left join sd.`order` o on dd.order_id=o.order_id
        left join mm.finished_goods_inventory fgi on dd.order_id=fgi.order_id and dd.order_number=fgi.order_number
        <where>
            <if test="orderDetail.deliveryDetail.deliveryId != null and orderDetail.deliveryDetail.deliveryId != ''">
                and dd.delivery_id regexp #{orderDetail.deliveryDetail.deliveryId}
            </if>
        </where>
        limit #{offset},#{pageSize};
    </select>
    <select id="getseletShippingOrderDetailPageTotal">
        select
            CEILING(count(dd.id)/#{pageSize})
        from sd.delivery_detail dd
                 left join sd.delivery d on dd.delivery_id=d.delivery_id
                 left join sd.order_detail od on dd.order_id=od.order_id and dd.order_number=od.order_number
                 left join sd.`order` o on dd.order_id=o.order_id
                 left join mm.finished_goods_inventory fgi on dd.order_id=fgi.order_id and dd.order_number=fgi.order_number
        <where>
            <if test="orderDetail.deliveryDetail.deliveryId != null and orderDetail.deliveryDetail.deliveryId != ''">
                and dd.delivery_id regexp #{orderDetail.deliveryDetail.deliveryId}
            </if>
        </where>
        limit #{offset},#{pageSize};
    </select>
    <select id="getseletShippingOrderDetails" resultMap="selectDeliveryFinishedGoodsInventoryOrderDetail">
        select od.order_id,
               od.order_number,
               o.batch,
               fgi.quantity_available,
               od.quantity- od.delivery_num as t_quantity,
               od.quantity as o_quantity,
               od.delivery_num as d_quantity,
               od.building_number,
               od.product_id,
               od.product_name,
               od.price,
               fgi.storage_region,
               od.width,
               od.height,
               od.shape,
               fgi.actual_signal_area,
               od.gross_area,
               od.compute_area,
               od.compute_gross_area,
               od.processing_note,
               od.edging_type,
               od.perimeter
        from sd.order_detail od
                 left join sd.`order` o on od.order_id = o.order_id
                 left join mm.finished_goods_inventory fgi
                 on od.order_id = fgi.order_id and od.order_number = fgi.order_number
        <where>
            fgi.quantity_available > 0 and od.quantity > od.delivery_num
            <if test="orderDetail.orderId != null and orderDetail.orderId != ''">
                and od.order_id regexp #{orderDetail.orderId}
            </if>
        </where>
        limit #{offset},#{pageSize};
    </select>
    <select id="getseletShippingOrderDetailsPageTotal">
        select
        CEILING(count(od.id)/#{pageSize})
        from sd.order_detail od
        left join sd.`order` o on od.order_id = o.order_id
        left join mm.finished_goods_inventory fgi
        on od.order_id = fgi.order_id and od.order_number = fgi.order_number
        <where>
            fgi.quantity_available > 0 and od.quantity > od.delivery_num
            <if test="orderDetail.orderId != null and orderDetail.orderId != ''">
                and od.order_id regexp #{orderDetail.orderId}
            </if>
        </where>
        limit #{offset},#{pageSize};
    </select>
</mapper>
north-glass-erp/target/classes/mapper/sd/OrderGlassDetailMapper.xml
New file
@@ -0,0 +1,41 @@
<?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.example.erp.mapper.sd.OrderGlassDetailMapper">
    <insert id="insertOrderGlassDetail" parameterType="java.lang.String">
        insert into
            order_glass_detail (
            order_id, order_number,
            technology_number,
            glass_address,
            glass_child,
            child_width,
            child_height,
            process,
            `group`)
        select
            od.order_id,
            od.order_number,
            pd.glass_sort,
            if(pd.glass_sort=1,'(外)',if(pd2.glass_sort=pd.glass_sort,'(内)','')),
            pd.detail,
            od.width,
            od.height,
            pd.process,
            pd.glass_group
        from sd.product_detail as pd
        left join order_detail as od
            on od.product_id = pd.prod_id and pd.detail_type='glass'
        LEFT JOIN (SELECT max(id) as id ,max(glass_sort) as glass_sort  from product_detail GROUP BY prod_id)as pd2
            on pd2.id=pd.id
        where od.order_id = #{orderId}
        ORDER BY od.order_number
    </insert>
    <select id="selectOrderGlassDetail">
        select * from order_glass_detail where order_id = #{orderId}
    </select>
</mapper>
north-glass-erp/target/classes/mapper/sd/OrderProcessDetail.xml
New file
@@ -0,0 +1,28 @@
<?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.example.erp.mapper.sd.OrderProcessDetailMapper">
    <insert id="insertOrderProcessDetail" >
        insert into
            order_process_detail(
                order_id,
                order_number,
                technology_number,
                process
            )
        values
        <foreach collection ="processDetailList" item="processDetail" separator =",">
            (
             #{processDetail.orderId},
             #{processDetail.orderNumber},
             #{processDetail.technologyNumber},
             #{processDetail.process}
             )
        </foreach>
    </insert>
</mapper>
north-glass-erp/target/classes/mapper/sd/ProductDetail.xml
New file
@@ -0,0 +1,9 @@
<?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.example.erp.mapper.sd.ProductDetailMapper">
    <select id="getGlassDetailList">
        select * from product_detail where prod_id = #{productId} and detail_type = 'glass'
    </select>
</mapper>
north-glass-erp/target/classes/mapper/userInfo/SysError.xml
New file
@@ -0,0 +1,12 @@
<?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.example.erp.mapper.userInfo.SysErrorMapper">
    <insert id="saveError">
        insert into erp_user_info.sys_error( func, error)
        values
        (#{sysError.func}, #{sysError.error})
    </insert>
</mapper>