| | |
| | | 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; |
| | |
| | | @Api("银座新工厂(五期)ERP接口") |
| | | @Slf4j |
| | | public class ERPController { |
| | | |
| | | public static JSONArray map = new JSONArray(); |
| | | |
| | | @Resource |
| | | private ErpReportService erpReportService; |
| | |
| | | JSONArray params = paramsFormat(objParams); |
| | | List<Order> orderList = JSON.parseArray(params.toJSONString(), Order.class); |
| | | // 数据处理,转发server |
| | | for (Order order : orderList) { |
| | | erpReportService.addOrderToServer(order); |
| | | } |
| | | return CommonResponse.ok(); |
| | | } |
| | | |
| | |
| | | JSONArray params = paramsFormat(objParams); |
| | | List<Order> orderList = JSON.parseArray(params.toJSONString(), Order.class); |
| | | // 数据处理,转发server |
| | | AsnOrderAndItemsParams asnOrderAndItemsParams = new AsnOrderAndItemsParams(); |
| | | // asnOrder/items/save |
| | | return CommonResponse.ok(); |
| | | } |
| | | |
| | |
| | | " \"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); |
| | |
| | | // 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); |
| | | } |
| | |
| | | @PostMapping("/reportInOrOutBound") |
| | | public CommonResponse reportInOrOutBound(@RequestBody Object objParams) { |
| | | try { |
| | | erpReportService.reportInOrOutBound(objParams); |
| | | return erpReportService.reportInOrOutBound(objParams); |
| | | } catch (Exception e) { |
| | | log.error("erp, reportInOrOutBound", e); |
| | | } |