|
@@ -27,7 +27,6 @@ import java.util.ArrayList;
|
|
|
import java.util.Comparator;
|
|
import java.util.Comparator;
|
|
|
import java.util.Date;
|
|
import java.util.Date;
|
|
|
import java.text.SimpleDateFormat;
|
|
import java.text.SimpleDateFormat;
|
|
|
-import java.util.Calendar;
|
|
|
|
|
import java.net.URLEncoder;
|
|
import java.net.URLEncoder;
|
|
|
|
|
|
|
|
import org.apache.poi.ss.usermodel.BorderStyle;
|
|
import org.apache.poi.ss.usermodel.BorderStyle;
|
|
@@ -170,7 +169,7 @@ public class MesProductLeakagePointStatController extends BaseController {
|
|
|
private Map<String, Object> buildQualityData(List<MesProductHf> hfRecords, Date startDate, Date endDate, String dataType) {
|
|
private Map<String, Object> buildQualityData(List<MesProductHf> hfRecords, Date startDate, Date endDate, String dataType) {
|
|
|
MesProductQm query = new MesProductQm();
|
|
MesProductQm query = new MesProductQm();
|
|
|
if (startDate != null) query.setTestTime_gte(startDate);
|
|
if (startDate != null) query.setTestTime_gte(startDate);
|
|
|
- if (endDate != null) query.setTestTime_lte(endOfDay(endDate));
|
|
|
|
|
|
|
+ if (endDate != null) query.setTestTime_lte(endDate);
|
|
|
int qualified = 0;
|
|
int qualified = 0;
|
|
|
int defective = 0;
|
|
int defective = 0;
|
|
|
int noPoint = 0;
|
|
int noPoint = 0;
|
|
@@ -267,7 +266,7 @@ public class MesProductLeakagePointStatController extends BaseController {
|
|
|
private List<MesProductRecord> findProductRecords(Date startDate, Date endDate) {
|
|
private List<MesProductRecord> findProductRecords(Date startDate, Date endDate) {
|
|
|
MesProductRecord query = new MesProductRecord();
|
|
MesProductRecord query = new MesProductRecord();
|
|
|
if (startDate != null) query.setUpdateDate_gte(startDate);
|
|
if (startDate != null) query.setUpdateDate_gte(startDate);
|
|
|
- if (endDate != null) query.setUpdateDate_lte(endOfDay(endDate));
|
|
|
|
|
|
|
+ if (endDate != null) query.setUpdateDate_lte(endDate);
|
|
|
query.getSqlMap().getWhere()
|
|
query.getSqlMap().getWhere()
|
|
|
.and("a.oprno", QueryType.IN, new String[] {"INSP030A", "INSP030B"})
|
|
.and("a.oprno", QueryType.IN, new String[] {"INSP030A", "INSP030B"})
|
|
|
.and("a.craft", QueryType.EQ, "100000");
|
|
.and("a.craft", QueryType.EQ, "100000");
|
|
@@ -384,7 +383,7 @@ public class MesProductLeakagePointStatController extends BaseController {
|
|
|
MesProductHf query = new MesProductHf();
|
|
MesProductHf query = new MesProductHf();
|
|
|
query.setSn(sn);
|
|
query.setSn(sn);
|
|
|
if (startDate != null) query.setCreateDate_gte(startDate);
|
|
if (startDate != null) query.setCreateDate_gte(startDate);
|
|
|
- if (endDate != null) query.setCreateDate_lte(endOfDay(endDate));
|
|
|
|
|
|
|
+ if (endDate != null) query.setCreateDate_lte(endDate);
|
|
|
List<MesProductHf> records = mesProductHfService.findList(query);
|
|
List<MesProductHf> records = mesProductHfService.findList(query);
|
|
|
if (StringUtils.isBlank(dataType) || "all".equals(dataType)) return records;
|
|
if (StringUtils.isBlank(dataType) || "all".equals(dataType)) return records;
|
|
|
List<MesProductHf> filteredRecords = new ArrayList<>();
|
|
List<MesProductHf> filteredRecords = new ArrayList<>();
|
|
@@ -404,17 +403,6 @@ public class MesProductLeakagePointStatController extends BaseController {
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- /** Date-only filters are inclusive of the selected end date, matching the detection-record page. */
|
|
|
|
|
- private Date endOfDay(Date date) {
|
|
|
|
|
- Calendar calendar = Calendar.getInstance();
|
|
|
|
|
- calendar.setTime(date);
|
|
|
|
|
- calendar.set(Calendar.HOUR_OF_DAY, 23);
|
|
|
|
|
- calendar.set(Calendar.MINUTE, 59);
|
|
|
|
|
- calendar.set(Calendar.SECOND, 59);
|
|
|
|
|
- calendar.set(Calendar.MILLISECOND, 999);
|
|
|
|
|
- return calendar.getTime();
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
private String normalizeLeakPoint(String value) {
|
|
private String normalizeLeakPoint(String value) {
|
|
|
String point = value == null ? "" : value.trim();
|
|
String point = value == null ? "" : value.trim();
|
|
|
if (!point.matches("\\d+")) return point;
|
|
if (!point.matches("\\d+")) return point;
|