预炸申请导出
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.cool.store.service;
|
||||
|
||||
import com.cool.store.dto.Preparation.PreparationDTO;
|
||||
import com.cool.store.dto.pre.fry.ApplyManagementDTO;
|
||||
import com.cool.store.entity.ImportTaskDO;
|
||||
import com.cool.store.entity.LineInfoDO;
|
||||
import com.cool.store.entity.PointInfoDO;
|
||||
@@ -31,4 +32,5 @@ public interface ExportRealizeService {
|
||||
void exportZxjpOpenShopReport(List<FranchiseReportResponse> list, ImportTaskDO importTaskDO, FranchiseReportRequest request);
|
||||
|
||||
void exportZxjpOpenShopReportPage(List<ShopReportResponse> list, ImportTaskDO importTaskDO, FranchiseReportRequest request);
|
||||
void exportPreFryQualificationApply(List<ApplyManagementDTO> list, ImportTaskDO importTaskDO);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.cool.store.service;
|
||||
|
||||
import com.cool.store.context.CurrentUserHolder;
|
||||
import com.cool.store.context.LoginUserInfo;
|
||||
import com.cool.store.dto.pre.fry.ApplyManagementQueryDTO;
|
||||
import com.cool.store.enums.FileTypeEnum;
|
||||
import com.cool.store.request.*;
|
||||
|
||||
@@ -15,14 +16,32 @@ public interface ExportService {
|
||||
|
||||
Long branchShopList(BranchShopRequest request,LoginUserInfo user);
|
||||
|
||||
//进度管理页面通用导出入口
|
||||
//财务导出 //加盟开店申请 //进度确认
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2025/7/3
|
||||
* @description://进度管理页面通用导出入口
|
||||
* //财务导出 //加盟开店申请 //进度确认
|
||||
*/
|
||||
Long exportProgressBase(BranchShopRequest request, LoginUserInfo user, FileTypeEnum fileTypeEnum);
|
||||
|
||||
//正新鸡排加盟报表导出
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2025/7/3
|
||||
* @description: //正新鸡排加盟报表导出
|
||||
*/
|
||||
Long exportZxjpOpenShopReport(FranchiseReportRequest request, LoginUserInfo user);
|
||||
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2025/7/3
|
||||
* @description:
|
||||
//正新鸡排门店维度加盟导出
|
||||
*/
|
||||
Long exportZxjpOpenShopReportPage(FranchiseReportRequest request, LoginUserInfo user);
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2025/7/3
|
||||
* @description:预炸资质申请管理
|
||||
*/
|
||||
Long exportPreFryQualificationApply(ApplyManagementQueryDTO request, LoginUserInfo user);
|
||||
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ import com.cool.store.dto.*;
|
||||
import com.cool.store.dto.Preparation.PreparationDTO;
|
||||
import com.cool.store.dto.Preparation.ScheduleDTO;
|
||||
|
||||
import com.cool.store.dto.pre.fry.ApplyManagementDTO;
|
||||
import com.cool.store.entity.*;
|
||||
import com.cool.store.enums.*;
|
||||
import com.cool.store.enums.point.*;
|
||||
@@ -699,6 +700,38 @@ public class ExportRealizeServiceImpl implements ExportRealizeService {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void exportPreFryQualificationApply(List<ApplyManagementDTO> list, ImportTaskDO importTaskDO) {
|
||||
String url = "";
|
||||
try {
|
||||
for (ApplyManagementDTO dto : list){
|
||||
dto.setApplyTypeName(PreFryApplyTypeEnum.getDescriptionByCode(dto.getApplyType()));
|
||||
dto.setCreateTimeStr(DateUtils.parseDateToStr(DateUtils.SPECIAL_DATE_START,dto.getCreateTime()));
|
||||
switch (dto.getAuditStatus()){
|
||||
case 0:
|
||||
dto.setAuditStatusName("审批中");
|
||||
break;
|
||||
case 1:
|
||||
dto.setAuditStatusName("审核通过");
|
||||
break;
|
||||
case 2:
|
||||
dto.setAuditStatusName("审核不通过");
|
||||
break;
|
||||
}
|
||||
}
|
||||
url = easyExcelUtil.exportExcel(ApplyManagementDTO.class, list, null,
|
||||
FileTypeEnum.PRE_FRY_QUALIFICATION_APPLY_EXPORT.getDesc() + DateUtils.parseDateToStr(SPECIAL_DATE_START, new Date()),
|
||||
FileTypeEnum.PRE_FRY_QUALIFICATION_APPLY_EXPORT.getDesc() + DateUtils.parseDateToStr(SPECIAL_DATE_START, new Date()));
|
||||
} catch (Throwable e) {
|
||||
log.error("fileUpload upload err, originFileName={}", FileTypeEnum.PRE_FRY_QUALIFICATION_APPLY_EXPORT.getDesc(), e);
|
||||
throw new ServiceException(ErrorCodeEnum.INTERNAL_SERVER_ERROR);
|
||||
} finally {
|
||||
importTaskDO.setStatus(ImportStatusEnum.success.getCode());
|
||||
importTaskDO.setFileUrl(url);
|
||||
importTaskMapper.update(eid, importTaskDO);
|
||||
}
|
||||
}
|
||||
|
||||
private String toString(Object o) {
|
||||
if (o == null) {
|
||||
return "";
|
||||
|
||||
@@ -6,9 +6,12 @@ import com.cool.store.context.CurrentUserHolder;
|
||||
import com.cool.store.context.LoginUserInfo;
|
||||
import com.cool.store.dao.HyOpenAreaInfoDAO;
|
||||
import com.cool.store.dao.LineInfoDAO;
|
||||
import com.cool.store.dao.PreFryQualificationApplyDAO;
|
||||
import com.cool.store.dao.ShopInfoDAO;
|
||||
import com.cool.store.dto.Preparation.PreparationDTO;
|
||||
import com.cool.store.dto.Preparation.ScheduleDTO;
|
||||
import com.cool.store.dto.pre.fry.ApplyManagementDTO;
|
||||
import com.cool.store.dto.pre.fry.ApplyManagementQueryDTO;
|
||||
import com.cool.store.entity.*;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.enums.FileTypeEnum;
|
||||
@@ -75,6 +78,8 @@ public class ExportServiceImpl implements ExportService {
|
||||
private ShopService shopService;
|
||||
@Resource
|
||||
private FranchiseReportService franchiseReportService;
|
||||
@Resource
|
||||
private PreFryQualificationApplyDAO preFryQualificationApplyDAO;
|
||||
|
||||
|
||||
|
||||
@@ -185,5 +190,25 @@ public class ExportServiceImpl implements ExportService {
|
||||
return (long) list.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long exportPreFryQualificationApply(ApplyManagementQueryDTO request, LoginUserInfo user) {
|
||||
List<ApplyManagementDTO> list = preFryQualificationApplyDAO.selectApplyManagementList(request);
|
||||
if (CollectionUtils.isEmpty(list)){
|
||||
log.error("导出数据为空");
|
||||
return 0L;
|
||||
}
|
||||
ImportTaskDO importTaskDO = new ImportTaskDO();
|
||||
importTaskDO.setStatus(ImportStatusEnum.Ongoing.getCode());
|
||||
importTaskDO.setFileName(FileTypeEnum.PRE_FRY_QUALIFICATION_APPLY_EXPORT.getDesc() + DateUtils.parseDateToStr(DateUtils.SPECIAL_DATE_START_1, new Date()));
|
||||
importTaskDO.setIsImport(Boolean.FALSE);
|
||||
importTaskDO.setFileType(FileTypeEnum.PRE_FRY_QUALIFICATION_APPLY_EXPORT.getFileType());
|
||||
importTaskDO.setCreateUserId(user.getUserId());
|
||||
importTaskDO.setCreateTime(new Date().getTime());
|
||||
importTaskDO.setCreateName(user.getName());
|
||||
importTaskMapper.insert(eid, importTaskDO);
|
||||
exportRealizeService.exportPreFryQualificationApply(list, importTaskDO);
|
||||
return 0L;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ import com.cool.store.entity.PreFryQualificationApplyDO;
|
||||
import com.cool.store.enums.AuditOperationTypeEnum;
|
||||
import com.cool.store.enums.AuditStatusEnum;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.enums.PreFryApplyTypeEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.service.PreFryQualificationApplyService;
|
||||
import com.cool.store.userholder.CurrentUser;
|
||||
|
||||
Reference in New Issue
Block a user