| New file | 
 |  |  | 
 |  |  | SELECT SUM | 
 |  |  |        ( asrsQty ) asrsQty, | 
 |  |  |        SUM ( erpQty ) erpQty, | 
 |  |  |        matnr, | 
 |  |  |        specs, | 
 |  |  |        maktx | 
 |  |  | FROM | 
 |  |  |     ( | 
 |  |  |         SELECT CAST | 
 |  |  |                ( SUM ( qty ) AS INT ) asrsQty, | 
 |  |  |                0 AS erpQty, | 
 |  |  |                matnr, | 
 |  |  |                specs, | 
 |  |  |                maktx | 
 |  |  |         FROM | 
 |  |  |             asr_loc_detl | 
 |  |  |         GROUP BY | 
 |  |  |             matnr, | 
 |  |  |             specs, | 
 |  |  |             maktx UNION ALL | 
 |  |  |         SELECT | 
 |  |  |             0, | 
 |  |  |             CAST ( SUM ( numis ) AS INT ), | 
 |  |  |             itemid, | 
 |  |  |             itemcode, | 
 |  |  |             itemname | 
 |  |  |         FROM | 
 |  |  |             ( | 
 |  |  |                 SELECT | 
 |  |  |                     * | 
 |  |  |                 FROM | 
 |  |  |                     OPENROWSET ( 'SQLOLEDB', '192.168.1.147,1800'; 'XGMLK'; 'xunda0413', XDLinkLK.dbo.vwErpLKStorage ) | 
 |  |  |         WHERE | 
 |  |  |             LKName = '中扬'  | 
 |  |  |         ) a  | 
 |  |  |     GROUP BY | 
 |  |  |         itemid, | 
 |  |  |         itemcode, | 
 |  |  |         itemname  | 
 |  |  |     ) b WHERE 1=1 and matnr not in (select matnr from man_order_detl) | 
 |  |  | GROUP BY | 
 |  |  |     matnr, | 
 |  |  |     specs, | 
 |  |  |     maktx | 
 
 |  |  | 
 |  |  | spring: | 
 |  |  |   profiles: | 
 |  |  |     active: mac | 
 |  |  |     active: win | 
 
 |  |  | 
 |  |  |         SELECT * FROM( | 
 |  |  |         SELECT ROW_NUMBER ( ) OVER ( ORDER BY d.matnr ) AS row, * FROM ( | 
 |  |  |         SELECT * FROM asr_show_diff WHERE 1 = 1 | 
 |  |  |         <if test="different != null and different "> | 
 |  |  |             and asrsQty = erpQty | 
 |  |  |         <if test="different != null and different == 1 "> | 
 |  |  |             and asrsQty != erpQty | 
 |  |  |         </if> | 
 |  |  |         <if test="different != null and different == 0 "> | 
 |  |  |             and asrsQty == erpQty | 
 |  |  |         </if> | 
 |  |  |         <if test="matnr != null"> | 
 |  |  |             AND matnr like #{matnr} | 
 |  |  | 
 |  |  |         </if> | 
 |  |  |         ) d ) e WHERE  1=1  and e.row between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize}) | 
 |  |  |     </select> | 
 |  |  |  | 
 |  |  |     <select id="asrsAndErpCount" resultType="java.lang.Long"> | 
 |  |  |         SELECT count(*) FROM asr_show_diff WHERE 1 = 1 and asrsQty != erpQty | 
 |  |  |         <if test="matnr != null"> | 
 
 |  |  | 
 |  |  |     </div> | 
 |  |  |     <div class="layui-inline"> | 
 |  |  |         <div class="layui-input-inline"> | 
 |  |  |             <input name="different" type="checkbox" lay-skin="switch" value="true" lay-text="显示差异|显示全部" lay-filter="different" > | 
 |  |  |             <input name="different" type="radio" value="0" title="显示全部" checked> | 
 |  |  |             <input name="different" type="radio" value="1" title="显示差异"> | 
 |  |  |  | 
 |  |  |         </div> | 
 |  |  |     </div> | 
 |  |  |     <!-- 待添加 --> | 
 |  |  | 
 |  |  |         </button> | 
 |  |  |         <button id="reset" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="reset">重置 | 
 |  |  |         </button> | 
 |  |  |  | 
 |  |  |     </div> | 
 |  |  | <!--    <div class="layui-inline">--> | 
 |  |  | <!--        <fieldset class="layui-elem-field">--> |