Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gh6072 3 add purchase orders to shipper transportation #6112

Merged
merged 12 commits into from
Feb 4, 2020
Merged

Conversation

metas-rc
Copy link
Member

Copy link
Member

@metas-ts metas-ts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Please check my comments (=>DDD)
    • when you have your little domain model, it should also be quite easy to add unit tests and drive your code a bit.
  • @teosarca wdyt?

* #L%
*/
@Repository
public class PurchaseOrderToShipperTransportationRepository
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looking at the code this is not a repository.
in my mind a repository is something where you can load and save entities.
@teosarca wdyt, is it sufficient to simply rename this to something that ends with ...Service?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

..or mayby ..DAO, sinse we already have a service which is more BL'ish, compared to this class

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...oooor maybe we can start with a small shipperTeansportation entity...
we could have a repo for it..and it could have a purchase order ids, and code such as C_Order_AddTo_M_ShipperTransportation could add another one, instead of having this addPurchaseOrderToShipperTransportation

And then the repo could save it, by behind the scenes creating that I_M_Package and that I_M_ShippingPackage

@metas-ts
Copy link
Member

metas-ts commented Feb 3, 2020

Codacy Here is an overview of what got changed by this pull request:

Complexity increasing per file
==============================
- de.metas.business/src/main/java/de/metas/shipping/PurchaseOrderToShipperTransportationService.java  2
- de.metas.business/src/main/java/de/metas/shipping/api/impl/ShipperTransportationDAO.java  3
- de.metas.business/src/main/java/de/metas/shipping/process/C_Order_AddTo_M_ShipperTransportation.java  2
- de.metas.business/src/main/java/de/metas/shipping/PurchaseOrderToShipperTransportationRepository.java  1
- de.metas.business/src/test/java/de/metas/shipping/PurchaseOrderToShipperTransportationServiceTest.java  1
         

Complexity decreasing per file
==============================
+ de.metas.swat/de.metas.swat.base/src/main/java/de/metas/tourplanning/process/M_ShippingPackage_CreateFromTourplanning.java  -2
         

See the complete overview on Codacy

@metas-ts metas-ts merged commit ca28a4a into master Feb 4, 2020
@metas-ts metas-ts deleted the gh6072_3 branch February 4, 2020 05:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants