diff --git a/measurement/src/main/java/com/ruoyi/bill/controller/PoundmstController.java b/measurement/src/main/java/com/ruoyi/bill/controller/PoundmstController.java index 9965c64..59e80d5 100644 --- a/measurement/src/main/java/com/ruoyi/bill/controller/PoundmstController.java +++ b/measurement/src/main/java/com/ruoyi/bill/controller/PoundmstController.java @@ -104,6 +104,17 @@ public class PoundmstController extends BaseController return toAjax(poundmstService.insertPoundmst(poundmst)); } + /** + * 完成主榜单信息 + */ + @PreAuthorize("@ss.hasPermi('measurement/bill:poundmst:add')") + @Log(title = "主榜单信息", businessType = BusinessType.INSERT) + @GetMapping(value = "/complete/{id}") + public AjaxResult complete(@PathVariable("id") String id) + { + return toAjax(poundmstService.completePoundmst(id)); + } + /** * 修改主榜单信息 */ diff --git a/measurement/src/main/java/com/ruoyi/bill/service/IPoundmstService.java b/measurement/src/main/java/com/ruoyi/bill/service/IPoundmstService.java index b72b274..41d20c9 100644 --- a/measurement/src/main/java/com/ruoyi/bill/service/IPoundmstService.java +++ b/measurement/src/main/java/com/ruoyi/bill/service/IPoundmstService.java @@ -53,6 +53,14 @@ public interface IPoundmstService extends IService */ public int updatePoundmst(Poundmst poundmst); + /** + * 完成主榜单信息 + * + * @param id 主榜单信息 + * @return 结果 + */ + public int completePoundmst(String id); + /** * 批量删除主榜单信息 * diff --git a/measurement/src/main/java/com/ruoyi/bill/service/impl/PoundBillServiceImpl.java b/measurement/src/main/java/com/ruoyi/bill/service/impl/PoundBillServiceImpl.java index 85d0945..0ed39cb 100644 --- a/measurement/src/main/java/com/ruoyi/bill/service/impl/PoundBillServiceImpl.java +++ b/measurement/src/main/java/com/ruoyi/bill/service/impl/PoundBillServiceImpl.java @@ -49,7 +49,8 @@ public class PoundBillServiceImpl extends ServiceImpl i { poundmst.initAddFields(poundmst); boolean save = save(poundmst); - //调用主榜单导入方法。 - //调用磅单回调接口。 - try { - if ("SP_InStock".equals(poundmst.getOabilltype())) - apiPostBack.makePoundmstFormData(poundmst.getId()); - } catch (IOException e) { - throw new RuntimeException("磅单:" + poundmst.getUsrcode() + "推送星空时,出现异常:"+e.getMessage()); - } if (save){ return 1; } @@ -110,6 +102,20 @@ public class PoundmstServiceImpl extends ServiceImpl i return -1; } + @Override + public int completePoundmst(String id) { + try { + //推送星空 + apiPostBack.makePoundmstFormData(id); + + //推送完成后。将单据状态设置为完成。 + + }catch (Exception e){ + throw new RuntimeException("主榜单:" + id + "推送星空时,出现异常:"+e.getMessage()); + } + return 1; + } + /** * 批量删除主榜单信息 * diff --git a/measurement/src/main/resources/mapper/measurement/bill/PoundmstMapper.xml b/measurement/src/main/resources/mapper/measurement/bill/PoundmstMapper.xml index c8455dc..e215a05 100644 --- a/measurement/src/main/resources/mapper/measurement/bill/PoundmstMapper.xml +++ b/measurement/src/main/resources/mapper/measurement/bill/PoundmstMapper.xml @@ -113,6 +113,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and cangKuNumber = #{cangKuNumber} and sccjNum = #{sccjNum} + order by crtdt desc