|
@@ -265,7 +265,7 @@ public class DataCollectController {
|
|
" " +
|
|
" " +
|
|
"from mom_orderdetail mo " +
|
|
"from mom_orderdetail mo " +
|
|
// " left join ca_batchmap cb on substring(cbSysBarCode,CHARINDEX('|', cbSysBarCode, CHARINDEX('|', cbSysBarCode, CHARINDEX('|', cbSysBarCode) + 1) + 1)+1,CHARINDEX('|', cbSysBarCode, CHARINDEX('|', cbSysBarCode, CHARINDEX('|', cbSysBarCode, CHARINDEX('|', cbSysBarCode) + 1) + 1) + 1)-CHARINDEX('|', cbSysBarCode, CHARINDEX('|', cbSysBarCode, CHARINDEX('|', cbSysBarCode) + 1) + 1)-1)= cb.cMOCode and RIGHT(mo.cbSysBarCode,1) = cb.iMOSubSN " +
|
|
// " left join ca_batchmap cb on substring(cbSysBarCode,CHARINDEX('|', cbSysBarCode, CHARINDEX('|', cbSysBarCode, CHARINDEX('|', cbSysBarCode) + 1) + 1)+1,CHARINDEX('|', cbSysBarCode, CHARINDEX('|', cbSysBarCode, CHARINDEX('|', cbSysBarCode, CHARINDEX('|', cbSysBarCode) + 1) + 1) + 1)-CHARINDEX('|', cbSysBarCode, CHARINDEX('|', cbSysBarCode, CHARINDEX('|', cbSysBarCode) + 1) + 1)-1)= cb.cMOCode and RIGHT(mo.cbSysBarCode,1) = cb.iMOSubSN " +
|
|
- " where mo.Status = 3 " +
|
|
|
|
|
|
+ " where (mo.Status = 3 or mo.Status = 4) " +
|
|
" )tmp ";
|
|
" )tmp ";
|
|
int totalCount = 0;
|
|
int totalCount = 0;
|
|
try (Connection connection = sqlServerDataSource.getConnection()) {
|
|
try (Connection connection = sqlServerDataSource.getConnection()) {
|
|
@@ -288,13 +288,13 @@ public class DataCollectController {
|
|
// " where status in (3,4) "
|
|
// " where status in (3,4) "
|
|
// +" ORDER BY MoDId OFFSET ? ROWS FETCH NEXT ? ROWS ONLY ";
|
|
// +" ORDER BY MoDId OFFSET ? ROWS FETCH NEXT ? ROWS ONLY ";
|
|
String sqlQuery = "select mo.MoDId,substring(cbSysBarCode,CHARINDEX('|', cbSysBarCode, CHARINDEX('|', cbSysBarCode, CHARINDEX('|', cbSysBarCode) + 1) + 1)+1,CHARINDEX('|', cbSysBarCode, CHARINDEX('|', cbSysBarCode, CHARINDEX('|', cbSysBarCode, CHARINDEX('|', cbSysBarCode) + 1) + 1) + 1)-CHARINDEX('|', cbSysBarCode, CHARINDEX('|', cbSysBarCode, CHARINDEX('|', cbSysBarCode) + 1) + 1)-1) as orderId,mo.Define24 as projectId,mo.Define25 as projectName,mo.relsdate" +
|
|
String sqlQuery = "select mo.MoDId,substring(cbSysBarCode,CHARINDEX('|', cbSysBarCode, CHARINDEX('|', cbSysBarCode, CHARINDEX('|', cbSysBarCode) + 1) + 1)+1,CHARINDEX('|', cbSysBarCode, CHARINDEX('|', cbSysBarCode, CHARINDEX('|', cbSysBarCode, CHARINDEX('|', cbSysBarCode) + 1) + 1) + 1)-CHARINDEX('|', cbSysBarCode, CHARINDEX('|', cbSysBarCode, CHARINDEX('|', cbSysBarCode) + 1) + 1)-1) as orderId,mo.Define24 as projectId,mo.Define25 as projectName,mo.relsdate" +
|
|
- " ,RIGHT(mo.cbSysBarCode,1) as line,mo.Status,mo.MDeptCode " +
|
|
|
|
|
|
+ " ,RIGHT(mo.cbSysBarCode,1) as line,mo.Status,mo.MDeptCode,mo.CloseDate as closeDate " +
|
|
" from mom_orderdetail mo " +
|
|
" from mom_orderdetail mo " +
|
|
// " left join ca_batchmap cb on substring(cbSysBarCode,CHARINDEX('|', cbSysBarCode, CHARINDEX('|', cbSysBarCode, CHARINDEX('|', cbSysBarCode) + 1) + 1)+1,CHARINDEX('|', cbSysBarCode, CHARINDEX('|', cbSysBarCode, CHARINDEX('|', cbSysBarCode, CHARINDEX('|', cbSysBarCode) + 1) + 1) + 1)-CHARINDEX('|', cbSysBarCode, CHARINDEX('|', cbSysBarCode, CHARINDEX('|', cbSysBarCode) + 1) + 1)-1) = cb.cMOCode and RIGHT(mo.cbSysBarCode,1) = cb.iMOSubSN " +
|
|
// " left join ca_batchmap cb on substring(cbSysBarCode,CHARINDEX('|', cbSysBarCode, CHARINDEX('|', cbSysBarCode, CHARINDEX('|', cbSysBarCode) + 1) + 1)+1,CHARINDEX('|', cbSysBarCode, CHARINDEX('|', cbSysBarCode, CHARINDEX('|', cbSysBarCode, CHARINDEX('|', cbSysBarCode) + 1) + 1) + 1)-CHARINDEX('|', cbSysBarCode, CHARINDEX('|', cbSysBarCode, CHARINDEX('|', cbSysBarCode) + 1) + 1)-1) = cb.cMOCode and RIGHT(mo.cbSysBarCode,1) = cb.iMOSubSN " +
|
|
- " where mo.Status = 3 " +
|
|
|
|
|
|
+ " where (mo.Status = 3 or mo.Status = 4)" +
|
|
" ORDER BY mo.MoDId OFFSET ? ROWS FETCH NEXT ? ROWS ONLY ";
|
|
" ORDER BY mo.MoDId OFFSET ? ROWS FETCH NEXT ? ROWS ONLY ";
|
|
List<ErpOrderInfo> resList = new ArrayList<>();
|
|
List<ErpOrderInfo> resList = new ArrayList<>();
|
|
- SimpleDateFormat sdfAll = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
|
+ SimpleDateFormat sdfAll = new SimpleDateFormat("yyyy-MM-dd");
|
|
try (Connection connection = sqlServerDataSource.getConnection()) {
|
|
try (Connection connection = sqlServerDataSource.getConnection()) {
|
|
PreparedStatement queryStmt = connection.prepareStatement(sqlQuery);
|
|
PreparedStatement queryStmt = connection.prepareStatement(sqlQuery);
|
|
int pageSize = pageBO.getPageSize();
|
|
int pageSize = pageBO.getPageSize();
|
|
@@ -312,7 +312,11 @@ public class DataCollectController {
|
|
erpOrderInfo.setStatus(resultSet.getInt("Status"));
|
|
erpOrderInfo.setStatus(resultSet.getInt("Status"));
|
|
erpOrderInfo.setRelsDate(resultSet.getDate("relsdate"));
|
|
erpOrderInfo.setRelsDate(resultSet.getDate("relsdate"));
|
|
erpOrderInfo.setDeptId(resultSet.getString("MDeptCode"));
|
|
erpOrderInfo.setDeptId(resultSet.getString("MDeptCode"));
|
|
-// erpOrderInfo.setDeptName(resultSet.getString("cDepName"));
|
|
|
|
|
|
+ if (resultSet.getDate("closeDate") != null) {
|
|
|
|
+ erpOrderInfo.setCloseDate(resultSet.getDate("closeDate"));
|
|
|
|
+ } else {
|
|
|
|
+ erpOrderInfo.setCloseDate(null);
|
|
|
|
+ }
|
|
resList.add(erpOrderInfo);
|
|
resList.add(erpOrderInfo);
|
|
}
|
|
}
|
|
}
|
|
}
|