LAPTOP-KB9HII50\70708 2 months ago
parent
commit
f17ffe8fce

+ 3 - 3
svr/svr-base/src/main/java/com/yihu/jw/base/service/a3service/MedicinedeviceService.java

@ -242,7 +242,7 @@ public class MedicinedeviceService  extends BaseJpaService<Mediicinedevice, Medi
        String sql = "select id,id_device idDevice,state,num,layer_no layerNo,wayer_no wayerNo,qty,drug_name drugName" +
                ",cargo_capacity cargoCapacity,shelf_status shelfStatus,cargo_state cargoState,fault_state faultState" +
                ",if(fault_state='1','故障',if(fault_state='0','正常','')) faultStateNam,if(cargo_state='1','开启',if(cargo_state='0','关闭','')) cargoStateName" +
                ",if(shelf_status='1','上架',if(shelf_status='0','下架','')) shelfStatusName" +
                ",if(shelf_status='1','上架',if(shelf_status='0','下架','')) shelfStatusName,delivery_address" +
                ",DATE_FORMAT(update_time,'%Y-%m-%d %H:%i:%S') updateTime";
        String countSql = "select count(id) ";
        String filter = " from t_mediicinecabinet_inventory where id_device='"+idDevice+"' ";
@ -250,7 +250,7 @@ public class MedicinedeviceService  extends BaseJpaService<Mediicinedevice, Medi
            filter += " and update_time>='"+startTime+"'";
        }
        if(!StringUtils.isEmpty(endTime)){
            filter += " and update_time>='"+endTime+"'";
            filter += " and update_time<='"+endTime+"'";
        }
        String orderBy = " order by fault_state desc,update_time desc limit "+(page-1)*size+","+size;
@ -267,7 +267,7 @@ public class MedicinedeviceService  extends BaseJpaService<Mediicinedevice, Medi
        String countSql = "select count(a.id)";
        String filter = " from ( " +
                "SELECT DISTINCT t.id,t.community,t.equ_num equNum,t.network_status,t.sale_status saleStatus,t.status " +
                ",if(t.status='1','不缺货',if(t.status='0','缺货','')) statusName " +
                ",if(t.status='1','不缺货',if(t.status='0','缺货','')) statusName,t.delivery_address deliveryAddress " +
                ",if(t.network_status='1','在线',if(t.network_status='0','离线','')) networkStatusName " +
                ",if(t.sale_status='1','在售',if(t.sale_status='2','停售',if(t.sale_status='3','故障',''))) saleStatusName " +
                ",t.layer,t.aisles,SUM(if(i.cargo_state='1' and i.fault_state='0',i.cargo_capacity,0)) normalOpenCargoCapacity " +