Ver Fonte

1.合同编辑调整

wuhp há 1 ano atrás
pai
commit
79769c64a9

+ 11 - 0
src/main/java/com/ydtech/modules/fnc/controller/contract/ContractController.java

@@ -140,4 +140,15 @@ public class ContractController extends BaseController {
         }
     }
 
+    /**
+     * @description: 合同编辑
+     * @author: whp
+     **/
+    @PostMapping("update")
+    @ApiOperation(value = "合同编辑")
+    public HttpResult updateByEntity(@RequestBody ContractVo contractVo) {
+        contractService.updateByEntity(contractVo);
+        return HttpResult.ok("合同编辑成功");
+    }
+
 }

+ 5 - 1
src/main/java/com/ydtech/modules/fnc/service/contract/ContractService.java

@@ -71,5 +71,9 @@ public interface ContractService extends IService<ContractEntity> {
      * 定时更新合同失效状态
      */
     void batchOrderDate(String nowTime);
-
+    /**
+     * @description: 合同编辑
+     * @author: whp
+     **/
+    void updateByEntity(ContractVo contractVo);
 }

+ 10 - 0
src/main/java/com/ydtech/modules/fnc/service/contract/impl/contractServiceImpl.java

@@ -473,4 +473,14 @@ public class contractServiceImpl extends ServiceImpl<ContractMapper, ContractEnt
         List<ContractEntity> contractEntityList = baseMapper.selectFilterFailure(nowTime);
         this.saveOrUpdateBatch(contractEntityList);
     }
+    /**
+     * @description: 合同编辑
+     * @author: whp
+     **/
+    @Override
+    public void updateByEntity(ContractVo contractVo) {
+        ContractEntity contractEntity = new ContractEntity();
+        BeanUtils.copyProperties(contractVo, contractEntity);
+        baseMapper.updateById(contractEntity);
+    }
 }

+ 0 - 3
src/main/resources/mapper/modules/fnc/contract/ContractMapper.xml

@@ -98,9 +98,6 @@
             should_postponed_date           =#{shouldPostponedDate},
             should_postponed_effective_date =#{shouldPostponedEffectiveDate},
             file_path_id                    =#{filePathId},
-            dept_id                         =#{deptId},
-            user_id                         =#{userId},
-            create_time                     =#{createTime},
             extern_type                     =#{externType},
             internal_type                   =#{internalType},
             contract_status                 =#{contractStatus},