top of page
realcode4you

Create a System to Calculate Sales Commission Using Java Spring Boot | Realcode4you

Requirement Details

- Create a system to calculate Sales commission and generate reports as listed below

- All output reports to be generated in JSON format

- Test using postman api client

- DB table to create

  • Sales_Commission table

- Columns - product, product_quantity, sale amount, salesman name, salesman commission, salesman area, created_date


- Implement the POST /sales API (slide 4)

  • Input JSON (sales) – see slide 5 for JSON format.

- salesman info - Contains attributes : salesman_id, salesman name, salesman area, commission_rate

- products info - Contains columns: product, quantity, mrp_per_unit, salesman_id

  • Define a Sales model class that contains salesman and product class arrays. Use this in the method call as request body.

  • Compute product level commission and store to DB.

  • Use Repository pattern to save the product commission into the DB.


- Implement the GET /sales/commission API

  • Input – date - request param or json request body (your choice)

  • Output – SalesCommission object array

  • Use JDBC template (select query) to query the table and map to SalesCommission data(model) class

  • Compute the time taken for this call using Spring AOP and print in logs


REST APIs to implement

- POST /sales

- Input

- Output

- status 200 (no error) or 400 (error) – response body to contain a simple json with suitable message


input:



Technology choices

  • Backend – Java/Springboot/DB/REST/JSON

  • Database Access – postgres, mysql or H2

  • Frontend – None needed. Access via REST API (postman)

  • Build system – Maven

  • Testing – next phase



If you need solution of above problem then then don't worry, realcode4you expert solve this problem with an reasonable price.


If you need other help related to other Java Programming like JavaFX, Java Servlet, Java Android App, Java Web Projects then our expert also provide top and best quality solution with complete support and reasonable price.


For more details you can send your request or requirement details at:


realcode4you@gmail.com

Comments


bottom of page