| 
					
				 | 
			
			
				@ -1503,97 +1503,142 @@ public class MedicineOrderService extends BaseJpaService<Mediicineorder, Mediici 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return result; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public MixEnvelop getSumAmountExcel(String belongCommunity, String equNum, String startTime, String endTime,int page,int size) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        List<Map<String,Object>> mapList=new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        Map<String,Object> countMap = new HashMap<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        //第几页 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        countMap.put("page",page); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        //多少条 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        countMap.put("size",size); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        page = (page - 1) * size; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        //查询出所有的设备 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        Iterable <Mediicinedevice> mediicinedevices = deviceDao.findDeviceAll(page,size); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        List<Mediicinedevice> mediicinedeviceList= IterableUtils.toList(mediicinedevices); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String countSql = " select " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "     COUNT(DISTINCT (t.id)) as count " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "   from " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "     t_mediicine_device as t " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "  where " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "  1=1   " ; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        Logger.getAnonymousLogger().info("finalCountSql="+countSql); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        int decCount = jdbcTemplate.queryForObject(countSql,Integer.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        //总页数 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        int total=decCount/size+(decCount%size>0?1:0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        countMap.put("total",total); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        //总条数 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        countMap.put("count",decCount); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        mapList.add(countMap); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        //将同一个设备的社区/名称/设备编码/历史记录/总金额放到一个Map中,并将这些Map放到同一个list中返回 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        for (Mediicinedevice mediicinedevice:mediicinedeviceList){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            Map<String,Object> map=new HashMap<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            map.put("community",mediicinedevice.getCommunity()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            map.put("equName",mediicinedevice.getEquNum()+(mediicinedevice.getEquName()==null?"":"/"+mediicinedevice.getEquName())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String oneSql="SELECT SUM(t.amount) AS sumAmount,\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "                COUNT(*) AS count,\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "                t.shipping_equ AS equNum\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "                FROM t_mediicine_order  t WHERE t.sell_state = 1 AND t.shipping_equ = '" + mediicinedevice.getEquNum()+"'"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String conditionSql=""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if (org.apache.commons.lang3.StringUtils.isNoneBlank(belongCommunity)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                conditionSql += "AND t.belong_community ='"+belongCommunity+"'"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if (org.apache.commons.lang3.StringUtils.isNoneBlank(equNum)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                conditionSql += "AND t.shipping_equ = '" + equNum + "'"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if (org.apache.commons.lang3.StringUtils.isNoneBlank(startTime)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                conditionSql += "AND t.shipping_time >= "+ startTime  ; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if (org.apache.commons.lang3.StringUtils.isNoneBlank(endTime)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                conditionSql += "AND t.shipping_time <= "+ endTime ; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            oneSql=oneSql+conditionSql; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            List<Map<String,Object>> list = hibenateUtils.createSQLQuery(oneSql); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            for (Map<String,Object> oneMap:list){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                String count = oneMap.get("count")==null?"0":oneMap.get("count").toString(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                String sumAmount=oneMap.get("sumAmount")==null?"0":oneMap.get("sumAmount").toString(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                map.put("ordercount",count); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                map.put("sumAmount",sumAmount); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            mapList.add(map); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return MixEnvelop.getSuccessListWithPage2(BaseHospitalRequestMapping.Prescription.api_success,mapList); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//    public MixEnvelop getSumAmountExcel(String belongCommunity, String equNum, String startTime, String endTime,int page,int size) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        List<Map<String,Object>> mapList=new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        Map<String,Object> countMap = new HashMap<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        //第几页 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        countMap.put("page",page); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        //多少条 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        countMap.put("size",size); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        page = (page - 1) * size; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        //查询出所有的设备 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        Iterable <Mediicinedevice> mediicinedevices = deviceDao.findDeviceAll(page,size); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        List<Mediicinedevice> mediicinedeviceList= IterableUtils.toList(mediicinedevices); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        String countSql = " select " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                "     COUNT(DISTINCT (t.id)) as count " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                "   from " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                "     t_mediicine_device as t " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                "  where " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                "  1=1   " ; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        Logger.getAnonymousLogger().info("finalCountSql="+countSql); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        int decCount = jdbcTemplate.queryForObject(countSql,Integer.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        //总页数 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        int total=decCount/size+(decCount%size>0?1:0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        countMap.put("total",total); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        //总条数 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        countMap.put("count",decCount); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        mapList.add(countMap); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				// 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        //将同一个设备的社区/名称/设备编码/历史记录/总金额放到一个Map中,并将这些Map放到同一个list中返回 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        for (Mediicinedevice mediicinedevice:mediicinedeviceList){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            Map<String,Object> map=new HashMap<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            map.put("community",mediicinedevice.getCommunity()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            map.put("equName",mediicinedevice.getEquNum()+(mediicinedevice.getEquName()==null?"":"/"+mediicinedevice.getEquName())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            String oneSql="SELECT SUM(t.amount) AS sumAmount,\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                    "                COUNT(*) AS count,\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                    "                t.shipping_equ AS equNum\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                    "                FROM t_mediicine_order  t WHERE t.sell_state = 1 AND t.shipping_equ = '" + mediicinedevice.getEquNum()+"'"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            String conditionSql=""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            if (org.apache.commons.lang3.StringUtils.isNoneBlank(belongCommunity)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                conditionSql += "AND t.belong_community ='"+belongCommunity+"'"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            if (org.apache.commons.lang3.StringUtils.isNoneBlank(equNum)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                conditionSql += "AND t.shipping_equ = '" + equNum + "'"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            if (org.apache.commons.lang3.StringUtils.isNoneBlank(startTime)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                conditionSql += "AND t.shipping_time >= "+ startTime  ; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            if (org.apache.commons.lang3.StringUtils.isNoneBlank(endTime)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                conditionSql += "AND t.shipping_time <= "+ endTime ; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            oneSql=oneSql+conditionSql; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            List<Map<String,Object>> list = hibenateUtils.createSQLQuery(oneSql); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            for (Map<String,Object> oneMap:list){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                String count = oneMap.get("count")==null?"0":oneMap.get("count").toString(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                String sumAmount=oneMap.get("sumAmount")==null?"0":oneMap.get("sumAmount").toString(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                map.put("ordercount",count); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                map.put("sumAmount",sumAmount); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            mapList.add(map); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				// 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        return MixEnvelop.getSuccessListWithPage2(BaseHospitalRequestMapping.Prescription.api_success,mapList); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public MixEnvelop getSumAmount(String belongCommunity, String equNum, String startTime, String endTime, int page, int size) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        List<Map<String,Object>> mapList=new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        //查询出所有的设备 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        Iterable <Mediicinedevice> mediicinedevices = deviceDao.findDeviceAll(page,size); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        List<Mediicinedevice> mediicinedeviceList= IterableUtils.toList(mediicinedevices); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String countSql = " select " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "     COUNT(DISTINCT (t.id)) as count " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "   from " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "     t_mediicine_device as t " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "  where " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "  1=1   " ; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        Logger.getAnonymousLogger().info("finalCountSql="+countSql); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        int decCount = jdbcTemplate.queryForObject(countSql,Integer.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        //总页数 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        int total=decCount/size+(decCount%size>0?1:0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (!org.apache.commons.lang3.StringUtils.isNoneBlank(belongCommunity)&&!org.apache.commons.lang3.StringUtils.isNoneBlank(equNum) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        &&!org.apache.commons.lang3.StringUtils.isNoneBlank(startTime)&&!org.apache.commons.lang3.StringUtils.isNoneBlank(endTime)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            Iterable<Mediicinedevice> mediicinedevices = deviceDao.findDeviceAll(page, size); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            List<Mediicinedevice> mediicinedeviceList = IterableUtils.toList(mediicinedevices); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            for (Mediicinedevice mediicinedevice : mediicinedeviceList) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                Map<String, Object> map = new HashMap<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                map.put("community", mediicinedevice.getCommunity()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                map.put("equName", mediicinedevice.getEquNum() + (mediicinedevice.getEquName() == null ? "" : "/" + mediicinedevice.getEquName())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                String oneSql = "SELECT SUM(t.amount) AS sumAmount,\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        "                COUNT(*) AS count,\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        "                t.shipping_equ AS equNum\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        "                FROM t_mediicine_order  t WHERE t.sell_state = 1 AND t.shipping_equ = '" + mediicinedevice.getEquNum() + "'"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                List<Map<String,Object>> list = hibenateUtils.createSQLQuery(oneSql); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                for (Map<String,Object> oneMap:list){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    String count = oneMap.get("count")==null?"0":oneMap.get("count").toString(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    String sumAmount=oneMap.get("sumAmount")==null?"0":oneMap.get("sumAmount").toString(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    map.put("ordercount",count); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    map.put("sumAmount",sumAmount); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                mapList.add(map); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String countSql = " select " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "     COUNT(DISTINCT (t.id)) as count " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "   from " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "     t_mediicine_device as t " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "  where " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "  1=1   " ; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            Logger.getAnonymousLogger().info("finalCountSql="+countSql); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            int decCount = jdbcTemplate.queryForObject(countSql,Integer.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            //总页数 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            int total=decCount/size+(decCount%size>0?1:0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            MixEnvelop mixEnvelop = MixEnvelop.getSuccessListWithPage2(BaseHospitalRequestMapping.Prescription.api_success,mapList); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            mixEnvelop.setTotalCount(decCount); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            mixEnvelop.setTotalPage(total); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return mixEnvelop; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        //将同一个设备的社区/名称/设备编码/历史记录/总金额放到一个Map中,并将这些Map放到同一个list中返回 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        for (Mediicinedevice mediicinedevice:mediicinedeviceList){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            Map<String,Object> map=new HashMap<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            map.put("community",mediicinedevice.getCommunity()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            map.put("equName",mediicinedevice.getEquNum()+(mediicinedevice.getEquName()==null?"":"/"+mediicinedevice.getEquName())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String oneSql="SELECT SUM(t.amount) AS sumAmount,\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "                COUNT(*) AS count,\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "                t.shipping_equ AS equNum\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "                FROM t_mediicine_order  t WHERE t.sell_state = 1 AND t.shipping_equ = '" + mediicinedevice.getEquNum()+"'"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "                FROM t_mediicine_order  t WHERE t.sell_state = 1 "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if (org.apache.commons.lang3.StringUtils.isNoneBlank(belongCommunity)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                oneSql += "AND t.belong_community ='"+belongCommunity+"'"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                if (!org.apache.commons.lang3.StringUtils.isNoneBlank(equNum)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    Mediicinedevice device=deviceDao.findByBelongCommunity(belongCommunity); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    map.put("community",device.getCommunity()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                }else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    oneSql += "AND t.shipping_equ = '" + equNum + "'"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    Mediicinedevice device=deviceDao.findByBelongCommunityAndEquNum(belongCommunity,equNum); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    map.put("community",device.getCommunity()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    map.put("equName",device.getEquNum()+(device.getEquName()==null?"":"/"+device.getEquName())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            }else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                if (!org.apache.commons.lang3.StringUtils.isNoneBlank(equNum)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                    Mediicinedevice device=deviceDao.findByBelongCommunity(belongCommunity); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                    map.put("community",device.getCommunity()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                }else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    oneSql += "AND t.shipping_equ = '" + equNum + "'"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    Mediicinedevice device=deviceDao.findMediicinedeviceByEquNum(equNum); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    map.put("community",device.getCommunity()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    map.put("equName",device.getEquNum()+(device.getEquName()==null?"":"/"+device.getEquName())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if (org.apache.commons.lang3.StringUtils.isNoneBlank(equNum)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                oneSql += "AND t.shipping_equ = '" + equNum + "'"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            if (org.apache.commons.lang3.StringUtils.isNoneBlank(equNum)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                oneSql += "AND t.shipping_equ = '" + equNum + "'"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                Mediicinedevice daoByEquNum=deviceDao.findMediicinedeviceByEquNum(equNum); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                map.put("equName",daoByEquNum.getEquNum()+(daoByEquNum.getEquName()==null?"":"/"+daoByEquNum.getEquName())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            }else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                map.put("equName",mediicinedevice.getEquNum()+(mediicinedevice.getEquName()==null?"":"/"+mediicinedevice.getEquName())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if (org.apache.commons.lang3.StringUtils.isNoneBlank(startTime)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                oneSql += "AND t.shipping_time >= "+ startTime  ; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -1608,8 +1653,10 @@ public class MedicineOrderService extends BaseJpaService<Mediicineorder, Mediici 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                map.put("sumAmount",sumAmount); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            mapList.add(map); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return MixEnvelop.getSuccessListWithPage2(BaseHospitalRequestMapping.Prescription.api_success,mapList); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        MixEnvelop mixEnvelop = MixEnvelop.getSuccessListWithPage2(BaseHospitalRequestMapping.Prescription.api_success,mapList); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        mixEnvelop.setTotalPage(mapList.size()/size+(mapList.size()%size==0?0:1)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        mixEnvelop.setTotalCount(mapList.size()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return mixEnvelop; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public void pushListWrite(OutputStream os, List<Map<String, Object>> list)throws Exception { 
			 |