Compare commits
No commits in common. "a7ae47485cb98abf753aa23f4493735b147f400b" and "51736166a445d6dec6245a204bd6ae0ed3f9d023" have entirely different histories.
a7ae47485c
...
51736166a4
@ -3,7 +3,6 @@ package com.cnbm.packing.controller;
|
|||||||
import com.cnbm.admin.annotation.LogOperation;
|
import com.cnbm.admin.annotation.LogOperation;
|
||||||
import com.cnbm.common.constant.Constant;
|
import com.cnbm.common.constant.Constant;
|
||||||
import com.cnbm.common.page.PageData;
|
import com.cnbm.common.page.PageData;
|
||||||
import com.cnbm.common.utils.ConvertUtils;
|
|
||||||
import com.cnbm.common.utils.ExcelUtils;
|
import com.cnbm.common.utils.ExcelUtils;
|
||||||
import com.cnbm.common.utils.Result;
|
import com.cnbm.common.utils.Result;
|
||||||
import com.cnbm.common.validator.AssertUtils;
|
import com.cnbm.common.validator.AssertUtils;
|
||||||
@ -26,7 +25,6 @@ import springfox.documentation.annotations.ApiIgnore;
|
|||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.time.format.DateTimeFormatter;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@ -121,26 +119,8 @@ public class ChangePackagingBoxHistoryController {
|
|||||||
@PreAuthorize("@ex.hasAuthority('packing:changePackagingBoxHistory:export')")
|
@PreAuthorize("@ex.hasAuthority('packing:changePackagingBoxHistory:export')")
|
||||||
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
|
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
|
||||||
List<ChangePackagingBoxHistory> list = changePackagingBoxHistoryService.historyList(params);
|
List<ChangePackagingBoxHistory> list = changePackagingBoxHistoryService.historyList(params);
|
||||||
List<ChangePackagingBoxHistoryDTO> dtoList = ConvertUtils.sourceToTarget(list, ChangePackagingBoxHistoryDTO.class);
|
|
||||||
if(list.size()>0) {
|
if(list.size()>0) {
|
||||||
for(ChangePackagingBoxHistoryDTO dto:dtoList){
|
ExcelUtils.exportExcelToTarget(response, "包装箱模组操作记录", list, ChangePackagingBoxHistoryExcel.class);
|
||||||
//操作时间 转化
|
|
||||||
DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
||||||
if(dto.getCreateTime()!=null){
|
|
||||||
dto.setCreateTime1(df.format(dto.getCreateTime()));
|
|
||||||
}
|
|
||||||
//操作类型 1=模组加入包装箱;2=模组移出包装箱;3=模组换箱
|
|
||||||
if(dto.getType()==1){
|
|
||||||
dto.setType1("模组加入包装箱");
|
|
||||||
}
|
|
||||||
if(dto.getType()==2){
|
|
||||||
dto.setType1("模组移出包装箱");
|
|
||||||
}
|
|
||||||
if(dto.getType()==3){
|
|
||||||
dto.setType1("模组换箱");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ExcelUtils.exportExcelToTarget(response, "包装箱模组操作记录", dtoList, ChangePackagingBoxHistoryExcel.class);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,7 +18,6 @@ import com.cnbm.packing.dto.WoPackagingBoxSubstrateDTO;
|
|||||||
import com.cnbm.packing.entity.WoPackagingBox;
|
import com.cnbm.packing.entity.WoPackagingBox;
|
||||||
import com.cnbm.packing.entity.WoPackagingBoxSubstrate;
|
import com.cnbm.packing.entity.WoPackagingBoxSubstrate;
|
||||||
import com.cnbm.packing.excel.WoPackagingBoxSubstrateExcel;
|
import com.cnbm.packing.excel.WoPackagingBoxSubstrateExcel;
|
||||||
import com.cnbm.packing.excel.WoPackagingBoxSubstrateManualExcel;
|
|
||||||
import com.cnbm.packing.mapper.WoPackagingBoxMapper;
|
import com.cnbm.packing.mapper.WoPackagingBoxMapper;
|
||||||
import com.cnbm.packing.mapper.WoPackagingBoxSubstrateMapper;
|
import com.cnbm.packing.mapper.WoPackagingBoxSubstrateMapper;
|
||||||
import com.cnbm.packing.param.PowerReportQueryParam;
|
import com.cnbm.packing.param.PowerReportQueryParam;
|
||||||
@ -37,7 +36,6 @@ import springfox.documentation.annotations.ApiIgnore;
|
|||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.text.DecimalFormat;
|
import java.text.DecimalFormat;
|
||||||
import java.time.format.DateTimeFormatter;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -362,22 +360,7 @@ public class WoPackagingBoxSubstrateController {
|
|||||||
public void exportPackingInfo(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
|
public void exportPackingInfo(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
|
||||||
List<WoPackagingBoxSubstrateDTO> list = woPackagingBoxSubstrateService.substrateList(params);
|
List<WoPackagingBoxSubstrateDTO> list = woPackagingBoxSubstrateService.substrateList(params);
|
||||||
if(list.size()>0) {
|
if(list.size()>0) {
|
||||||
//包装箱创建时间 最近打印时间 转化
|
ExcelUtils.exportExcelToTarget(response, "装箱单信息", list, WoPackagingBoxSubstrateExcel.class);
|
||||||
for(WoPackagingBoxSubstrateDTO dto:list){
|
|
||||||
DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
||||||
if(dto.getBoxCreateTime()!=null){
|
|
||||||
dto.setBoxCreateTime1(df.format(dto.getBoxCreateTime()));
|
|
||||||
}
|
|
||||||
if(dto.getPrintTime()!=null){
|
|
||||||
dto.setPrintTime1(df.format(dto.getPrintTime()));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(Integer.parseInt(params.get("model").toString())==1){
|
|
||||||
ExcelUtils.exportExcelToTarget(response, "手动装箱单信息", list, WoPackagingBoxSubstrateManualExcel.class);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
ExcelUtils.exportExcelToTarget(response, "自动装箱单信息", list, WoPackagingBoxSubstrateExcel.class);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -75,10 +75,4 @@ public class ChangePackagingBoxHistoryDTO implements Serializable {
|
|||||||
@ApiModelProperty(value = "版本号")
|
@ApiModelProperty(value = "版本号")
|
||||||
private Integer version;
|
private Integer version;
|
||||||
|
|
||||||
@ApiModelProperty(value = "操作时间(转)")
|
|
||||||
private String createTime1;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "操作类型(转)")
|
|
||||||
private String type1;
|
|
||||||
|
|
||||||
}
|
}
|
@ -179,10 +179,4 @@ public class WoPackagingBoxSubstrateDTO implements Serializable {
|
|||||||
@ApiModelProperty(value = "打印时间(最近一次打印时间)")
|
@ApiModelProperty(value = "打印时间(最近一次打印时间)")
|
||||||
private LocalDateTime printTime;
|
private LocalDateTime printTime;
|
||||||
|
|
||||||
@ApiModelProperty(value = "包装箱创建时间(转)")
|
|
||||||
private String boxCreateTime1;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "最近打印时间(转)")
|
|
||||||
private String printTime1;
|
|
||||||
|
|
||||||
}
|
}
|
@ -28,8 +28,8 @@ public class ChangePackagingBoxHistoryExcel {
|
|||||||
@Excel(name = "目的位置")
|
@Excel(name = "目的位置")
|
||||||
private Integer targetSlot;
|
private Integer targetSlot;
|
||||||
@Excel(name = "操作类型")
|
@Excel(name = "操作类型")
|
||||||
private String type1;
|
private Integer type;
|
||||||
@Excel(name = "操作时间")
|
@Excel(name = "操作时间")
|
||||||
private String createTime1;
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
}
|
}
|
@ -19,26 +19,26 @@ import java.util.Date;
|
|||||||
public class WoPackagingBoxSubstrateExcel {
|
public class WoPackagingBoxSubstrateExcel {
|
||||||
|
|
||||||
@Excel(name = "创建时间")
|
@Excel(name = "创建时间")
|
||||||
private String boxCreateTime1;
|
private LocalDateTime boxCreateTime;
|
||||||
@Excel(name = "模组ID")
|
@Excel(name = "模组ID")
|
||||||
private String woSubstrateId;
|
private String woSubstrateId;
|
||||||
@Excel(name = "BoxID")
|
@Excel(name = "BoxID")
|
||||||
private String packagingBoxId;
|
private String packagingBoxId;
|
||||||
@Excel(name = "模组所在包装箱位置")
|
@Excel(name = "模组所在包装箱位置")
|
||||||
private Integer slot;
|
private Integer slot;
|
||||||
@Excel(name = "订单号")
|
|
||||||
private String orderName;
|
|
||||||
@Excel(name = "SAP物料号")
|
|
||||||
private String sapMaterial;
|
|
||||||
@Excel(name = "档位功率")
|
@Excel(name = "档位功率")
|
||||||
private String powerLevel;
|
private String powerLevel;
|
||||||
@Excel(name = "补偿功率")
|
@Excel(name = "补偿功率")
|
||||||
private Float pmpp;
|
private Float pmpp;
|
||||||
@Excel(name = "实测功率")
|
@Excel(name = "实测功率")
|
||||||
private Float actualPmpp;
|
private Float actualPmpp;
|
||||||
|
@Excel(name = "订单")
|
||||||
|
private String orderName;
|
||||||
@Excel(name = "线体")
|
@Excel(name = "线体")
|
||||||
private Integer lineBody;
|
private Integer lineBody;
|
||||||
|
@Excel(name = "SAP物料号")
|
||||||
|
private String sapMaterial;
|
||||||
@Excel(name = "最近打印时间")
|
@Excel(name = "最近打印时间")
|
||||||
private String printTime1;
|
private LocalDateTime printTime;
|
||||||
|
|
||||||
}
|
}
|
@ -1,32 +0,0 @@
|
|||||||
package com.cnbm.packing.excel;
|
|
||||||
|
|
||||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 包装箱基板关联表 ( 基板表 )
|
|
||||||
*
|
|
||||||
* @author codeGenerator
|
|
||||||
* @since 2023-02-21
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
public class WoPackagingBoxSubstrateManualExcel {
|
|
||||||
|
|
||||||
@Excel(name = "创建时间")
|
|
||||||
private String boxCreateTime1;
|
|
||||||
@Excel(name = "模组ID")
|
|
||||||
private String woSubstrateId;
|
|
||||||
@Excel(name = "BoxID")
|
|
||||||
private String packagingBoxId;
|
|
||||||
@Excel(name = "模组所在包装箱位置")
|
|
||||||
private Integer slot;
|
|
||||||
@Excel(name = "SAP物料号")
|
|
||||||
private String sapMaterial;
|
|
||||||
@Excel(name = "功率等级")
|
|
||||||
private String powerLevel;
|
|
||||||
@Excel(name = "线体")
|
|
||||||
private Integer lineBody;
|
|
||||||
@Excel(name = "最近打印时间")
|
|
||||||
private String printTime1;
|
|
||||||
|
|
||||||
}
|
|
@ -51,7 +51,6 @@ public class ChangePackagingBoxHistoryServiceBizImpl extends CrudServiceImpl<Cha
|
|||||||
if(params.get("startTime")==null && params.get("endTime")==null && params.get("type")==null){
|
if(params.get("startTime")==null && params.get("endTime")==null && params.get("type")==null){
|
||||||
wrapper.apply(true, "TO_DAYS(NOW())-TO_DAYS(create_time) = 0");
|
wrapper.apply(true, "TO_DAYS(NOW())-TO_DAYS(create_time) = 0");
|
||||||
}
|
}
|
||||||
wrapper.orderByDesc(ChangePackagingBoxHistory.CREATE_TIME);
|
|
||||||
|
|
||||||
return wrapper;
|
return wrapper;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user