update 通过起草组id和企业id查询企业信息和所有联系人信息

This commit is contained in:
lijiarao
2024-09-11 14:21:37 +08:00
parent e38a906f69
commit f5ea32e423
3 changed files with 15 additions and 15 deletions
@@ -24,7 +24,6 @@ import com.jero.drafting.vo.CheckVo;
import com.jero.drafting.vo.PayDraftingGroupSubItemExcel; import com.jero.drafting.vo.PayDraftingGroupSubItemExcel;
import com.jero.modules.system.entity.SysUser; import com.jero.modules.system.entity.SysUser;
import com.jero.modules.system.service.ISysUserService; import com.jero.modules.system.service.ISysUserService;
import com.jero.project.entity.PayWorkingGroupSubItemContacts;
import com.jero.temporary.entity.PayContactsManagementTemporary; import com.jero.temporary.entity.PayContactsManagementTemporary;
import com.jero.temporary.service.IPayContactsManagementTemporaryService; import com.jero.temporary.service.IPayContactsManagementTemporaryService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
@@ -640,11 +639,11 @@ public class PayDraftingGroupSubItemController extends JeroController<PayDraftin
/** /**
* 通过起草组id和参会人id查询企业信息和所有联系人信息 * 通过起草组id和参会人id查询企业信息和所有联系人信息
*/ */
@ApiOperation(value = "通过起草组id和参会人id查询企业信息和所有联系人信息") @ApiOperation(value = "通过起草组id和企业id查询企业信息和所有联系人信息")
@GetMapping(value = "/queryInfoByDraftIdAndContactId") @GetMapping(value = "/queryInfoByDraftIdAndCompanyId")
public Result<CompanyInfoVO> queryInfoByDraftIdAndContactId(@RequestParam(name = "draftId") String draftId, public Result<CompanyInfoVO> queryInfoByDraftIdAndCompanyId(@RequestParam(name = "draftId") String draftId,
@RequestParam(name = "contactId") String contactId) { @RequestParam(name = "companyId") String companyId) {
CompanyInfoVO companyInfoVO = payDraftingGroupSubItemService.queryInfoByDraftIdAndContactId(draftId,contactId); CompanyInfoVO companyInfoVO = payDraftingGroupSubItemService.queryInfoByDraftIdAndCompanyId(draftId, companyId);
return Result.OK(companyInfoVO); return Result.OK(companyInfoVO);
} }
} }
@@ -35,7 +35,7 @@ public interface IPayDraftingGroupSubItemService extends IService<PayDraftingGro
*/ */
void addPayDraftingGroupSubItem(PayDraftingGroupSubItem payDraftingGroupSubItem); void addPayDraftingGroupSubItem(PayDraftingGroupSubItem payDraftingGroupSubItem);
CompanyInfoVO queryInfoByDraftIdAndContactId(String draftId, String contactId); CompanyInfoVO queryInfoByDraftIdAndCompanyId(String draftId, String companyId);
/** /**
* 根据id删除 * 根据id删除
@@ -39,6 +39,7 @@ import com.jero.temporary.service.IPayContactsManagementTemporaryService;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.SecurityUtils; import org.apache.shiro.SecurityUtils;
import org.checkerframework.checker.units.qual.Prefix;
import org.jeecgframework.poi.excel.ExcelImportCheckUtil; import org.jeecgframework.poi.excel.ExcelImportCheckUtil;
import org.jeecgframework.poi.excel.ExcelImportUtil; import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.entity.ImportParams; import org.jeecgframework.poi.excel.entity.ImportParams;
@@ -52,6 +53,8 @@ import javax.servlet.http.HttpServletRequest;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import static org.checkerframework.checker.units.qual.Prefix.one;
/** /**
* <p> * <p>
* 起草组成员表 服务实现类 * 起草组成员表 服务实现类
@@ -210,19 +213,17 @@ public class PayDraftingGroupSubItemServiceImpl extends ServiceImpl<PayDraftingG
} }
} }
@Override @Override
public CompanyInfoVO queryInfoByDraftIdAndContactId(String draftId, String contactId) { public CompanyInfoVO queryInfoByDraftIdAndCompanyId(String draftId, String companyId) {
LambdaQueryWrapper<PayDraftingGroupSubItemContacts> wrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<PayDraftingGroupSubItem> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(PayDraftingGroupSubItemContacts::getDraftingGroupId, draftId); wrapper.eq(PayDraftingGroupSubItem::getDraftingGroupId, draftId);
wrapper.eq(PayDraftingGroupSubItemContacts::getContactsId, contactId); wrapper.eq(PayDraftingGroupSubItem::getChargeCompanyId, companyId);
PayDraftingGroupSubItemContacts one = payDraftingGroupSubItemContactsService.getOne(wrapper); PayDraftingGroupSubItem one = payDraftingGroupSubItemService.getOne(wrapper);
if (one == null){ if (one == null){
return null; return null;
} }
CompanyInfoVO companyInfoVO = new CompanyInfoVO(); CompanyInfoVO companyInfoVO = new CompanyInfoVO();
//查询企业信息 //查询企业信息
String draftingGroupSubId = one.getDraftingGroupSubId(); String draftingGroupSubId = one.getId();
PayDraftingGroupSubItem groupSubItem = this.getById(draftingGroupSubId);
String companyId = groupSubItem.getChargeCompanyId();
PayCompanyManagement companyManagement = payCompanyManagementService.getById(companyId); PayCompanyManagement companyManagement = payCompanyManagementService.getById(companyId);
companyInfoVO.setCompanyManagement(companyManagement); companyInfoVO.setCompanyManagement(companyManagement);
//查询联系人信息 //查询联系人信息