1
18 小时以前 4d5c3bd8bfea7a5ae0b3cd606156a1e83e633bd9
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("客户信息同步")
@@ -131,6 +139,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());
@@ -170,50 +181,50 @@
            condition = new InventoryQueryCondition();
        }
        
        if (SIMULATED_DATA_ENABLE.equals("1")) {
            String x = "[\n" +
                    "  {\n" +
                    "    \"locId\": \"LOC-A-01-01\",\n" +
                    "    \"wareHouseId\": \"WH001\",\n" +
                    "    \"wareHouseName\": \"原料仓库\",\n" +
                    "    \"palletId\": \"PALLET001\",\n" +
                    "    \"matNr\": \"MAT10001\",\n" +
                    "    \"makTx\": \"钢材Q235\",\n" +
                    "    \"spec\": \"国标GB/T700-2006\",\n" +
                    "    \"anfme\": 10.5,\n" +
                    "    \"unit\": \"吨\",\n" +
                    "    \"status\": \"可用\",\n" +
                    "    \"orderType\": 1,\n" +
                    "    \"orderNo\": \"Order202698921\",\n" +
                    "    \"prepareType\": 1,\n" +
                    "    \"planNo\": \"PLAN202601060001\",\n" +
                    "    \"batch\": \"BATCH20260106001\",\n" +
                    "    \"stockOrgId\": \"ORG001\"\n" +
                    "  },\n" +
                    "  {\n" +
                    "    \"locId\": \"LOC-B-02-03\",\n" +
                    "    \"wareHouseId\": \"WH002\",\n" +
                    "    \"wareHouseName\": \"成品仓库\",\n" +
                    "    \"palletId\": \"PALLET002\",\n" +
                    "    \"matNr\": \"MAT20001\",\n" +
                    "    \"makTx\": \"电机组件\",\n" +
                    "    \"spec\": \"380V 50Hz\",\n" +
                    "    \"anfme\": 50,\n" +
                    "    \"unit\": \"台\",\n" +
                    "    \"status\": \"可用\",\n" +
                    "    \"orderType\": \"1\",\n" +
                    "    \"orderNo\": \"SO202601060001\",\n" +
                    "    \"prepareType\": 1,\n" +
                    "    \"planNo\": \"PLAN202601060002\",\n" +
                    "    \"batch\": \"BATCH20260106002\",\n" +
                    "    \"stockOrgId\": \"ORG001\"\n" +
                    "  }\n" +
                    "]";
            if (map == null || map.isEmpty()) {
                map = JSON.parseArray(x);
            }
            return CommonResponse.ok(JSONArray.parseArray(map.toJSONString(), InventoryDetails.class));
        }
//        if (SIMULATED_DATA_ENABLE.equals("1")) {
//            String x = "[\n" +
//                    "  {\n" +
//                    "    \"locId\": \"LOC-A-01-01\",\n" +
//                    "    \"wareHouseId\": \"WH001\",\n" +
//                    "    \"wareHouseName\": \"原料仓库\",\n" +
//                    "    \"palletId\": \"PALLET001\",\n" +
//                    "    \"matNr\": \"MAT10001\",\n" +
//                    "    \"makTx\": \"钢材Q235\",\n" +
//                    "    \"spec\": \"国标GB/T700-2006\",\n" +
//                    "    \"anfme\": 10.5,\n" +
//                    "    \"unit\": \"吨\",\n" +
//                    "    \"status\": \"可用\",\n" +
//                    "    \"orderType\": 1,\n" +
//                    "    \"orderNo\": \"Order202698921\",\n" +
//                    "    \"prepareType\": 1,\n" +
//                    "    \"planNo\": \"PLAN202601060001\",\n" +
//                    "    \"batch\": \"BATCH20260106001\",\n" +
//                    "    \"stockOrgId\": \"ORG001\"\n" +
//                    "  },\n" +
//                    "  {\n" +
//                    "    \"locId\": \"LOC-B-02-03\",\n" +
//                    "    \"wareHouseId\": \"WH002\",\n" +
//                    "    \"wareHouseName\": \"成品仓库\",\n" +
//                    "    \"palletId\": \"PALLET002\",\n" +
//                    "    \"matNr\": \"MAT20001\",\n" +
//                    "    \"makTx\": \"电机组件\",\n" +
//                    "    \"spec\": \"380V 50Hz\",\n" +
//                    "    \"anfme\": 50,\n" +
//                    "    \"unit\": \"台\",\n" +
//                    "    \"status\": \"可用\",\n" +
//                    "    \"orderType\": \"1\",\n" +
//                    "    \"orderNo\": \"SO202601060001\",\n" +
//                    "    \"prepareType\": 1,\n" +
//                    "    \"planNo\": \"PLAN202601060002\",\n" +
//                    "    \"batch\": \"BATCH20260106002\",\n" +
//                    "    \"stockOrgId\": \"ORG001\"\n" +
//                    "  }\n" +
//                    "]";
//            if (map == null || map.isEmpty()) {
//                map = JSON.parseArray(x);
//            }
//            return CommonResponse.ok(JSONArray.parseArray(map.toJSONString(), InventoryDetails.class));
//        }
        try {
            if (wmsServerFeignClient == null) {