ソースを参照

修改合同信息时,将委托方的拥有人改为当前用户

huangguoce 10 時間 前
コミット
e42da9d570

+ 13 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/workClientInfo/controller/CwWorkClientController.java

@@ -380,4 +380,17 @@ public class CwWorkClientController {
         return ResponseEntity.ok (result);
     }
 
+
+
+    /**
+     * 根据id修改客户拥有人
+     * @param dto
+     * @return
+     */
+    @ApiOperation(value = "根据id修改客户拥有人")
+    @PostMapping(value = "/updateUpdateUserById")
+    public ResponseEntity<String> updateUpdateUserById(@RequestBody CwWorkClientBaseDTO dto) {
+        String s = cwWorkClientService.updateUpdateUserById(dto);
+        return ResponseEntity.ok(s);
+    }
 }

+ 14 - 1
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/workClientInfo/service/CwWorkClientService.java

@@ -249,9 +249,11 @@ public class CwWorkClientService extends ServiceImpl<CwWorkClientBaseMapper, CwW
                 String no = SpringUtil.getBean ( IWorkAttachmentApi.class ).genSerialNum(userDTO.getCompanyDTO().getId(), CwWorkClientBaseDTO.BIZ_CODE,TokenProvider.getCurrentToken());
                 cwWorkClientBase.setNo(no);
                 cwWorkClientBase.setUpdateUser(userDTO.getId());
-                cwWorkClientBase.setStatus("0");
+                cwWorkClientBase.setStatus("5");
             }
         }
+        UserDTO userDTO = SpringUtil.getBean ( IUserApi.class ).getByToken(TokenProvider.getCurrentToken());
+        cwWorkClientBase.setUpdateUser(userDTO.getId());
         this.saveOrUpdate(cwWorkClientBase);
         if (ObjectUtil.isNotEmpty(cwWorkClientBaseDTO)) {
             // 附件
@@ -392,6 +394,17 @@ public class CwWorkClientService extends ServiceImpl<CwWorkClientBaseMapper, CwW
         return "操作成功";
     }
 
+    /**
+     * 更新客户拥有人
+     * @param cwWorkClientBaseDTO
+     * @return
+     */
+    public String updateUpdateUserById(CwWorkClientBaseDTO cwWorkClientBaseDTO) {
+        CwWorkClientBase cwWorkClientBase = CwWorkClientBaseWrapper.INSTANCE.toEntity(cwWorkClientBaseDTO);
+        cwWorkClientBaseMapper.update(cwWorkClientBase, new QueryWrapper<CwWorkClientBase>().lambda().eq(CwWorkClientBase::getId, cwWorkClientBase.getId()));
+        return "操作成功";
+    }
+
     // 其他人发起修改申请
     public synchronized ResponseEntity<Map<String,String>> pushUpdate(String id) {
         CwWorkClientBaseDTO cwWorkClientBaseDTO = this.queryById(id);