|  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private PlansExtMapper plansExtMapper; | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private WStockExtMapper stockExtMapper; | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private WorkorderRecordExtMapper workorderRecordExtMapper; | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private DepartmentExtService departmentExtService; | 
|---|
|  |  |  | 
|---|
|  |  |  | .add(Constants.formatBigdecimal(model.getQualifiedNum())); | 
|---|
|  |  |  | 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<Unqualified7DayModel> getUnqualified7DayData(Integer companyId, Integer departId, Integer procedureId) { | 
|---|
|  |  |  | DepartmentExtListVO department =   departmentExtService.getModelById(companyId,departId); | 
|---|
|  |  |  | if(department == null || Constants.equalsInteger(department.getDeleted(), Constants.ONE)){ | 
|---|