|
|
|
@ -38,7 +38,7 @@ public class FactoryMgtDAOImpl implements FactoryMgtDAO {
|
|
|
|
|
private static final Log log = LogFactory.getLog(FactoryMgtDAOImpl.class);
|
|
|
|
|
|
|
|
|
|
@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 (?, ?, ?, ?, ?)";
|
|
|
|
|
try {
|
|
|
|
|
int paramIndex = 1;
|
|
|
|
@ -49,7 +49,7 @@ public class FactoryMgtDAOImpl implements FactoryMgtDAO {
|
|
|
|
|
stmt.setString(paramIndex++, productionPlan.getMachineId());
|
|
|
|
|
stmt.setString(paramIndex++, productionPlan.getProductId());
|
|
|
|
|
stmt.setInt(paramIndex, productionPlan.getTarget());
|
|
|
|
|
return stmt.executeUpdate() > 0;
|
|
|
|
|
stmt.executeUpdate();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} catch (SQLException e) {
|
|
|
|
|