luoxinwu
2024-03-05 c88d1658a2b6b51ed1a81c3be3e9102b661970f3
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/NewFightCommunityConstructionServiceImpl.java
@@ -33,21 +33,23 @@
    @Override
    public IPage<NewFightCommunityConstructionDTO> getList(int pageNum, int pageSize)
    public IPage<NewFightCommunityConstructionDTO> getList(int pageNum, int pageSize,
                                                           String communityId,String userId)
    {
        Page page = new Page<>(pageNum,pageSize);
        return baseMapper.getList(page);
        return baseMapper.getList(page,communityId,userId);
    }
    @Override
    public NewFightCommunityConstructionDTO getDetails(String id)
    public NewFightCommunityConstructionDTO getDetails(String id,String userId)
    {
        return baseMapper.getDetails(id);
        return baseMapper.getDetails(id,userId);
    }
    @Override
    public R addData(NewFightCommunityConstructionDTO item)
    {
        item.setStatus("1");
        int num=baseMapper.addData(item);
        if(num>0)
        {
@@ -70,6 +72,17 @@
        int num=baseMapper.editData(item);
        if(num>0)
        {
            if(item.getList()!=null && item.getList().size()>0 )
            {
                for (NewFightProjectPlanDTO dto:item.getList())
                {
                    if(StringUtils.isEmpty(dto.getId()))
                    {
                        return R.fail("项目规划进度id不能为空");
                    }
                    projectPlanService.editData(dto);
                }
            }
            return R.ok();
        }
        return R.fail("操作失败");
@@ -81,6 +94,8 @@
        int num= baseMapper.expurgateData(id);
        if(num>0)
        {
            //删除相关项目规划进度
            projectPlanService.expurgateData(null,id);
            return R.ok();
        }
        return R.fail("操作失败");