zqy
8 天以前 cdc6cd1bba85d08a0ff47a368c1f4904c07a4d20
ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZInfoUserController.java
@@ -13,6 +13,7 @@
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.ServletUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.utils.uuid.UUID;
import com.ruoyi.domain.*;
import com.ruoyi.domain.dto.Genealogy;
@@ -158,8 +159,11 @@
        Long userId = user.getUserId();
        zInfoUser.setSysId(userId);
        LambdaUpdateWrapper<ZInfoUser> uw = new LambdaUpdateWrapper<>();
        uw.eq(ZInfoUser::getSysId,userId).set(ZInfoUser::getSelfIntroduction,zInfoUser.getSelfIntroduction());
        return toAjax(zInfoUserService.update(uw));
        //    saveOrUpdate(zInfoUser));
@@ -175,6 +179,10 @@
        Long userId = user.getUserId();
        zInfoUser.setSysId(userId);
        Long userId1 = zInfoUserService.getInfoBysysId(userId).getUserId();
        zInfoUser.setUserId(userId1);
//        ZInfoUser infoBysysId = zInfoUserService.getInfoBysysId(userId);
//
//
@@ -182,6 +190,12 @@
        user.setSex(zInfoUser.getSex()+"");
        user.setUserName(zInfoUser.getOldName());
        user.setPhonenumber(zInfoUser.getPhoneNumber());
        String oriUaid = zInfoUser.getUaid();
        String originalString = zInfoUser.getOldName()+"-"+zInfoUser.getPhoneNumber();
        String uniqueId = UUID.nameUUIDFromBytes(originalString.getBytes()).toString();
        zInfoUser.setUaid(uniqueId);
//
//        us.setUserId(user.getSysId());
//        us.setUserName(user.getUserName());
@@ -192,8 +206,20 @@
//        us.setRemark(user.getRemark());
        userService.updateUser(user);
        //LambdaUpdateWrapper<ZInfoUser> uw = new LambdaUpdateWrapper<>();
        System.out.println("{{{{{{{"+oriUaid);
        System.out.println("{{{{{{{"+zInfoUser);
        //修改uaid相同的用户记录
        if(oriUaid!=null) {
            List<ZInfoUser> list = zInfoUserService.findByUaidToFaid(oriUaid);
            for(ZInfoUser zInfoUser1: list)
                zInfoUser1.setUaid(oriUaid);
            return toAjax(zInfoUserService.saveBatch(list));
        }
        else
        // uw.eq(ZInfoUser::getSysId,userId).set(ZInfoUser::getSelfIntroduction,zInfoUser.getSelfIntroduction());
        return toAjax(zInfoUserService.saveOrUpdate(zInfoUser));
            return toAjax(zInfoUserService.saveOrUpdate(zInfoUser));
        //    saveOrUpdate(zInfoUser));
    }
@@ -305,9 +331,7 @@
        List<HashMap<Long,String>> satisfyIds = new ArrayList<>();
        HashMap<Long,String> bs = new HashMap<>();
        for (ZInfoUser zInfoUser:zInfoUsers) {
            if (zInfoUser.getMaritalStatus() ==null || zInfoUser.getMaritalStatus() != 1 )
                bs.put(zInfoUser.getUserId(),zInfoUser.getNickName());
        }
        satisfyIds.add(bs);
        return AjaxResult.success(satisfyIds);