1
3 天以前 df08ca13ad69fd3908bfcd5f39f05f6c4ffb668a
rsf-open-api/src/main/java/com/vincent/rsf/openApi/controller/phyz/ERPController.java
@@ -7,7 +7,6 @@
import com.vincent.rsf.openApi.entity.dto.CommonResponse;
import com.vincent.rsf.openApi.entity.phyz.*;
import com.vincent.rsf.openApi.service.phyz.ErpReportService;
import com.vincent.rsf.server.manager.controller.params.AsnOrderAndItemsParams;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
@@ -28,6 +27,8 @@
@Api("银座新工厂(五期)ERP接口")
@Slf4j
public class ERPController {
    public static JSONArray map = new JSONArray();
    @Resource
    private ErpReportService erpReportService;
@@ -115,7 +116,16 @@
        JSONArray params = paramsFormat(objParams);
        List<Order> orderList = JSON.parseArray(params.toJSONString(), Order.class);
        // 数据处理,转发server
        return CommonResponse.ok();
        StringBuffer errorMsg = new StringBuffer();
        for (Order order : orderList) {
            String i = erpReportService.addOrderToServer(order);
            if (i.equals("200")){
                errorMsg.append(order.getOrderNo()+"下发成功;");
            } else {
                errorMsg.append(order.getOrderNo()+"下发失败,原因:"+i+";");
            }
        }
        return CommonResponse.ok(errorMsg.toString());
    }
    @ApiOperation("入/出库任务通知单取消")
@@ -132,8 +142,6 @@
        JSONArray params = paramsFormat(objParams);
        List<Order> orderList = JSON.parseArray(params.toJSONString(), Order.class);
        // 数据处理,转发server
        AsnOrderAndItemsParams asnOrderAndItemsParams = new AsnOrderAndItemsParams();
        // asnOrder/items/save
        return CommonResponse.ok();
    }
@@ -179,7 +187,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);
@@ -293,9 +304,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);
        }
@@ -306,7 +317,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);
        }