Start Task #2019 Cost:16h Left:0h

Finish Task #2019 Cost:16h
yun-zuoyi
袁津哲 5 years ago
parent 7134bad17f
commit 868e82d83a

@ -10,6 +10,9 @@ import cn.estsh.i3plus.pojo.mes.bean.*;
import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;
import java.util.ArrayList;
import java.util.List;
/**
* @Description:
* @Reference: Mes
@ -541,4 +544,58 @@ public class MesPcnHqlPack {
return packBean;
}
/**
*
*
* @return
*/
public static <T> List<T> getPage(List<T> totalList, int currentPage, int pageSize, int totalPage) {
if (currentPage <= 0) {
currentPage = 1;
}
if (currentPage >= totalPage) {
currentPage = totalPage;
}
List<T> subList = new ArrayList<>();
if (null != totalList) {
subList.addAll(totalList.subList(getStartIndex(totalList, currentPage, pageSize, totalPage),
getEndIndex(totalList, currentPage, pageSize, totalPage)));
}
return subList;
}
private static <T> int getStartIndex(List<T> totalList, int currentPage, int pageSize, int totalRecord) {
if (null == totalList) {
return 0;
}
int startIndex = (currentPage - 1) * pageSize;
if (startIndex > totalRecord) {
startIndex = totalRecord;
}
if (startIndex < 0) {
startIndex = 0;
}
return startIndex;
}
private static <T> int getEndIndex(List<T> totalList, int currentPage, int pageSize, int totalRecord) {
if (null == totalList) {
return 0;
}
int endIndex = getStartIndex(totalList, currentPage, pageSize, totalRecord) + pageSize;
if (endIndex < 0) {
endIndex = 0;
}
if (endIndex < getStartIndex(totalList, currentPage, pageSize, totalRecord)) {
endIndex = getStartIndex(totalList, currentPage, pageSize, totalRecord);
}
if (endIndex > totalRecord) {
endIndex = totalRecord;
}
return endIndex;
}
}

@ -0,0 +1,54 @@
package cn.estsh.i3plus.pojo.model.mes;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @Description : MesModel
* @Reference :
* @Author : siliter.yuan
* @CreateDate : 2020-06-01 09:53
* @Modify:
**/
@Data
@NoArgsConstructor
public class MesElectricDataModel implements Serializable {
private static final long serialVersionUID = -6376845639646546495L;
@ApiParam(value = "车型")
public String carType;
@ApiParam(value = "颜色代码")
public String colorCode;
@ApiParam(value = "日期时间")
private String dateTime;
@ApiParam(value = "生产序号")
private String productSeq;
@ApiParam(value = "车型信息")
private String carTypeInfo;
@ApiParam(value = "生产模式")
private String productModel;
@ApiParam(value = "产品生产号")
private String productNumber;
@ApiParam(value = "备用")
private String spare;
@ApiParam(value = "所有零件信息包括所有选配信息")
private String other;
@ApiParam(value = "电检结果")
private String electricResult;
@ApiParam(value = "文件名称")
private String ftpFileName;
}

@ -0,0 +1,61 @@
package cn.estsh.i3plus.pojo.model.mes;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import java.io.Serializable;
/**
* @Description : MesModel
* @Reference :
* @Author : siliter.yuan
* @CreateDate : 2020-06-02 09:53
* @Modify:
**/
@Data
public class MesElectricMarkUpDataModel implements Serializable {
private static final long serialVersionUID = -6376845779646546495L;
@ApiParam(value = "工作中心代码")
public String workCenterCode;
@ApiParam(value = "工作单元代码")
public String workCellCode;
@ApiParam(value = "过程条码")
private String serialNumber;
@ApiParam(value = "产品生产号")
private String productNumber;
@ApiParam(value = "电检结果")
private String electricResult;
@ApiParam(value = "测试时间")
private String testDateTime;
@ApiParam(value = "是否补录")
private Integer isMarkUp;
@ApiParam(value = "补录时间")
private String markUpDateTime;
@ApiParam(value = "开始时间")
private String startDateTimeStr;
@ApiParam(value = "结束时间")
private String endDateTimeStr;
public MesElectricMarkUpDataModel(String workCenterCode, String workCellCode, String serialNumber, String productNumber,
String electricResult, String testDateTime, Integer isMarkUp, String markUpDateTime) {
this.workCenterCode = workCenterCode;
this.workCellCode = workCellCode;
this.serialNumber = serialNumber;
this.productNumber = productNumber;
this.electricResult = electricResult;
this.testDateTime = testDateTime;
this.isMarkUp = isMarkUp;
this.markUpDateTime = markUpDateTime;
}
}
Loading…
Cancel
Save