|
@@ -168,7 +168,7 @@ public class DataCollectController {
|
|
|
|
|
|
@RequestMapping("/getSqlServerProjectTypeDataSum")
|
|
@RequestMapping("/getSqlServerProjectTypeDataSum")
|
|
public String getSqlServerProjectTypeDataSum() {
|
|
public String getSqlServerProjectTypeDataSum() {
|
|
- String sqlCount = "select count(distinct citemccode) from fitemss97 where bclose = 0";
|
|
|
|
|
|
+ String sqlCount = "select count(distinct left(citemccode,5) ) from fitemss97 where bclose = 0";
|
|
int totalCount = 0;
|
|
int totalCount = 0;
|
|
try (Connection connection = sqlServerDataSource.getConnection()) {
|
|
try (Connection connection = sqlServerDataSource.getConnection()) {
|
|
PreparedStatement countStmt = connection.prepareStatement(sqlCount);
|
|
PreparedStatement countStmt = connection.prepareStatement(sqlCount);
|
|
@@ -185,7 +185,7 @@ public class DataCollectController {
|
|
|
|
|
|
@RequestMapping("/getSqlServerProjectTypeDataList")
|
|
@RequestMapping("/getSqlServerProjectTypeDataList")
|
|
public List<String> getSqlServerProjectTypeDataList(@RequestBody PageBO pageBO) {
|
|
public List<String> getSqlServerProjectTypeDataList(@RequestBody PageBO pageBO) {
|
|
- String sqlQuery = " select distinct citemccode " +
|
|
|
|
|
|
+ String sqlQuery = " select distinct left(citemccode,5) " +
|
|
" from fitemss97 where bclose = 0 ORDER BY citemccode OFFSET ? ROWS FETCH NEXT ? ROWS ONLY ";
|
|
" from fitemss97 where bclose = 0 ORDER BY citemccode OFFSET ? ROWS FETCH NEXT ? ROWS ONLY ";
|
|
List<String> resList = new ArrayList<>();
|
|
List<String> resList = new ArrayList<>();
|
|
try (Connection connection = sqlServerDataSource.getConnection()) {
|
|
try (Connection connection = sqlServerDataSource.getConnection()) {
|
|
@@ -258,10 +258,11 @@ public class DataCollectController {
|
|
// String sqlCount = "select count(*) from mom_orderdetail where status in (3,4) ";
|
|
// String sqlCount = "select count(*) from mom_orderdetail where status in (3,4) ";
|
|
String sqlCount = "select count(*) " +
|
|
String sqlCount = "select count(*) " +
|
|
"from ( " +
|
|
"from ( " +
|
|
- " select mo.cbSysBarCode,SUBSTRING(mo.cbSysBarCode, 8, 15) as orderId,mo.Define24,mo.Define25 " +
|
|
|
|
|
|
+ " select mo.cbSysBarCode,SUBSTRING(mo.cbSysBarCode, 8, 14) as orderId,mo.Define24,mo.Define25 " +
|
|
" ,RIGHT(mo.cbSysBarCode,1) as line,mo.Status,cb.cDeptID,cb.cDepName,mo.MoDId " +
|
|
" ,RIGHT(mo.cbSysBarCode,1) as line,mo.Status,cb.cDeptID,cb.cDepName,mo.MoDId " +
|
|
- " from mom_orderdetail mo " +
|
|
|
|
- " left join ca_batchmap cb on SUBSTRING(mo.cbSysBarCode, 8, 15) = cb.cMOCode and RIGHT(mo.cbSysBarCode,1) = cb.iMOSubSN " +
|
|
|
|
|
|
+ " " +
|
|
|
|
+ "from mom_orderdetail mo " +
|
|
|
|
+ " left join ca_batchmap cb on SUBSTRING(mo.cbSysBarCode, 8, 14) = cb.cMOCode and RIGHT(mo.cbSysBarCode,1) = cb.iMOSubSN " +
|
|
" where mo.Status = 3 " +
|
|
" where mo.Status = 3 " +
|
|
" )tmp ";
|
|
" )tmp ";
|
|
int totalCount = 0;
|
|
int totalCount = 0;
|
|
@@ -284,10 +285,10 @@ public class DataCollectController {
|
|
// " from mom_orderdetail " +
|
|
// " from mom_orderdetail " +
|
|
// " 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(mo.cbSysBarCode, 8, 15) as orderId,mo.Define24 as projectId,mo.Define25 as projectName,mo.relsdate" +
|
|
|
|
|
|
+ String sqlQuery = "select mo.MoDId,SUBSTRING(mo.cbSysBarCode, 8, 14) as orderId,mo.Define24 as projectId,mo.Define25 as projectName,mo.relsdate" +
|
|
" ,RIGHT(mo.cbSysBarCode,1) as line,mo.Status,cb.cDeptID,cb.cDepName " +
|
|
" ,RIGHT(mo.cbSysBarCode,1) as line,mo.Status,cb.cDeptID,cb.cDepName " +
|
|
" from mom_orderdetail mo " +
|
|
" from mom_orderdetail mo " +
|
|
- " left join ca_batchmap cb on SUBSTRING(mo.cbSysBarCode, 8, 15) = cb.cMOCode and RIGHT(mo.cbSysBarCode,1) = cb.iMOSubSN " +
|
|
|
|
|
|
+ " left join ca_batchmap cb on SUBSTRING(mo.cbSysBarCode, 8, 14) = cb.cMOCode and RIGHT(mo.cbSysBarCode,1) = cb.iMOSubSN " +
|
|
" where mo.Status = 3 " +
|
|
" where mo.Status = 3 " +
|
|
" 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<>();
|