Преглед на файлове

后台,订单列表增加content,搜索内容查询,这跟原型图不一致

wangzhinan преди 3 години
родител
ревизия
4aff619159

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

@ -81,6 +81,8 @@ public class MedicineOrderEndpoint extends EnvelopRestEndpoint {
    @GetMapping(value = BaseRequestMapping.BaseOrder.docFullInfo)
    @ApiOperation(value = "获取处方订单信息基础信息列表")
    public PageEnvelop getOrderFullInfolist(
            @ApiParam(name = "content", value = "搜索内容")
            @RequestParam(value = "content", required = false) String content,
            @ApiParam(name = "orderNum", value = "订单号")
            @RequestParam(value = "orderNum", required = false) String orderNum,
            @ApiParam(name = "equNum", value = "设备号")
@ -105,7 +107,7 @@ public class MedicineOrderEndpoint extends EnvelopRestEndpoint {
            @RequestParam(value = "page") int page,
            @ApiParam(name = "size", value = "页码", required = true, defaultValue = "15")
            @RequestParam(value = "size") int size) throws Exception {
        JSONObject result = orderservice.queryOrderListFullInfo(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, userId,page,size,wechatId);
        return success(result.getJSONArray("msg"),result.getInteger("count"),page,size);
    }

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

@ -161,9 +161,10 @@ public class MedicineOrderService extends BaseJpaService<Mediicineorder, Mediici
    //orderNum, equNum, contact, startTime, endTime, sellState, orderState, dispensingWindow
    public JSONObject queryOrderListFullInfo(String orderNum, String equNum, String contact,
    public JSONObject queryOrderListFullInfo(String content,String orderNum, String equNum, String contact,
                                             String startTime, String endTime, String sellState,
                                             String orderState, String dispensingWindow, String community, 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();
@ -226,6 +227,7 @@ public class MedicineOrderService extends BaseJpaService<Mediicineorder, Mediici
        }
        String sencodSql = "SELECT\n" +
                "    tmd.equ_name as equName,\n" +
                "    t.id as id,\n" +
                "    t.address as address,\n" +
                "    t.age as age,\n" +
@ -276,12 +278,15 @@ public class MedicineOrderService extends BaseJpaService<Mediicineorder, Mediici
                "    t.social_security_card_num AS socialSecurityCardNum,\n" +
                "    t.belong_community AS belongCommunity\n" +
                "FROM\n" +
                "    t_mediicine_order AS t where 1=1 \n";
                "    t_mediicine_order AS t left join t_mediicine_device tmd on t.shipping_equ = tmd.equ_num where 1=1 \n";
        if (!StringUtils.isEmpty(belongCommunitys)) {
            conditionSql += " and '," + belongCommunitys + ",' LIKE CONCAT('%,',t.belong_community,',%')\n";
        }
        if (!StringUtils.isEmpty(content)) {
            conditionSql += " and CONCAT(IFNULL(t.`prescribe_num`,''),IFNULL(t.`contact`,''),IFNULL(t.`shipping_equ`,'')) like '%" + content + "%'";
        }
        if (!StringUtils.isEmpty(community)) {
            conditionSql += " and t.belong_community = '" + community + "'";
        }

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

@ -113,6 +113,7 @@ public class MedicinedeviceService  extends BaseJpaService<Mediicinedevice, Medi
        }
        Mediicinedevice mediicinedevice = new Mediicinedevice();
        mediicinedevice.setEquNum(deviceId);
        mediicinedevice.setEquName(deviceId);
        mediicinedevice.setLayer(layer);
        mediicinedevice.setWayer(wayer);
        mediicinedevice.setCargoCapacity("5");
@ -2397,7 +2398,7 @@ public class MedicinedeviceService  extends BaseJpaService<Mediicinedevice, Medi
                "    t.wayer AS wayer\n" +
                "FROM\n" +
                "    t_mediicine_device AS t WHERE t.del = 1 and ',"+ ids +",' LIKE CONCAT('%,',t.id,',%')";
        String sencordSql = "SELECT\n" +
        String secondSql = "SELECT\n" +
                "\ttmi.layer_no AS layerNo,\n" +
                "\ttmi.wayer_no AS wayerNo,\n" +
                "\ttmi.qty AS qty,\n" +
@ -2453,7 +2454,7 @@ public class MedicinedeviceService  extends BaseJpaService<Mediicinedevice, Medi
            String tempStr = "";
            //is not null 用于管理端,新增备货单时,获取设备缺货信息,
            // 没有绑定药品的货道也显示,导致,窗口不好看而增加的,操作员端的,有待观察
            tempStr = sencordSql + " WHERE tmi.drug_code IS NOT NULL and tmi.org_code IS NOT NULL and tmi.id_device = '" + stringObjectMap.get("id").toString() + "'";
            tempStr = secondSql + " WHERE tmi.drug_code IS NOT NULL and tmi.org_code IS NOT NULL and tmi.qty < tmi.cargo_capacity and tmi.id_device = '" + stringObjectMap.get("id").toString() + "'";
            List<Map<String, Object>> childList = null;
            childList = hibenateUtils.createSQLQuery(tempStr);
            if (childList != null) {