| 
					
				 | 
			
			
				@ -2351,6 +2351,8 @@ public class MedicinedeviceService  extends BaseJpaService<Mediicinedevice, Medi 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "\tifnull(t.cargo_capacity, 0) AS cargoCapacity,\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "\tifnull(t.qty, 0) AS qty,\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "\tt.cargo_state AS cargoState,\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "\tt.drug_code AS drugCode,\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "\tt.org_code AS orgCode,\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "\tt.fault_state AS faultState\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "FROM\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "\tt_mediicinecabinet_inventory t\n" + 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -2397,10 +2399,22 @@ public class MedicinedeviceService  extends BaseJpaService<Mediicinedevice, Medi 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            //空置率 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            stringObjectMap.put("kongzhilv", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                    new BigDecimal((number * 1.0) / Integer.parseInt(stringObjectMap.get("aisles").toString())).setScale(2, BigDecimal.ROUND_HALF_UP)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            //newVersion 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            //正常货道数(正常的、开启的) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            int normalCargoNumber = ((int) list.stream() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    .filter(item -> "1".equals(String.valueOf(item.get("cargoState"))) && "0".equals(String.valueOf(item.get("faultState")))).count()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            //关闭的货道数 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            int closedCargoNumber = ((int) list.stream() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                    .filter(item -> "0".equals(String.valueOf(item.get("cargoState")))).count()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            //已经设置药品的货道数 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            int alreadySetDrugNumber = ((int) list.stream() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    .filter(item  -> "1".equals(String.valueOf(item.get("cargoState"))) && 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            "0".equals(String.valueOf(item.get("faultState"))) && 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            !StringUtils.isEmpty(item.get("orgCode")) && 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            !StringUtils.isEmpty(item.get("drugCode"))).count()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            //未设置药品的货道数--->正常的开启的货道数--(单纯关闭的-故障即关闭的)(就关闭的)-已经设置药品的货道数, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            int noSetDrugCargoNumber =  normalCargoNumber  - alreadySetDrugNumber; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            stringObjectMap.put("weishezhishangpinhuodao", noSetDrugCargoNumber); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            //newVersion 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            //已用货道数 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            int usedCargoNumber = ((int) list.stream() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    .filter(item -> "1".equals(String.valueOf(item.get("cargoState"))) && 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -2668,6 +2682,8 @@ public class MedicinedeviceService  extends BaseJpaService<Mediicinedevice, Medi 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "\tifnull(t.cargo_capacity, 0) AS cargoCapacity,\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "\tifnull(t.qty, 0) AS qty,\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "\tt.cargo_state AS cargoState,\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "\tt.drug_code AS drugCode,\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "\tt.org_code AS orgCode,\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "\tt.fault_state AS faultState\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "FROM\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "\tt_mediicinecabinet_inventory t\n" + 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -2717,25 +2733,38 @@ public class MedicinedeviceService  extends BaseJpaService<Mediicinedevice, Medi 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            //在架库存数 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            stringObjectMap.put("shangPinKuCun", inStock); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            //未设置商品货道 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            tempSql = "SELECT\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "\tcount(DISTINCT(t.id))\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "FROM\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "\tt_mediicinecabinet_inventory t\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "WHERE\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "\tt.id_device = '" + stringObjectMap.get("id").toString() + "'\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "AND t.org_code IS NULL\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "AND t.drug_code IS NULL\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "AND (t.state = '1' OR t.state = '21')"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            int number = jdbcTemplate.queryForObject(tempSql, Integer.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            stringObjectMap.put("weishezhishangpinhuodao", number); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            tempSql = "SELECT\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				////                    "\tcount(DISTINCT(t.id))\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				////                    "FROM\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				////                    "\tt_mediicinecabinet_inventory t\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				////                    "WHERE\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				////                    "\tt.id_device = '" + stringObjectMap.get("id").toString() + "'\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				////                    "AND t.org_code IS NULL\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				////                    "AND t.drug_code IS NULL\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				////                    "AND (t.state = '1' OR t.state = '21')"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				////            int number = jdbcTemplate.queryForObject(tempSql, Integer.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            stringObjectMap.put("weishezhishangpinhuodao", number); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            //正常货道数(正常的、开启的) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            int normalCargoNumber = ((int) list.stream() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    .filter(item -> "1".equals(String.valueOf(item.get("cargoState"))) && "0".equals(String.valueOf(item.get("faultState")))).count()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            //关闭的货道数 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            int closedCargoNumber = ((int) list.stream() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                    .filter(item -> "0".equals(String.valueOf(item.get("cargoState")))).count()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            //已经设置药品的货道数 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            int alreadySetDrugNumber = ((int) list.stream() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    .filter(item  -> "1".equals(String.valueOf(item.get("cargoState"))) && 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            "0".equals(String.valueOf(item.get("faultState"))) && 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            !StringUtils.isEmpty(item.get("orgCode")) && 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            !StringUtils.isEmpty(item.get("drugCode"))).count()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            //未设置药品的货道数--->正常的开启的货道数--(单纯关闭的-故障即关闭的)(就关闭的)-已经设置药品的货道数, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            int noSetDrugCargoNumber =  normalCargoNumber  - alreadySetDrugNumber; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            stringObjectMap.put("weishezhishangpinhuodao", noSetDrugCargoNumber); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            //空置率 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            stringObjectMap.put("kongzhilv", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                    new BigDecimal((number * 1.0) / Integer.parseInt(stringObjectMap.get("aisles").toString())).setScale(2, BigDecimal.ROUND_HALF_UP)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            //newVersion 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            //正常货道数(正常的、开启的) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            int normalCargoNumber = ((int) list.stream() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    .filter(item -> "1".equals(String.valueOf(item.get("cargoState"))) && "0".equals(String.valueOf(item.get("faultState")))).count()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            //已用货道数 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            //已用货道数,正常的开启的有药品数量的 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            int usedCargoNumber = ((int) list.stream() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    .filter(item -> "1".equals(String.valueOf(item.get("cargoState"))) && 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            "0".equals(String.valueOf(item.get("faultState"))) && 
			 |