【工艺路线】导出
This commit is contained in:
parent
ff4d34744f
commit
d56a6257d6
|
|
@ -1,16 +1,22 @@
|
||||||
package com.nflg.product.technology.api;
|
package com.nflg.product.technology.api;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import cn.hutool.core.convert.Convert;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.nflg.product.base.core.api.BaseApi;
|
import com.nflg.product.base.core.api.BaseApi;
|
||||||
import com.nflg.product.technology.pojo.query.ProcessRouteTaskQuery;
|
import com.nflg.product.technology.pojo.query.ProcessRouteTaskQuery;
|
||||||
import com.nflg.product.technology.pojo.vo.BomNewPBomVO;
|
import com.nflg.product.technology.pojo.vo.BomNewPBomVO;
|
||||||
|
import com.nflg.product.technology.pojo.vo.ProcessRouteTaskExcelVO;
|
||||||
import com.nflg.product.technology.pojo.vo.ProcessRouteTaskVO;
|
import com.nflg.product.technology.pojo.vo.ProcessRouteTaskVO;
|
||||||
import com.nflg.product.technology.service.ProcessRouteTaskService;
|
import com.nflg.product.technology.service.ProcessRouteTaskService;
|
||||||
|
import com.nflg.product.technology.util.EecExcelUtil;
|
||||||
import nflg.product.common.vo.ResultVO;
|
import nflg.product.common.vo.ResultVO;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.IOException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -70,4 +76,18 @@ public class ProcessRouteTaskApi extends BaseApi {
|
||||||
return ResultVO.success(processRouteTaskService.getPBomAllTree(query));
|
return ResultVO.success(processRouteTaskService.getPBomAllTree(query));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出
|
||||||
|
*/
|
||||||
|
@PostMapping("export")
|
||||||
|
public void export(@RequestBody List<ProcessRouteTaskVO> taskVOList, @RequestBody ProcessRouteTaskQuery query, HttpServletResponse response) throws IOException {
|
||||||
|
if (CollUtil.isNotEmpty(taskVOList)) {
|
||||||
|
// 前端勾选导出
|
||||||
|
EecExcelUtil.export(response, taskVOList, ProcessRouteTaskExcelVO.class, "工艺路线");
|
||||||
|
} else {
|
||||||
|
List<ProcessRouteTaskVO> data = processRouteTaskService.selectPageByCondition(query).getRecords();
|
||||||
|
EecExcelUtil.export(response, Convert.toList(ProcessRouteTaskExcelVO.class, data), ProcessRouteTaskExcelVO.class, "工艺路线");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,116 @@
|
||||||
|
package com.nflg.product.technology.pojo.vo;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.nflg.product.technology.pojo.dto.BaseImportExcelDTO;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
import org.ttzero.excel.annotation.ExcelColumn;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 工艺路线-任务清单(抬头)
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author 10001392
|
||||||
|
* @since 2024-11-24
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class ProcessRouteTaskExcelVO extends BaseImportExcelDTO implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
private Long rowId;
|
||||||
|
|
||||||
|
// 工艺路线编号
|
||||||
|
@ExcelColumn("工艺路线编号")
|
||||||
|
private String taskCode;
|
||||||
|
|
||||||
|
// 工厂编码
|
||||||
|
@ExcelColumn("工厂编码")
|
||||||
|
private String factory;
|
||||||
|
|
||||||
|
// 物料编码
|
||||||
|
@ExcelColumn("物料编码")
|
||||||
|
private String materialNo;
|
||||||
|
|
||||||
|
// 物料描述
|
||||||
|
@ExcelColumn("物料描述")
|
||||||
|
private String materialDesc;
|
||||||
|
|
||||||
|
// 任务清单描述
|
||||||
|
@ExcelColumn("任务清单描述")
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
// 用途:1=生产 2=工程/设计 3=万能 4=工厂维护 5=货物接收 51=货物接收模型 53=GR外部处理 6= 货物发放 9=物料检验
|
||||||
|
@ExcelColumn("用途:1=生产 2=工程/设计 3=万能 4=工厂维护 5=货物接收 51=货物接收模型 53=GR外部处理 6= 货物发放 9=物料检验")
|
||||||
|
private Integer usefulness;
|
||||||
|
|
||||||
|
// 状态:1=生成的、2=对订单下达、3=对成本核算下达
|
||||||
|
@ExcelColumn("状态:1=生成的、2=对订单下达、3=对成本核算下达")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
// 从批量
|
||||||
|
@ExcelColumn("从批量")
|
||||||
|
private String fromBatch;
|
||||||
|
|
||||||
|
// 到批量
|
||||||
|
@ExcelColumn("到批量")
|
||||||
|
private String toBatch;
|
||||||
|
|
||||||
|
// 有效起始日
|
||||||
|
@ExcelColumn("有效起始日")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT-8")
|
||||||
|
private LocalDateTime expireStartTime;
|
||||||
|
|
||||||
|
// 有效至
|
||||||
|
@ExcelColumn("有效至")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT-8")
|
||||||
|
private LocalDateTime expireEndTime;
|
||||||
|
|
||||||
|
// 删除标记:0=未删除、1=已删除
|
||||||
|
@ExcelColumn("删除标记:0=未删除、1=已删除")
|
||||||
|
private Integer delFlag;
|
||||||
|
|
||||||
|
// 创建人
|
||||||
|
@ExcelColumn("创建人")
|
||||||
|
private String createdBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人姓名
|
||||||
|
*/
|
||||||
|
@ExcelColumn("创建人姓名")
|
||||||
|
private String createdByName;
|
||||||
|
|
||||||
|
// 创建时间
|
||||||
|
@ExcelColumn("创建时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT-8")
|
||||||
|
private LocalDateTime createdTime;
|
||||||
|
|
||||||
|
// 更新人
|
||||||
|
@ExcelColumn("更新人")
|
||||||
|
private String updatedBy;
|
||||||
|
|
||||||
|
// 更新时间
|
||||||
|
@ExcelColumn("更新时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT-8")
|
||||||
|
private LocalDateTime updatedTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新人姓名
|
||||||
|
*/
|
||||||
|
@ExcelColumn("更新人姓名")
|
||||||
|
private String updatedByName;
|
||||||
|
|
||||||
|
@ExcelColumn("处理状态:1=修改中、2=暂存中、3=已完成")
|
||||||
|
// 处理状态:1=修改中、2=暂存中、3=已完成
|
||||||
|
private Integer handleState;
|
||||||
|
|
||||||
|
@ExcelColumn("SAP导入状态:1=已导入、2=未导入、3=异常、4=已修改(未导入)")
|
||||||
|
// SAP导入状态:1=已导入、2=未导入、3=异常、4=已修改(未导入)
|
||||||
|
private Integer sapState;
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue