| | |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.core.wms.model.response.WmsBaseResponse; |
| | | import com.doumee.core.wms.model.response.WmsInventoryDataResponse; |
| | | import com.doumee.core.wms.model.response.WmsBaseDataResponse; |
| | | import com.doumee.core.wms.model.response.WmsInventoryJsonResponse; |
| | | import com.doumee.dao.business.*; |
| | | import com.doumee.dao.business.join.PlatformWarnEventJoinMapper; |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | public BoardStockListVO stockList( ){ |
| | | public BoardStockListVO stockList(){ |
| | | BoardStockListVO data = new BoardStockListVO(); |
| | | double toatalNum = 1d; |
| | | BigDecimal num = new BigDecimal(0); |
| | |
| | | try { |
| | | toatalNum =Double.parseDouble(systemDictDataBiz.queryByCode(Constants.WMS_PARAM,Constants.WMS_TOTAL_STOCK_NUM).getCode()) ; |
| | | }catch (Exception e){ |
| | | |
| | | } |
| | | WmsBaseResponse<WmsInventoryDataResponse> response = wmsService.getInventoryList(); |
| | | WmsBaseResponse<WmsBaseDataResponse> response = wmsService.getInventoryList(); |
| | | if(response!=null && response.getData()!=null && response.getData().size()>0){ |
| | | List<WmsInventoryJsonResponse> t= response.getData().get(0).getJson(); |
| | | if(t!=null &&t.size()>0){ |
| | |
| | | num = num.add (Constants.formatBigdecimal( j.getQty())); |
| | | GeneralVO d = new GeneralVO(); |
| | | d.setNum(Constants.formatBigdecimal(j.getQty())); |
| | | d.setName(j.getItem_name()); |
| | | d.setName(j.getItemName()); |
| | | list.add(d); |
| | | } |
| | | } |
| | |
| | | toatalNum =1; |
| | | } |
| | | data.setTotalNum(new BigDecimal(toatalNum)); |
| | | data.setUseRate(Constants.formatBigdecimal(data.getNum()).divide(data.getTotalNum(),2,BigDecimal.ROUND_UP)); |
| | | data.setUseRate(Constants.formatBigdecimal(data.getNum()).divide(data.getTotalNum(),2,BigDecimal.ROUND_HALF_UP)); |
| | | return data; |
| | | |
| | | } |
| | |
| | | .selectAll(PlatformJob.class) |
| | | .eq(PlatformJob::getIsdeleted,Constants.ZERO) |
| | | .eq(PlatformJob::getCarCodeFront,param.getCarCode()) |
| | | .in(PlatformJob::getStatus,Constants.PlatformJobStatus.DONE.getKey(),Constants.PlatformJobStatus.LEAVED.getKey(),Constants.PlatformJobStatus.AUTHED_LEAVE.getKey(),Constants.PlatformJobStatus.CALLED.getKey()) |
| | | .in(PlatformJob::getStatus, |
| | | Constants.PlatformJobStatus.DONE.getKey(), |
| | | Constants.PlatformJobStatus.LEAVED.getKey(), |
| | | Constants.PlatformJobStatus.AUTHED_LEAVE.getKey(), |
| | | Constants.PlatformJobStatus.CALLED.getKey()) |
| | | .last("limit 1")); |
| | | if(job!=null){ |
| | | List<PlatformLog> logList = platformLogMapper.selectJoinList(PlatformLog.class, |
| | |
| | | .orderByDesc(PlatformLog::getCreateDate)); |
| | | if(detailList!=null){ |
| | | for(PlatformWmsDetail d : detailList){ |
| | | if(!isNotExistIocode(d.getIocode(),data.getContractList())){ |
| | | if(isExistIocode(d.getIocode(),data.getContractList())){ |
| | | continue; |
| | | } |
| | | tt = new CarsContractVO(); |
| | |
| | | return list; |
| | | } |
| | | |
| | | private boolean isNotExistIocode(String iocode, List<CarsContractVO> detailList) { |
| | | private boolean isExistIocode(String iocode, List<CarsContractVO> detailList) { |
| | | if(detailList!=null){ |
| | | for(CarsContractVO d :detailList){ |
| | | if(StringUtils.equals(d.getIoCode(),iocode)){ |