|
|
@ -38,7 +38,7 @@ public class FactoryMgtDAOImpl implements FactoryMgtDAO {
|
|
|
|
private static final Log log = LogFactory.getLog(FactoryMgtDAOImpl.class);
|
|
|
|
private static final Log log = LogFactory.getLog(FactoryMgtDAOImpl.class);
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public boolean addProductionPlan(ProductionPlan productionPlan) throws FactoryMgtDAOException {
|
|
|
|
public void addProductionPlan(ProductionPlan productionPlan) throws FactoryMgtDAOException {
|
|
|
|
String sql = "INSERT INTO PRODUCTION_PLAN (DATE, TIME, MACHINE_ID, PRODUCT_ID, TARGET) VALUES (?, ?, ?, ?, ?)";
|
|
|
|
String sql = "INSERT INTO PRODUCTION_PLAN (DATE, TIME, MACHINE_ID, PRODUCT_ID, TARGET) VALUES (?, ?, ?, ?, ?)";
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
int paramIndex = 1;
|
|
|
|
int paramIndex = 1;
|
|
|
@ -49,7 +49,7 @@ public class FactoryMgtDAOImpl implements FactoryMgtDAO {
|
|
|
|
stmt.setString(paramIndex++, productionPlan.getMachineId());
|
|
|
|
stmt.setString(paramIndex++, productionPlan.getMachineId());
|
|
|
|
stmt.setString(paramIndex++, productionPlan.getProductId());
|
|
|
|
stmt.setString(paramIndex++, productionPlan.getProductId());
|
|
|
|
stmt.setInt(paramIndex, productionPlan.getTarget());
|
|
|
|
stmt.setInt(paramIndex, productionPlan.getTarget());
|
|
|
|
return stmt.executeUpdate() > 0;
|
|
|
|
stmt.executeUpdate();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
} catch (SQLException e) {
|
|
|
|
} catch (SQLException e) {
|
|
|
|