lbq
3 天以前 11db152ac1ee3d47e1047fb0c96fc7e10da345ac
rsf-open-api/src/main/java/com/vincent/rsf/openApi/controller/phyz/ERPController.java
@@ -6,6 +6,8 @@
import com.vincent.rsf.framework.exception.CoolException;
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;
@@ -15,6 +17,7 @@
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.List;
import java.util.Objects;
@@ -25,6 +28,10 @@
@Api("银座新工厂(五期)ERP接口")
@Slf4j
public class ERPController {
    @Resource
    private ErpReportService erpReportService;
    @ApiOperation("仓库信息同步")
    @PostMapping("/wareHouse/sync")
@@ -125,6 +132,8 @@
        JSONArray params = paramsFormat(objParams);
        List<Order> orderList = JSON.parseArray(params.toJSONString(), Order.class);
        // 数据处理,转发server
        AsnOrderAndItemsParams asnOrderAndItemsParams = new AsnOrderAndItemsParams();
        // asnOrder/items/save
        return CommonResponse.ok();
    }
@@ -281,4 +290,28 @@
        return new JSONArray();
    }
    // region 测试推送功能
    @ApiOperation("登录")
    @PostMapping("/loginBySign")
    public CommonResponse loginBySign(@RequestBody Object objParams) {
        try {
            erpReportService.loginBySign();
        } catch (Exception e) {
            log.error("erp, loginBySign", e);
        }
        return CommonResponse.ok();
    }
    @ApiOperation("入/出库任务回调")
    @PostMapping("/reportInOrOutBound")
    public CommonResponse reportInOrOutBound(@RequestBody Object objParams) {
        try {
            erpReportService.reportInOrOutBound(objParams);
        } catch (Exception e) {
            log.error("erp, reportInOrOutBound", e);
        }
        return CommonResponse.ok();
    }
    // endregion
}