From d086af5559dba52095d23e425be87d8f11f24814 Mon Sep 17 00:00:00 2001 From: zjj <3272660260@qq.com> Date: 星期四, 17 七月 2025 16:32:47 +0800 Subject: [PATCH] #菜单、po单 --- rsf-server/src/main/resources/mapper/manager/LocItemMapper.xml | 79 ++++++++++++++------------------------- 1 files changed, 28 insertions(+), 51 deletions(-) diff --git a/rsf-server/src/main/resources/mapper/manager/LocItemMapper.xml b/rsf-server/src/main/resources/mapper/manager/LocItemMapper.xml index 852c4b5..bc18949 100644 --- a/rsf-server/src/main/resources/mapper/manager/LocItemMapper.xml +++ b/rsf-server/src/main/resources/mapper/manager/LocItemMapper.xml @@ -1,56 +1,33 @@ <?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.vincent.rsf.server.manager.mapper.LocItemMapper"> - - <select id="pageByStock" resultType="com.vincent.rsf.server.manager.entity.LocItem"> - SELECT * - FROM (SELECT id, - loc_id, - loc_code, - type, - order_item_id, - wk_type, - matnr_id, - maktx, - matnr_code, - 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 - FROM man_loc_item - GROUP BY matnr_id - UNION ALL - SELECT id, - '' AS loc_id, - '' AS loc_code, - type, - asn_item_id AS order_item_id, - wk_type, - matnr_id, - maktx, - matnr_code, - 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 - FROM man_warehouse_areas_item - GROUP BY matnr_id) t - ${ew.customSqlSegment} + <select id="listByMatnr" resultType="com.vincent.rsf.server.manager.entity.LocItem"> + SELECT + * + FROM + ( + SELECT + li.id, + li.loc_id, + li.loc_code, + l.barcode, + li.matnr_id, + li.matnr_code, + li.maktx, + li.batch, + li.unit, + SUM( li.anfme ) anfme, + li.fields_index + FROM + man_loc_item li + INNER JOIN man_loc l ON l.id = li.loc_id + WHERE l.use_status = #{type} + GROUP BY + loc_id, + matnr_id, + batch, + fields_index + )t + ${ew.customSqlSegment} </select> </mapper> -- Gitblit v1.9.1