企业端项目详情修改

This commit is contained in:
梁琦涛
2021-10-09 14:32:34 +08:00
parent b71d66feca
commit 85c24f8934
7 changed files with 38 additions and 11 deletions
@@ -100,4 +100,8 @@ public class PayProjectCommon {
* 项目类型1:工作组,2:分标委
*/
public final static Integer PROJECT_TYPE_FILE2 = 2;
/**
* 需要发票(1:增值税普通发票,2:增值税专用发票,0:否,3:需要发票(小程序需要))
*/
public final static Integer NEED_INVOICE3 = 3;
}
@@ -151,7 +151,8 @@ public class PayCommonProjectController extends JeroController<PayCommonProject,
List<String> listProjectIds = new ArrayList<>();
// 项目的企业联系人
LambdaQueryWrapper<PayCommonProject> queryPayCommonProject = new LambdaQueryWrapper<>();
queryPayCommonProject.eq(PayCommonProject::getContactsId,sysUser.getId());
queryPayCommonProject.eq(PayCommonProject::getContactsId,sysUser.getId()).or()
.eq(PayCommonProject::getMailContactsId,sysUser.getId());
List<PayCommonProject> listPayCommonProject = payCommonProjectService.list(queryPayCommonProject);
if(!CollectionUtils.isEmpty(listPayCommonProject)){
List<String> list = listPayCommonProject.stream().map(PayCommonProject::getId).collect(Collectors.toList());
@@ -210,10 +211,18 @@ public class PayCommonProjectController extends JeroController<PayCommonProject,
queryWrapper.in("id", Arrays.asList(""));
}
if(!StringUtils.isEmpty(payCommonProject.getChargeProject())){
queryWrapper.like("chargeProject",payCommonProject.getChargeProject());
queryWrapper.like("charge_project",payCommonProject.getChargeProject());
}
List<Integer> listNeedInvoice = new ArrayList<>();
if(!Objects.isNull(payCommonProject.getNeedInvoice())){
queryWrapper.eq("needInvoice",payCommonProject.getNeedInvoice());
// 需要发票 : 3为 需要发票,小程序需要
if(Objects.equals(payCommonProject.getNeedInvoice(),PayProjectCommon.NEED_INVOICE3)){
listNeedInvoice.add(1);
listNeedInvoice.add(2);
}else{
listNeedInvoice.add(payCommonProject.getNeedInvoice());
}
queryWrapper.in("need_invoice",listNeedInvoice);
}
if(!Objects.isNull(payCommonProject.getPack())){
queryWrapper.eq("pack",payCommonProject.getPack());
@@ -146,7 +146,8 @@ public class PayWorkingGroupSubItemController extends JeroController<PayWorkingG
LambdaQueryWrapper<PayWorkingGroupSubItem> queryPayWorkingGroupSubItem = new LambdaQueryWrapper<>();
queryPayWorkingGroupSubItem.eq(PayWorkingGroupSubItem::getContactsIdOne,sysUser.getId()).or()
.eq(PayWorkingGroupSubItem::getContactsIdTwo,sysUser.getId()).or()
.eq(PayWorkingGroupSubItem::getContactsIdThree,sysUser.getId());
.eq(PayWorkingGroupSubItem::getContactsIdThree,sysUser.getId()).or()
.eq(PayWorkingGroupSubItem::getMailContactsId,sysUser.getId());
List<PayWorkingGroupSubItem> listPayWorkingGroupSubItem = payWorkingGroupSubItemService.list(queryPayWorkingGroupSubItem);
if(!CollectionUtils.isEmpty(listPayWorkingGroupSubItem)){
List<String> listProjectId = listPayWorkingGroupSubItem.stream().map(PayWorkingGroupSubItem::getId).collect(Collectors.toList());
@@ -204,7 +205,17 @@ public class PayWorkingGroupSubItemController extends JeroController<PayWorkingG
listProjectIdsNew.add("");
}
Page<PayWorkingGroupSubItem> page = new Page<>(pageNo, pageSize);
IPage<PayWorkingGroupSubItem> pageList = payWorkingGroupSubItemService.queryCompanyPageList(page, payWorkingGroupSubItem,listProjectIdsNew);
List<Integer> listNeedInvoice = new ArrayList<>();
if(!Objects.isNull(payWorkingGroupSubItem.getNeedInvoice())){
// 需要发票 : 3为 需要发票,小程序需要
if(Objects.equals(payWorkingGroupSubItem.getNeedInvoice(),PayProjectCommon.NEED_INVOICE3)){
listNeedInvoice.add(1);
listNeedInvoice.add(2);
}else{
listNeedInvoice.add(payWorkingGroupSubItem.getNeedInvoice());
}
}
IPage<PayWorkingGroupSubItem> pageList = payWorkingGroupSubItemService.queryCompanyPageList(page, payWorkingGroupSubItem,listNeedInvoice,listProjectIdsNew);
if(!CollectionUtils.isEmpty(pageList.getRecords())){
List<PayWorkingGroupSubItem> list = pageList.getRecords();
list.forEach(p->{
@@ -54,5 +54,5 @@ public interface PayWorkingGroupSubItemMapper extends BaseMapper<PayWorkingGroup
* @Return
* @Exception
*/
IPage<PayWorkingGroupSubItem> queryCompanyPageList(Page<PayWorkingGroupSubItem> page,@Param("payWorkingGroupSubItem") PayWorkingGroupSubItem payWorkingGroupSubItem,@Param("listProjectIds") List<String> listProjectIds);
IPage<PayWorkingGroupSubItem> queryCompanyPageList(Page<PayWorkingGroupSubItem> page,@Param("payWorkingGroupSubItem") PayWorkingGroupSubItem payWorkingGroupSubItem,@Param("listNeedInvoice") List<Integer> listNeedInvoice,@Param("listProjectIds") List<String> listProjectIds);
}
@@ -137,8 +137,11 @@
<if test="payWorkingGroupSubItem.pack != null">
AND pwgs.pack = #{payWorkingGroupSubItem.pack}
</if>
<if test="payWorkingGroupSubItem.needInvoice != null">
AND pwgs.need_invoice = #{payWorkingGroupSubItem.needInvoice}
<if test="listNeedInvoice != null and listNeedInvoice.size() > 0">
AND pwgs.need_invoice in
<foreach collection="listNeedInvoice" index="index" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
<if test="listProjectIds != null and listProjectIds.size() > 0">
AND pwgs.id in
@@ -106,6 +106,6 @@ public interface IPayWorkingGroupSubItemService extends IService<PayWorkingGroup
* @Return
* @Exception
*/
IPage<PayWorkingGroupSubItem> queryCompanyPageList(Page<PayWorkingGroupSubItem> page,PayWorkingGroupSubItem payWorkingGroupSubItem,List<String> listProjectIds);
IPage<PayWorkingGroupSubItem> queryCompanyPageList(Page<PayWorkingGroupSubItem> page,PayWorkingGroupSubItem payWorkingGroupSubItem,List<Integer> listNeedInvoice,List<String> listProjectIds);
}
@@ -549,8 +549,8 @@ public class PayWorkingGroupSubItemServiceImpl extends ServiceImpl<PayWorkingGro
}
@Override
public IPage<PayWorkingGroupSubItem> queryCompanyPageList(Page<PayWorkingGroupSubItem> page, PayWorkingGroupSubItem payWorkingGroupSubItem, List<String> listProjectIds) {
return payWorkingGroupSubItemMapper.queryCompanyPageList( page, payWorkingGroupSubItem, listProjectIds);
public IPage<PayWorkingGroupSubItem> queryCompanyPageList(Page<PayWorkingGroupSubItem> page, PayWorkingGroupSubItem payWorkingGroupSubItem,List<Integer> listNeedInvoice, List<String> listProjectIds) {
return payWorkingGroupSubItemMapper.queryCompanyPageList( page, payWorkingGroupSubItem,listNeedInvoice, listProjectIds);
}
/**