| | |
| | | @Autowired |
| | | private WorkPlansExtMapper workPlansExtMapper; |
| | | @Autowired |
| | | private CompanyExtService companyExtService; |
| | | @Autowired |
| | | private DepartmentExtService departmentExtService; |
| | | @Autowired |
| | | private RouteProcedureExtMapper routeProcedureExtMapper; |
| | | @Autowired |
| | | private PlansExtMapper plansExtMapper; |
| | | @Autowired |
| | | private WorkorderRecordExtMapper workorderRecordExtMapper; |
| | | private WStockExtMapper stockExtMapper; |
| | | @Autowired |
| | | private DepartmentExtService departmentExtService; |
| | | private WorkorderRecordExtMapper workorderRecordExtMapper; |
| | | @Autowired |
| | | private DeviceCheckExtService deviceCheckExtService; |
| | | @Autowired |
| | |
| | | //未完成数 |
| | | BigDecimal doneNum =Constants.formatBigdecimal(model.getUnqualifiedNum()) |
| | | .add(Constants.formatBigdecimal(model.getQualifiedNum())); |
| | | model.setUndoneNum(Constants.formatBigdecimal(model.getNum()).subtract(doneNum); |
| | | model.setUndoneNum(Constants.formatBigdecimal(model.getNum()).subtract(doneNum)); |
| | | //不良品率 |
| | | model.set |
| | | if(doneNum.compareTo(new BigDecimal(0) )>0){ |
| | | model.setUnqualifiedRate(model.getUnqualifiedNum().divide(doneNum,4).multiply(new BigDecimal(100))); |
| | | } |
| | | } |
| | | } |
| | | return result; |
| | | } |
| | | @Override |
| | | public List<StockDataModel> getStockList(Integer companyId, Integer departId){ |
| | | DepartmentExtListVO department = departmentExtService.getModelById(companyId,departId); |
| | | if(department == null || Constants.equalsInteger(department.getDeleted(), Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"对不起,企业或者部门信息不合法,如有疑问,请联系系统管理员"); |
| | | } |
| | | QueryWStockExtDTO param = new QueryWStockExtDTO(); |
| | | param.setRootDepartId(department.getRootId()); |
| | | param.setWmodelDepartId(departId); |
| | | //查询统计结果 |
| | | List<StockDataModel> result = stockExtMapper.getStatisticsStockList(param); |
| | | return result; |
| | | } |
| | | @Override |
| | | public List<DepartmentExtListVO> getDepartmentList(Integer companyId){ |
| | | CompanyExtListVO companyExtListVO = companyExtService.getModelById(companyId); |
| | | if(companyExtListVO == null || Constants.equalsInteger(companyExtListVO.getDeleted(), Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"对不起,企业或者部门信息不合法,如有疑问,请联系系统管理员"); |
| | | } |
| | | QueryDepartmentExtDTO param = new QueryDepartmentExtDTO(); |
| | | param.setDeleted(Constants.ZERO); |
| | | param.setCompanyId(companyId); |
| | | param.setType(Constants.DEPART_TYPE.com); |
| | | List<DepartmentExtListVO> result = departmentExtService.findList(param); |
| | | return result; |
| | | } |
| | | @Override |
| | |
| | | //只能查看当前根组织的数据 |
| | | pageWrap.getModel().setRootDepartId(department.getRootId()); |
| | | pageWrap.getModel().setComDepartId(departId); |
| | | PageHelper.startPage(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | return deviceCheckExtService.findPage(pageWrap); |
| | | return deviceCheckExtService.getDeviceCheckPage(pageWrap); |
| | | } |
| | | @Override |
| | | public List<ProcedurePlansPageModel> getProcedurePlansPage(Integer companyId, Integer departId,Integer procedureId){ |