cl
6 天以前 9700e007ebb34750369452a72187f9c47b9ff1bb
rsf-server/src/main/resources/mapper/manager/WarehouseStockMapper.xml
@@ -2,29 +2,29 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.vincent.rsf.server.manager.mapper.WarehouseStockMapper">
    <select id="pageByStock" resultType="com.vincent.rsf.server.manager.entity.ViewStockManage">
        SELECT id,
               loc_id,
               loc_code,
               warehouse,
               type,
               order_item_id,
               wk_type,
               matnr_id,
               maktx,
               matnr_code,
               splr_id,
               unit,
               SUM(anfme)    anfme,
               SUM(qty)      qty,
               SUM(work_qty) work_qty,
               batch,
               spec,
               model,
               fields_index,
               update_by,
               create_by,
               update_time,
               create_time
        SELECT MAX(id)            AS id,
               MAX(loc_id)        AS loc_id,
               MAX(loc_code)      AS loc_code,
               MAX(warehouse)     AS warehouse,
               MAX(type)          AS type,
               MAX(order_item_id) AS order_item_id,
               MAX(wk_type)       AS wk_type,
               MAX(matnr_id)      AS matnr_id,
               MAX(maktx)         AS maktx,
               MAX(matnr_code)    AS matnr_code,
               MAX(splr_id)       AS splr_id,
               MAX(unit)          AS unit,
               SUM(anfme)         AS anfme,
               SUM(qty)           AS qty,
               SUM(work_qty)      AS work_qty,
               MAX(batch)         AS batch,
               MAX(spec)          AS spec,
               MAX(model)         AS model,
               MAX(fields_index)  AS fields_index,
               MAX(update_by)     AS update_by,
               MAX(create_by)     AS create_by,
               MAX(update_time)   AS update_time,
               MAX(create_time)   AS create_time
        FROM view_stock_manage
            ${ew.customSqlSegment}
    </select>