瀏覽代碼

update bug

wangzhinan 3 年之前
父節點
當前提交
7acf7242d4

+ 8 - 2
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/a4endpoint/MedicineDeviceEndpoint.java

@ -501,9 +501,13 @@ public class MedicineDeviceEndpoint extends EnvelopRestEndpoint {
    @ApiOperation(value = "获取缺货设备列表夹带userId", notes = "获取缺货设备列表")
    @ApiOperation(value = "获取缺货设备列表夹带userId", notes = "获取缺货设备列表")
    public Envelop getOutOfStockDeviceListByUserId(@ApiParam(name = "userId", value = "用户id")
    public Envelop getOutOfStockDeviceListByUserId(@ApiParam(name = "userId", value = "用户id")
                                                   @RequestParam(value = "userId", required = true) String userId,
                                                   @RequestParam(value = "userId", required = true) String userId,
                                                   @ApiParam(name = "community", value = "所属社区")
                                                    @RequestParam(value = "community", required = false) String community,
                                                   @ApiParam(name = "town", value = "所属区域")
                                                       @RequestParam(value = "town", required = false) String town,
                                                   @ApiParam(name = "content", value = "搜索内容")
                                                   @ApiParam(name = "content", value = "搜索内容")
                                                   @RequestParam(value = "content", required = false) String content) throws Exception {
                                                   @RequestParam(value = "content", required = false) String content) throws Exception {
        JSONObject jsonObject = deviceService.getOutOfStockDeviceListByUserId(userId, content);
        JSONObject jsonObject = deviceService.getOutOfStockDeviceListByUserId(userId, content,community,town);
        return success(jsonObject.getJSONArray("msg"));
        return success(jsonObject.getJSONArray("msg"));
    }
    }
    //getDeviceListByUserId
    //getDeviceListByUserId
@ -517,6 +521,8 @@ public class MedicineDeviceEndpoint extends EnvelopRestEndpoint {
                                               @RequestParam(value = "networkStatus", required = false) String networkStatus,
                                               @RequestParam(value = "networkStatus", required = false) String networkStatus,
                                               @ApiParam(name = "community", value = "所属社区")
                                               @ApiParam(name = "community", value = "所属社区")
                                               @RequestParam(value = "community", required = false) String community,
                                               @RequestParam(value = "community", required = false) String community,
                                               @ApiParam(name = "town", value = "所属区域")
                                                   @RequestParam(value = "town", required = false) String town,
                                               @ApiParam(name = "saleStatus", value = "设备销售状态")
                                               @ApiParam(name = "saleStatus", value = "设备销售状态")
                                               @RequestParam(value = "saleStatus", required = false) String saleStatus,
                                               @RequestParam(value = "saleStatus", required = false) String saleStatus,
                                               @ApiParam(name = "equType", value = "设备类型")
                                               @ApiParam(name = "equType", value = "设备类型")
@ -527,7 +533,7 @@ public class MedicineDeviceEndpoint extends EnvelopRestEndpoint {
                                               @RequestParam(value = "page") int page,
                                               @RequestParam(value = "page") int page,
                                               @ApiParam(name = "size", value = "分页大小", required = true, defaultValue = "15")
                                               @ApiParam(name = "size", value = "分页大小", required = true, defaultValue = "15")
                                               @RequestParam(value = "size") int size) throws Exception {
                                               @RequestParam(value = "size") int size) throws Exception {
        JSONObject result = deviceService.getDeviceListByUserId(content, networkStatus, community,
        JSONObject result = deviceService.getDeviceListByUserId(content, networkStatus, community,town,
                saleStatus, equType,
                saleStatus, equType,
                userId, page, size);
                userId, page, size);
        return success(result.getJSONArray("msg"), result.getInteger("count"), page, size);
        return success(result.getJSONArray("msg"), result.getInteger("count"), page, size);

+ 3 - 1
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/a4endpoint/MedicineOrderEndpoint.java

@ -101,13 +101,15 @@ public class MedicineOrderEndpoint extends EnvelopRestEndpoint {
            @RequestParam(value = "dispensingWindow", required = false) String dispensingWindow,
            @RequestParam(value = "dispensingWindow", required = false) String dispensingWindow,
            @ApiParam(name = "community", value = "所属社区")
            @ApiParam(name = "community", value = "所属社区")
            @RequestParam(value = "community", required = false) String community,
            @RequestParam(value = "community", required = false) String community,
            @ApiParam(name = "town", value = "所属区")
            @RequestParam(value = "town", required = false) String town,
            @ApiParam(name = "userId", value = "用户id")
            @ApiParam(name = "userId", value = "用户id")
            @RequestParam(value = "userId", required = true) String userId,
            @RequestParam(value = "userId", required = true) String userId,
            @ApiParam(name = "page", value = "分页大小", required = true, defaultValue = "1")
            @ApiParam(name = "page", value = "分页大小", required = true, defaultValue = "1")
            @RequestParam(value = "page") int page,
            @RequestParam(value = "page") int page,
            @ApiParam(name = "size", value = "页码", required = true, defaultValue = "15")
            @ApiParam(name = "size", value = "页码", required = true, defaultValue = "15")
            @RequestParam(value = "size") int size) throws Exception {
            @RequestParam(value = "size") int size) throws Exception {
        JSONObject result = orderservice.queryOrderListFullInfo(content,orderNum, equNum, contact, startTime, endTime, sellState, orderState, dispensingWindow, community, userId,page,size,wechatId);
        JSONObject result = orderservice.queryOrderListFullInfo(content,orderNum, equNum, contact, startTime, endTime, sellState, orderState, dispensingWindow, community, town,userId,page,size,wechatId);
        return success(result.getJSONArray("msg"),result.getInteger("count"),page,size);
        return success(result.getJSONArray("msg"),result.getInteger("count"),page,size);
    }
    }

+ 4 - 1
svr/svr-base/src/main/java/com/yihu/jw/base/service/a3service/MedicineOrderService.java

@ -213,7 +213,7 @@ public class MedicineOrderService extends BaseJpaService<Mediicineorder, Mediici
    //orderNum, equNum, contact, startTime, endTime, sellState, orderState, dispensingWindow
    //orderNum, equNum, contact, startTime, endTime, sellState, orderState, dispensingWindow
    public JSONObject queryOrderListFullInfo(String content,String orderNum, String equNum, String contact,
    public JSONObject queryOrderListFullInfo(String content,String orderNum, String equNum, String contact,
                                             String startTime, String endTime, String sellState,
                                             String startTime, String endTime, String sellState,
                                             String orderState, String dispensingWindow, String community,
                                             String orderState, String dispensingWindow, String community,String town,
                                             String userId, int page, int size, String wechatId) throws Exception {
                                             String userId, int page, int size, String wechatId) throws Exception {
        JSONObject result = new JSONObject();
        JSONObject result = new JSONObject();
@ -344,6 +344,9 @@ public class MedicineOrderService extends BaseJpaService<Mediicineorder, Mediici
        if (!StringUtils.isEmpty(community)) {
        if (!StringUtils.isEmpty(community)) {
            conditionSql += " and t.belong_community = '" + community + "'";
            conditionSql += " and t.belong_community = '" + community + "'";
        }
        }
        if (!StringUtils.isEmpty(town)){
            conditionSql += "AND t.belong_community IN(SELECT  d.code FROM  dm_hospital d where d.town = '"+town+"' )\n ";
        }
        if (!StringUtils.isEmpty(orderNum)) {
        if (!StringUtils.isEmpty(orderNum)) {
            conditionSql += " and t.order_num = '" + orderNum + "'";
            conditionSql += " and t.order_num = '" + orderNum + "'";
        }
        }

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

@ -2184,7 +2184,7 @@ public class MedicinedeviceService  extends BaseJpaService<Mediicinedevice, Medi
     * @return
     * @return
     * @throws Exception
     * @throws Exception
     */
     */
    public JSONObject getOutOfStockDeviceListByUserId(String userId, String content) throws Exception {
    public JSONObject getOutOfStockDeviceListByUserId(String userId, String content,String community,String town) throws Exception {
        JSONObject result = new JSONObject();
        JSONObject result = new JSONObject();
        if (StringUtils.isEmpty(userId)) {
        if (StringUtils.isEmpty(userId)) {
@ -2265,6 +2265,12 @@ public class MedicinedeviceService  extends BaseJpaService<Mediicinedevice, Medi
                    "t.`status` = 0 and ',"+ deviceIds +",' LIKE CONCAT('%,',t.id,',%')\n";
                    "t.`status` = 0 and ',"+ deviceIds +",' LIKE CONCAT('%,',t.id,',%')\n";
            if (!StringUtils.isEmpty(content)) {
            if (!StringUtils.isEmpty(content)) {
                sencodSql += " AND ( t.equ_name like '%"+content+"%' or t.equ_num like '%"+content+"%')\n";
                sencodSql += " AND ( t.equ_name like '%"+content+"%' or t.equ_num like '%"+content+"%')\n";
            }
            if (!StringUtils.isEmpty(community)) {
                sencodSql += "AND t.belong_community = '" + community +"'\n";
            }
            if (!StringUtils.isEmpty(town)){
                sencodSql += "AND t.belong_community IN(SELECT  d.code FROM  dm_hospital d where d.town = '"+town+"' )\n ";
            }
            }
             deviceList = hibenateUtils.createSQLQuery(sencodSql);
             deviceList = hibenateUtils.createSQLQuery(sencodSql);
        } else {
        } else {
@ -2359,6 +2365,12 @@ public class MedicinedeviceService  extends BaseJpaService<Mediicinedevice, Medi
            if (!StringUtils.isEmpty(content)) {
            if (!StringUtils.isEmpty(content)) {
                sencodSql += " AND (t.`equ_name` like '%" + content + "%' or t.`equ_num` like '%" + content + "%')\n";
                sencodSql += " AND (t.`equ_name` like '%" + content + "%' or t.`equ_num` like '%" + content + "%')\n";
            }
            }
            if (!StringUtils.isEmpty(community)) {
                sencodSql += "AND t.belong_community = '" + community +"'\n";
            }
            if (!StringUtils.isEmpty(town)){
                sencodSql += "AND t.belong_community IN(SELECT  d.code FROM  dm_hospital d where d.town = '"+town+"' )\n ";
            }
            deviceList = hibenateUtils.createSQLQuery(sencodSql);
            deviceList = hibenateUtils.createSQLQuery(sencodSql);
@ -2480,7 +2492,7 @@ public class MedicinedeviceService  extends BaseJpaService<Mediicinedevice, Medi
     * @return
     * @return
     * @throws Exception
     * @throws Exception
     */
     */
    public JSONObject getDeviceListByUserId(String content,String networkStatus, String community,
    public JSONObject getDeviceListByUserId(String content,String networkStatus, String community,String town,
                                            String saleStatus,String equType,String userId, int page, int size) throws Exception {
                                            String saleStatus,String equType,String userId, int page, int size) throws Exception {
        JSONObject result = new JSONObject();
        JSONObject result = new JSONObject();
@ -2626,6 +2638,9 @@ public class MedicinedeviceService  extends BaseJpaService<Mediicinedevice, Medi
        if (!StringUtils.isEmpty(community)) {
        if (!StringUtils.isEmpty(community)) {
            conditionSql += "AND t.belong_community = '" + community +"'\n";
            conditionSql += "AND t.belong_community = '" + community +"'\n";
        }
        }
        if (!StringUtils.isEmpty(town)){
            conditionSql += "AND t.belong_community IN(SELECT  d.code FROM  dm_hospital d where d.town = '"+town+"' )\n ";
        }
        if (!StringUtils.isEmpty(saleStatus)) {
        if (!StringUtils.isEmpty(saleStatus)) {
            conditionSql += "AND t.sale_status = '" + saleStatus +"'\n";
            conditionSql += "AND t.sale_status = '" + saleStatus +"'\n";
        }
        }