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

Модель управления складом #35

Open
wants to merge 42 commits into
base: master
Choose a base branch
from

Conversation

mikhailmineev
Copy link
Collaborator

No description provided.

<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.xtend.XTEND_CONTAINER"/>
<classpathentry kind="lib" path="C:/Users/Михаил/src/raox/ru.bmstu.rk9.rao.lib/bin/" sourcepath="C:/Users/Михаил/src/raox/ru.bmstu.rk9.rao.lib"/>
<classpathentry kind="lib" path="C:/Users/Михаил/src/raox/ru.bmstu.rk9.rao.lib/thirdparty/querydsl/lib/querydsl-jpa-4.1.3-apt-hibernate-one-jar.jar"/>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Хотелось бы относительный путей. Попробуй относительно корня Эклипса, как тут.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

https://github.com/mikhailmineev/raox/blob/ba3b8528c8d330fd04d62ca35f1737ce5663510c/ru.bmstu.rk9.rao.ui/src/ru/bmstu/rk9/rao/ui/execution/BuildUtil.java#L173-L181
Тут представлено два режима генерации данных ссылок, PRODUCTION и DEVELOPMENT, на данный момент у меня вызывается DEVELOPMENT при rebuild, смысл править это появится только после релиза фичи с чтением из базы

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Еще вопрос насчет релиза, все библиотеки thirdparty будут залиты в ru.bmstu.rk9.rao.lib.jar? тогда в релизе не понадобится прописывать querydsl

Copy link
Collaborator

@aurusov aurusov Sep 10, 2017

Choose a reason for hiding this comment

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

Еще вопрос насчет релиза, все библиотеки thirdparty будут залиты в ru.bmstu.rk9.rao.lib.jar? тогда в релизе не понадобится прописывать querydsl

Как вариант. Посмотри использование commons-math3-3.6.jar через поиск по всем файлам по содержимому.

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>warehouse</name>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Название уж больно общее. Вторая модель склада сразу будет конфликтовать.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Тогда грамотнее будет сделать подпапки warehouse->warehouse-model ну и warehouse->warehouse-receipt (заказ)?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Общая пупка нужна, но не факт, что warehouse. Надо Андрея спросить. Вернемся к этому месту чуть позже.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@Troideninc

Подскажи название модели. Хочется, чтобы оно отражало именно твою систему. М.б. прям юридическое название фирмы ?

Choose a reason for hiding this comment

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

Предлагаю: Русское название "Модель поставки под заказ"
Английское "delivery to order"


constant terminateTime = 600 // Время остановки
constant allowedDeliveryWaitPeriod = 4 // Допустимое время ожидания заказа
constant defaultDeliveryTime = 3 // Время ожидания в днях
Copy link
Collaborator

Choose a reason for hiding this comment

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

Если уж писать размерность, то у всех трех констант.

public List<PartRequest> requestedParts;

@Override
public String toString(){
Copy link
Collaborator

Choose a reason for hiding this comment

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

Включи автоматическое форматирование при сохранении *.java

import domain.PartRequest
import java.util.Iterator
import domain.Part
import domain.QOrder
Copy link
Collaborator

Choose a reason for hiding this comment

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

Давай сортировать их по имени.

/*dataprovider corpTerminal = new SqlDataProvider("jdbc:mysql://localhost:3306/corpterminal","observer","compaq")
.addEntity("Part")*/

type OrderIterator {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Разве мы не так договаривались ?
OrderIterator -> Orders

constant deliveryAmount = 200 // В штуках
constant itemPrice = 1_000_00 // В копейках
constant defaultDeliveryTime = 3 // Время ожидания в днях
constant terminateTime = 600 // Время остановки
Copy link
Collaborator

Choose a reason for hiding this comment

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

Нет размерности

int deliveryTime
}

type WPart {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Надо переименовать

int totalPrice
}

type PartIterator {
Copy link
Collaborator

Choose a reason for hiding this comment

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

PartIterator -> Parts

event ItemReceived() {
var part = partIterator.iterator.next()
var price = calculatePrice(part)
WPart.create(part,price)
Copy link
Collaborator

Choose a reason for hiding this comment

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

пробел


event ItemReceived() {
var part = partIterator.iterator.next()
var price = calculatePrice(part)
Copy link
Collaborator

Choose a reason for hiding this comment

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

var -> val в обоих случаях


def init() {
var query = corpTerminal.getQuery()
var part = QPart.part
Copy link
Collaborator

Choose a reason for hiding this comment

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

Старайся везде писать val

"jdbc:mysql://mikhailmineev.ru:3306/corpterminal?zeroDateTimeBehavior=convertToNull",
"jpademo",
"jdbc:mysql://mikhailmineev.ru:3306/corpterminal?zeroDateTimeBehavior=convertToNull",
"jpademo",
Copy link
Collaborator

@aurusov aurusov Oct 2, 2017

Choose a reason for hiding this comment

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

А это что за пробелы в конце ? Эх, нет у нас форматирования для моделей.

Copy link
Collaborator Author

@mikhailmineev mikhailmineev Oct 2, 2017

Choose a reason for hiding this comment

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

Форматирование делает что-то типа

dataprovider data = new SqlDataProvider("com.mysql.jdbc.Driver",
	"jdbc:mysql://localhost:3306/corpterminal?zeroDateTimeBehavior=convertToNull", "observer", "compaq", Part, Order,
	PartRequest)

Но оно менее читаемо
Собственно, когда я разбивал параметры на строки, тогда и забыл вручную убрать пробелы

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Решил, как исправить, на данные для подключения создам отдельные константы

@aurusov
Copy link
Collaborator

aurusov commented Oct 2, 2017

Посмотрел. Текущее состояние ok.

@mikhailmineev
Copy link
Collaborator Author

Можете провести ревью кода модели?

Mikhail Mineev added 3 commits October 19, 2017 19:13
- Пустые заказы считаем неуспешными
- Длительность пустых заказов и тех, у которых неуспешные детали,
считаем по длительности до последнего изменения
(LeKaitoW#16)
- Чисто пустые заказы игнорятся
Пофиксен учет деталей на складе
(LeKaitoW#16)
LocalDate start = getDateOfCreation();
LocalDate end = getDateOfRealization();
long result = start.until(end, ChronoUnit.DAYS);
if(result < 0) {
Copy link
Collaborator

@aurusov aurusov Nov 16, 2017

Choose a reason for hiding this comment

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

Натрави стандартный форматтер на вс java-исходники.

long result = start.until(end, ChronoUnit.DAYS);
if(result < 0) {
throw new IllegalStateException("getModificationInterval " + result);
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

В однострочных if'ах мы не используем скобки.

public List<PartRequest> requestedParts;

/**
* Дата поступления заказа
Copy link
Collaborator

Choose a reason for hiding this comment

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

Название метода говорит за себя лучше комментария. Предлагаю их удалить.

* @return можно ли вычислить интервал реализации
*/
public boolean hasRealizationInterval() {
return dateOfRealization != null;
Copy link
Collaborator

@aurusov aurusov Nov 16, 2017

Choose a reason for hiding this comment

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

Кажется странным иметь метод бизнес-логики обработки в классе работы с БД. Предлагаю завести потомка и перенести туда.

������ ������ ���������� ���������� mysql-connector-java-5.1.44-bin.jar
������� � https://dev.mysql.com/downloads/connector/j/

����� �� �������� � ����������� ��-�� ��� ��������
Copy link
Collaborator

Choose a reason for hiding this comment

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

Почему не utf-8 ?

Mikhail Mineev added 18 commits November 17, 2017 19:57
# Conflicts:
#	delivery_to_order/order_request_model.rao
Добавил баланс
Заказ деталей учитывается в балансе
Эксперимент по коэффициенту количества заказываемых деталей
Расчет длительности ожидания заказа по гистограмме по дням, со
значениями успех (реализован)/неуспех (LeKaitoW#16)
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.

3 participants