| | |
| | | // @ManagerAuth |
| | | public void statisExport(HttpServletResponse response) throws IOException { |
| | | List<LocDetl> excel = LocDetlMapper.getStockStatisExcel(); |
| | | for (LocDetl locDetl : excel) { |
| | | Mat mat = matService.selectByMatnr(locDetl.getMatnr()); |
| | | if (mat != null) { |
| | | locDetl.sync(mat); |
| | | } |
| | | } |
| | | // for (LocDetl locDetl : excel) { |
| | | // Mat mat = matService.selectByMatnr(locDetl.getMatnr()); |
| | | // if (mat != null) { |
| | | // locDetl.sync(mat); |
| | | // } |
| | | // } |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | response.setCharacterEncoding("utf-8"); |
| | | String fileName = URLEncoder.encode("库存明细统计报表", "UTF-8"); |
| | |
| | | private String maktx; |
| | | |
| | | @ApiModelProperty(value= "规格") |
| | | @ExcelProperty("规格") |
| | | private String specs; |
| | | |
| | | @ApiModelProperty(value= "货品特征") |
| | | @ExcelProperty("货品特征") |
| | | @ExcelProperty("批号") |
| | | private String batch; |
| | | |
| | | @ApiModelProperty(value= "单据编号") |
| | |
| | | private String orderNo; |
| | | |
| | | @ApiModelProperty(value= "型号") |
| | | @ExcelProperty("桶型") |
| | | private String model; |
| | | |
| | | @ApiModelProperty(value= "颜色") |
| | |
| | | |
| | | @ApiModelProperty(value= "生产日期") |
| | | @TableField("manu_date") |
| | | @ExcelProperty("生产日期") |
| | | private String manuDate; |
| | | |
| | | @ApiModelProperty(value= "品项数") |
| | |
| | | private Double safeQty; |
| | | |
| | | @ApiModelProperty(value= "重量") |
| | | @ExcelProperty("净重") |
| | | private Double weight; |
| | | |
| | | @ApiModelProperty(value= "长度") |
| | | @TableField("man_length") |
| | | @ExcelProperty("毛重") |
| | | private Double manLength; |
| | | |
| | | @ApiModelProperty(value= "体积") |
| | | @TableField("volume") |
| | | @ExcelProperty("罐装量") |
| | | private Double volume; |
| | | |
| | | @ApiModelProperty(value= "三方编码") |
| | |
| | | , a.maktx |
| | | , a.model |
| | | , a.volume |
| | | ,manu_date manuDate |
| | | ,batch |
| | | , sum(a.anfme) as anfme |
| | | ,sum(a.weight) weight |
| | | ,sum(a.man_length) manLength |
| | | from asr_loc_detl a |
| | | where 1=1 |
| | | <include refid="stockOutCondition"></include> |
| | | group by a.matnr,a.maktx,a.model,a.volume |
| | | group by a.matnr,a.maktx,a.model,a.volume,manu_date,batch |
| | | ) t where t.row between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize}) |
| | | </select> |
| | | |
| | |
| | | , a.maktx |
| | | , a.model |
| | | , a.volume |
| | | ,manu_date manuDate |
| | | ,batch |
| | | from asr_loc_detl a |
| | | where 1=1 |
| | | <include refid="stockOutCondition"></include> |
| | | group by a.matnr, a.maktx, a.model,a.volume |
| | | group by a.matnr,a.maktx,a.model,a.volume,manu_date,batch |
| | | ) b |
| | | </select> |
| | | |
| | |
| | | select |
| | | ROW_NUMBER() over (order by sum(a.anfme) desc) as row |
| | | , a.matnr |
| | | , a.maktx |
| | | , a.model |
| | | , a.volume |
| | | ,manu_date manuDate |
| | | ,batch |
| | | , sum(a.anfme) as anfme |
| | | ,sum(a.weight) weight |
| | | ,sum(a.man_length) manLength |
| | | from asr_loc_detl a |
| | | where 1=1 |
| | | group by a.matnr |
| | | group by a.matnr,a.maktx,a.model,a.volume,manu_date,batch |
| | | </select> |
| | | |
| | | <select id="selectPakoutByRule" resultMap="BaseResultMap"> |