1
18 分钟以前 fdaef787cf4ffe516a395559abe75db531af9af8
rsf-open-api/src/main/java/com/vincent/rsf/openApi/controller/phyz/ERPController.java
@@ -18,8 +18,8 @@
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import jakarta.annotation.Resource;
import jakarta.servlet.http.HttpServletRequest;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@@ -56,7 +56,11 @@
        JSONArray params = paramsFormat(objParams);
        List<Warehouse> warehouseList = JSON.parseArray(params.toJSONString(), Warehouse.class);
        // 数据处理,转发server
        return CommonResponse.ok();
        String resultMsg = erpReportService.syncWareHouse(warehouseList);
        if ("200".equals(resultMsg)){
            return  CommonResponse.ok(resultMsg);
        }
        return CommonResponse.error(resultMsg);
    }
    @ApiOperation("物料信息同步")
@@ -73,7 +77,11 @@
        JSONArray params = paramsFormat(objParams);
        List<Material> materialList = JSON.parseArray(params.toJSONString(), Material.class);
        // 数据处理,转发server
        return CommonResponse.ok();
        String resultMsg = erpReportService.syncMaterial(materialList);
        if ("200".equals(resultMsg)){
            return  CommonResponse.ok(resultMsg);
        }
        return CommonResponse.error(resultMsg);
    }
    @ApiOperation("客户信息同步")
@@ -90,7 +98,11 @@
        JSONArray params = paramsFormat(objParams);
        List<Customer> customerList = JSON.parseArray(params.toJSONString(), Customer.class);
        // 数据处理,转发server
        return CommonResponse.ok();
        String resultMsg = erpReportService.syncCustomer(customerList);
        if ("200".equals(resultMsg)){
            return  CommonResponse.ok(resultMsg);
        }
        return CommonResponse.error(resultMsg);
    }
    @ApiOperation("供应商信息同步")
@@ -107,6 +119,10 @@
        JSONArray params = paramsFormat(objParams);
        List<Supplier> supplierList = JSON.parseArray(params.toJSONString(), Supplier.class);
        // 数据处理,转发server
        String resultMsg = erpReportService.syncSupplier(supplierList);
        if ("200".equals(resultMsg)){
            return  CommonResponse.ok(resultMsg);
        }
        return CommonResponse.ok();
    }
@@ -131,6 +147,9 @@
                errorMsg.append(order.getOrderNo()+"下发成功;");
            } else {
                errorMsg.append(order.getOrderNo()+"下发失败,原因:"+i+";");
                if (orderList.size()==1){
                    return CommonResponse.error(errorMsg.toString());
                }
            }
        }
        return CommonResponse.ok(errorMsg.toString());