预炸申请导出
This commit is contained in:
@@ -26,6 +26,7 @@ public enum FileTypeEnum {
|
|||||||
IMPORT_FITMENT_SHOP_STAGE("importFitmentShopStage", "导入装修阶段完成数据"),
|
IMPORT_FITMENT_SHOP_STAGE("importFitmentShopStage", "导入装修阶段完成数据"),
|
||||||
IMPORT_FITMENT_SHOP_STAGE_DATA_ERROR_LIST("OaOldShopStageDataErrorList", "导入装修阶段完成数据错误列表 "),
|
IMPORT_FITMENT_SHOP_STAGE_DATA_ERROR_LIST("OaOldShopStageDataErrorList", "导入装修阶段完成数据错误列表 "),
|
||||||
SELLING_DETAILS_REPORT("sellingDetailsReport", "开店明细报表"),
|
SELLING_DETAILS_REPORT("sellingDetailsReport", "开店明细报表"),
|
||||||
|
PRE_FRY_QUALIFICATION_APPLY_EXPORT("preFryQualificationApplyExport", "预炸品资质申请导出"),
|
||||||
;
|
;
|
||||||
private String fileType;
|
private String fileType;
|
||||||
private String desc;
|
private String desc;
|
||||||
|
|||||||
@@ -75,6 +75,15 @@
|
|||||||
LEFT JOIN xfsg_line_info c ON c.partner_id = a.created_user_id
|
LEFT JOIN xfsg_line_info c ON c.partner_id = a.created_user_id
|
||||||
left join xfsg_shop_info d ON d.shop_code = a.store_code
|
left join xfsg_shop_info d ON d.shop_code = a.store_code
|
||||||
<where>
|
<where>
|
||||||
|
<if test = "regionIds !=null and regionIds.size()>0">
|
||||||
|
and d.region_id in
|
||||||
|
<foreach item="item" index="index" collection="regionIds" separator="," open="(" close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="investmentManagerId != null and investmentManagerId != ''">
|
||||||
|
and d.investment_manager = #{investmentManagerId}
|
||||||
|
</if>
|
||||||
<if test="applyCode !=null and applyCode != ''">
|
<if test="applyCode !=null and applyCode != ''">
|
||||||
and a.apply_code LIKE CONCAT('%', #{applyCode}, '%')
|
and a.apply_code LIKE CONCAT('%', #{applyCode}, '%')
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
package com.cool.store.dto.pre.fry;
|
package com.cool.store.dto.pre.fry;
|
||||||
|
|
||||||
import com.alibaba.excel.annotation.ExcelProperty;
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
import com.cool.store.annotation.Excel;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -16,8 +15,10 @@ import java.util.Date;
|
|||||||
public class ApplyManagementDTO {
|
public class ApplyManagementDTO {
|
||||||
|
|
||||||
private Long id;
|
private Long id;
|
||||||
|
@ExcelProperty(value = "门店编号",order = 3)
|
||||||
@ApiModelProperty("门店Code")
|
@ApiModelProperty("门店Code")
|
||||||
private String storeCode;
|
private String storeCode;
|
||||||
|
@ExcelProperty(value = "门店名称",order = 2)
|
||||||
@ApiModelProperty("门店名称")
|
@ApiModelProperty("门店名称")
|
||||||
private String storeName;
|
private String storeName;
|
||||||
@ExcelProperty(value = "申请单号",order = 1)
|
@ExcelProperty(value = "申请单号",order = 1)
|
||||||
@@ -25,20 +26,30 @@ public class ApplyManagementDTO {
|
|||||||
private String applyCode;
|
private String applyCode;
|
||||||
@ApiModelProperty("申请类型:1-有冷藏展示柜,2-有常温展示柜,3-无展示柜 ")
|
@ApiModelProperty("申请类型:1-有冷藏展示柜,2-有常温展示柜,3-无展示柜 ")
|
||||||
private Integer applyType;
|
private Integer applyType;
|
||||||
|
@ExcelProperty(value = "申请类型",order =6)
|
||||||
|
private String applyTypeName;
|
||||||
@ApiModelProperty("申请人ID")
|
@ApiModelProperty("申请人ID")
|
||||||
private String createUserId;
|
private String createUserId;
|
||||||
|
@ExcelProperty(value = "申请人",order = 7)
|
||||||
@ApiModelProperty("申请人名称")
|
@ApiModelProperty("申请人名称")
|
||||||
private String createUserName;
|
private String createUserName;
|
||||||
|
@ExcelProperty(value = "申请人手机号",order =8)
|
||||||
@ApiModelProperty("申请人手机号")
|
@ApiModelProperty("申请人手机号")
|
||||||
private String createUserMobile;
|
private String createUserMobile;
|
||||||
|
@ExcelProperty(value = "申请时间",order = 9)
|
||||||
|
private String createTimeStr;
|
||||||
@ApiModelProperty("申请时间")
|
@ApiModelProperty("申请时间")
|
||||||
private Date createTime;
|
private Date createTime;
|
||||||
|
@ExcelProperty(value = "审核状态",order =10)
|
||||||
|
private String auditStatusName;
|
||||||
@ApiModelProperty("审核状态:0-审批中,1-审核通过,2-审核不通过")
|
@ApiModelProperty("审核状态:0-审批中,1-审核通过,2-审核不通过")
|
||||||
private Integer auditStatus;
|
private Integer auditStatus;
|
||||||
|
@ExcelProperty(value = "所属大区",order = 4)
|
||||||
@ApiModelProperty("所属大区")
|
@ApiModelProperty("所属大区")
|
||||||
private String regionName;
|
private String regionName;
|
||||||
private Long regionId;
|
private Long regionId;
|
||||||
private String investmentManagerId;
|
private String investmentManagerId;
|
||||||
|
@ExcelProperty(value = " 督导",order = 5)
|
||||||
@ApiModelProperty("督导")
|
@ApiModelProperty("督导")
|
||||||
private String investmentManagerName;
|
private String investmentManagerName;
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import com.cool.store.common.PageBasicInfo;
|
|||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class ApplyManagementQueryDTO extends PageBasicInfo {
|
public class ApplyManagementQueryDTO extends PageBasicInfo {
|
||||||
@@ -25,4 +26,8 @@ public class ApplyManagementQueryDTO extends PageBasicInfo {
|
|||||||
private Date createTimeEnd;
|
private Date createTimeEnd;
|
||||||
@ApiModelProperty("申请编号")
|
@ApiModelProperty("申请编号")
|
||||||
private String applyCode;
|
private String applyCode;
|
||||||
|
@ApiModelProperty("所属大区")
|
||||||
|
private List<Long> regionIds;
|
||||||
|
@ApiModelProperty("所属督导")
|
||||||
|
private String investmentManagerId;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.cool.store.service;
|
package com.cool.store.service;
|
||||||
|
|
||||||
import com.cool.store.dto.Preparation.PreparationDTO;
|
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.ImportTaskDO;
|
||||||
import com.cool.store.entity.LineInfoDO;
|
import com.cool.store.entity.LineInfoDO;
|
||||||
import com.cool.store.entity.PointInfoDO;
|
import com.cool.store.entity.PointInfoDO;
|
||||||
@@ -31,4 +32,5 @@ public interface ExportRealizeService {
|
|||||||
void exportZxjpOpenShopReport(List<FranchiseReportResponse> list, ImportTaskDO importTaskDO, FranchiseReportRequest request);
|
void exportZxjpOpenShopReport(List<FranchiseReportResponse> list, ImportTaskDO importTaskDO, FranchiseReportRequest request);
|
||||||
|
|
||||||
void exportZxjpOpenShopReportPage(List<ShopReportResponse> 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.CurrentUserHolder;
|
||||||
import com.cool.store.context.LoginUserInfo;
|
import com.cool.store.context.LoginUserInfo;
|
||||||
|
import com.cool.store.dto.pre.fry.ApplyManagementQueryDTO;
|
||||||
import com.cool.store.enums.FileTypeEnum;
|
import com.cool.store.enums.FileTypeEnum;
|
||||||
import com.cool.store.request.*;
|
import com.cool.store.request.*;
|
||||||
|
|
||||||
@@ -15,14 +16,32 @@ public interface ExportService {
|
|||||||
|
|
||||||
Long branchShopList(BranchShopRequest request,LoginUserInfo user);
|
Long branchShopList(BranchShopRequest request,LoginUserInfo user);
|
||||||
|
|
||||||
//进度管理页面通用导出入口
|
/**
|
||||||
//财务导出 //加盟开店申请 //进度确认
|
* @Auther: wangshuo
|
||||||
|
* @Date: 2025/7/3
|
||||||
|
* @description://进度管理页面通用导出入口
|
||||||
|
* //财务导出 //加盟开店申请 //进度确认
|
||||||
|
*/
|
||||||
Long exportProgressBase(BranchShopRequest request, LoginUserInfo user, FileTypeEnum fileTypeEnum);
|
Long exportProgressBase(BranchShopRequest request, LoginUserInfo user, FileTypeEnum fileTypeEnum);
|
||||||
|
|
||||||
//正新鸡排加盟报表导出
|
/**
|
||||||
|
* @Auther: wangshuo
|
||||||
|
* @Date: 2025/7/3
|
||||||
|
* @description: //正新鸡排加盟报表导出
|
||||||
|
*/
|
||||||
Long exportZxjpOpenShopReport(FranchiseReportRequest request, LoginUserInfo user);
|
Long exportZxjpOpenShopReport(FranchiseReportRequest request, LoginUserInfo user);
|
||||||
|
/**
|
||||||
|
* @Auther: wangshuo
|
||||||
|
* @Date: 2025/7/3
|
||||||
|
* @description:
|
||||||
//正新鸡排门店维度加盟导出
|
//正新鸡排门店维度加盟导出
|
||||||
|
*/
|
||||||
Long exportZxjpOpenShopReportPage(FranchiseReportRequest request, LoginUserInfo user);
|
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.PreparationDTO;
|
||||||
import com.cool.store.dto.Preparation.ScheduleDTO;
|
import com.cool.store.dto.Preparation.ScheduleDTO;
|
||||||
|
|
||||||
|
import com.cool.store.dto.pre.fry.ApplyManagementDTO;
|
||||||
import com.cool.store.entity.*;
|
import com.cool.store.entity.*;
|
||||||
import com.cool.store.enums.*;
|
import com.cool.store.enums.*;
|
||||||
import com.cool.store.enums.point.*;
|
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) {
|
private String toString(Object o) {
|
||||||
if (o == null) {
|
if (o == null) {
|
||||||
return "";
|
return "";
|
||||||
|
|||||||
@@ -6,9 +6,12 @@ import com.cool.store.context.CurrentUserHolder;
|
|||||||
import com.cool.store.context.LoginUserInfo;
|
import com.cool.store.context.LoginUserInfo;
|
||||||
import com.cool.store.dao.HyOpenAreaInfoDAO;
|
import com.cool.store.dao.HyOpenAreaInfoDAO;
|
||||||
import com.cool.store.dao.LineInfoDAO;
|
import com.cool.store.dao.LineInfoDAO;
|
||||||
|
import com.cool.store.dao.PreFryQualificationApplyDAO;
|
||||||
import com.cool.store.dao.ShopInfoDAO;
|
import com.cool.store.dao.ShopInfoDAO;
|
||||||
import com.cool.store.dto.Preparation.PreparationDTO;
|
import com.cool.store.dto.Preparation.PreparationDTO;
|
||||||
import com.cool.store.dto.Preparation.ScheduleDTO;
|
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.entity.*;
|
||||||
import com.cool.store.enums.ErrorCodeEnum;
|
import com.cool.store.enums.ErrorCodeEnum;
|
||||||
import com.cool.store.enums.FileTypeEnum;
|
import com.cool.store.enums.FileTypeEnum;
|
||||||
@@ -75,6 +78,8 @@ public class ExportServiceImpl implements ExportService {
|
|||||||
private ShopService shopService;
|
private ShopService shopService;
|
||||||
@Resource
|
@Resource
|
||||||
private FranchiseReportService franchiseReportService;
|
private FranchiseReportService franchiseReportService;
|
||||||
|
@Resource
|
||||||
|
private PreFryQualificationApplyDAO preFryQualificationApplyDAO;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -185,5 +190,25 @@ public class ExportServiceImpl implements ExportService {
|
|||||||
return (long) list.size();
|
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.AuditOperationTypeEnum;
|
||||||
import com.cool.store.enums.AuditStatusEnum;
|
import com.cool.store.enums.AuditStatusEnum;
|
||||||
import com.cool.store.enums.ErrorCodeEnum;
|
import com.cool.store.enums.ErrorCodeEnum;
|
||||||
|
import com.cool.store.enums.PreFryApplyTypeEnum;
|
||||||
import com.cool.store.exception.ServiceException;
|
import com.cool.store.exception.ServiceException;
|
||||||
import com.cool.store.service.PreFryQualificationApplyService;
|
import com.cool.store.service.PreFryQualificationApplyService;
|
||||||
import com.cool.store.userholder.CurrentUser;
|
import com.cool.store.userholder.CurrentUser;
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.cool.store.controller.webb;
|
package com.cool.store.controller.webb;
|
||||||
|
|
||||||
import com.cool.store.context.CurrentUserHolder;
|
import com.cool.store.context.CurrentUserHolder;
|
||||||
|
import com.cool.store.dto.pre.fry.ApplyManagementQueryDTO;
|
||||||
import com.cool.store.enums.FileTypeEnum;
|
import com.cool.store.enums.FileTypeEnum;
|
||||||
import com.cool.store.request.*;
|
import com.cool.store.request.*;
|
||||||
import com.cool.store.response.ResponseResult;
|
import com.cool.store.response.ResponseResult;
|
||||||
@@ -68,4 +69,10 @@ public class ExportController {
|
|||||||
public ResponseResult zxjpOpenShopReportPage(@RequestBody FranchiseReportRequest request) {
|
public ResponseResult zxjpOpenShopReportPage(@RequestBody FranchiseReportRequest request) {
|
||||||
return ResponseResult.success(exportService.exportZxjpOpenShopReportPage(request, CurrentUserHolder.getUser()));
|
return ResponseResult.success(exportService.exportZxjpOpenShopReportPage(request, CurrentUserHolder.getUser()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/preFryQualificationApply")
|
||||||
|
@ApiOperation("预炸品资质申请导出")
|
||||||
|
public ResponseResult preFryQualificationApply(@RequestBody ApplyManagementQueryDTO request) {
|
||||||
|
return ResponseResult.success(exportService.exportPreFryQualificationApply(request, CurrentUserHolder.getUser()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user