|
|
@ -1,6 +1,7 @@ |
|
|
|
package org.jeecg.modules.demo.project.service.impl; |
|
|
|
package org.jeecg.modules.demo.project.service.impl; |
|
|
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSON; |
|
|
|
import com.alibaba.fastjson.JSON; |
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.apache.shiro.SecurityUtils; |
|
|
|
import org.apache.shiro.SecurityUtils; |
|
|
@ -80,4 +81,37 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl |
|
|
|
departExt.setProjectId(project.getId()); |
|
|
|
departExt.setProjectId(project.getId()); |
|
|
|
this.iDepartExtService.save(departExt); |
|
|
|
this.iDepartExtService.save(departExt); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void update4shenbao(ProjectShenBaoDto dto) { |
|
|
|
|
|
|
|
log.info(">>> the 修改项目书-文 reqParams:{}", JSON.toJSONString(dto)); |
|
|
|
|
|
|
|
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
iUserExtService.remove(new LambdaQueryWrapper<UserExt>().eq(UserExt::getProjectId,dto.getId())); |
|
|
|
|
|
|
|
iDepartExtService.remove(new LambdaQueryWrapper<DepartExt>().eq(DepartExt::getProjectId,dto.getId())); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// SysDepart sysDepart = new SysDepart();
|
|
|
|
|
|
|
|
DepartExt departExt = new DepartExt(); |
|
|
|
|
|
|
|
// SysUser sysUser = new SysUser();
|
|
|
|
|
|
|
|
UserExt userExt = new UserExt(); |
|
|
|
|
|
|
|
Project project = new Project(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BeanUtils.copyProperties(dto, departExt); |
|
|
|
|
|
|
|
// BeanUtils.copyProperties(dto, sysDepart);
|
|
|
|
|
|
|
|
// BeanUtils.copyProperties(dto, sysUser);
|
|
|
|
|
|
|
|
BeanUtils.copyProperties(dto, userExt); |
|
|
|
|
|
|
|
BeanUtils.copyProperties(dto, project); |
|
|
|
|
|
|
|
project.setSysOrgCode(loginUser.getOrgId()); |
|
|
|
|
|
|
|
//负责人
|
|
|
|
|
|
|
|
// project.setProjectCharger(loginUser.getId());
|
|
|
|
|
|
|
|
this.updateById(project); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
userExt.setUserId(loginUser.getId()); |
|
|
|
|
|
|
|
userExt.setProjectId(project.getId()); |
|
|
|
|
|
|
|
this.iUserExtService.save(userExt); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
departExt.setDepartId(loginUser.getOrgId()); |
|
|
|
|
|
|
|
departExt.setProjectId(project.getId()); |
|
|
|
|
|
|
|
this.iDepartExtService.save(departExt); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|