Compare commits

..

No commits in common. "a7ae47485cb98abf753aa23f4493735b147f400b" and "51736166a445d6dec6245a204bd6ae0ed3f9d023" have entirely different histories.

8 changed files with 10 additions and 92 deletions

View File

@ -3,7 +3,6 @@ package com.cnbm.packing.controller;
import com.cnbm.admin.annotation.LogOperation;
import com.cnbm.common.constant.Constant;
import com.cnbm.common.page.PageData;
import com.cnbm.common.utils.ConvertUtils;
import com.cnbm.common.utils.ExcelUtils;
import com.cnbm.common.utils.Result;
import com.cnbm.common.validator.AssertUtils;
@ -26,7 +25,6 @@ import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletResponse;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.List;
import java.util.Map;
@ -121,26 +119,8 @@ public class ChangePackagingBoxHistoryController {
@PreAuthorize("@ex.hasAuthority('packing:changePackagingBoxHistory:export')")
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<ChangePackagingBoxHistory> list = changePackagingBoxHistoryService.historyList(params);
List<ChangePackagingBoxHistoryDTO> dtoList = ConvertUtils.sourceToTarget(list, ChangePackagingBoxHistoryDTO.class);
if(list.size()>0) {
for(ChangePackagingBoxHistoryDTO dto:dtoList){
//操作时间 转化
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);
ExcelUtils.exportExcelToTarget(response, "包装箱模组操作记录", list, ChangePackagingBoxHistoryExcel.class);
}
}

View File

@ -18,7 +18,6 @@ import com.cnbm.packing.dto.WoPackagingBoxSubstrateDTO;
import com.cnbm.packing.entity.WoPackagingBox;
import com.cnbm.packing.entity.WoPackagingBoxSubstrate;
import com.cnbm.packing.excel.WoPackagingBoxSubstrateExcel;
import com.cnbm.packing.excel.WoPackagingBoxSubstrateManualExcel;
import com.cnbm.packing.mapper.WoPackagingBoxMapper;
import com.cnbm.packing.mapper.WoPackagingBoxSubstrateMapper;
import com.cnbm.packing.param.PowerReportQueryParam;
@ -37,7 +36,6 @@ import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletResponse;
import java.text.DecimalFormat;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.time.LocalDateTime;
import java.util.List;
@ -362,22 +360,7 @@ public class WoPackagingBoxSubstrateController {
public void exportPackingInfo(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<WoPackagingBoxSubstrateDTO> list = woPackagingBoxSubstrateService.substrateList(params);
if(list.size()>0) {
//包装箱创建时间 最近打印时间 转化
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);
}
ExcelUtils.exportExcelToTarget(response, "装箱单信息", list, WoPackagingBoxSubstrateExcel.class);
}
}
}

View File

@ -75,10 +75,4 @@ public class ChangePackagingBoxHistoryDTO implements Serializable {
@ApiModelProperty(value = "版本号")
private Integer version;
@ApiModelProperty(value = "操作时间(转)")
private String createTime1;
@ApiModelProperty(value = "操作类型(转)")
private String type1;
}

View File

@ -179,10 +179,4 @@ public class WoPackagingBoxSubstrateDTO implements Serializable {
@ApiModelProperty(value = "打印时间(最近一次打印时间)")
private LocalDateTime printTime;
@ApiModelProperty(value = "包装箱创建时间(转)")
private String boxCreateTime1;
@ApiModelProperty(value = "最近打印时间(转)")
private String printTime1;
}

View File

@ -28,8 +28,8 @@ public class ChangePackagingBoxHistoryExcel {
@Excel(name = "目的位置")
private Integer targetSlot;
@Excel(name = "操作类型")
private String type1;
private Integer type;
@Excel(name = "操作时间")
private String createTime1;
private LocalDateTime createTime;
}

View File

@ -19,26 +19,26 @@ import java.util.Date;
public class WoPackagingBoxSubstrateExcel {
@Excel(name = "创建时间")
private String boxCreateTime1;
private LocalDateTime boxCreateTime;
@Excel(name = "模组ID")
private String woSubstrateId;
@Excel(name = "BoxID")
private String packagingBoxId;
@Excel(name = "模组所在包装箱位置")
private Integer slot;
@Excel(name = "订单号")
private String orderName;
@Excel(name = "SAP物料号")
private String sapMaterial;
@Excel(name = "档位功率")
private String powerLevel;
@Excel(name = "补偿功率")
private Float pmpp;
@Excel(name = "实测功率")
private Float actualPmpp;
@Excel(name = "订单")
private String orderName;
@Excel(name = "线体")
private Integer lineBody;
@Excel(name = "SAP物料号")
private String sapMaterial;
@Excel(name = "最近打印时间")
private String printTime1;
private LocalDateTime printTime;
}

View File

@ -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;
}

View File

@ -51,7 +51,6 @@ public class ChangePackagingBoxHistoryServiceBizImpl extends CrudServiceImpl<Cha
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.orderByDesc(ChangePackagingBoxHistory.CREATE_TIME);
return wrapper;
}