wangzhinan 3 år sedan
förälder
incheckning
fb7b55b634

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

@ -97,13 +97,15 @@ public class MedicineOrderEndpoint extends EnvelopRestEndpoint {
            @RequestParam(value = "orderState", required = false) String orderState,
            @RequestParam(value = "orderState", required = false) String orderState,
            @ApiParam(name = "dispensingWindow", value = "取药区域")
            @ApiParam(name = "dispensingWindow", value = "取药区域")
            @RequestParam(value = "dispensingWindow", required = false) String dispensingWindow,
            @RequestParam(value = "dispensingWindow", required = false) String dispensingWindow,
            @ApiParam(name = "community", value = "所属社区")
            @RequestParam(value = "community", required = false) String community,
            @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(orderNum, equNum, contact, startTime, endTime, sellState, orderState, dispensingWindow, userId,page,size,wechatId);
        JSONObject result = orderservice.queryOrderListFullInfo(orderNum, equNum, contact, startTime, endTime, sellState, orderState, dispensingWindow, community, 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

@ -158,7 +158,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 orderNum, String equNum, String contact,
    public JSONObject queryOrderListFullInfo(String orderNum, String equNum, String contact,
                                            String startTime, String endTime, String sellState,
                                            String startTime, String endTime, String sellState,
                                            String orderState, String dispensingWindow, String userId, int page, int size,String wechatId) throws Exception {
                                            String orderState, String dispensingWindow, String community, String userId, int page, int size,String wechatId) throws Exception {
        JSONObject result = new JSONObject();
        JSONObject result = new JSONObject();
@ -279,6 +279,9 @@ public class MedicineOrderService extends BaseJpaService<Mediicineorder, Mediici
        if (!StringUtils.isEmpty(belongCommunitys)) {
        if (!StringUtils.isEmpty(belongCommunitys)) {
            conditionSql += " and ',"+ belongCommunitys +",' LIKE CONCAT('%,',t.belong_community,',%')\n";
            conditionSql += " and ',"+ belongCommunitys +",' LIKE CONCAT('%,',t.belong_community,',%')\n";
        }
        }
        if (!StringUtils.isEmpty(community)) {
            conditionSql += " and t.belong_community = '" + community + "'";
        }
        if (!StringUtils.isEmpty(orderNum)){
        if (!StringUtils.isEmpty(orderNum)){
            conditionSql += " and t.order_num = '" + orderNum + "'";
            conditionSql += " and t.order_num = '" + orderNum + "'";
        }
        }