@Overridepublic GoodsBaseInfoEpcVO selectEpcGoodsBaseInfo(CarConfig carconfig, String realCarDKText, String realCarAgeText) {// 查询变速箱油信息GoodsBaseInfoEpcVO vo = new GoodsBaseInfoEpcVO();if (carconfig == null) {return new GoodsBaseInfoEpcVO();}List<String> keyWordList = Lists.newLinkedList();if (EasyepcConsts.POWERTYPE_1.equals(carconfig.getPowerType())) {// 汽油if (EasyepcConsts.GEARBOXTYPE_1.equals(carconfig.getGearboxType())|| EasyepcConsts.GEARBOXTYPE_2.equals(carconfig.getGearboxType())|| EasyepcConsts.GEARBOXTYPE_3.equals(carconfig.getGearboxType())|| EasyepcConsts.GEARBOXTYPE_4.equals(carconfig.getGearboxType())|| EasyepcConsts.GEARBOXTYPE_5.equals(carconfig.getGearboxType())) {// 自动挡if (EasyepcConsts.GEARBOXTYPE_1.equals(carconfig.getGearboxType())) {// 双离合keyWordList.add("湿式双离合");} else if (EasyepcConsts.GEARBOXTYPE_2.equals(carconfig.getGearboxType())|| EasyepcConsts.GEARBOXTYPE_3.equals(carconfig.getGearboxType())) {// 手自一体或者AMTString gearNum = carconfig.getGearNum();if (StringUtils.isEmpty(gearNum)) {return new GoodsBaseInfoEpcVO();}if (!StringUtils.isNumericSpace(gearNum)) {return new GoodsBaseInfoEpcVO();}int gearNumInt = Integer.parseInt(gearNum);if (gearNumInt <= 5) {keyWordList.add("IIID");keyWordList.add("多用途");keyWordList.add("5");} else {if (gearNumInt == 6) {keyWordList.add("多用途");keyWordList.add("6");} else if (gearNumInt == 7) {keyWordList.add("多用途");keyWordList.add("7");} else if (gearNumInt == 8) {keyWordList.add("8");keyWordList.add("9");} else if (gearNumInt == 9) {keyWordList.add("9");}}} else if (EasyepcConsts.GEARBOXTYPE_4.equals(carconfig.getGearboxType())|| EasyepcConsts.GEARBOXTYPE_5.equals(carconfig.getGearboxType())) {// 无极变速或者CVTkeyWordList.add("CVT");}} else {// 手动挡if (EasyepcConsts.VEHICLECLASS_1.equals(carconfig.getVehicleClass())|| EasyepcConsts.VEHICLECLASS_2.equals(carconfig.getVehicleClass())|| EasyepcConsts.VEHICLECLASS_3.equals(carconfig.getVehicleClass())) {keyWordList.add("GL-4");}}} else if (EasyepcConsts.POWERTYPE_2.equals(carconfig.getPowerType())) {// 柴油if (EasyepcConsts.GEARBOXTYPE_1.equals(carconfig.getGearboxType())|| EasyepcConsts.GEARBOXTYPE_2.equals(carconfig.getGearboxType())|| EasyepcConsts.GEARBOXTYPE_3.equals(carconfig.getGearboxType())|| EasyepcConsts.GEARBOXTYPE_4.equals(carconfig.getGearboxType())|| EasyepcConsts.GEARBOXTYPE_5.equals(carconfig.getGearboxType())) {// 自动挡if (EasyepcConsts.GEARBOXTYPE_1.equals(carconfig.getGearboxType())) {// 双离合 无商品数据return new GoodsBaseInfoEpcVO();} else if (EasyepcConsts.GEARBOXTYPE_2.equals(carconfig.getGearboxType())|| EasyepcConsts.GEARBOXTYPE_3.equals(carconfig.getGearboxType())) {// 手自一体或者AMTString gearNum = carconfig.getGearNum();if (StringUtils.isEmpty(gearNum)) {return new GoodsBaseInfoEpcVO();}if (!StringUtils.isNumericSpace(gearNum)) {return new GoodsBaseInfoEpcVO();}int gearNumInt = Integer.parseInt(gearNum);if (gearNumInt <= 5) {keyWordList.add("IIID");keyWordList.add("多用途");keyWordList.add("5");} else {if (gearNumInt == 6) {keyWordList.add("多用途");keyWordList.add("6");} else if (gearNumInt == 7) {keyWordList.add("多用途");keyWordList.add("7");} else if (gearNumInt == 8) {keyWordList.add("8");keyWordList.add("9");} else if (gearNumInt == 9) {keyWordList.add("9");}}} else if (EasyepcConsts.GEARBOXTYPE_4.equals(carconfig.getGearboxType())|| EasyepcConsts.GEARBOXTYPE_5.equals(carconfig.getGearboxType())) {// 无极变速或者CVTkeyWordList.add("CVT");}} else {// 手动挡if (EasyepcConsts.VEHICLECLASS_1.equals(carconfig.getVehicleClass())|| EasyepcConsts.VEHICLECLASS_2.equals(carconfig.getVehicleClass())|| EasyepcConsts.VEHICLECLASS_3.equals(carconfig.getVehicleClass())) {keyWordList.add("GL-4");} else if (EasyepcConsts.VEHICLECLASS_4.equals(carconfig.getVehicleClass())|| EasyepcConsts.VEHICLECLASS_5.equals(carconfig.getVehicleClass())) {keyWordList.add("GL-5");}}}List<GoodsBaseInfo> goodsBaseInfoBs = Lists.newLinkedList();for (String s : keyWordList) {List<GoodsBaseInfo> singlegoodsBaseInfoBs = this.selectList(new EntityWrapper<GoodsBaseInfo>().eq("is_deleted", CommonConstant.NO).eq("is_enable", CommonConstant.YES).eq("status", CommonConstant.YES).like("good_label_json", s));if (singlegoodsBaseInfoBs != null && !singlegoodsBaseInfoBs.isEmpty()) {goodsBaseInfoBs.addAll(singlegoodsBaseInfoBs);}}// 查询机油或者柴油String keyWord = null;if (EasyepcConsts.POWERTYPE_1.equals(carconfig.getPowerType())) {keyWord = "汽机油";} else if (EasyepcConsts.POWERTYPE_2.equals(carconfig.getPowerType())) {keyWord = "柴机油";}List<GoodsBaseInfo> goodsBaseInfoJy = this.selectList(new EntityWrapper<GoodsBaseInfo>().eq("is_deleted", CommonConstant.NO).eq("is_enable", CommonConstant.YES).eq("status", CommonConstant.YES).like("good_label_json", keyWord));List<GoodsBaseInfo> goodsBaseInfoJy1 = Lists.newLinkedList();if (goodsBaseInfoJy != null) {goodsBaseInfoJy1 = goodsBaseInfoJy.stream().filter(goodsBaseInfo -> goodsBaseInfo.getGoodLabelJson().contains(realCarDKText)).collect(Collectors.toList());}List<GoodsBaseInfo> goodsBaseInfoJy2 = Lists.newLinkedList();if (goodsBaseInfoJy1 != null) {goodsBaseInfoJy2 = goodsBaseInfoJy1.stream().filter(goodsBaseInfo -> goodsBaseInfo.getGoodLabelJson().contains(realCarAgeText)).collect(Collectors.toList());}List<GoodsBaseInfo> goodsBaseInfoJy3 = Lists.newLinkedList();List<String> goodsLabelList = goodsBaseInfoJy2.stream().map(p -> p.getGoodLabelJson()).collect(Collectors.toList());if (goodsLabelList.contains("生物基")) {goodsBaseInfoJy3 = goodsBaseInfoJy2.stream().filter(goodsBaseInfo -> goodsBaseInfo.getGoodLabelJson().contains("生物基")).collect(Collectors.toList());} else if (goodsLabelList.contains("极速")) {goodsBaseInfoJy3 = goodsBaseInfoJy2.stream().filter(goodsBaseInfo -> goodsBaseInfo.getGoodLabelJson().contains("极速")).collect(Collectors.toList());} else {goodsBaseInfoJy3 = goodsBaseInfoJy2.stream().filter(goodsBaseInfo -> goodsBaseInfo.getGoodLabelJson().contains("其它")).collect(Collectors.toList());}List<GoodsBaseInfo> goodsBaseInfoJy4 = Lists.newLinkedList();goodsLabelList = goodsBaseInfoJy3.stream().map(p -> p.getGoodLabelJson()).collect(Collectors.toList());if (goodsLabelList.contains("sn")) {goodsBaseInfoJy4 = goodsBaseInfoJy3.stream().filter(goodsBaseInfo -> goodsBaseInfo.getGoodLabelJson().contains("sn")).collect(Collectors.toList());} else if (goodsLabelList.contains("sm")) {goodsBaseInfoJy4 = goodsBaseInfoJy3.stream().filter(goodsBaseInfo -> goodsBaseInfo.getGoodLabelJson().contains("sm")).collect(Collectors.toList());} else if (goodsLabelList.contains("sl")) {goodsBaseInfoJy4 = goodsBaseInfoJy3.stream().filter(goodsBaseInfo -> goodsBaseInfo.getGoodLabelJson().contains("sl")).collect(Collectors.toList());} else {goodsBaseInfoJy4 = goodsBaseInfoJy3.stream().filter(goodsBaseInfo -> goodsBaseInfo.getGoodLabelJson().contains("sj")).collect(Collectors.toList());}goodsLabelList = goodsBaseInfoJy4.stream().map(p -> p.getGoodLabelJson()).collect(Collectors.toList());List<GoodsBaseInfo> goodsBaseInfoJy5 = Lists.newLinkedList();if (goodsLabelList.contains("4L")) {goodsBaseInfoJy5 = goodsBaseInfoJy4.stream().filter(goodsBaseInfo -> goodsBaseInfo.getGoodLabelJson().contains("4L")).collect(Collectors.toList());} else {goodsBaseInfoJy5 = goodsBaseInfoJy4.stream().filter(goodsBaseInfo -> goodsBaseInfo.getGoodLabelJson().contains("1L")).collect(Collectors.toList());}vo.setGoodsBaseInfoBs(goodsBaseInfoBs);vo.setGoodsBaseInfoJy(goodsBaseInfoJy5);return vo;}
/*** 查询工单管理列表* * @param requestApiParam* @return*/@RequestMapping(value = "v1/listmanagerworkorder", method = RequestMethod.POST)@ApiOperation(value = "查询工单管理列表||二期", notes = "一期一阶段")@ApiVersion(group = { ApiVersionConsts.V_2_2_4 })public ResultEntity<List<UserDispatchMakeInfoVO>> listStatusWorkOrder1(@RequestBody RequestApiParam<ListManagerWorkOrderDTO> requestApiParam) {assertUidNotNull(requestApiParam);UserBaseInfo userBaseInfo = this.userBaseInfoService.selectByUserId(HttpConsts.NO, HttpConsts.YES,requestApiParam.getUid());if (userBaseInfo == null) {return error(ResultCode.USER_NOT_EXIST);}if (userBaseInfo.getIdentity() == null) {return error(ResultCode.SYS_DATA_ERROR);}ListManagerWorkOrderDTO dto = requestApiParam.getT();List<Integer> makeUserIdList = Lists.newLinkedList();if (UserConsts.OTHER_SERVICE.equals(userBaseInfo.getIdentity())) {makeUserIdList.add(requestApiParam.getUid());} else {String makeUserIdStr = dto.getMakeUserId();try {makeUserIdList = JSON.parseArray(makeUserIdStr, Integer.class);if (makeUserIdList == null || makeUserIdList.isEmpty()) {List<UserBaseInfoVO> list = this.userBaseInfoService.selectUserBaseInfoByServiceUserId(new Page<UserBaseInfo>(1, -1), requestApiParam.getUid());if (list == null || list.isEmpty()) {return error(ResultCode.PARAM_CHECK_ERROR);}makeUserIdList = list.stream().map(p -> p.getId()).collect(Collectors.toList());}} catch (Exception e) {return error(ResultCode.PARAM_DECODE_ERROR);}}List<UserDispatchMakeInfoVO> list = this.iUserDispatchMakeInfoService.selectManagerWorkOrderListByCondition(new Page<UserDispatchMakeInfo>(dto.getPageNo(), dto.getPageSize()), makeUserIdList,dto.getWorkOrderStatus());if (list == null || list.isEmpty()) {list = Lists.newArrayList();return success(list);}for (UserDispatchMakeInfoVO vo : list) {if (UserConsts.PLATFORM_SERVICE.equals(userBaseInfo.getIdentity())|| UserConsts.THIRD_SERVICE.equals(userBaseInfo.getIdentity())) {// 服务商显示价 服务商结算价vo.setShowPrice(this.ifNullAS0(vo.getServiceOrderPrice()));} else if (UserConsts.OTHER_SERVICE.equals(userBaseInfo.getIdentity())) {// 安装师傅或者个人计师 个人技师结算价vo.setShowPrice(this.ifNullAS0(vo.getMasterOrderPrice()));}}return success(list);}