factory-mgt
Rushdi Mohamed 1 year ago
parent d97b0e3f9f
commit 3b59638415

@ -24,7 +24,7 @@ import io.entgra.device.mgt.core.factory.mgt.common.dto.ProductionPlan;
public interface FactoryMgtDAO extends BaseRequestDAO<ProductionPlan> {
boolean addProductionPlan(ProductionPlan productionPlan) throws FactoryMgtPluginException, FactoryMgtDAOException;
void addProductionPlan(ProductionPlan productionPlan) throws FactoryMgtPluginException, FactoryMgtDAOException;
boolean updateProductionPlan(ProductionPlan productionPlan) throws FactoryMgtPluginException, FactoryMgtDAOException;

@ -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) {

@ -15,6 +15,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.entgra.device.mgt.core.factory.mgt.core.util;
import io.entgra.device.mgt.core.factory.mgt.common.exception.FactoryMgtException;

@ -18,7 +18,6 @@
package io.entgra.device.mgt.core.factory.mgt.core;
import com.google.gson.Gson;
import io.entgra.device.mgt.core.factory.mgt.common.bean.PaginatedMeterRequestQuery;
import io.entgra.device.mgt.core.factory.mgt.common.dto.ProductionPlan;
import io.entgra.device.mgt.core.factory.mgt.common.exception.FactoryMgtException;
@ -27,8 +26,8 @@ import io.entgra.device.mgt.core.factory.mgt.common.responses.BulkStatusResponse
import io.entgra.device.mgt.core.factory.mgt.common.spi.ProductionPlanService;
import io.entgra.device.mgt.core.factory.mgt.common.wrapper.ProductionPlanWrapper;
import io.entgra.device.mgt.core.factory.mgt.core.mock.BaseFactoryMgtPluginTest;
import io.entgra.device.mgt.core.factory.mgt.core.service.impl.ProductionPlanServiceImpl;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.testng.Assert;

Loading…
Cancel
Save