Przeglądaj źródła

银行卡信息根据公司

liangpeile 1 rok temu
rodzic
commit
0fc82eff38

+ 2 - 0
medical_history-vue/src/views/admin/AdminDoctorUserList.vue

@@ -396,6 +396,7 @@ export default {
       this.visiblezz = true
     },
     giveMoney(record) {
+
       this.userId = record.id
       this.money = record.money
       this.notes = record.notes
@@ -428,6 +429,7 @@ export default {
     },
 
     handleOkMoney(record) {
+
       var that = this
       httpAction(that.url.giveMoney, {
         id: that.userId,

+ 4 - 25
medical_history/jeecg-boot-module-system/src/main/java/org/jeecg/modules/adminuser/controller/AdminDoctorUserController.java

@@ -110,6 +110,7 @@ public class AdminDoctorUserController extends JeecgController<AdminUser, IAdmin
 
             AdminUser record = new AdminUser();
             record.setAvatar(adminCompSelect.getAvatar());
+            record.setId(adminCompSelect.getId());
             record.setCardPic(adminCompSelect.getCardPic());
             record.setPhone(adminCompSelect.getPhone());
             record.setKsname(adminCompSelect.getKsName());
@@ -193,17 +194,8 @@ public class AdminDoctorUserController extends JeecgController<AdminUser, IAdmin
     @DeleteMapping(value = "/delete")
     public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
 
-        LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
-        AdminUser adminUser = adminUserService.getById(id);
-        LambdaQueryWrapper<AdminCompSelect> queryWrapper = new LambdaQueryWrapper<>();
-        queryWrapper.eq(AdminCompSelect::getSysOrgCode, sysUser.getOrgCode());
-        queryWrapper.eq(AdminCompSelect::getDoctorAndSpecialist, "1");
-        queryWrapper.eq(AdminCompSelect::getPhone, adminUser.getPhone());
-        adminCompSelectService.remove(queryWrapper);
-        List<AdminCompSelect> list = adminCompSelectService.list(queryWrapper);
-        if (null == list || list.size() == 0) {
-            adminUserService.removeById(id);
-        }
+        adminCompSelectService.removeById(id);
+
         return Result.OK("删除成功!");
     }
 
@@ -217,20 +209,7 @@ public class AdminDoctorUserController extends JeecgController<AdminUser, IAdmin
     @ApiOperation(value = "用户管理-批量删除", notes = "用户管理-批量删除")
     @DeleteMapping(value = "/deleteBatch")
     public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
-        LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
-        String[] split = ids.split(",");
-        for (int i = 0; i < split.length; i++) {
-            AdminUser adminUser = adminUserService.getById(split[i]);
-            LambdaQueryWrapper<AdminCompSelect> queryWrapper = new LambdaQueryWrapper<>();
-            queryWrapper.eq(AdminCompSelect::getSysOrgCode, sysUser.getOrgCode());
-            queryWrapper.eq(AdminCompSelect::getDoctorAndSpecialist, "1");
-            queryWrapper.eq(AdminCompSelect::getPhone, adminUser.getPhone());
-            adminCompSelectService.remove(queryWrapper);
-            List<AdminCompSelect> list = adminCompSelectService.list(queryWrapper);
-            if (null == list || list.size() == 0) {
-                this.adminUserService.removeByIds(Arrays.asList(ids.split(",")));
-            }
-        }
+        this.adminCompSelectService.removeByIds(Arrays.asList(ids.split(",")));
 
         return Result.OK("批量删除成功!");
     }

+ 7 - 25
medical_history/jeecg-boot-module-system/src/main/java/org/jeecg/modules/adminuser/controller/AdminSpecialistUserController.java

@@ -99,6 +99,7 @@ public class AdminSpecialistUserController extends JeecgController<AdminUser, IA
         }
         for (AdminCompSelect adminCompSelect : list) {
             AdminUser record = new AdminUser();
+            record.setId(adminCompSelect.getId());
             record.setPhone(adminCompSelect.getPhone());
             record.setAvatar(adminCompSelect.getAvatar());
             record.setCardPic(adminCompSelect.getCardPic());
@@ -187,18 +188,12 @@ public class AdminSpecialistUserController extends JeecgController<AdminUser, IA
     @ApiOperation(value = "用户管理-通过id删除", notes = "用户管理-通过id删除")
     @DeleteMapping(value = "/delete")
     public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
-        LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
-        AdminUser adminUser = adminUserService.getById(id);
+        adminCompSelectService.removeById(id);
 
-        LambdaQueryWrapper<AdminCompSelect> queryWrapper = new LambdaQueryWrapper<>();
-        queryWrapper.eq(AdminCompSelect::getSysOrgCode, sysUser.getOrgCode());
-        queryWrapper.eq(AdminCompSelect::getDoctorAndSpecialist, "2");
-        queryWrapper.eq(AdminCompSelect::getPhone, adminUser.getPhone());
-        adminCompSelectService.remove(queryWrapper);
-        List<AdminCompSelect> list = adminCompSelectService.list(queryWrapper);
-        if (null == list || list.size() == 0) {
-            adminUserService.removeById(id);
-        }
+//        List<AdminCompSelect> list = adminCompSelectService.list(queryWrapper);
+//        if (null == list || list.size() == 0) {
+//            adminUserService.removeById(id);
+//        }
 
 
         return Result.OK("删除成功!");
@@ -214,20 +209,7 @@ public class AdminSpecialistUserController extends JeecgController<AdminUser, IA
     @ApiOperation(value = "用户管理-批量删除", notes = "用户管理-批量删除")
     @DeleteMapping(value = "/deleteBatch")
     public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
-        LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
-        String[] split = ids.split(",");
-        for (int i = 0; i < split.length; i++) {
-            AdminUser adminUser = adminUserService.getById(split[i]);
-            LambdaQueryWrapper<AdminCompSelect> queryWrapper = new LambdaQueryWrapper<>();
-            queryWrapper.eq(AdminCompSelect::getSysOrgCode, sysUser.getOrgCode());
-            queryWrapper.eq(AdminCompSelect::getDoctorAndSpecialist, "2");
-            queryWrapper.eq(AdminCompSelect::getPhone, adminUser.getPhone());
-            adminCompSelectService.remove(queryWrapper);
-            List<AdminCompSelect> list = adminCompSelectService.list(queryWrapper);
-            if (null == list || list.size() == 0) {
-                this.adminUserService.removeByIds(Arrays.asList(ids.split(",")));
-            }
-        }
+        this.adminCompSelectService.removeByIds(Arrays.asList(ids.split(",")));
         return Result.OK("批量删除成功!");
     }
 

+ 33 - 39
medical_history/jeecg-boot-module-system/src/main/java/org/jeecg/modules/adminuser/service/impl/AdminUserServiceImpl.java

@@ -203,10 +203,12 @@ public class AdminUserServiceImpl extends ServiceImpl<AdminUserMapper, AdminUser
     @Override
     public Result<?> giveMoney(AdminUser adminUser1) {
         String id = adminUser1.getId();
-        AdminUser adminUser = this.getById(id);
-        String yzh = adminUser.getYzh();
-        if ("0".equals(yzh)) {
-            return Result.error("请确认云账户转账权限是否开启");
+
+
+        AdminCompSelect adminCompSelect = adminCompSelectService.getById(id);
+        String yzh = adminCompSelect.getYzh();
+        if ("0".equals(yzh)){
+            return Result.error("请确认云账户权限是否开启");
         }
 
         CreateBankpayOrderRequest request = new CreateBankpayOrderRequest();
@@ -218,10 +220,12 @@ public class AdminUserServiceImpl extends ServiceImpl<AdminUserMapper, AdminUser
         request.setOrderId("BL" + format + randomNumber);
         request.setDealerId(dealer_id);
         request.setBrokerId(broker_id);
-        request.setRealName(adminUser.getName());
-        request.setCardNo(adminUser.getBackCard());
-        request.setPhoneNo(adminUser.getCardholderPhone());
-        request.setIdCard(adminUser.getCard());
+
+
+        request.setRealName(adminCompSelect.getName());
+        request.setCardNo(adminCompSelect.getBackCard());
+        request.setPhoneNo(adminCompSelect.getCardholderPhone());
+        request.setIdCard(adminCompSelect.getCard());
         request.setPay(String.valueOf(adminUser1.getMoney()));
         request.setPayRemark(adminUser1.getNotes());
 
@@ -469,22 +473,17 @@ public class AdminUserServiceImpl extends ServiceImpl<AdminUserMapper, AdminUser
     @Override
     public void updateByUser(AdminUser adminUser) {
         String phone = adminUser.getPhone();
-        LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
-        QueryWrapper<AdminCompSelect> adminCompSelectQueryWrapper = new QueryWrapper<>();
-        adminCompSelectQueryWrapper.eq("phone", phone);
-        adminCompSelectQueryWrapper.eq("sys_org_code", sysUser.getOrgCode());
-        adminCompSelectQueryWrapper.eq("doctor_and_specialist", "1");
-        AdminCompSelect adminCompSelect = adminCompSelectService.getOne(adminCompSelectQueryWrapper);
-        if (null != adminCompSelect) {
-            adminCompSelect.setKsName(adminUser.getKsname());
-            adminCompSelect.setDwName(adminUser.getDwname());
-            adminCompSelect.setAvatar(adminUser.getAvatar());
-            adminCompSelect.setCardPic(adminUser.getCardPic());
-            adminCompSelect.setName(adminUser.getName());
-            adminCompSelect.setWisWjdc(adminUser.getWisWjdc());
-            adminCompSelect.setWisMhu(adminUser.getWisMhu());
-            adminCompSelectService.updateById(adminCompSelect);
-        }
+
+        AdminCompSelect adminCompSelect = adminCompSelectService.getById(adminUser.getId());
+        adminCompSelect.setKsName(adminUser.getKsname());
+        adminCompSelect.setDwName(adminUser.getDwname());
+        adminCompSelect.setAvatar(adminUser.getAvatar());
+        adminCompSelect.setCardPic(adminUser.getCardPic());
+        adminCompSelect.setName(adminUser.getName());
+        adminCompSelect.setWisWjdc(adminUser.getWisWjdc());
+        adminCompSelect.setWisMhu(adminUser.getWisMhu());
+
+
         adminUserService.updateById(adminUser);
 
     }
@@ -673,21 +672,16 @@ public class AdminUserServiceImpl extends ServiceImpl<AdminUserMapper, AdminUser
 
     @Override
     public void updateByUser2(AdminUser adminUser) {
-        String phone = adminUser.getPhone();
-        LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
-        QueryWrapper<AdminCompSelect> adminCompSelectQueryWrapper = new QueryWrapper<>();
-        adminCompSelectQueryWrapper.eq("phone", phone);
-        adminCompSelectQueryWrapper.eq("sys_org_code", sysUser.getOrgCode());
-        adminCompSelectQueryWrapper.eq("doctor_and_specialist", "2");
-        AdminCompSelect adminCompSelect = adminCompSelectService.getOne(adminCompSelectQueryWrapper);
-        if (null != adminCompSelect) {
-            adminCompSelect.setKsName(adminUser.getKsname());
-            adminCompSelect.setDwName(adminUser.getDwname());
-            adminCompSelect.setAvatar(adminUser.getAvatar());
-            adminCompSelect.setCardPic(adminUser.getCardPic());
-            adminCompSelect.setName(adminUser.getName());
-            adminCompSelectService.updateById(adminCompSelect);
-        }
+        AdminCompSelect adminCompSelect = adminCompSelectService.getById(adminUser.getId());
+        adminCompSelect.setKsName(adminUser.getKsname());
+        adminCompSelect.setDwName(adminUser.getDwname());
+        adminCompSelect.setAvatar(adminUser.getAvatar());
+        adminCompSelect.setCardPic(adminUser.getCardPic());
+        adminCompSelect.setName(adminUser.getName());
+        adminCompSelect.setWisWjdc(adminUser.getWisWjdc());
+        adminCompSelect.setWisMhu(adminUser.getWisMhu());
+
+
         adminUserService.updateById(adminUser);
 
     }