库存明细统计增加车间,树脂类型搜索框,默认统计库存状态为(已入库+部分出库+待出库),库存重量为0不显示记录
| | |
| | | List<Pla> getStockStatisAllByBrand(@Param("brand") String brand); |
| | | |
| | | // @Select("select brand, matnr,workshop , sum(weight_anfme) as weight from asr_pla_detl GROUP BY brand,matnr,workshop ORDER BY matnr,workshop desc") |
| | | List<Pla> getStockStatisAll(@Param("brand") String brand,@Param("status") String status,@Param("stime") Date stime, @Param("etime") Date etime); |
| | | List<Pla> getStockStatisAll(@Param("brand") String brand,@Param("status") String status,@Param("stime") Date stime, @Param("etime") Date etime, |
| | | @Param("type") String type,@Param("workshop") String workshop); |
| | | |
| | | |
| | | Integer getStockStatisCountAll(Map<String, Object> map); |
| | |
| | | Object create_time = page.getCondition().get("create_time"); |
| | | Object brand = page.getCondition().get("brand"); |
| | | Object status = page.getCondition().get("status"); |
| | | String type = (String) page.getCondition().get("type"); |
| | | String workshop = (String) page.getCondition().get("workshop"); |
| | | |
| | | String createTime = create_time == null ? null : create_time.toString(); |
| | | if(!Cools.isEmpty(createTime)){ |
| | | String[] dates = createTime.split(" - "); |
| | | stime = DateUtils.convert(dates[0]); |
| | | etime = DateUtils.convert(dates[1]); |
| | | } |
| | | plaList=baseMapper.getStockStatisAll(brand == null ? null:brand.toString(), status == null ? null:status.toString(), stime,etime); |
| | | plaList=baseMapper.getStockStatisAll(brand == null ? null:brand.toString(), status == null ? null:status.toString(), stime,etime, type, workshop); |
| | | |
| | | double weightSum = plaList.stream().mapToDouble(Pla::getWeight).sum(); |
| | | |
| | |
| | | <if test="etime != null"> |
| | | and pakin_time <= #{etime} |
| | | </if> |
| | | <if test="status == null or status.trim() == ''"> |
| | | and status in ('已入库','部分出库','待出库') |
| | | </if> |
| | | <if test="status != null and status != ''"> |
| | | and status = #{status} |
| | | </if> |
| | | <if test="type != null and type != ''"> |
| | | and type = #{type} |
| | | </if> |
| | | <if test="workshop != null and workshop != ''"> |
| | | and workshop = #{workshop} |
| | | </if> |
| | | </where> |
| | | GROUP BY brand,matnr,workshop ORDER BY matnr,workshop |
| | | GROUP BY brand,matnr,workshop HAVING SUM(weight_anfme) > 0 ORDER BY matnr,workshop |
| | | </select> |
| | | </mapper> |
| | |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <select name="type"> |
| | | <option value="">树脂类型</option> |
| | | <option value="纯树脂">纯树脂</option> |
| | | <option value="改性树脂">改性树脂</option> |
| | | <option value="副产物">副产物</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="workshop" placeholder="车间" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width: 300px"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input layui-laydate-range" name="create_time" type="text" placeholder="入库起始时间 - 终止时间" autocomplete="off" style="width: 300px"> |