|
@@ -72,7 +72,15 @@ public class DataCollectController {
|
|
// List<TisTimeVO> tisTimeVOS = JSONArray.parseArray(jsonarray, TisTimeVO.class);
|
|
// List<TisTimeVO> tisTimeVOS = JSONArray.parseArray(jsonarray, TisTimeVO.class);
|
|
if(!CollectionUtils.isEmpty(tisList)){
|
|
if(!CollectionUtils.isEmpty(tisList)){
|
|
for (TisTimeVO tisTimeVO : tisList) {
|
|
for (TisTimeVO tisTimeVO : tisList) {
|
|
|
|
+ String sqlQuery = "select top 1 iRealCOID from ca_batchmap where cMOCode = ? and iMOSubSN = ? ";
|
|
try (Connection connection = sqlServerDataSource.getConnection()) {
|
|
try (Connection connection = sqlServerDataSource.getConnection()) {
|
|
|
|
+ PreparedStatement queryStmt = connection.prepareStatement(sqlQuery);
|
|
|
|
+ queryStmt.setString(1,tisTimeVO.getOrderId());
|
|
|
|
+ queryStmt.setInt(2,tisTimeVO.getLine());
|
|
|
|
+ ResultSet queryRs = queryStmt.executeQuery();
|
|
|
|
+ if (queryRs.next()) {
|
|
|
|
+ tisTimeVO.setCoId(queryRs.getString("iRealCOID"));
|
|
|
|
+ }
|
|
String sqlInsert = "insert into CA_DayTiS(cPPID,iRealWkt,dDate) values(?,?,?)";
|
|
String sqlInsert = "insert into CA_DayTiS(cPPID,iRealWkt,dDate) values(?,?,?)";
|
|
PreparedStatement insertStmt = connection.prepareStatement(sqlInsert);
|
|
PreparedStatement insertStmt = connection.prepareStatement(sqlInsert);
|
|
insertStmt.setString(1,tisTimeVO.getCoId());
|
|
insertStmt.setString(1,tisTimeVO.getCoId());
|