Parcourir la source

添加附件修改

yzc il y a 1 an
Parent
commit
703c24dbb6

+ 5 - 0
hx-purchase/src/main/java/com/fjhx/purchase/controller/purchase/PurchaseController.java

@@ -162,4 +162,9 @@ public class PurchaseController {
         purchaseService.cancellation(dto.getId());
     }
 
+    @PostMapping("/updateAttachment")
+    public void updateAttachment(@RequestBody PurchaseDto dto) {
+        purchaseService.updateAttachment(dto);
+    }
+
 }

+ 5 - 0
hx-purchase/src/main/java/com/fjhx/purchase/service/purchase/PurchaseService.java

@@ -115,4 +115,9 @@ public interface PurchaseService extends BaseService<Purchase> {
     void cancellation(Long id);
 
     void updateSubscribeStatus(Long businessId);
+
+    /**
+     * 修改采购单附件
+     */
+    void updateAttachment(PurchaseDto dto);
 }

+ 7 - 0
hx-purchase/src/main/java/com/fjhx/purchase/service/purchase/impl/PurchaseServiceImpl.java

@@ -22,6 +22,7 @@ import com.fjhx.common.enums.FlowStatusEnum1;
 import com.fjhx.common.service.coding.CodingRuleService;
 import com.fjhx.common.service.documentary.GetDocumentaryBusinessTemplate;
 import com.fjhx.common.utils.Assert;
+import com.fjhx.file.utils.ObsFileUtil;
 import com.fjhx.flow.entity.flow.po.FlowExample;
 import com.fjhx.flow.enums.FlowStatusEnum;
 import com.fjhx.flow.service.flow.FlowExampleService;
@@ -1030,4 +1031,10 @@ public class PurchaseServiceImpl extends ServiceImpl<PurchaseMapper, Purchase>
         }
         subscribeDetailService.updateBatchById(subscribeDetails);
     }
+
+
+    @Override
+    public void updateAttachment(PurchaseDto dto){
+        ObsFileUtil.editFile(dto.getFileList(),dto.getId());
+    }
 }