|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.vincent.rsf.framework.common.R; | 
|---|
|  |  |  | import com.vincent.rsf.framework.exception.CoolException; | 
|---|
|  |  |  | import com.vincent.rsf.server.api.controller.erp.params.OrderParams; | 
|---|
|  |  |  | import com.vincent.rsf.server.api.controller.erp.params.SyncLocReviseParams; | 
|---|
|  |  |  | import com.vincent.rsf.server.api.controller.erp.params.SyncOrderParams; | 
|---|
|  |  |  | import com.vincent.rsf.server.api.controller.erp.params.SyncTransferParams; | 
|---|
|  |  |  | import com.vincent.rsf.server.api.controller.erp.params.*; | 
|---|
|  |  |  | import com.vincent.rsf.server.api.service.ReceiveMsgService; | 
|---|
|  |  |  | import com.vincent.rsf.server.common.annotation.OperationLog; | 
|---|
|  |  |  | import com.vincent.rsf.server.common.utils.ExcelUtil; | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.entity.excel.AsnOrderTemplate; | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.enums.OrderType; | 
|---|
|  |  |  | import com.vincent.rsf.server.system.controller.BaseController; | 
|---|
|  |  |  | import io.swagger.annotations.Api; | 
|---|
|  |  |  | import io.swagger.annotations.ApiOperation; | 
|---|
|  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * @author Ryan | 
|---|
|  |  |  | * @date 2025/8/19 | 
|---|
|  |  |  | * @description: 同步盘点单据 | 
|---|
|  |  |  | * @description: 收货通知单同步 | 
|---|
|  |  |  | * @version 1.0 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiOperation("同步单据") | 
|---|
|  |  |  | @OperationLog("单据同步") | 
|---|
|  |  |  | @PostMapping("/sync/checks") | 
|---|
|  |  |  | public R syncCheckResult(@RequestBody SyncOrderParams syncOrders) { | 
|---|
|  |  |  | if (Objects.isNull(syncOrders)) { | 
|---|
|  |  |  | public R syncCheckResult(@RequestBody List<SyncOrderParams> syncOrders) { | 
|---|
|  |  |  | if (Objects.isNull(syncOrders) || syncOrders.isEmpty()) { | 
|---|
|  |  |  | throw new CoolException("参数不能为空!!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return receiveMsgService.syncCheckOrder(syncOrders, getLoginUserId()); | 
|---|
|  |  |  | 
|---|
|  |  |  | if (Objects.isNull(transferParams)) { | 
|---|
|  |  |  | throw new CoolException("参数不能为空!!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return receiveMsgService.syncTransfer(transferParams); | 
|---|
|  |  |  | return receiveMsgService.syncTransfer(transferParams, getLoginUserId()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | if (Objects.isNull(reviseParams)) { | 
|---|
|  |  |  | return R.error("参数不能为空!!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return receiveMsgService.syncLocRevise(reviseParams); | 
|---|
|  |  |  | return receiveMsgService.syncLocRevise(reviseParams, getLoginUserId()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | 
|---|
|  |  |  | @ApiOperation("单据修改") | 
|---|
|  |  |  | @OperationLog("单据修改") | 
|---|
|  |  |  | @PostMapping("/sync/orders/update") | 
|---|
|  |  |  | public R syncOrderUpdate(@RequestBody SyncOrderParams orders) { | 
|---|
|  |  |  | if (Objects.isNull(orders)) { | 
|---|
|  |  |  | public R syncOrderUpdate(@RequestBody List<SyncOrderParams> orders) { | 
|---|
|  |  |  | if (Objects.isNull(orders) || orders.isEmpty()) { | 
|---|
|  |  |  | return R.error("参数不能为空!!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return receiveMsgService.syncOrderUpdate(orders); | 
|---|
|  |  |  | //        return receiveMsgService.syncOrderUpdate(orders); | 
|---|
|  |  |  | return receiveMsgService.syncCheckOrder(orders, getLoginUserId()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | @ApiOperation("单据删除") | 
|---|
|  |  |  | @OperationLog("单据删除") | 
|---|
|  |  |  | @PostMapping("/sync/orders/delete") | 
|---|
|  |  |  | public R syncOrderDel(@RequestBody List<OrderParams> orders) { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return R.ok(); | 
|---|
|  |  |  | public R syncOrderDel(@RequestBody List<SyncOrderParams> orders) { | 
|---|
|  |  |  | if (Objects.isNull(orders)) { | 
|---|
|  |  |  | return R.error("参数不能为空!!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return receiveMsgService.syncOrderDelete(orders); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * @author Ryan | 
|---|
|  |  |  | * @date 2025/8/22 | 
|---|
|  |  |  | * @description: 盘点差异单同步 | 
|---|
|  |  |  | * @version 1.0 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @PostMapping("/sync/check/result") | 
|---|
|  |  |  | @ApiOperation("盘点差异单同步") | 
|---|
|  |  |  | @OperationLog("盘点差异单") | 
|---|
|  |  |  | public R checkResult(@RequestBody SyncCheckDiffParams syncParams) { | 
|---|
|  |  |  | if (Objects.isNull(syncParams)) { | 
|---|
|  |  |  | return R.error("参数不能为空!!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return receiveMsgService.syncCheckDiffs(syncParams); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|