| | |
| | | package com.example.erp.service.sd; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.example.erp.entity.sd.BasicData; |
| | | import com.example.erp.entity.sd.BasicOtherMoney; |
| | | import com.example.erp.entity.sd.BomBase; |
| | | import com.example.erp.entity.sd.Customer; |
| | | import com.example.erp.entity.pp.FlowCard; |
| | | import com.example.erp.entity.sd.*; |
| | | import com.example.erp.mapper.sd.BomDataMapper; |
| | | import com.example.erp.mapper.sd.BasicOtherMoneyMapper; |
| | | import com.example.erp.mapper.sd.CustomerMapper; |
| | |
| | | |
| | | return true; |
| | | } |
| | | |
| | | public Map<String, Object> getOrderBomDataSv(String orderId) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", bomDataMapper.getOrderBomDataMp(orderId)); |
| | | return map; |
| | | } |
| | | |
| | | public Map<String, Object> getBomDataProductSv(Map<String, Object> object) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();//最终结果 |
| | | List<OrderDetail> orderDetailsList = JSONArray.parseArray(JSONObject.toJSONString(object.get("productName")), OrderDetail.class); |
| | | if (!orderDetailsList.isEmpty()) { |
| | | for (OrderDetail od : orderDetailsList) { |
| | | Map<String, Object> itemmap = new HashMap<>(); |
| | | itemmap.put("data", bomDataMapper.getBOMDetails(od.getProductId())); |
| | | list.add(itemmap); |
| | | |
| | | } |
| | | } |
| | | map.put("data", list); |
| | | return map; |
| | | } |
| | | } |