| | |
| | | package com.example.erp.service.sd; |
| | | |
| | | 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.Customer; |
| | | import com.example.erp.mapper.sd.BasicDateMapper; |
| | | import com.example.erp.mapper.sd.BasicOtherMoneyMapper; |
| | |
| | | public Map<String, List<Object>> getOrderBasicData() { |
| | | //获取订单基本数据类型 |
| | | //创建Map对象 |
| | | Map<String, List<Object>> orderBasicDataMap = new HashMap<>(); ; |
| | | Map<String, List<Object>> orderBasicDataMap = new HashMap<>(); |
| | | //创建List对象 |
| | | orderBasicDataMap = getBasicDataByType("order"); |
| | | |
| | |
| | | orderBasicDataMap.put("customer",orderBasicDataList); |
| | | List<Customer> customerList = customerMapper.getCustomerList(); |
| | | for (Customer customer : customerList){ |
| | | customer.setProjectList(customerMapper.getProjectList(customer.getId())); |
| | | orderBasicDataMap.get("customer").add(customer); |
| | | } |
| | | |
| | | orderBasicDataMap.put("orderOtherMoney", Collections.singletonList(basicOtherMoneyMapper.selectList(null))); |
| | | orderBasicDataMap.put("orderOtherMoney", |
| | | Collections.singletonList( |
| | | basicOtherMoneyMapper.selectList(new QueryWrapper<BasicOtherMoney>().eq("state",1)) |
| | | )); |
| | | |
| | | |
| | | //返回Map对象 |
| | |
| | | //将数据放入List中 |
| | | BasicDataMap.get(item.getBasicCategory()).add(item); |
| | | } |
| | | BasicDataMap.put("deliveryOtherMoney", Collections.singletonList( basicOtherMoneyMapper.selectList(new QueryWrapper<BasicOtherMoney>().eq("state",1)))); |
| | | return BasicDataMap; |
| | | } |
| | | |
| | |
| | | basicData.setBasicType(basicTypeList.get(0)); |
| | | basicData.setBasicCategory(basicTypeList.get(1)); |
| | | basicData.setBasicName(map.get("input").toString()); |
| | | basicData.setNickname(map.get("nickname").toString()); |
| | | basicDateMapper.insert(basicData); |
| | | } |
| | | return true; |