| | |
| | | map.put("spec", material.getSpec()); |
| | | map.put("describle", material.getDescribe()); |
| | | map.put("unit", material.getUnit()); |
| | | map.put("operateType", material.getOperateType()); |
| | | mappedList.add(map); |
| | | } |
| | | return mappedList; |
| | |
| | | map.put("type", null); |
| | | map.put("longitude", null); |
| | | map.put("latitude", null); |
| | | map.put("operateType", warehouse.getOperateType()); |
| | | mappedList.add(map); |
| | | } |
| | | return mappedList; |
| | |
| | | */ |
| | | private List<Map<String, Object>> customerToCompaniesParams(List<Customer> customerList) { |
| | | List<Map<String, Object>> mappedList = new ArrayList<>(); |
| | | int rowNum = 0; |
| | | for (Customer customer : customerList) { |
| | | rowNum++; |
| | | if (Objects.isNull(customer)) { |
| | | continue; |
| | | } |
| | | if (StringUtils.isBlank(customer.getCustomerId())) { |
| | | throw new CoolException("客户同步失败:第" + rowNum + "行客户编码为空"); |
| | | } |
| | | if (StringUtils.isBlank(customer.getCustomerName())) { |
| | | throw new CoolException("客户同步失败:第" + rowNum + "行客户名称为空"); |
| | | } |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("name", customer.getCustomerName()); |
| | | map.put("nameEn", null); |
| | | map.put("breifCode", customer.getCustomerNickName()); |
| | | // server 端类型转换使用中文描述 |
| | | map.put("type", customer.getType()); |
| | | map.put("type", "客户"); |
| | | map.put("contact", customer.getContact()); |
| | | map.put("tel", customer.getTelephone()); |
| | | map.put("email", customer.getEmail()); |
| | |
| | | map.put("province", null); |
| | | map.put("address", customer.getAddress()); |
| | | map.put("code", customer.getCustomerId()); |
| | | map.put("operateType", customer.getOperateType()); |
| | | mappedList.add(map); |
| | | } |
| | | return mappedList; |
| | |
| | | map.put("province", null); |
| | | map.put("address", supplier.getAddress()); |
| | | map.put("code", supplier.getSupplierId()); |
| | | map.put("operateType", supplier.getOperateType()); |
| | | mappedList.add(map); |
| | | } |
| | | return mappedList; |