Преглед на файлове

BUG处理、单号直接取b2b平台

guq преди 7 години
родител
ревизия
acc2428e70

+ 11 - 0
applications/money/money-dto/src/main/java/com/usoftchina/saas/money/dto/ApcheckDTO.java

@@ -59,6 +59,17 @@ public class ApcheckDTO implements Serializable {
     @ApiModelProperty(value = "应付总额")
     private Double ac_payamont;//应付总额
 
+    @ApiModelProperty(value = "单据编号")
+    private String code;
+
+    public String getCode() {
+        return code;
+    }
+
+    public void setCode(String code) {
+        this.code = code;
+    }
+
     public Long getAc_b2bid() {
         return ac_b2bid;
     }

+ 3 - 3
applications/transfers/transfers-server/src/main/java/com/usoftchina/saas/transfers/service/impl/ApCheckServiceImpl.java

@@ -68,9 +68,9 @@ public class ApCheckServiceImpl implements ApCheckService{
             main.setAc_confirmstatus(Status.UNCONFIRM.getDisplay());
             main.setAc_confirmstatuscode(Status.UNCONFIRM.name());
             main.setAc_sendstatus(Status.SENDED.getDisplay());
-            //获取编号
-            String code = maxnumberService.getMaxnumberByCompanyid(BillCodeSeq.APCHECK.getCaller(), true, companyId).getData();
-            main.setAc_code(code);
+            //拿平台编号
+            //String code = maxnumberService.getMaxnumberByCompanyid(BillCodeSeq.APCHECK.getCaller(), true, companyId).getData();
+            main.setAc_code(form.getMain().getCode());
             apcheckMapper.insertSelective(main);
 
             //根据型号匹配物料

+ 13 - 6
applications/transfers/transfers-server/src/main/java/com/usoftchina/saas/transfers/service/impl/SaleDownServiceImpl.java

@@ -78,10 +78,10 @@ public class SaleDownServiceImpl implements SaleDownService{
                 main.setSa_custcode(customer.getCu_code());
                 main.setSa_custid(customer.getId());
             }
-            //取编号
-            String code = maxnumberService.getMaxnumberByCompanyid(BillCodeSeq.SALEDOWN.getCaller(), true, companyId).getData();
+            //取编号 客户采购单不需要编号
+            //String code = maxnumberService.getMaxnumberByCompanyid(BillCodeSeq.SALEDOWN.getCaller(), true, companyId).getData();
             //补充必要数据
-            main.setSa_code(code);
+            //main.setSa_code(code);
             main.setCreateTime(new Date());
             main.setCompanyId(companyId);
             main.setSa_status(Status.UNAUDITED.getDisplay());
@@ -96,15 +96,22 @@ public class SaleDownServiceImpl implements SaleDownService{
                 if (!StringUtils.isEmpty(custspeccode)) {
                     Product product = saledownMapper.findProductBySpec(custspeccode, companyId);
                     if (product != null) {
-                        detail.setSd_said(main.getId());
                         detail.setSd_prodcode(product.getPr_code());
                         detail.setSd_prodid(product.getId());
                         detail.setSd_prodspec(product.getPr_spec());
                         detail.setSd_produnit(product.getPr_unit());
                         detail.setSd_orispeccode(product.getPr_orispeccode());
-                        detail.setCompanyId(companyId);
-                        insertDetail.add(detail);
+                    } else {
+                        //为空时 自己选择
+                        detail.setSd_prodcode(null);
+                        detail.setSd_prodid(null);
+                        detail.setSd_prodspec(null);
+                        detail.setSd_produnit(null);
+                        detail.setSd_orispeccode(null);
                     }
+                    detail.setSd_said(main.getId());
+                    detail.setCompanyId(companyId);
+                    insertDetail.add(detail);
                 }
             }
             //插入从表