diff --git a/AstuteSystem/sql/astute.sql b/AstuteSystem/sql/astute.sql index 56b50e4..55f71a0 100644 --- a/AstuteSystem/sql/astute.sql +++ b/AstuteSystem/sql/astute.sql @@ -586,16 +586,15 @@ CREATE TABLE IF NOT EXISTS `service_type` ( PRIMARY KEY (`service_type_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; --- Dumping data for table astute.service_type: ~6 rows (approximately) +-- Dumping data for table astute.service_type: ~5 rows (approximately) /*!40000 ALTER TABLE `service_type` DISABLE KEYS */; INSERT INTO `service_type` (`service_type_id`, `desc`) VALUES - (1, 'Study'), + (1, 'Studies'), (2, 'Design'), (3, 'Peer Review'), (4, 'Cost Estimation'), (5, 'Forensic Investigation'), - (6, 'Out-of-pocket Expense'), - (7, 'TEMP'); + (6, 'Out-of-pocket Expense'); /*!40000 ALTER TABLE `service_type` ENABLE KEYS */; -- Dumping structure for table astute.session @@ -609,7 +608,7 @@ CREATE TABLE IF NOT EXISTS `session` ( CONSTRAINT `fk_session_user_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`user_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; --- Dumping data for table astute.session: ~21 rows (approximately) +-- Dumping data for table astute.session: ~22 rows (approximately) /*!40000 ALTER TABLE `session` DISABLE KEYS */; INSERT INTO `session` (`session_id`, `user_id`, `session_start_date`, `session_end_date`) VALUES ('042ef08346f84d52b98a22dab48c7b1c', 1, NULL, NULL), @@ -622,6 +621,7 @@ INSERT INTO `session` (`session_id`, `user_id`, `session_start_date`, `session_e ('4f48b60481ab4729a26b809c077fc7c0', 1, NULL, NULL), ('5df808bb502044ccb6e9da1bce0c63d4', 2, NULL, NULL), ('66ed2bccbaf34b1e96b2b81393996cf9', 1, NULL, NULL), + ('687e971f46884e968b234c9b47aa8629', 1, NULL, NULL), ('84237645fad54f5aa4d1ae4e24dcefc6', 1, NULL, NULL), ('8f8991185a174b87adb7d0b1b40c1475', 1, NULL, NULL), ('9273d151dabf4bc38e65cb1a568f9504', 1, NULL, NULL), @@ -699,7 +699,7 @@ and invoice_detail.po_line_item_num = item_no_in and po_detail.PO_num = po_no and invoice.PO_num = po_detail.PO_num and invoice.inv_no = invoice_detail.inv_num -and invoice.inv_status <> 3 +and invoice.inv_status = 2 and invoice_detail.po_line_item_num = po_detail.line_item_no; update po_detail set remaining_qty = rem_qty where PO_num = po_no and line_item_no = item_no_in; @@ -726,7 +726,7 @@ CREATE TABLE IF NOT EXISTS `user` ( /*!40000 ALTER TABLE `user` DISABLE KEYS */; INSERT INTO `user` (`user_id`, `username`, `password`, `first_name`, `middle_name`, `last_name`, `role`, `email`, `office_phone_ext`, `cell_phone`) VALUES (1, 'sparikh', 'sparikh', 'Saurin', NULL, 'Parikh', 'Owner', 'sparikh@Astuteng.com', 2024002004, 3014616485), - (2, 'humarethiya', 'humarethiya', 'Haresh', NULL, 'Umaretiya', 'Owner', 'Humaretiya@astuteng.com', 2024002004, 0); + (2, 'humaretiya', 'humaretiya', 'Haresh', NULL, 'Umaretiya', 'Owner', 'Humaretiya@astuteng.com', 2024002004, 0); /*!40000 ALTER TABLE `user` ENABLE KEYS */; /*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */; diff --git a/AstuteSystem/src/main/java/com/astute/dao/SqlDAO.java b/AstuteSystem/src/main/java/com/astute/dao/SqlDAO.java index b597f72..833625e 100644 --- a/AstuteSystem/src/main/java/com/astute/dao/SqlDAO.java +++ b/AstuteSystem/src/main/java/com/astute/dao/SqlDAO.java @@ -280,7 +280,7 @@ public class SqlDAO extends DAO { public void deleteServiceType(int serviceTypeId) throws AstuteException { try { Statement stmt = conn.createStatement(); - String sql = "delete from service_type where service_type_id = '" + serviceTypeId; + String sql = "delete from service_type where service_type_id = " + serviceTypeId; stmt.executeUpdate(sql); } catch (SQLException e) { e.printStackTrace(); diff --git a/AstuteSystem/src/main/java/com/astute/resources/ServiceTypeResource.java b/AstuteSystem/src/main/java/com/astute/resources/ServiceTypeResource.java index 5042bb0..8331b36 100644 --- a/AstuteSystem/src/main/java/com/astute/resources/ServiceTypeResource.java +++ b/AstuteSystem/src/main/java/com/astute/resources/ServiceTypeResource.java @@ -41,7 +41,7 @@ public class ServiceTypeResource { return new ApiResponse(ApiResponse.UPDATE_ACCESS_SUCESS).toResponse(); } - @Path("/{serviceTypeId}/delete") + @Path("/delete/{serviceTypeId}") @PUT public Response deleteServiceType(@PathParam("serviceTypeId") int serviceTypeId) throws AstuteException { diff --git a/AstuteSystem/src/main/main.iml b/AstuteSystem/src/main/main.iml new file mode 100644 index 0000000..80f2369 --- /dev/null +++ b/AstuteSystem/src/main/main.iml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<module type="JAVA_MODULE" version="4"> + <component name="FacetManager"> + <facet type="web" name="Web"> + <configuration> + <descriptors> + <deploymentDescriptor name="web.xml" url="file://$MODULE_DIR$/webapp/WEB-INF/web.xml" /> + </descriptors> + <webroots> + <root url="file://$MODULE_DIR$/webapp" relative="/" /> + </webroots> + </configuration> + </facet> + </component> + <component name="NewModuleRootManager" inherit-compiler-output="true"> + <exclude-output /> + <content url="file://$MODULE_DIR$"> + <sourceFolder url="file://$MODULE_DIR$/java" isTestSource="false" /> + </content> + <orderEntry type="inheritedJdk" /> + <orderEntry type="sourceFolder" forTests="false" /> + </component> +</module> \ No newline at end of file