-
Notifications
You must be signed in to change notification settings - Fork 19
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
base: master
Are you sure you want to change the base?
Conversation
warehouse/.classpath
Outdated
<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"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Хотелось бы относительный путей. Попробуй относительно корня Эклипса, как тут.
There was a problem hiding this comment.
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, смысл править это появится только после релиза фичи с чтением из базы
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
через поиск по всем файлам по содержимому.
warehouse/.project
Outdated
@@ -0,0 +1,23 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<projectDescription> | |||
<name>warehouse</name> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Название уж больно общее. Вторая модель склада сразу будет конфликтовать.
There was a problem hiding this comment.
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 (заказ)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Общая пупка нужна, но не факт, что warehouse
. Надо Андрея спросить. Вернемся к этому месту чуть позже.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Подскажи название модели. Хочется, чтобы оно отражало именно твою систему. М.б. прям юридическое название фирмы ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Предлагаю: Русское название "Модель поставки под заказ"
Английское "delivery to order"
warehouse/order_request_model.rao
Outdated
|
||
constant terminateTime = 600 // Время остановки | ||
constant allowedDeliveryWaitPeriod = 4 // Допустимое время ожидания заказа | ||
constant defaultDeliveryTime = 3 // Время ожидания в днях |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Если уж писать размерность, то у всех трех констант.
# Conflicts: # delivery_to_order/warehouse_model.rao
public List<PartRequest> requestedParts; | ||
|
||
@Override | ||
public String toString(){ |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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 // Время остановки |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Нет размерности
int deliveryTime | ||
} | ||
|
||
type WPart { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Надо переименовать
int totalPrice | ||
} | ||
|
||
type PartIterator { |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
А это что за пробелы в конце ? Эх, нет у нас форматирования для моделей.
There was a problem hiding this comment.
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)
Но оно менее читаемо
Собственно, когда я разбивал параметры на строки, тогда и забыл вручную убрать пробелы
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Решил, как исправить, на данные для подключения создам отдельные константы
Посмотрел. Текущее состояние |
Можете провести ревью кода модели? |
- Пустые заказы считаем неуспешными - Длительность пустых заказов и тех, у которых неуспешные детали, считаем по длительности до последнего изменения (LeKaitoW#16)
- Чисто пустые заказы игнорятся Пофиксен учет деталей на складе (LeKaitoW#16)
LocalDate start = getDateOfCreation(); | ||
LocalDate end = getDateOfRealization(); | ||
long result = start.until(end, ChronoUnit.DAYS); | ||
if(result < 0) { |
There was a problem hiding this comment.
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); | ||
} |
There was a problem hiding this comment.
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; | ||
|
||
/** | ||
* Дата поступления заказа |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Кажется странным иметь метод бизнес-логики обработки в классе работы с БД. Предлагаю завести потомка и перенести туда.
delivery_to_order/lib/README.txt
Outdated
������ ������ ���������� ���������� mysql-connector-java-5.1.44-bin.jar | ||
������� � https://dev.mysql.com/downloads/connector/j/ | ||
|
||
����� �� �������� � ����������� ��-�� ��� �������� |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Почему не utf-8 ?
# Conflicts: # delivery_to_order/order_request_model.rao
Добавил баланс Заказ деталей учитывается в балансе Эксперимент по коэффициенту количества заказываемых деталей Расчет длительности ожидания заказа по гистограмме по дням, со значениями успех (реализован)/неуспех (LeKaitoW#16)
вероятности заказа конкретной детали (LeKaitoW#16)
No description provided.