zhangyuewww 1 năm trước cách đây
mục cha
commit
c247c3e0d8

+ 15 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/ContractProcessInfoController.java

@@ -1,6 +1,11 @@
 package com.yh.saas.plugin.yiliangyiyun.controller;
 
 
+import com.yh.saas.plugin.yiliangyiyun.entity.ContractProcessInfo;
+import com.yh.saas.plugin.yiliangyiyun.service.IContractProcessInfoService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 
 import org.springframework.web.bind.annotation.RestController;
@@ -16,6 +21,16 @@ import org.springframework.web.bind.annotation.RestController;
 @RestController
 @RequestMapping("/contractProcessInfo")
 public class ContractProcessInfoController {
+    @Autowired
+    private IContractProcessInfoService contractProcessInfoService;
+
+    /**
+     * 编辑合同流程信息
+     */
+    @PostMapping("/editInfo")
+    public String editInfo(@RequestBody ContractProcessInfo contractProcessInfo) {
+        return contractProcessInfoService.editInfo(contractProcessInfo);
+    }
 
 }
 

+ 6 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/IContractProcessInfoService.java

@@ -12,5 +12,11 @@ import com.baomidou.mybatisplus.service.IService;
  * @since 2021-05-17
  */
 public interface IContractProcessInfoService extends IService<ContractProcessInfo> {
+    /**
+     * 编辑
+     *
+     * @param contractProcessInfo
+     */
+    String editInfo(ContractProcessInfo contractProcessInfo);
 
 }

+ 11 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/ContractProcessInfoServiceImpl.java

@@ -1,5 +1,6 @@
 package com.yh.saas.plugin.yiliangyiyun.service.impl;
 
+import com.baomidou.mybatisplus.mapper.EntityWrapper;
 import com.yh.saas.plugin.yiliangyiyun.entity.ContractProcessInfo;
 import com.yh.saas.plugin.yiliangyiyun.mapper.ContractProcessInfoMapper;
 import com.yh.saas.plugin.yiliangyiyun.service.IContractProcessInfoService;
@@ -17,4 +18,14 @@ import org.springframework.stereotype.Service;
 @Service
 public class ContractProcessInfoServiceImpl extends ServiceImpl<ContractProcessInfoMapper, ContractProcessInfo> implements IContractProcessInfoService {
 
+    @Override
+    public String editInfo(ContractProcessInfo contractProcessInfo) {
+        ContractProcessInfo contractProcessInfo1=this.selectOne(new EntityWrapper<ContractProcessInfo>().eq("contract_id",contractProcessInfo.getId()));
+        if (contractProcessInfo1!=null){
+            contractProcessInfo1.setMildewGrain(contractProcessInfo.getMildewGrain());
+            contractProcessInfo1.setGoodsName(contractProcessInfo.getGoodsName());
+            this.updateById(contractProcessInfo1);
+        }
+        return "OK";
+    }
 }