| | |
| | | oqty.setY(locUseRate.getOqty()); |
| | | list.add(oqty); |
| | | |
| | | ChartBean uqty = new ChartBean(); |
| | | uqty.setName("使用库位"); |
| | | uqty.setY(locUseRate.getUqty()); |
| | | list.add(uqty); |
| | | |
| | | ChartBean xqty = new ChartBean(); |
| | | xqty.setName("禁用库位"); |
| | | xqty.setY(locUseRate.getXqty()); |
| | | list.add(xqty); |
| | | // ChartBean uqty = new ChartBean(); |
| | | // uqty.setName("使用库位"); |
| | | // uqty.setY(locUseRate.getUqty()); |
| | | // list.add(uqty); |
| | | // |
| | | // ChartBean xqty = new ChartBean(); |
| | | // xqty.setName("禁用库位"); |
| | | // xqty.setY(locUseRate.getXqty()); |
| | | // list.add(xqty); |
| | | } |
| | | map.put("rows",list); |
| | | return R.ok(map); |
| | |
| | | Integer row = locMast.getRow1(); |
| | | Integer bay = locMast.getBay1(); |
| | | |
| | | // switch (area){ |
| | | // case 1: |
| | | // if (row % 4 == 0 || (row+1) % 4 == 0) { |
| | | // row=row+locMast.getCrnNo(); |
| | | // }else{ |
| | | // row=row+locMast.getCrnNo()-1; |
| | | // } |
| | | // bay=32-bay; |
| | | // break; |
| | | // case 2: |
| | | // case 3: |
| | | //// if (row<=3 || row>=5){ |
| | | //// if (row%1==0){ |
| | | //// row=row+(row/1)-1; |
| | | //// }else { |
| | | //// row=row+((row+1)/1)-1; |
| | | //// } |
| | | //// }else { |
| | | //// if (row%2==0){ |
| | | //// row=row+(row/2); |
| | | //// }else { |
| | | //// row=row+((row-1)/2); |
| | | //// } |
| | | //// } |
| | | //// if (row == 9){ |
| | | //// row= row -1; |
| | | //// } |
| | | // |
| | | // if (row ==7) { |
| | | // row=row+2; |
| | | // }else{ |
| | | // if (row>7){ |
| | | // row=row+locMast.getCrnNo()+1; |
| | | // }else { |
| | | // row=row+locMast.getCrnNo()-1; |
| | | // } |
| | | // } |
| | | // break; |
| | | //// case 4: |
| | | ////// if (row<=11){ |
| | | //////// if (row%2==0){ |
| | | //////// row=row+(row/2)-1; |
| | | //////// }else { |
| | | //////// row=row+((row+1)/2)-1; |
| | | //////// } |
| | | //////// }else { |
| | | //////// if (row%2==0){ |
| | | //////// row=row+(row/2); |
| | | //////// }else { |
| | | //////// row=row+((row-1)/2); |
| | | //////// } |
| | | //////// } |
| | | //// |
| | | //// if (row % 10 == 0) { |
| | | //// row=row+2; |
| | | //// }else{ |
| | | //// if (row>10){ |
| | | //// row=row+locMast.getCrnNo()+1; |
| | | //// }else { |
| | | //// row=row+locMast.getCrnNo()-1; |
| | | //// } |
| | | //// } |
| | | //// break; |
| | | // case 5: |
| | | //// if (row<=11){ |
| | | //// if (row%2==0){ |
| | | //// row=row+(row/2)-1; |
| | | //// }else { |
| | | //// row=row+((row+1)/2)-1; |
| | | //// } |
| | | //// }else { |
| | | //// if (row%2==0){ |
| | | //// row=row+(row/2); |
| | | //// }else { |
| | | //// row=row+((row-1)/2); |
| | | //// } |
| | | //// } |
| | | // |
| | | // if (row % 7 == 0) { |
| | | // row=row+2; |
| | | // }else{ |
| | | // if (row>7){ |
| | | // row=row+locMast.getCrnNo()+1; |
| | | // }else { |
| | | // row=row+locMast.getCrnNo()-1; |
| | | // } |
| | | // } |
| | | // break; |
| | | // |
| | | // |
| | | // |
| | | // } |
| | | |
| | | ArrayList rowData = arrayLists.get(row); |
| | | Object o = rowData.get(bay); |
| | | JSONObject jsonObject = JSON.parseObject(o.toString()); |
| | |
| | | //更新list |
| | | rowData.set(bay, jsonObject); |
| | | arrayLists.set(row, rowData); |
| | | |
| | | |
| | | |
| | | // if (area == 1 || area == 6){ |
| | | // ArrayList rowData = arrayLists.get(row); |
| | | // Object o = rowData.get(bay); |
| | | // JSONObject jsonObject = JSON.parseObject(o.toString()); |
| | | // jsonObject.put("locNo", locMast.getLocNo());//设置库位号 |
| | | // jsonObject.put("locSts", locMast.getLocSts());//库位状态 |
| | | // //jsonObject.put("locSts$", locMast.getLocSts$());//库位状态 |
| | | // //更新list |
| | | // rowData.set(bay, jsonObject); |
| | | // arrayLists.set(row, rowData); |
| | | // }else { |
| | | // ArrayList rowData = arrayLists.get(bay); |
| | | // Object o = rowData.get(row); |
| | | // JSONObject jsonObject = JSON.parseObject(o.toString()); |
| | | // jsonObject.put("locNo", locMast.getLocNo());//设置库位号 |
| | | // jsonObject.put("locSts", locMast.getLocSts());//库位状态 |
| | | // //jsonObject.put("locSts$", locMast.getLocSts$());//库位状态 |
| | | // //更新list |
| | | // rowData.set(row, jsonObject); |
| | | // arrayLists.set(bay, rowData); |
| | | // } |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | for (Object o : jsonArray){ |
| | | JSONObject jsonObject = (JSONObject)o; |
| | | String batch = jsonObject.get("batch").toString(); |
| | | Integer packageNo = (Integer) jsonObject.get("packageNo"); |
| | | Integer packageNo = Integer.parseInt(json.get("packageNo").toString()); |
| | | if(Cools.isEmpty(locNo) || Cools.isEmpty(batch) || Cools.isEmpty(packageNo)){ |
| | | return R.error("有参数为空,无法入库"); |
| | | } |
| | |
| | | public R plaPackOut1(@RequestBody JSONObject json){ |
| | | String locNo = json.get("locNo").toString(); |
| | | String batch = json.get("batch").toString(); |
| | | Integer packageNo = (Integer) json.get("packageNo"); |
| | | Integer packageNo = Integer.parseInt(json.get("packageNo").toString()); |
| | | String orderNo = json.get("orderNo").toString(); |
| | | String orderDetlId = json.get("orderDetlId").toString(); |
| | | String wrkNo = json.get("wrkNo").toString(); |
| | |
| | | public R plaPackOut(@RequestBody JSONObject json){ |
| | | String locNo = json.get("locNo").toString(); |
| | | String batch = json.get("batch").toString(); |
| | | Integer packageNo = (Integer) json.get("packageNo"); |
| | | Integer packageNo = Integer.parseInt(json.get("packageNo").toString()); |
| | | String orderNo = json.get("orderNo").toString(); |
| | | String orderDetlId = json.get("orderDetlId").toString(); |
| | | String wrkNo = json.get("wrkNo").toString(); |
| | |
| | | @RequestMapping("/plaDetl/check/v1") |
| | | public R plaDetlCheck(@RequestBody JSONObject json){ |
| | | String batch = json.get("batch").toString(); |
| | | Integer packageNo = (Integer) json.get("packageNo"); |
| | | |
| | | Integer packageNo = Integer.parseInt(json.get("packageNo").toString()); |
| | | if(Cools.isEmpty(batch) || Cools.isEmpty(packageNo)){ |
| | | return R.error("有参数为空,无法入库"); |
| | | } |
| | |
| | | public R plaDetlMove(@RequestBody JSONObject json){ |
| | | |
| | | String batch = json.get("batch").toString(); |
| | | Integer packageNo = (Integer) json.get("packageNo"); |
| | | Integer packageNo = Integer.parseInt(json.get("packageNo").toString()); |
| | | String locNo = json.get("locNo").toString(); |
| | | |
| | | if(Cools.isEmpty(batch) || Cools.isEmpty(packageNo)){ |
| | |
| | | @RequestMapping("/manpakout/pakout/v1") |
| | | public R pakout(@RequestBody JSONObject json){ |
| | | |
| | | String batch = json.get("batch").toString(); |
| | | Integer packageNo = Integer.parseInt(json.get("packageNo").toString()); |
| | | String orderNo = json.get("orderNo").toString(); |
| | | |
| | | |
| | | |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/orderQuery/auth") |
| | | @ManagerAuth |
| | | // @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<Order> wrapper = new EntityWrapper<>(); |
| | | wrapper.like("order_no", condition); |
| | |
| | | return R.ok(result); |
| | | } |
| | | |
| | | @RequestMapping(value = "/pla/statis/auth") |
| | | @ManagerAuth |
| | | public R statis(@RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "10")Integer limit, |
| | | @RequestParam Map<String, Object> param) { |
| | | |
| | | Page<Pla> stockStatis = plaService.getStockStatisAll(toPage(curr, limit, param, Pla.class)); |
| | | |
| | | return R.ok().add(stockStatis); |
| | | } |
| | | |
| | | /** |
| | | * excel导入模板下载 |
| | | */ |
| | |
| | | } |
| | | |
| | | public String getPackageNo$(){ |
| | | if(Cools.isEmpty(packageNo)){ |
| | | return null; |
| | | } |
| | | if(packageNo < 10){ |
| | | return "00" + packageNo; |
| | | }else if(packageNo < 100){ |
| | |
| | | @ApiModelProperty(value= "批号") |
| | | private String batch; |
| | | |
| | | @ApiModelProperty(value= "包号") |
| | | private int package_no; |
| | | |
| | | @ApiModelProperty(value= "剩余重量") |
| | | private Double weight_anfme; |
| | | |
| | | @ApiModelProperty(value= "单据编号") |
| | | @TableField("order_no") |
| | | private String orderNo; |
New file |
| | |
| | | package com.zy.asrs.entity.result; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ExcelIgnoreUnannotated |
| | | public class PlalAll { |
| | | private String brand; |
| | | private String matnr; |
| | | private Double weightAnfme; |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.zy.asrs.entity.Pla; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface PlaMapper extends BaseMapper<Pla> { |
| | | |
| | | @Select("select brand, matnr, sum(weight_anfme) as weight from asr_pla_detl where brand = #{brand} GROUP BY brand,matnr ORDER BY weight") |
| | | List<Pla> getStockStatisAllByBrand(@Param("brand") String brand); |
| | | |
| | | @Select("select brand, matnr, sum(weight_anfme) as weight from asr_pla_detl GROUP BY brand,matnr ORDER BY weight") |
| | | List<Pla> getStockStatisAll(); |
| | | |
| | | |
| | | Integer getStockStatisCountAll(Map<String, Object> map); |
| | | |
| | | } |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.zy.asrs.entity.OrderDetl; |
| | | import com.zy.asrs.entity.Pla; |
| | |
| | | void viladate(List<Pla> plas, User user); |
| | | |
| | | List<Pla> selectToHistory(); |
| | | |
| | | public Page<Pla> getStockStatisAll(Page<Pla> page); |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.core.common.Cools; |
| | | import com.core.exception.CoolException; |
| | |
| | | public List<Pla> selectToHistory() { |
| | | return this.selectList(new EntityWrapper<Pla>().eq("status",GlobleParameter.PLA_STATUS_4)); |
| | | } |
| | | |
| | | @Override |
| | | public Page<Pla> getStockStatisAll(Page<Pla> page) { |
| | | |
| | | if(Cools.isEmpty(page.getCondition().get("brand"))){ |
| | | page.setRecords(baseMapper.getStockStatisAll()); |
| | | }else { |
| | | page.setRecords(baseMapper.getStockStatisAllByBrand(page.getCondition().get("brand").toString())); |
| | | } |
| | | |
| | | page.setTotal(0); |
| | | return page; |
| | | } |
| | | } |
| | |
| | | ( |
| | | SELECT |
| | | GETDATE() AS today |
| | | , CONVERT(decimal, DATEDIFF(second,man_loc_detl.create_time, GETDATE()) / 86400.0, 9) AS stay_time |
| | | , man_loc_detl.* |
| | | FROM man_loc_detl |
| | | INNER JOIN man_node ON man_loc_detl.loc_no = man_node.name |
| | | , CONVERT(decimal, DATEDIFF(second,asr_pla_detl.pakin_time, GETDATE()) / 86400.0, 9) AS stay_time |
| | | , asr_pla_detl.* |
| | | FROM asr_pla_detl |
| | | INNER JOIN man_node ON asr_pla_detl.loc_no = man_node.name |
| | | where 1=1 |
| | | <include refid="viewStayTimeConditionSql"></include> |
| | | ) ts |
| | |
| | | ( |
| | | SELECT |
| | | GETDATE() AS today |
| | | , CONVERT(decimal, DATEDIFF(second,man_loc_detl.create_time, GETDATE()) / 86400.0, 9) AS stay_time |
| | | , man_loc_detl.* |
| | | FROM man_loc_detl |
| | | INNER JOIN man_node ON man_loc_detl.loc_no = man_node.name |
| | | , CONVERT(decimal, DATEDIFF(second,asr_pla_detl.create_time, GETDATE()) / 86400.0, 9) AS stay_time |
| | | , asr_pla_detl.* |
| | | FROM asr_pla_detl |
| | | INNER JOIN man_node ON asr_pla_detl.loc_no = man_node.name |
| | | where 1=1 |
| | | <include refid="viewStayTimeConditionSql"></include> |
| | | ) t |
| | |
| | | var pageCurr; |
| | | function getCol() { |
| | | var cols = [ |
| | | {field: 'anfme', align: 'center',title: '库存数量', style: 'font-weight: bold'} |
| | | {field: 'brand', align: 'center',title: '牌号', style: 'font-weight: bold'}, |
| | | {field: 'matnr', align: 'center',title: '商品编号', style: 'font-weight: bold'}, |
| | | {field: 'weight', align: 'center',title: '库存数量', style: 'font-weight: bold'} |
| | | ]; |
| | | arrRemove(detlCols, "field", "anfme") |
| | | arrRemove(detlCols, "field", "zpallet") |
| | | cols.push.apply(cols, detlCols); |
| | | // arrRemove(detlCols, "field", "anfme") |
| | | // arrRemove(detlCols, "field", "zpallet") |
| | | // cols.push.apply(cols, detlCols); |
| | | // cols.push({field: 'anfme', align: 'center',title: '数量', style: 'font-weight: bold'} |
| | | // ) |
| | | return cols; |
| | |
| | | tableIns = table.render({ |
| | | elem: '#locDetlStatis', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/locDetl/statis/auth', |
| | | url: baseUrl+'/pla/statis/auth', |
| | | page: true, |
| | | limit: 20, |
| | | limits: [20, 30, 50, 100, 200, 500], |
| | |
| | | {field: 'createTime$', title: '入库时间', align: 'center', width: 200} |
| | | ,{field: 'stay_time', align: 'center',title: '库龄(天)'} |
| | | ,{field: 'loc_no', align: 'center',title: '库位号'} |
| | | ,{field: 'matnr', align: 'center',title: '商品编号'} |
| | | ,{field: 'brand', align: 'center',title: '牌号'} |
| | | ,{field: 'batch', align: 'center',title: '批号'} |
| | | ,{field: 'package_no', align: 'center',title: '包号'} |
| | | ,{field: 'weight_anfme', align: 'center',title: '剩余重量'} |
| | | ]; |
| | | cols.push.apply(cols, detlCols); |
| | | return cols; |
| | | } |
| | | layui.use(['table','laydate', 'form'], function() { |
| | |
| | | <div id="search-box" class="layui-form layui-card-header"> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="matnr" placeholder="商品编号" autocomplete="off"> |
| | | </div> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="owner" placeholder="货主编号" autocomplete="off"> |
| | | <input class="layui-input" type="text" name="brand" placeholder="牌号" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <!-- 待添加 --> |
| | |
| | | <script type="text/template" id="templatePreview1" class="template-qrcode"> |
| | | <div class="template-preview"> |
| | | {{#each data}} |
| | | <div class="layui-row" style="height: 230px;width: 650px; color:#000; margin-top: 40px"> |
| | | <div class="layui-col-xs5" style="height: auto; margin-top: 20px"> |
| | | <img src="../../static/image/hneLogo.jpg" style="display: inline-block; width: 40%;height: 30%; margin-left: 30px"> |
| | | <div class="layui-row" style="height: 230px;width: 750px; color:#000; margin-top: 40px"> |
| | | <div class="layui-col-xs6" style="height: auto; margin-top: 25px; margin-left: -20px"> |
| | | <img src="../../static/image/hneLogo.png" style="display: inline-block; width: 40%;height: 30%; margin-left: 30px; color:#000;"> |
| | | </div> |
| | | <div class="layui-col-xs7" style="margin-left: -105px;margin-right: 30px; margin-top: 70px; text-align: left; font-size: 20px"> |
| | | <div class="layui-col-xs6" style="margin-left: -185px;margin-right: 30px; margin-top: 80px; text-align: left; font-size: 20px; font-weight:bold"> |
| | | 浙江省台州市台州湾新区台州湾大道188号</br> |
| | | Address:No. 188, Taizhou Bay Avenue, Taizhou Bay New Area, Taizhou City, Zhejiang Province |
| | | No.188 Taizhou Bay Avenue, Taizhou Bay New Area, Taizhou City, Zhejiang Province. P.R.China |
| | | </div> |
| | | </div> |
| | | <!-- <div class="layui-row" style="font-size: xx-large; text-align: left; margin-left: 40px;">--> |
| | | <!-- 聚乳酸 Polylactic Acid--> |
| | | <!-- </div>--> |
| | | <div class="layui-row" style="alignment: center; margin-left: 35px; margin-top: -20px; margin-bottom: 3.7px;"> |
| | | <table class="contain" width="500" style="overflow: hidden;table-layout: fixed; color:#000; font-size: 30px;text-align: left"> |
| | | <table class="contain" width="500" style="overflow: hidden;table-layout: fixed; color:#000; font-size: 35px;text-align: left"> |
| | | <tr style="height: 100px;" > |
| | | <td align="center" scope="col" colspan="4" style="font-weight: bold; text-align: left; padding-left: 20px"><strong style="font-weight: bold;color: black;">聚乳酸 Polylactic Acid</strong></td> |
| | | </tr> |
| | |
| | | <!-- <td align="center" colspan="1" style="font-weight: bold;color: black;overflow:hidden; white-space:normal; "><strong style="font-weight: bold;color: black;">REVODE {{this.brand}}</strong></td>--> |
| | | </tr> |
| | | <tr style="height: 100px;text-align: left"> |
| | | <td align="center" colspan="2" style="font-weight: bold;color: black; text-align: left; padding-left: 20px"><strong>批号:PN {{this.batch}} {{this.packageNo}}</strong></td> |
| | | <td align="center" colspan="2" style="font-weight: bold;color: black; text-align: left; padding-left: 20px"><strong>批号:{{this.batch}}</strong></td> |
| | | <!-- <td align="center" colspan="1" style="font-weight: bold;color: black;overflow:hidden; white-space:nowrap; text-overflow:ellipsis;"><strong style="font-weight: bold;color: black;">{{this.weightAnfme}} KG</strong></td>--> |
| | | </tr> |
| | | <tr style="height: 100px;text-align: left"> |
| | | <td align="center" colspan="2" style="font-weight: bold;color: black; text-align: left; padding-left: 20px"><strong>重量:{{this.weightAnfme}} KG</strong></td> |
| | | <!-- <td align="center" colspan="1" style="font-weight: bold;color: black;overflow:hidden; white-space:nowrap; text-overflow:ellipsis;"><strong style="font-weight: bold;color: black;">{{this.weightAnfme}} KG</strong></td>--> |
| | | </tr> |
| | | <tr style="height: 100px;text-align: left"> |
| | | <td align="center" colspan="2" rowspan="1" style="font-weight: bold;color: black; text-align: left; padding-left: 20px"><strong>追踪码:{{this.line}} {{this.packageNo$}}</strong></td> |
| | | <td align="center" colspan="2" style="font-weight: bold;color: black; text-align: left; padding-left: 20px"><strong>重量:{{this.weight}} KG</strong></td> |
| | | <!-- <td align="center" colspan="1" style="font-weight: bold;color: black;overflow:hidden; white-space:nowrap; text-overflow:ellipsis;"><strong style="font-weight: bold;color: black;">{{this.weightAnfme}} KG</strong></td>--> |
| | | <td align="center" scope="col" colspan="2" rowspan="2"> |
| | | <img class="template-code template-qrcode" src="{{this.barcodeUrl}}" width="80%"> |
| | | </td> |
| | | </tr> |
| | | <tr style="height: 100px;text-align: left"> |
| | | <td align="center" colspan="2" rowspan="1" style="font-weight: bold;color: black; text-align: left; padding-left: 20px"><strong>追踪码:{{this.line}} {{this.packageNo$}}</strong></td> |
| | | <!-- <td align="center" colspan="1" style="font-weight: bold;color: black;overflow:hidden; white-space:nowrap; text-overflow:ellipsis;"><strong style="font-weight: bold;color: black;">{{this.weightAnfme}} KG</strong></td>--> |
| | | </tr> |
| | | <tr style="height: 100px;text-align: left"> |
| | | </tr> |
| | | </table> |
| | | </div> |