Jelajahi Sumber

代码补充

yuansh 2 hari lalu
induk
melakukan
1878cd0f3e
18 mengubah file dengan 488 tambahan dan 129 penghapusan
  1. 5 0
      srm-module-code/src/main/java/org/jeecg/modules/cuspCode/controller/CuspSupplierProfileController.java
  2. 25 1
      srm-module-code/src/main/java/org/jeecg/modules/purCode/controller/PurShippingFeeController.java
  3. 5 0
      srm-module-code/src/main/java/org/jeecg/modules/purCode/entity/PurPayment.java
  4. 25 0
      srm-module-code/src/main/java/org/jeecg/modules/purCode/entity/PurShippingFee.java
  5. 21 21
      srm-module-code/src/main/java/org/jeecg/modules/purCode/entity/PurShippingFeeNotice.java
  6. 9 9
      srm-module-code/src/main/java/org/jeecg/modules/purCode/entity/PurShippingFeeProdeuct.java
  7. 2 0
      srm-module-code/src/main/java/org/jeecg/modules/purCode/mapper/xml/PurQuotationSelectionProductMapper.xml
  8. 82 0
      srm-module-code/src/main/java/org/jeecg/modules/purCode/service/impl/PurPaymentServiceImpl.java
  9. 2 0
      srm-module-code/src/main/java/org/jeecg/modules/purCode/vo/PurQuotationSelectionAlert.java
  10. 28 4
      srm-module-code/src/main/java/org/jeecg/modules/purCode/vo/PurShippingFeePage.java
  11. 102 39
      srm-module-code/src/main/java/org/jeecg/modules/saleCode/controller/SaleInvoiceController.java
  12. 1 1
      srm-module-code/src/main/java/org/jeecg/modules/saleCode/mapper/xml/SaleDeliveryMapper.xml
  13. 2 0
      srm-module-code/src/main/java/org/jeecg/modules/saleCode/mapper/xml/SaleOrderProductMapper.xml
  14. 1 1
      srm-module-code/src/main/java/org/jeecg/modules/saleCode/util/EasyExcelUtil.java
  15. 120 0
      srm-module-code/src/main/java/org/jeecg/modules/saleCode/util/HttpUtils2.java
  16. 51 51
      srm-module-code/src/main/java/org/jeecg/modules/saleCode/util/JibeApiClient.java
  17. 4 2
      srm-module-code/src/main/java/org/jeecg/modules/saleCode/vo/SaleInvoicePage.java
  18. 3 0
      srm-module-code/src/main/java/org/jeecg/modules/saleCode/vo/SaleOrderAlert.java

+ 5 - 0
srm-module-code/src/main/java/org/jeecg/modules/cuspCode/controller/CuspSupplierProfileController.java

@@ -356,6 +356,7 @@ public class CuspSupplierProfileController {
     public Result<String> getDisable(@RequestParam(name = "ids", required = true) String ids, String info) {
 
         CuspSupplierProfile ent = cuspSupplierProfileService.getById(ids);
+        //状态(1-启用,0-停用)
         String st = StringUtils.isBlank(info) ? "1" : "0";
         if(st.equals(ent.getStatus())){
 
@@ -363,6 +364,10 @@ public class CuspSupplierProfileController {
         }
         CuspSupplierProfile cuspSupplierProfile = new CuspSupplierProfile();
         cuspSupplierProfile.setStatus(Integer.valueOf(st));
+        if(st.equals("0")){
+
+            cuspSupplierProfile.setTemporarySupplier(0);
+        }
         cuspSupplierProfile.setId(ids);
         cuspSupplierProfile.setReasonFor(info);
         cuspSupplierProfileService.updateById(cuspSupplierProfile);

+ 25 - 1
srm-module-code/src/main/java/org/jeecg/modules/purCode/controller/PurShippingFeeController.java

@@ -90,7 +90,31 @@ public class PurShippingFeeController {
 		IPage<PurShippingFee> pageList = purShippingFeeService.page(page, queryWrapper);
 		return Result.OK(pageList);
 	}
-	
+
+	/**
+	 * 分页列表查询
+	 *
+	 * @param purShippingFee
+	 * @param pageNo
+	 * @param pageSize
+	 * @param req
+	 * @return
+	 */
+	//@AutoLog(value = "运费采购订单-分页列表查询")
+	@ApiOperation(value="运费采购订单-分页列表查询", notes="运费采购订单-分页列表查询")
+	@GetMapping(value = "/listRequest")
+	@PermissionData(pageComponent="purchase/freightPurchaseOrder/FreightPurchaseOrderList")
+	public Result<IPage<PurShippingFee>> listRequest(PurShippingFee purShippingFee,
+								   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+								   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+								   HttpServletRequest req) {
+        QueryWrapper<PurShippingFee> queryWrapper = QueryGenerator.initQueryWrapper(purShippingFee, req.getParameterMap());
+		Page<PurShippingFee> page = new Page<PurShippingFee>(pageNo, pageSize);
+		queryWrapper.in("payment","0","2");
+		IPage<PurShippingFee> pageList = purShippingFeeService.page(page, queryWrapper);
+		return Result.OK(pageList);
+	}
+
 	/**
 	 *   添加
 	 *

+ 5 - 0
srm-module-code/src/main/java/org/jeecg/modules/purCode/entity/PurPayment.java

@@ -123,6 +123,11 @@ public class PurPayment implements Serializable {
 	@Excel(name = "采购订单(orderCode)", width = 15)
     @ApiModelProperty(value = "采购订单(orderCode)")
     private String orderCode;
+
+	//项目
+    private String projectName;
+    private String project;
+
 	/**申请金额(apply money)*/
 	@Excel(name = "申请金额(apply money)", width = 15)
     @ApiModelProperty(value = "申请金额(apply money)")

+ 25 - 0
srm-module-code/src/main/java/org/jeecg/modules/purCode/entity/PurShippingFee.java

@@ -133,4 +133,29 @@ public class PurShippingFee implements Serializable {
     @Excel(name = "银行帐号", width = 15)
     @ApiModelProperty(value = "银行帐号")
     private String bankAccount;
+
+
+    /**预计付款日期(Expected payment date)*/
+    @Excel(name = "预计付款日期(Expected payment date)", width = 15, format = "yyyy-MM-dd")
+    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern="yyyy-MM-dd")
+    @ApiModelProperty(value = "预计付款日期(Expected payment date)")
+    private Date expectedPaymentDate;
+    /**申请金额(approve money)*/
+    @Excel(name = "申请金额(approve money)", width = 15)
+    @ApiModelProperty(value = "申请金额(approve money)")
+    private java.math.BigDecimal approveMoney;
+    @Excel(name = "已付款金额(参照)", width = 15)
+    @ApiModelProperty(value = "已付款金额(参照)")
+    private java.math.BigDecimal payMoney;
+    /**付款(payment)1是0否*/
+    @Excel(name = "付款(payment)1是0否", width = 15)
+    @ApiModelProperty(value = "付款(payment)1是0否2部分付款")
+    @Dict(dicCode = "yes_or_no")
+    private String payment;
+    //类型(预付款/月结款)
+    @Excel(name = "类型(type)", width = 15)
+    @ApiModelProperty(value = "类型(预付款/月结款)")
+    private String type;
+
 }

+ 21 - 21
srm-module-code/src/main/java/org/jeecg/modules/purCode/entity/PurShippingFeeNotice.java

@@ -36,7 +36,7 @@ public class PurShippingFeeNotice implements Serializable {
     @ApiModelProperty(value = "运费采购订单主键")
     private String headId;
 	/**删除*/
-	@Excel(name = "删除", width = 15)
+//	@Excel(name = "删除", width = 15)
     @ApiModelProperty(value = "删除")
     @TableLogic
     private Integer delFlag;
@@ -59,7 +59,7 @@ public class PurShippingFeeNotice implements Serializable {
     @ApiModelProperty(value = "更新时间")
     private Date updateTime;
 	/**发货日期*/
-	@Excel(name = "发货日期", width = 15, format = "yyyy-MM-dd")
+//	@Excel(name = "发货日期", width = 15, format = "yyyy-MM-dd")
 	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
     @DateTimeFormat(pattern="yyyy-MM-dd")
     @ApiModelProperty(value = "发货日期")
@@ -81,47 +81,47 @@ public class PurShippingFeeNotice implements Serializable {
     @ApiModelProperty(value = "客户(customer)")
     private String customer;
 	/**客户(customer)名称*/
-	@Excel(name = "客户(customer)名称", width = 15)
+	@Excel(name = "客户(customer)", width = 15)
     @ApiModelProperty(value = "客户(customer)名称")
     private String customerName;
 	/**业务类型(busyness type)*/
-	@Excel(name = "业务类型(busyness type)", width = 15)
+//	@Excel(name = "业务类型(busyness type)", width = 15)
     @ApiModelProperty(value = "业务类型(busyness type)")
     private String busynessType;
 	/**优先级(priority)*/
-	@Excel(name = "优先级(priority)", width = 15,dicCode = "priority")
+//	@Excel(name = "优先级(priority)", width = 15,dicCode = "priority")
     @ApiModelProperty(value = "优先级(priority)")
     private String priority;
 	/**产品分类(production class)*/
-	@Excel(name = "产品分类(production class)", width = 15,dictTable = "base_product_class", dicCode = "id", dicText = "name")
+//	@Excel(name = "产品分类(production class)", width = 15,dictTable = "base_product_class", dicCode = "id", dicText = "name")
     @ApiModelProperty(value = "产品分类(production class)")
     private String productionClass;
 	/**机型(model)*/
-	@Excel(name = "机型(model)", width = 15)
+//	@Excel(name = "机型(model)", width = 15)
     @ApiModelProperty(value = "机型(model)")
     private String model;
 	/**厂家(maker)*/
-	@Excel(name = "厂家(maker)", width = 15)
+//	@Excel(name = "厂家(maker)", width = 15)
     @ApiModelProperty(value = "厂家(maker)")
     private String maker;
 	/**交货条款(delivery terms)*/
-	@Excel(name = "交货条款(delivery terms)", width = 15)
+//	@Excel(name = "交货条款(delivery terms)", width = 15)
     @ApiModelProperty(value = "交货条款(delivery terms)")
     private String deliveryTerms;
 	/**是否出口(export)*/
-	@Excel(name = "是否出口(export)", width = 15)
+//	@Excel(name = "是否出口(export)", width = 15)
     @ApiModelProperty(value = "是否出口(export)")
     private String isExport;
 	/**发货方式(delivery type)*/
-	@Excel(name = "发货方式(delivery type)", width = 15)
+//	@Excel(name = "发货方式(delivery type)", width = 15)
     @ApiModelProperty(value = "发货方式(delivery type)")
     private String deliveryType;
 	/**交货地点(delivery address)*/
-	@Excel(name = "交货地点(delivery address)", width = 15)
+//	@Excel(name = "交货地点(delivery address)", width = 15)
     @ApiModelProperty(value = "交货地点(delivery address)")
     private String deliveryAddress;
 	/**质保期(warranty period)月(month)*/
-	@Excel(name = "质保期(warranty period)月(month)", width = 15)
+//	@Excel(name = "质保期(warranty period)月(month)", width = 15)
     @ApiModelProperty(value = "质保期(warranty period)月(month)")
     private String warrantyPeriod;
 	/**销售部门(sale department)*/
@@ -129,11 +129,11 @@ public class PurShippingFeeNotice implements Serializable {
     @ApiModelProperty(value = "销售部门(sale department)")
     private String saleDepartment;
 	/**包装要求(packageb requirement)*/
-	@Excel(name = "包装要求(packageb requirement)", width = 15)
+//	@Excel(name = "包装要求(packageb requirement)", width = 15)
     @ApiModelProperty(value = "包装要求(packageb requirement)")
     private String packagebRequirement;
 	/**联系人(linkman)*/
-	@Excel(name = "联系人(linkman)", width = 15)
+//	@Excel(name = "联系人(linkman)", width = 15)
     @ApiModelProperty(value = "联系人(linkman)")
     private String linkman;
 	/**业务员(salesman)*/
@@ -141,27 +141,27 @@ public class PurShippingFeeNotice implements Serializable {
     @ApiModelProperty(value = "业务员(salesman)")
     private String salesman;
 	/**收货地址(address)*/
-	@Excel(name = "收货地址(address)", width = 15)
+//	@Excel(name = "收货地址(address)", width = 15)
     @ApiModelProperty(value = "收货地址(address)")
     private String address;
 	/**联系电话*/
-	@Excel(name = "联系电话", width = 15)
+//	@Excel(name = "联系电话", width = 15)
     @ApiModelProperty(value = "联系电话")
     private String linkphone;
 	/**F号(F number)*/
-	@Excel(name = "F号(F number)", width = 15)
+//	@Excel(name = "F号(F number)", width = 15)
     @ApiModelProperty(value = "F号(F number)")
     private String fnumber;
 	/**提单号(B/L NO)*/
-	@Excel(name = "提单号(B/L NO)", width = 15)
+//	@Excel(name = "提单号(B/L NO)", width = 15)
     @ApiModelProperty(value = "提单号(B/L NO)")
     private String blNo;
 	/**备注(notes)*/
-	@Excel(name = "备注(notes)", width = 15)
+//	@Excel(name = "备注(notes)", width = 15)
     @ApiModelProperty(value = "备注(notes)")
     private String notes;
 	/**来源主键*/
-	@Excel(name = "来源主键", width = 15)
+//	@Excel(name = "来源主键", width = 15)
     @ApiModelProperty(value = "来源主键")
     private String sourceId;
 }

+ 9 - 9
srm-module-code/src/main/java/org/jeecg/modules/purCode/entity/PurShippingFeeProdeuct.java

@@ -59,7 +59,7 @@ public class PurShippingFeeProdeuct implements Serializable {
     @ApiModelProperty(value = "表头主键(运费采购订单)")
     private String headId;
 	/**产品id*/
-	@Excel(name = "产品id", width = 15)
+//	@Excel(name = "产品id", width = 15)
     @ApiModelProperty(value = "产品id")
     private String productId;
 	/**产品分类*/
@@ -79,31 +79,31 @@ public class PurShippingFeeProdeuct implements Serializable {
     @ApiModelProperty(value = "产品英文名")
     private String englishName;
 	/**型号*/
-	@Excel(name = "型号", width = 15)
+//	@Excel(name = "型号", width = 15)
     @ApiModelProperty(value = "型号")
     private String model;
 	/**备件号*/
-	@Excel(name = "备件号", width = 15)
+//	@Excel(name = "备件号", width = 15)
     @ApiModelProperty(value = "备件号")
     private String partno;
 	/**图号*/
-	@Excel(name = "图号", width = 15)
+//	@Excel(name = "图号", width = 15)
     @ApiModelProperty(value = "图号")
     private String drawingno;
 	/**订货号*/
-	@Excel(name = "订货号", width = 15)
+//	@Excel(name = "订货号", width = 15)
     @ApiModelProperty(value = "订货号")
     private String orderno;
 	/**厂家*/
-	@Excel(name = "厂家", width = 15)
+//	@Excel(name = "厂家", width = 15)
     @ApiModelProperty(value = "厂家")
     private String factory;
 	/**质量等级*/
-	@Excel(name = "质量等级", width = 15)
+//	@Excel(name = "质量等级", width = 15)
     @ApiModelProperty(value = "质量等级")
     private String qualityGrade;
 	/**含税金额(tax amount)*/
-	@Excel(name = "含税金额(tax amount)", width = 15)
-    @ApiModelProperty(value = "含税金额(tax amount)")
+	@Excel(name = "运费金额(tax amount)", width = 15)
+    @ApiModelProperty(value = "运费金额(tax amount)")
     private java.math.BigDecimal taxAmount;
 }

+ 2 - 0
srm-module-code/src/main/java/org/jeecg/modules/purCode/mapper/xml/PurQuotationSelectionProductMapper.xml

@@ -54,6 +54,7 @@
 					  , b.exchange_rate_usd
 					  , b.discount
 					  , b.tax_price_original
+					  , g.temporary_supplier
 					,case when e.tax_rate is null then IFNULL(f.tax_rate,0) else e.tax_rate  end as tax_rate
 					,IFNULL(f.gross_margin,0) gross_margin
 					from pur_quotation_selection a
@@ -61,6 +62,7 @@
 					left join base_project_archive d on a.inquiry_project = d.id
 					left join base_product_archive e on b.product_id = e.id
 					left join base_product_class f on e.class_id = f.id
+					left join cusp_supplier_profile g on g.id = b.selection_supplier
 				 where a.del_flag = 0
 				   and a.submit = 1
 				   and b.del_flag = 0

+ 82 - 0
srm-module-code/src/main/java/org/jeecg/modules/purCode/service/impl/PurPaymentServiceImpl.java

@@ -29,6 +29,8 @@ public class PurPaymentServiceImpl extends ServiceImpl<PurPaymentMapper, PurPaym
     @Autowired
     private IPurAdvanceCommissionService purAdvanceCommissionService;
     @Autowired
+    private IPurShippingFeeService purShippingFeeService;
+    @Autowired
     private ISerialPatternService serialPatternService;
 
     private void setPaymentStatus(Object request, BigDecimal paymentMoney) {
@@ -51,6 +53,10 @@ public class PurPaymentServiceImpl extends ServiceImpl<PurPaymentMapper, PurPaym
             PurAdvanceCommission r = (PurAdvanceCommission) request;
             approveMoney = r.getApproveMoney() != null ? r.getApproveMoney() : BigDecimal.ZERO;
             payMoney = r.getPayMoney() != null ? r.getPayMoney() : BigDecimal.ZERO;
+        } else if (request instanceof PurShippingFee) {
+            PurShippingFee r = (PurShippingFee) request;
+            approveMoney = r.getApproveMoney() != null ? r.getApproveMoney() : BigDecimal.ZERO;
+            payMoney = r.getPayMoney() != null ? r.getPayMoney() : BigDecimal.ZERO;
         }
 
         if (paymentMoney == null || paymentMoney.compareTo(BigDecimal.ZERO) == 0) {
@@ -58,16 +64,19 @@ public class PurPaymentServiceImpl extends ServiceImpl<PurPaymentMapper, PurPaym
             else if (request instanceof PurCommissionRequest) ((PurCommissionRequest) request).setPayment("2");
             else if (request instanceof PurAdvancePayment) ((PurAdvancePayment) request).setPayment("2");
             else if (request instanceof PurAdvanceCommission) ((PurAdvanceCommission) request).setPayment("2");
+            else if (request instanceof PurShippingFee) ((PurShippingFee) request).setPayment("2");
         } else if (payMoney.compareTo(approveMoney) == 0) {
             if (request instanceof PurPaymentRequest) ((PurPaymentRequest) request).setPayment("1");
             else if (request instanceof PurCommissionRequest) ((PurCommissionRequest) request).setPayment("1");
             else if (request instanceof PurAdvancePayment) ((PurAdvancePayment) request).setPayment("1");
             else if (request instanceof PurAdvanceCommission) ((PurAdvanceCommission) request).setPayment("1");
+            else if (request instanceof PurShippingFee) ((PurShippingFee) request).setPayment("1");
         } else if (payMoney.compareTo(approveMoney) < 0) {
             if (request instanceof PurPaymentRequest) ((PurPaymentRequest) request).setPayment("0");
             else if (request instanceof PurCommissionRequest) ((PurCommissionRequest) request).setPayment("0");
             else if (request instanceof PurAdvancePayment) ((PurAdvancePayment) request).setPayment("0");
             else if (request instanceof PurAdvanceCommission) ((PurAdvanceCommission) request).setPayment("0");
+            else if (request instanceof PurShippingFee) ((PurShippingFee) request).setPayment("0");
         }
     }
 
@@ -178,6 +187,25 @@ public class PurPaymentServiceImpl extends ServiceImpl<PurPaymentMapper, PurPaym
             setPaymentStatus(request, paymentMoney);
             purAdvanceCommissionService.updateById(request);
 
+        }else if("物流付款申请".equals(payType) || "物流预付款申请".equals(payType)){
+
+            PurShippingFee request = purShippingFeeService.getById(applyBillId);
+            if(request!=null && StringUtils.isNotBlank(request.getPayment()) && request.getPayment().equals("1")){
+                return Result.error("该物流付款申请已被占用,请刷新后重试!");
+            }
+
+            BigDecimal approveMoney = request.getApproveMoney();
+            BigDecimal currentPayMoney = request.getPayMoney() != null ? request.getPayMoney() : BigDecimal.ZERO;
+
+            if(currentPayMoney.add(paymentMoney).compareTo(approveMoney) > 0){
+                return Result.error("付款金额超过申请金额,请修改!");
+            }
+
+            request.setId(applyBillId);
+            request.setPayMoney(currentPayMoney.add(paymentMoney));
+            setPaymentStatus(request, paymentMoney);
+            purShippingFeeService.updateById(request);
+
         }
 
         this.save(purPayment);
@@ -262,6 +290,21 @@ public class PurPaymentServiceImpl extends ServiceImpl<PurPaymentMapper, PurPaym
                     purAdvanceCommissionService.updateById(requestOld);
                 }
 
+            }else if("物流付款申请".equals(payTypeOld) || "物流预付款申请".equals(payTypeOld)){
+
+                PurShippingFee requestOld = purShippingFeeService.getById(applyBillId);
+                if(requestOld != null && requestOld.getPayMoney() != null){
+                    BigDecimal currentPayMoney = requestOld.getPayMoney();
+                    requestOld.setPayMoney(currentPayMoney.subtract(paymentMoneyOld));
+                    if(requestOld.getPayMoney().compareTo(BigDecimal.ZERO) <= 0){
+                        requestOld.setPayMoney(BigDecimal.ZERO);
+                        requestOld.setPayment("2");
+                    } else {
+                        setPaymentStatus(requestOld, BigDecimal.ZERO);
+                    }
+                    purShippingFeeService.updateById(requestOld);
+                }
+
             }
 
         }
@@ -346,6 +389,27 @@ public class PurPaymentServiceImpl extends ServiceImpl<PurPaymentMapper, PurPaym
             setPaymentStatus(request, paymentMoney);
             purAdvanceCommissionService.updateById(request);
 
+        }else if("物流付款申请".equals(payTypeOld) || "物流预付款申请".equals(payTypeOld)){
+
+
+            PurShippingFee request = purShippingFeeService.getById(applyBillId);
+            if(request!=null && StringUtils.isNotBlank(request.getPayment()) && request.getPayment().equals("1") && !applyBillId.equals(applyBillIdOld)){
+                return Result.error("该物流付款申请已被占用,请刷新后重试!");
+            }
+
+            BigDecimal approveMoney = request.getApproveMoney();
+            BigDecimal currentPayMoney = request.getPayMoney() != null ? request.getPayMoney() : BigDecimal.ZERO;
+            BigDecimal newPayMoney = applyBillId.equals(applyBillIdOld) ? currentPayMoney.subtract(paymentMoneyOld).add(paymentMoney) : currentPayMoney.add(paymentMoney);
+
+            if(newPayMoney.compareTo(approveMoney) > 0){
+                return Result.error("付款金额超过申请金额,请修改!");
+            }
+
+            request.setId(applyBillId);
+            request.setPayMoney(newPayMoney);
+            setPaymentStatus(request, paymentMoney);
+            purShippingFeeService.updateById(request);
+
         }
 
         this.updateById(purPayment);
@@ -400,6 +464,15 @@ public class PurPaymentServiceImpl extends ServiceImpl<PurPaymentMapper, PurPaym
                 setPaymentStatus(request, paymentMoney);
                 purAdvanceCommissionService.updateById(request);
             }
+        }else if("物流付款申请".equals(payType) || "物流预付款申请".equals(payType)){
+
+            PurShippingFee request = purShippingFeeService.getById(applyBillId);
+            if(request != null && request.getPayMoney() != null){
+                BigDecimal currentPayMoney = request.getPayMoney();
+                request.setPayMoney(currentPayMoney.subtract(paymentMoney));
+                setPaymentStatus(request, paymentMoney);
+                purShippingFeeService.updateById(request);
+            }
         }
 
         this.removeById(id);
@@ -460,6 +533,15 @@ public class PurPaymentServiceImpl extends ServiceImpl<PurPaymentMapper, PurPaym
                     setPaymentStatus(request, paymentMoney);
                     purAdvanceCommissionService.updateById(request);
                 }
+            }else if("物流付款申请".equals(payType) || "物流预付款申请".equals(payType)){
+
+                PurShippingFee request = purShippingFeeService.getById(applyBillId);
+                if(request != null && request.getPayMoney() != null){
+                    BigDecimal currentPayMoney = request.getPayMoney();
+                    request.setPayMoney(currentPayMoney.subtract(paymentMoney));
+                    setPaymentStatus(request, paymentMoney);
+                    purShippingFeeService.updateById(request);
+                }
             }
         }
 

+ 2 - 0
srm-module-code/src/main/java/org/jeecg/modules/purCode/vo/PurQuotationSelectionAlert.java

@@ -36,6 +36,8 @@ public class PurQuotationSelectionAlert implements Serializable {
 //    @ApiModelProperty(value = "创建人")
 //    private String createBy;
     private String sysOrgCode;
+    //    临时供应商(0-是,1-申请中,2-否)  增加限制:临时供应商不可做采购订单
+    private String temporarySupplier;
 //
 //	/**创建时间*/
 //	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")

+ 28 - 4
srm-module-code/src/main/java/org/jeecg/modules/purCode/vo/PurShippingFeePage.java

@@ -59,7 +59,7 @@ public class PurShippingFeePage {
 	@ApiModelProperty(value = "更新时间")
     private Date updateTime;
 	/**客户确认(1-已确认,0-未确认)*/
-	@Excel(name = "客户确认(1-已确认,0-未确认)", width = 15)
+//	@Excel(name = "客户确认(1-已确认,0-未确认)", width = 15)
 	@ApiModelProperty(value = "客户确认(1-已确认,0-未确认)")
     private Integer status;
 	/**提交(submit)1是0否*/
@@ -67,7 +67,7 @@ public class PurShippingFeePage {
 	@ApiModelProperty(value = "提交(submit)1是0否")
     private String submit;
 	/**关闭(close)1是0否*/
-	@Excel(name = "关闭(close)", width = 15,dicCode = "yes_or_no")
+//	@Excel(name = "关闭(close)", width = 15,dicCode = "yes_or_no")
 	@ApiModelProperty(value = "关闭(close)1是0否")
     private String close;
 	/**删除状态(0-正常,1-已删除)*/
@@ -101,11 +101,11 @@ public class PurShippingFeePage {
 	@ApiModelProperty(value = "备注(notes)")
     private String notes;
 	/**附件(attachs)*/
-	@Excel(name = "附件(attachs)", width = 15)
+//	@Excel(name = "附件(attachs)", width = 15)
 	@ApiModelProperty(value = "附件(attachs)")
     private String attachs;
 	/**版本号*/
-	@Excel(name = "版本号", width = 15)
+//	@Excel(name = "版本号", width = 15)
 	@ApiModelProperty(value = "版本号")
     private String version;
 
@@ -125,6 +125,30 @@ public class PurShippingFeePage {
 	@ApiModelProperty(value = "银行帐号")
 	private String bankAccount;
 
+	/**预计付款日期(Expected payment date)*/
+	@Excel(name = "预计付款日期(Expected payment date)", width = 15, format = "yyyy-MM-dd")
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
+	@DateTimeFormat(pattern="yyyy-MM-dd")
+	@ApiModelProperty(value = "预计付款日期(Expected payment date)")
+	private Date expectedPaymentDate;
+	/**申请金额(approve money)*/
+	@Excel(name = "申请金额(approve money)", width = 15)
+	@ApiModelProperty(value = "申请金额(approve money)")
+	private java.math.BigDecimal approveMoney;
+//	@Excel(name = "已付款金额(参照)", width = 15)
+	@ApiModelProperty(value = "已付款金额(参照)")
+	private java.math.BigDecimal payMoney;
+	/**付款(payment)1是0否*/
+	@Excel(name = "付款(payment)", width = 15,dicCode = "yes_or_no")
+	@ApiModelProperty(value = "付款(payment)1是0否")
+	@Dict(dicCode = "yes_or_no")
+	private String payment;
+
+	//类型(预付款/月结款)
+	@Excel(name = "类型(type)", width = 15)
+	@ApiModelProperty(value = "类型(预付款/月结款)")
+	private String type;
+
 	@ExcelCollection(name="运费采购订单子表 -  发货通知单")
 	@ApiModelProperty(value = "运费采购订单子表 -  发货通知单")
 	private List<PurShippingFeeNotice> purShippingFeeNoticeList;

+ 102 - 39
srm-module-code/src/main/java/org/jeecg/modules/saleCode/controller/SaleInvoiceController.java

@@ -840,8 +840,17 @@ public class SaleInvoiceController {
     @RequiresPermissions("saleCode:sale_invoice:exportXls")
     @RequestMapping(value = "/exportXls")
     public ModelAndView exportXls(HttpServletRequest request, SaleInvoice saleInvoice) {
+
+        String organize = saleInvoice.getOrganize();
+        saleInvoice.setOrganize(null);
+
         // Step.1 组装查询条件查询数据
         QueryWrapper<SaleInvoice> queryWrapper = QueryGenerator.initQueryWrapper(saleInvoice, request.getParameterMap());
+
+        if(StringUtils.isNotBlank(organize)){
+            queryWrapper.likeRight("organize",organize);
+        }
+
         LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
 
         //配置选中数据查询条件
@@ -849,68 +858,123 @@ public class SaleInvoiceController {
         if (oConvertUtils.isNotEmpty(selections)) {
             List<String> selectionList = Arrays.asList(selections.split(","));
             queryWrapper.in("id", selectionList);
-        }else{
-
+        } else {
             String dept = sysUser.getOrgCode();
-            String userName =  sysUser.getUsername();
-            if(!userName.equals("admin") && !userName.equals("jack") && !userName.equals("max") && !"A02A05".equals(dept)){
+            String userName = sysUser.getUsername();
+            if (!userName.equals("admin") && !userName.equals("jack") && !userName.equals("max") && !"A02A05".equals(dept)) {
                 throw new JeecgBootException("请勾选要导出的数据");
             }
+        }
 
 
-        }
-        //Step.2 获取导出数据
+        // Step.2 获取导出数据
         List<SaleInvoice> saleInvoiceList = saleInvoiceService.list(queryWrapper);
 
-        System.out.println("============1===============");
-        // Step.3 组装pageList
-        List<SaleInvoicePage> pageList = new ArrayList<SaleInvoicePage>();
-        for (SaleInvoice main : saleInvoiceList) {
+        // ==== 批量预加载关联数据,消除 N+1 查询 ====
+        Set<String> invoiceIdSet = new HashSet<>();
+        Set<String> sourceCodeSet = new HashSet<>();
+        Set<String> sourceCode2Set = new HashSet<>();
+        for (SaleInvoice inv : saleInvoiceList) {
+            invoiceIdSet.add(inv.getId());
+            if (StringUtils.isNotBlank(inv.getSourceCode())) {
+                sourceCodeSet.add(inv.getSourceCode());
+            }
+            if (StringUtils.isNotBlank(inv.getSourceCode2())) {
+                // sourceCode2 可能是逗号分隔的,需要拆分扁平化
+                for (String code : inv.getSourceCode2().split(",")) {
+                    if (StringUtils.isNotBlank(code)) {
+                        sourceCode2Set.add(code.trim());
+                    }
+                }
+            }
+        }
+
+        // 2.1 批量查 SaleInvoiceShip,按 headId 分组
+        Map<String, List<SaleInvoiceShip>> shipMap = new HashMap<>();
+        if (!invoiceIdSet.isEmpty()) {
+            List<SaleInvoiceShip> allShips = saleInvoiceShipService.list(
+                    new QueryWrapper<SaleInvoiceShip>().in("head_id", invoiceIdSet));
+            shipMap = allShips.stream().collect(Collectors.groupingBy(SaleInvoiceShip::getHeadId));
+        }
+
+        // 2.2 批量查 SaleDelivery,按 billCode 分组
+        Map<String, SaleDelivery> deliveryMap = new HashMap<>();
+        Set<String> deliverySourceCodeSet = new HashSet<>();
+        if (!sourceCodeSet.isEmpty()) {
+            List<SaleDelivery> allDeliveries = saleDeliveryService.list(
+                    new QueryWrapper<SaleDelivery>().in("bill_code", sourceCodeSet));
+            deliveryMap = allDeliveries.stream()
+                    .collect(Collectors.toMap(SaleDelivery::getBillCode, d -> d, (a, b) -> a));
+            // 收集 SaleDelivery 的 sourceCode 用于查 SaleOrder
+            for (SaleDelivery d : allDeliveries) {
+                if (StringUtils.isNotBlank(d.getSourceCode())) {
+                    deliverySourceCodeSet.add(d.getSourceCode());
+                }
+            }
+        }
 
-            main.setCreateBy(null);
-            main.setSysOrgCode(null);
-            main.setNotes(null);
+        // 2.3 批量查 SaleOrder,按 billCode 分组
+        Map<String, SaleOrder> orderMap = new HashMap<>();
+        if (!deliverySourceCodeSet.isEmpty()) {
+            List<SaleOrder> allOrders = saleOrderService.list(
+                    new QueryWrapper<SaleOrder>().in("bill_code", deliverySourceCodeSet));
+            orderMap = allOrders.stream()
+                    .collect(Collectors.toMap(SaleOrder::getBillCode, o -> o, (a, b) -> a));
+        }
 
+        // 2.4 批量查 PlatCommissionOrder,按 billCode 分组
+        Map<String, PlatCommissionOrder> commissionMap = new HashMap<>();
+        if (!sourceCode2Set.isEmpty()) {
+            List<PlatCommissionOrder> allCommissions = platCommissionOrderService.list(
+                    new QueryWrapper<PlatCommissionOrder>().in("bill_code", sourceCode2Set));
+            commissionMap = allCommissions.stream()
+                    .collect(Collectors.toMap(PlatCommissionOrder::getBillCode, c -> c, (a, b) -> a));
+        }
+        // ==== 批量预加载结束 ====
+
+        // Step.3 组装pageList(直接从 Map 取值,无 DB 查询)
+        List<SaleInvoicePage> pageList = new ArrayList<SaleInvoicePage>();
+        for (SaleInvoice main : saleInvoiceList) {
             SaleInvoicePage vo = new SaleInvoicePage();
             BeanUtils.copyProperties(main, vo);
-            List<SaleInvoiceShip> saleInvoiceShipList = saleInvoiceShipService.selectByMainId(main.getId());
-            List<String> shipNames = saleInvoiceShipList.stream()
+
+            // 船名
+            List<SaleInvoiceShip> ships = shipMap.getOrDefault(main.getId(), Collections.emptyList());
+            List<String> shipNames = ships.stream()
                     .map(SaleInvoiceShip::getShipName)
                     .collect(Collectors.toList());
-            if(shipNames.size() > 0){
-
-                String result = String.join(",", shipNames);
-                vo.setNotes(result);
-
+            if (!shipNames.isEmpty()) {
+                vo.setNotes(String.join(",", shipNames));
             }
-            String sourceCode = main.getSourceCode();
-            if(StringUtils.isNotBlank(sourceCode)){
-                SaleDelivery saleDelivery = saleDeliveryService.getByBillCode(sourceCode);
-                if(saleDelivery !=null && StringUtils.isNotBlank(saleDelivery.getSourceCode())){
-                    SaleOrder saleOrder = saleOrderService.getByBillCode(saleDelivery.getSourceCode());
 
-                    if(saleOrder !=null){
+            // 从 SaleDelivery → SaleOrder 链路取 createBy / sysOrgCode
+            String sourceCode = main.getSourceCode();
+            if (StringUtils.isNotBlank(sourceCode)) {
+                SaleDelivery saleDelivery = deliveryMap.get(sourceCode);
+                if (saleDelivery != null && StringUtils.isNotBlank(saleDelivery.getSourceCode())) {
+                    SaleOrder saleOrder = orderMap.get(saleDelivery.getSourceCode());
+                    if (saleOrder != null) {
                         vo.setCreateBy(saleOrder.getCreateBy());
                         vo.setSysOrgCode(saleOrder.getSysOrgCode());
                     }
                 }
-
             }
-            String sourceCode2 = main.getSourceCode2();
 
+            // 从 PlatCommissionOrder 取 createBy / sysOrgCode
+            String sourceCode2 = main.getSourceCode2();
             if (oConvertUtils.isNotEmpty(sourceCode2)) {
-                LambdaQueryWrapper<PlatCommissionOrder> deliveryLambdaQueryWrapper = new LambdaQueryWrapper<>();
-                deliveryLambdaQueryWrapper.eq(PlatCommissionOrder::getBillCode, sourceCode2);
-                PlatCommissionOrder delivery = platCommissionOrderService.getOne(deliveryLambdaQueryWrapper);
-                if (delivery != null){
-                    vo.setCreateBy(delivery.getCreateBy());
-                    vo.setSysOrgCode(delivery.getSysOrgCode());
+                // 逗号分隔的 sourceCode2,取第一个匹配的佣金订单
+                for (String code : sourceCode2.split(",")) {
+                    if (StringUtils.isNotBlank(code.trim())) {
+                        PlatCommissionOrder commission = commissionMap.get(code.trim());
+                        if (commission != null) {
+                            vo.setCreateBy(commission.getCreateBy());
+                            vo.setSysOrgCode(commission.getSysOrgCode());
+                            break;
+                        }
+                    }
                 }
             }
-
-//            vo.setSaleInvoiceShipList(saleInvoiceShipList);
-//            List<SaleInvoiceProduct> saleInvoiceProductList = saleInvoiceProductService.selectByMainId(main.getId());
-//            vo.setSaleInvoiceProductList(saleInvoiceProductList);
             pageList.add(vo);
         }
 
@@ -920,7 +984,6 @@ public class SaleInvoiceController {
         mv.addObject(NormalExcelConstants.CLASS, SaleInvoicePage.class);
         mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("销售发票数据", "导出人:" + sysUser.getRealname(), "销售发票"));
         mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
-        System.out.println("===========================");
         return mv;
     }
 

+ 1 - 1
srm-module-code/src/main/java/org/jeecg/modules/saleCode/mapper/xml/SaleDeliveryMapper.xml

@@ -43,7 +43,7 @@
                      FROM sale_delivery_details
                      WHERE del_flag = 0
                         AND (product_code = 'PA00000003'
-                        or product_code = '1897126304437129217')
+                        or product_id = '1897126304437129217')
                      GROUP BY head_id
                  ) e ON e.head_id = a.id
                   LEFT JOIN sale_order b ON a.source_code = b.bill_code AND b.del_flag = 0

+ 2 - 0
srm-module-code/src/main/java/org/jeecg/modules/saleCode/mapper/xml/SaleOrderProductMapper.xml

@@ -54,9 +54,11 @@
 					 , b.supplier_name
 					 , b.purchase_quantity
 					 , b.delivery_quantity
+					 , c.temporary_supplier
 
 				from sale_order a
 						 left join sale_order_product b on a.id = b.head_id
+						 left join cusp_supplier_profile c on c.id = b.supplier_id
 						 left join base_project_archive d on a.project = d.id
 
 				where a.del_flag = 0

+ 1 - 1
srm-module-code/src/main/java/org/jeecg/modules/saleCode/util/EasyExcelUtil.java

@@ -90,6 +90,6 @@ public class EasyExcelUtil {
 //
 //
     public static void main(String[] args) {
-        convertExcelToPdf("E:\\PE2605386.xlsx","E:\\PE2605386.xlsx");
+        convertExcelToPdf("E:\\国外加工形式发票模板.xlsx","E:\\123.pdf");
     }
 }

+ 120 - 0
srm-module-code/src/main/java/org/jeecg/modules/saleCode/util/HttpUtils2.java

@@ -0,0 +1,120 @@
+package org.jeecg.modules.saleCode.util;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import io.micrometer.core.instrument.util.StringUtils;
+import org.apache.http.HttpEntity;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.client.utils.URIBuilder;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.util.EntityUtils;
+import org.jeecg.common.util.DateUtils;
+
+import java.io.IOException;
+import java.net.URL;
+import java.nio.charset.StandardCharsets;
+
+public class HttpUtils2 {
+
+    private static final String ACCESS_TOKEN = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjoiQlg2ckhrUkRjemdDN1d3NytHdklHZ1VxUW5XbHRBMkRJc1ljWlhURTl5dEZTOEZHNEZOV2RtR0w0Q1BOdkZkeGg1ZlJuUVI3S0tNay9ZVkc0SFU0d1pRU1BKQzNFeHNieHVLRG8vTGJFUS90RDhoeGhTOVlZbTBOcU9ESTMxK0JEM0IzdkVXSXBPZU1MWjZETU9YTHBBPT0iLCJpYXQiOjE3NzczMDQ0MjIsImV4cCI6MTg2MzcwNDQyMn0.tOlnbJWrwOf1vkW4l8MumhlsEbQlOyMhltMm1Ja6p88";
+    private static final String CLIENT_ID = "4169e684-6dc7-40bc-b36e-d6777ca53459";
+    private static final String SUPPLIER_ID = "a37dc266-6740-479b-96d1-880d73543783";
+    private static final String API_URL_LIST = "https://jcds-test.jibe.solutions/api/supplier/pull_json/";
+
+    public static void main(String[] args) throws Exception {
+//        getDateListByUrl();
+//        getDateListByUrl(API_URL_LIST,ACCESS_TOKEN);
+//        URL url = new URL("http://116.236.227.117:8001/jeecgboot/sys/randomImage/1629428467008?_t=1779353837676");
+//        System.out.println(url);
+        getDateListByUrl();
+    }
+
+    public static JsonNode getDateListByUrl(String url, String accessToken) {
+        CloseableHttpClient httpClient = HttpClients.createDefault();
+        try {
+            HttpGet request = new HttpGet(url);
+
+            // ✅ 设置必要的请求头
+            request.setHeader("Accept", "application/json");
+            request.setHeader("Content-Type", "application/json;charset=UTF-8");
+//            if (accessToken != null && !accessToken.trim().isEmpty()) {
+                request.setHeader("Authorization", "Bearer " + accessToken); // 根据实际改
+//            }
+
+            CloseableHttpResponse response = httpClient.execute(request);
+            int statusCode = response.getStatusLine().getStatusCode();
+            HttpEntity entity = response.getEntity();
+            String responseBody = EntityUtils.toString(entity, StandardCharsets.UTF_8);
+
+            if (statusCode == 200) {
+                return parseJson(responseBody);
+            } else {
+                // ✅ 使用正确的中文 & 输出响应体便于调试
+                System.err.println("API请求失败:getDateListByUrl 状态码=" + statusCode);
+                System.err.println("API请求失败:getDateListByUrl 响应内容=" + responseBody);
+                throw new RuntimeException("API请求失败:getDateListByUrl 状态码=" + statusCode);
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+            throw new RuntimeException("API请求异常:getDateListByUrl, 错误信息=" + e.getMessage(), e);
+        } finally {
+            try {
+                httpClient.close();
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+        }
+    }
+
+
+    public static JsonNode getDateListByUrl() throws Exception {
+
+        try (CloseableHttpClient httpClient = HttpClients.createDefault()) {
+
+            URIBuilder uriBuilder = new URIBuilder(API_URL_LIST)
+                    .addParameter("document_type", "rfq")   // 询价
+                    .addParameter("supplier_uid", SUPPLIER_ID)   //
+                    .addParameter("client_uid", CLIENT_ID);              //
+
+
+            HttpGet httpGet = new HttpGet(uriBuilder.build());
+//            httpGet.setHeader("Accept", "application/json");
+            httpGet.setHeader("Content-Type", "application/json;charset=UTF-8");
+            httpGet.setHeader("Authorization", "Bearer " + ACCESS_TOKEN);
+
+            try (CloseableHttpResponse response = httpClient.execute(httpGet)) {
+                int statusCode = response.getStatusLine().getStatusCode();
+                HttpEntity entity = response.getEntity();
+
+                if (statusCode == 200 && entity != null) {
+                    String responseBody = EntityUtils.toString(entity);
+                    JsonNode jsonNode = parseJson(responseBody);
+                    // 在这里处理jsonNode,例如遍历或提取数据
+                    System.out.println("=========格式化输出JSON==========="); // 格式化输出JSON
+//                    System.out.println(jsonNode.toPrettyString()); // 格式化输出JSON
+                    return jsonNode;
+                } else {
+                    System.out.println("===================="); // 格式化输出JSON
+                    String responseBody = EntityUtils.toString(entity, StandardCharsets.UTF_8);
+                    System.err.println("API请求失败:getDateListByUrl 状态码=" + statusCode);
+                    System.err.println("响应内容: " + responseBody); // 关键:打印实际返回内容
+                    throw new RuntimeException("API请求失败:getDateListByUrl 状态码=" + statusCode + ", 响应: " + responseBody);
+
+//                    System.err.println("API请求失败:getDateListByUrl 状态码=" + statusCode);
+//                    System.err.println("API请求失败:getDateListByUrl 失败信息=" + response);
+//                    throw new RuntimeException("API请求失败:getDateListByUrl 状态码=" + statusCode);
+                }
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+            throw new RuntimeException("API请求异常:getDateListByUrl 状态码=" + e.getMessage());
+        }
+    }
+
+    private static JsonNode parseJson(String jsonString) throws IOException {
+        ObjectMapper objectMapper = new ObjectMapper();
+        return objectMapper.readTree(jsonString);
+    }
+}

+ 51 - 51
srm-module-code/src/main/java/org/jeecg/modules/saleCode/util/JibeApiClient.java

@@ -127,57 +127,57 @@ public class JibeApiClient {
 
         //=====================返回报价=====================
 //        // 构建请求体
-        Map<String, Object> requestBody = buildRequestBody2("quotation", SUPPLIER_UID, CLIENT_UID);
-
-        String jsonBody = null;
-        try {
-            jsonBody = OBJECT_MAPPER.writeValueAsString(requestBody);
-            System.err.println("==========================");
-            System.out.println(jsonBody);
-        } catch (Exception e) {
-            System.err.println("==========================");
-            System.out.println("构建请求体失败: " + e.getMessage());
-        }
-
-        // 构建请求
-        RequestBody body = RequestBody.create(JSON_MEDIA_TYPE, jsonBody);
-        Request request = new Request.Builder()
-                .url(BASE_URL + "/" + "quotation_response/")
-                .post(body)
-                .addHeader("token", TOKEN)
-                .addHeader("Content-Type", "application/json")
-                .build();
-
-        // 执行请求
-        try (Response response = HTTP_CLIENT.newCall(request).execute()) {
-            String responseBody = response.body() != null ? response.body().string() : "";
-
-            // 格式化响应
-            String formattedBody = formatJson(responseBody);
-
-            ApiResponse apiResponse = new ApiResponse(
-                    response.code(),
-                    response.message(),
-                    responseBody,
-                    formattedBody,
-                    response.isSuccessful()
-            );
-
-            if (!response.isSuccessful()) {
-                System.out.println("HTTP请求失败: " + response.code() + " " + response.message());
-            }
-
-            System.err.println("============1==============");
-            System.out.println(apiResponse.getFormattedBody());
-            System.err.println("============2==============");
-            System.out.println(apiResponse);
-
-        } catch (IOException e) {
-            System.err.println("==========================");
-            System.out.println("网络请求异常: " + e.getMessage());
-        }
-        System.err.println("==========================");
-        System.err.println(jsonBody);
+//        Map<String, Object> requestBody = buildRequestBody2("quotation", SUPPLIER_UID, CLIENT_UID);
+//
+//        String jsonBody = null;
+//        try {
+//            jsonBody = OBJECT_MAPPER.writeValueAsString(requestBody);
+//            System.err.println("==========================");
+//            System.out.println(jsonBody);
+//        } catch (Exception e) {
+//            System.err.println("==========================");
+//            System.out.println("构建请求体失败: " + e.getMessage());
+//        }
+//
+//        // 构建请求
+//        RequestBody body = RequestBody.create(JSON_MEDIA_TYPE, jsonBody);
+//        Request request = new Request.Builder()
+//                .url(BASE_URL + "/" + "quotation_response/")
+//                .post(body)
+//                .addHeader("token", TOKEN)
+//                .addHeader("Content-Type", "application/json")
+//                .build();
+//
+//        // 执行请求
+//        try (Response response = HTTP_CLIENT.newCall(request).execute()) {
+//            String responseBody = response.body() != null ? response.body().string() : "";
+//
+//            // 格式化响应
+//            String formattedBody = formatJson(responseBody);
+//
+//            ApiResponse apiResponse = new ApiResponse(
+//                    response.code(),
+//                    response.message(),
+//                    responseBody,
+//                    formattedBody,
+//                    response.isSuccessful()
+//            );
+//
+//            if (!response.isSuccessful()) {
+//                System.out.println("HTTP请求失败: " + response.code() + " " + response.message());
+//            }
+//
+//            System.err.println("============1==============");
+//            System.out.println(apiResponse.getFormattedBody());
+//            System.err.println("============2==============");
+//            System.out.println(apiResponse);
+//
+//        } catch (IOException e) {
+//            System.err.println("==========================");
+//            System.out.println("网络请求异常: " + e.getMessage());
+//        }
+//        System.err.println("==========================");
+//        System.err.println(jsonBody);
 
 //        System.out.println(buildRequestBodyConfirmPo(SUPPLIER_UID, CLIENT_UID));
 

+ 4 - 2
srm-module-code/src/main/java/org/jeecg/modules/saleCode/vo/SaleInvoicePage.java

@@ -36,8 +36,6 @@ public class SaleInvoicePage {
 	//关闭原因
 	private String closeReason;
 
-	//组织 ,由销售订单带入
-	private String organize;
 	/**创建时间*/
 	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
     @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@@ -125,6 +123,10 @@ public class SaleInvoicePage {
 	private String sysOrgCode;
 
 
+	//组织 ,由销售订单带入
+	@Excel(name = "组织", width = 25)
+	private String organize;
+
 	/**购方税号(buyer's tax number)*/
 //	@Excel(name = "购方税号(buyer's tax number)", width = 15)
 	@ApiModelProperty(value = "购方税号(buyer's tax number)")

+ 3 - 0
srm-module-code/src/main/java/org/jeecg/modules/saleCode/vo/SaleOrderAlert.java

@@ -44,6 +44,9 @@ public class SaleOrderAlert implements Serializable {
     //联系人信息
     private String liaisonInfo;
 
+//    临时供应商(0-是,1-申请中,2-否)  增加限制:临时供应商不可做采购订单
+    private String temporarySupplier;
+
 //	/**创建时间*/
 //	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
 //    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")