java 8 删选集合 和取集合中的字段重组成集合的使用

	@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);}

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/418654.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

1.名字忘了

1.h5文档类型和字符集是&#xff1f;<!DOCTYPE html><meta charset"utf-8" /> 2.请描述h5的canvascanvas是HTML5中的新元素&#xff0c;你可以使用javascript用它来绘制图形、图标、以及其它任何视觉性图像。它也可用于创建图片特效和动画。canvas 元素本…

前端学习(1877)vue之电商管理系统电商系统之头部布局

目录结构 router.js import Vue from vue import Router from vue-router import Login from ./components/Login.vue import Home from ./components/Home.vueVue.use(Router)const router new Router({routes:[{path:/,redirect:/login},{path:/login,component:Login},{pat…

springMVC 后端代码 如何用 @requestParam() 接收前台传过来的数组

https://blog.csdn.net/bigtree_3721/article/details/71479667 https://www.jb51.net/article/130922.htm https://blog.csdn.net/gao454917848/article/details/46355877 第二种 &#xff1a; serviceWorkOrderList.search function () {var queryData {};queryData[wo…

.net 任务(Task)

1. Task &#xff08;任务&#xff09;&#xff1a; 很容易调用 ThreadPool.QueueUserWorkItem 实现异步操作&#xff0c;但是这个技术有许多 .net 引入Task类型来使用任务。 如下几种方式都是实现异步的方法&#xff1a; public static void Method(){ThreadPool.QueueUserWor…

前端学习(1878)vue之电商管理系统电商系统之左侧菜单布局

目录结构 router.js import Vue from vue import Router from vue-router import Login from ./components/Login.vue import Home from ./components/Home.vueVue.use(Router)const router new Router({routes:[{path:/,redirect:/login},{path:/login,component:Login},{pat…

Activiti工作流6.0表结构介绍

https://blog.csdn.net/qq_38011415/article/details/101127222

Ubuntu 16.04 搭建Android开发环境

1、Installing Java sudo add-apt-repository ppa:webupd8team/java sudo apt-get update sudo apt-get install oracle-java8-installer After that sudo apt-get install oracle-java8-set-default 2、Installing Android Studio (1) Download Android Studio from here or h…

前端学习(1879)vue之电商管理系统电商系统之通过axios拦截器添加token认证

目录结构 router.js import Vue from vue import Router from vue-router import Login from ./components/Login.vue import Home from ./components/Home.vueVue.use(Router)const router new Router({routes:[{path:/,redirect:/login},{path:/login,component:Login},{pat…

activiti5.22 springboot 流程引擎 实战全过程

https://blog.csdn.net/ssyujay/article/details/83896809

前端学习(1880)vue之电商管理系统电商系统之获取左侧菜单数据

目录结构 router.js import Vue from vue import Router from vue-router import Login from ./components/Login.vue import Home from ./components/Home.vueVue.use(Router)const router new Router({routes:[{path:/,redirect:/login},{path:/login,component:Login},{pat…

OpenGL学习之路(二)

1 引子 在上一篇读书笔记中&#xff0c;我们对书本中给出的例子进行详细的分析。首先是搭出一个框架&#xff1b;然后填充初始化函数&#xff0c;在初始化函数中向OpenGL提供顶点信息&#xff08;缓冲区对象&#xff09;和顶点属性信息&#xff08;顶点数组对象&#xff09;&a…

eclipse安装lombok

https://blog.csdn.net/Dorothy1224/article/details/79280591 https://blog.csdn.net/z_z_h_0/article/details/85119163

前端学习(1881)vue之电商管理系统电商系统之双层for循环渲染数据

目录结构 router.js import Vue from vue import Router from vue-router import Login from ./components/Login.vue import Home from ./components/Home.vueVue.use(Router)const router new Router({routes:[{path:/,redirect:/login},{path:/login,component:Login},{pat…

iOS之本地推送通知使用介绍

推送通知作用&#xff1a;可以让不在前台运行的app,告知用户app内部发生了什么事情 如何发送本地通知&#xff1a; 发送本地通知步骤&#xff1a; 1.创建本地通知对象 2.设置本地通知内容 3.调度本地通知 具体实现代码&#xff1a; 注意&#xff1a;iOS7通过上述代码可以完成发…

Swagger2 @ApiImplicitParam中dataType和paramType的区别?

https://blog.csdn.net/it_erge/article/details/91492997

前端学习(1882)vue之电商管理系统电商系统之设置字体颜色并添加标签

目录结构 router.js import Vue from vue import Router from vue-router import Login from ./components/Login.vue import Home from ./components/Home.vueVue.use(Router)const router new Router({routes:[{path:/,redirect:/login},{path:/login,component:Login},{pat…

前端学习(1883)vue之电商管理系统电商系统之每次只能打开一个菜单项并解决边框问题

目录结构 router.js import Vue from vue import Router from vue-router import Login from ./components/Login.vue import Home from ./components/Home.vueVue.use(Router)const router new Router({routes:[{path:/,redirect:/login},{path:/login,component:Login},{pat…

第一次冲刺阶段(三)

今天下午我们团队进行了第三次站立会议&#xff0c;总结了昨天的进展状况&#xff0c;的的确确出现很多问题&#xff0c;进展微乎其微&#xff0c;我们对安卓开发知识不熟悉&#xff0c;导致我们举步维艰&#xff0c;很考验耐性与团队的协作能力&#xff0c;我们必须坚持下去&a…