修改起草组会议导出excel功能
This commit is contained in:
+4
-1
@@ -13,6 +13,9 @@ import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
@@ -424,5 +427,5 @@ public class PayDraftingGroupSubItem implements Serializable {
|
||||
|
||||
/**审核说明**/
|
||||
@ApiModelProperty(value = "审核说明")
|
||||
private Integer checkRemark;
|
||||
private String checkRemark;
|
||||
}
|
||||
|
||||
+8
-5
@@ -25,12 +25,15 @@
|
||||
left join sys_user su on pdg.principal_id_a = su.id
|
||||
left join sys_user su1 on pdg.principal_id_b = su1.id
|
||||
left join pay_working_group pwg on pwg.id = pdg.working_group_id
|
||||
<if test="(payDraftingGroup.companyContactName != null and payDraftingGroup.companyContactName != '')
|
||||
or (payDraftingGroup.companyName != null and payDraftingGroup.companyName != '')">
|
||||
left join pay_drafting_group_subitem pdgs on pdg.id = pdgs.drafting_group_id
|
||||
left JOIN pay_drafting_group_subitem_contacts pdgsc on pdgsc.drafting_group_sub_id = pdgs.id
|
||||
</if>
|
||||
left join pay_drafting_group_subitem pdgs on pdg.id = pdgs.drafting_group_id
|
||||
left JOIN pay_drafting_group_subitem_contacts pdgsc on pdgsc.drafting_group_sub_id = pdgs.id
|
||||
<!-- <if test="(payDraftingGroup.companyContactName != null and payDraftingGroup.companyContactName != '')-->
|
||||
<!-- or (payDraftingGroup.companyName != null and payDraftingGroup.companyName != '')">-->
|
||||
<!-- left join pay_drafting_group_subitem pdgs on pdg.id = pdgs.drafting_group_id-->
|
||||
<!-- left JOIN pay_drafting_group_subitem_contacts pdgsc on pdgsc.drafting_group_sub_id = pdgs.id-->
|
||||
<!-- </if>-->
|
||||
<where>
|
||||
pdgs.check_result = 1 OR pdgs.check_result = 2
|
||||
<if test="payDraftingGroup.draftingGroupProject != null and payDraftingGroup.draftingGroupProject != ''">
|
||||
AND drafting_group_project LIKE concat('%',concat(#{payDraftingGroup.draftingGroupProject},'%'))
|
||||
</if>
|
||||
|
||||
+5
@@ -15,6 +15,7 @@ import com.jero.company.entity.PayContactsManagement;
|
||||
import com.jero.company.service.IPayCompanyManagementService;
|
||||
import com.jero.company.service.IPayContactsManagementService;
|
||||
import com.jero.contract.service.IPayIncomeContractService;
|
||||
import com.jero.drafting.common.DraftingConstant;
|
||||
import com.jero.drafting.entity.PayDraftingGroup;
|
||||
import com.jero.drafting.entity.PayDraftingGroupSubItem;
|
||||
import com.jero.drafting.entity.PayDraftingGroupSubItemContacts;
|
||||
@@ -428,6 +429,10 @@ public class PayDraftingGroupSubItemServiceImpl extends ServiceImpl<PayDraftingG
|
||||
companyWrapper.in(PayCompanyManagement::getCompanyName,listCompanyName);
|
||||
List<PayCompanyManagement> listCompanyInfo = payCompanyManagementService.list(companyWrapper);
|
||||
List<String> listContactsName = new ArrayList<>();
|
||||
// 导入的数据默认为审核通过状态
|
||||
for (PayDraftingGroupSubItem payDraftingGroupSubItem : list) {
|
||||
payDraftingGroupSubItem.setCheckResult(DraftingConstant.CHECK_PASS);
|
||||
}
|
||||
// 获取excel中联系人1名称
|
||||
List<String> listContactsName1 = list.stream().map(PayDraftingGroupSubItem::getContactsNameOne).collect(Collectors.toList());
|
||||
if(!CollectionUtils.isEmpty(listContactsName1)){
|
||||
|
||||
-4
@@ -250,8 +250,4 @@ public class PayDraftingGroupSubItemExcel implements Serializable {
|
||||
@Excel(name = "联系人10备注", width = 15)
|
||||
@ApiModelProperty(value = "联系人10备注")
|
||||
private String remarksTen;
|
||||
|
||||
@Excel(name = "标签名称", width = 15)
|
||||
@ApiModelProperty(value = "标签")
|
||||
private String label;
|
||||
}
|
||||
|
||||
+17
-1
@@ -7,6 +7,7 @@ import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.enums.CompanyMessageEnums;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.api.ISysBaseAPI;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.common.util.PasswordUtil;
|
||||
import com.jero.common.util.ValidUtil;
|
||||
@@ -28,6 +29,8 @@ import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.Arrays;
|
||||
@@ -38,7 +41,7 @@ import java.util.Objects;
|
||||
@RestController
|
||||
@RequestMapping("/meeting/draftGroupMeeting")
|
||||
@Slf4j
|
||||
public class DraftGroupMeetingController {
|
||||
public class DraftGroupMeetingController extends JeroController<PayMeeting, IPayMeetingService> {
|
||||
@Resource
|
||||
private IPayMeetingService payMeetingService;
|
||||
@Resource
|
||||
@@ -208,4 +211,17 @@ public class DraftGroupMeetingController {
|
||||
List<String> strings = payMeetingService.publishReminder(publishReminderVO, CompanyMessageEnums.MSG1, "C_OPEN_TYPE1");
|
||||
return Result.OK("发布成功",strings);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*/
|
||||
@RequiresPermissions("draftGroupMeeting:export")
|
||||
@GetMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, PayMeeting payMeeting) {
|
||||
payMeeting.setMeetingType(MeetingCommon.DRAFTING_GROUP_MEETING_INT);
|
||||
IPage<PayMeeting> queryPageList = payMeetingService.queryPageList(payMeeting, -1, -1, request);
|
||||
List<Object> exportList = payMeetingService.getExportList(request, queryPageList);
|
||||
Class<?> aClass = payMeetingService.getaClass(MeetingCommon.DRAFTING_GROUP_MEETING_INT);
|
||||
return super.exportListXls(exportList, aClass, "会议管理");
|
||||
}
|
||||
}
|
||||
|
||||
+13
-3
@@ -1006,10 +1006,9 @@ public class PayMeetingServiceImpl extends ServiceImpl<PayMeetingMapper, PayMeet
|
||||
permission = "committeeMeeting:search";
|
||||
}else if (meetingType.equals(MeetingCommon.COUNCIL_MEETING_INT)) {
|
||||
permission = "committeeMeeting:search";
|
||||
}else if (meetingType.equals(MeetingCommon.DRAFTING_GROUP_MEETING_INT)) {
|
||||
permission = "draftGroupMeeting:search";
|
||||
}
|
||||
// }else if (meetingType.equals(MeetingCommon.DRAFTING_GROUP_MEETING_INT)) {
|
||||
// permission = "draftGroupMeeting:search";
|
||||
// }
|
||||
}
|
||||
if (StringUtils.isNotBlank(permission)) {
|
||||
if (!rolePermissionService.getRolePermission(permission)) {
|
||||
@@ -1348,6 +1347,8 @@ public class PayMeetingServiceImpl extends ServiceImpl<PayMeetingMapper, PayMeet
|
||||
classToExport = CommitteeMeetingExcel.class;
|
||||
}else if (meetingType.equals(MeetingCommon.COUNCIL_MEETING_INT)){
|
||||
classToExport = CouncilMeetingExcel.class;
|
||||
}else if (meetingType.equals(MeetingCommon.DRAFTING_GROUP_MEETING_INT)){
|
||||
classToExport = DraftingGroupMeetingExcel.class;
|
||||
}
|
||||
return classToExport;
|
||||
}
|
||||
@@ -1446,6 +1447,15 @@ public class PayMeetingServiceImpl extends ServiceImpl<PayMeetingMapper, PayMeet
|
||||
BeanUtils.copyProperties(payMeetingVO, councilMeetingExcel);
|
||||
exportList.add(councilMeetingExcel);
|
||||
break;
|
||||
case MeetingCommon.DRAFTING_GROUP_MEETING:
|
||||
String draftingGroupId = meeting.getDraftingGroupId();
|
||||
PayDraftingGroup draftingGroup = payDraftingGroupService.getById(draftingGroupId);
|
||||
payMeetingVO.setDraftingGroupName(draftingGroup.getDraftingGroupProject());
|
||||
//保存数据
|
||||
DraftingGroupMeetingExcel draftingGroupMeetingExcel = new DraftingGroupMeetingExcel();
|
||||
BeanUtils.copyProperties(payMeetingVO, draftingGroupMeetingExcel);
|
||||
exportList.add(draftingGroupMeetingExcel);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return exportList;
|
||||
|
||||
+5
-5
@@ -14,8 +14,8 @@ import java.util.List;
|
||||
public class DraftingGroupMeetingExcel {
|
||||
|
||||
/**工作组项目名称*/
|
||||
@Excel(name = "工作组项目名称", width = 15)
|
||||
private String workingGroupName;
|
||||
@Excel(name = "起草组项目名称", width = 15)
|
||||
private String draftingGroupName;
|
||||
|
||||
/**会议名称*/
|
||||
@Excel(name = "会议名称", width = 15)
|
||||
@@ -91,8 +91,8 @@ public class DraftingGroupMeetingExcel {
|
||||
@Excel(name = "备注", width = 15)
|
||||
private String remark;
|
||||
|
||||
/**通知正文*/
|
||||
@Excel(name = "通知正文", width = 15,orderNum = "1")
|
||||
private String notice;
|
||||
// /**通知正文*/
|
||||
// @Excel(name = "通知正文", width = 15,orderNum = "1")
|
||||
// private String notice;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user