lbq
3 天以前 a0c27199b7e512dc4087b80e3808f5fb1a081f0d
rsf-open-api/src/main/java/com/vincent/rsf/openApi/controller/phyz/ERPController.java
@@ -28,6 +28,8 @@
@Slf4j
public class ERPController {
    public static JSONArray map = new JSONArray();
    @Resource
    private ErpReportService erpReportService;
@@ -114,6 +116,9 @@
        JSONArray params = paramsFormat(objParams);
        List<Order> orderList = JSON.parseArray(params.toJSONString(), Order.class);
        // 数据处理,转发server
        for (Order order : orderList) {
            erpReportService.addOrderToServer(order);
        }
        return CommonResponse.ok();
    }
@@ -176,7 +181,10 @@
                    "    \"stockOrgId\": \"ORG001\"\n" +
                    "  }\n" +
                    "]";
            return CommonResponse.ok(JSONArray.parseArray(x, InventoryDetails.class));
            if (map == null || map.isEmpty()) {
                map = JSON.parseArray(x);
            }
            return CommonResponse.ok(JSONArray.parseArray(map.toJSONString(), InventoryDetails.class));
        }
        InventoryQueryCondition condition = JSON.parseObject(params.toJSONString(), InventoryQueryCondition.class);
@@ -290,9 +298,9 @@
    // region 测试推送功能
    @ApiOperation("登录")
    @PostMapping("/loginBySign")
    public CommonResponse loginBySign(@RequestBody Object objParams) {
    public CommonResponse loginBySign() {
        try {
            erpReportService.loginBySign();
            return CommonResponse.ok(erpReportService.loginBySign());
        } catch (Exception e) {
            log.error("erp, loginBySign", e);
        }
@@ -303,7 +311,7 @@
    @PostMapping("/reportInOrOutBound")
    public CommonResponse reportInOrOutBound(@RequestBody Object objParams) {
        try {
            erpReportService.reportInOrOutBound(objParams);
            return erpReportService.reportInOrOutBound(objParams);
        } catch (Exception e) {
            log.error("erp, reportInOrOutBound", e);
        }