|  |  |  | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @RequestMapping("/stock/default/v1") | 
|---|
|  |  |  | public R queryStock(@RequestHeader(required = false) String appkey, | 
|---|
|  |  |  | @RequestParam("matnr") String matnr, | 
|---|
|  |  |  | @RequestParam("batch") String batch, | 
|---|
|  |  |  | HttpServletRequest request) { | 
|---|
|  |  |  | auth(appkey, null, request); | 
|---|
|  |  |  | return R.ok().add(openService.queryStock()); | 
|---|
|  |  |  | 
|---|
|  |  |  | count(anfme) as count | 
|---|
|  |  |  | from asr_loc_detl | 
|---|
|  |  |  | where 1=1 | 
|---|
|  |  |  | <if test="batch != null and batch != ''"> | 
|---|
|  |  |  | and batch = #{batch} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="matnr != null and matnr != ''"> | 
|---|
|  |  |  | and matnr = #{matnr} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | group by matnr,batch | 
|---|
|  |  |  | </select> | 
|---|
|  |  |  | <select id="sum" resultType="java.lang.Integer"> | 
|---|