Commit Graph

106 Commits

Author SHA1 Message Date
PhilRunninger
853196bd65 Assuage my obsession for less lines of code. 2023-08-29 11:59:19 -04:00
PhilRunninger
b171b4d7ac More refactoring. Code is much DRY-er.
I removed a bunch of duplication by:
1. Moving `if (!where)` logic into the build_where function - sending
   the "No body was sent." message back in the HTTP response object.
2. Putting all file read operations into a dedicated function -
   process_route. This takes a callback function that handles the
   remaining logic of each route after successfully reading the SQL
   file.
2023-08-29 11:52:55 -04:00
PhilRunninger
d5738cc7af Refactor, and add additional logging statements. 2023-08-28 22:01:24 -04:00
PhilRunninger
7e82b37fb1 Merge branch 'master' of github.com:The-HC-Companies/forecast_api 2023-05-09 01:26:10 -04:00
PhilRunninger
eb03d61600 Add options to query by director or segment. Also speed it up A LOT. 2023-05-09 01:24:08 -04:00
f47571c1e2 Extend minimum order_date back one additional year in the past. 2023-05-08 10:05:55 -04:00
PhilRunninger
4504cbaa2a Improve log messages in the server console log.
* More informative.
* Better timing in the code, so always displayed.
* Used string interpolation instead of concatenation for readability.
2023-04-28 10:27:27 -04:00
PhilRunninger
86225ea7e5 Get pounds to update for each forecast adjustment.
Lots of cleanup here too, removing large swaths of code that are no
longer needed. Many improvements the Excel workbook, which is kept in
Teams, not git. These changes may or may not have had accompanying VBA
changes.
2023-04-27 16:54:37 -04:00
PhilRunninger
59cb926d9c Make the log statements unique for each route. 2023-03-01 17:51:01 -05:00
68aa1c219a updates 2023-02-24 19:28:14 -05:00
c48e52f95c add a floor date to prevent adjusting actual history based on the supplied timestamp 2021-07-16 10:20:32 -04:00
a328aaeaaf running the SQL was commented out in the router, also the columns were incorrect when swapping customer, and outer join was spelled wrong 2021-04-07 21:23:19 +00:00
28ee5dfbb4 update history pull to match dev branch 2021-04-07 12:55:35 -04:00
e4604a16f5 merge dev branch 2021-04-07 10:17:12 -04:00
1b0f4b9f04 history target is wrapped in scenario key from UI 2021-04-05 19:03:31 +00:00
98eff757c0 add route for sales basis adjustment 2020-06-15 18:02:21 -04:00
pt
834d52a2a2 customer swap route will do nothing 2020-05-12 16:55:37 -04:00
Paul Trowbridge
e3205a94c1 setup history listing to be based on a where clause to allow for director level 2020-04-02 09:55:53 -04:00
Paul Trowbridge
9539b99301 manually force 'adj volume' as a valid baseline iteration to build on. this is the iteration for 'new basket' 2020-03-19 12:59:17 -04:00
pt
1c0e07502d swap (#45) 2020-03-13 14:48:26 +00:00
Trowbridge
fcc95ecb40 validate forecast matches actual, build in log entries for initial build 2020-02-20 14:26:39 -05:00
pt
2ec8ec75f0 deprecate add month for volume only 2020-02-16 22:34:06 -05:00
Trowbridge
6774a2fdff default load as not null 2020-02-14 17:00:06 -05:00
Trowbridge
6485613ab7 add undo route, and include comments 2020-02-14 14:41:29 -05:00
pt
1b8c101429 update history log 2020-02-14 02:24:52 -05:00
Paul Trowbridge
8cf8490887 Merge branch 'bugfix/div0' 2019-04-03 08:57:59 -05:00
Paul Trowbridge
e312bc1abd add log file routes and queries 2019-04-03 08:56:01 -05:00
Paul Trowbridge
723e2a250c fix add month route for volume only with base = 0 2019-04-03 03:26:07 -04:00
fleetside72
8cb6b843ba recast scale_v to be based on qty and handle -0- qty 2019-04-03 01:42:10 -04:00
Paul Trowbridge
731c811fc3 change message on list route 2019-03-28 09:32:09 -04:00
Paul Trowbridge
0c08dae349 variabalize port 2019-03-27 11:59:21 -05:00
Paul Trowbridge
6c0e98b13e specifiy env 2019-03-27 12:50:09 -04:00
Paul Trowbridge
172b00b9ee working directory comes from env file 2019-03-27 12:28:51 -04:00
Paul Trowbridge
fdb54f4a8b change directory 2019-03-25 13:32:51 -05:00
Paul Trowbridge
bb5f74a058 add timestamp to log 2019-03-25 02:44:40 -04:00
Paul Trowbridge
1f9623e026 swap out timestamp before pushing into the database 2019-03-22 14:39:16 -04:00
Trowbridge
429baa0c04 add route to list changes 2019-03-22 14:02:03 -04:00
Trowbridge
c85994b606 correct log stmt and add route 2019-03-22 04:49:35 -04:00
Paul Trowbridge
8f2ef692df Merge branch 'dev' of github.com:fleetside72/forecast_api into dev 2019-03-21 16:52:35 -04:00
Trowbridge
bb83caa46f parameterize sql and add route for new part 2019-03-21 15:29:17 -04:00
Paul Trowbridge
ccb40d309d Merge branch 'dev' of github.com:fleetside72/forecast_api into dev 2019-03-20 00:44:27 -05:00
Trowbridge
5245bfac74 add a part list and log sql statements 2019-03-20 00:37:36 -04:00
Paul Trowbridge
d01a2f9f74 Merge branch 'dev' of github.com:fleetside72/forecast_api into dev 2019-03-18 18:16:38 -05:00
Paul Trowbridge
8f7a9d5e8d change path 2019-03-18 18:16:35 -05:00
Paul Trowbridge
ecaef0ae4b setup a basket to send back, convert to https 2019-03-18 17:27:01 -04:00
Paul Trowbridge
ec9bd664c1 Merge branch 'dev' of github.com:fleetside72/forecast_api into dev 2019-03-18 15:07:21 -05:00
Paul Trowbridge
5247ecfc06 add some logging 2019-03-18 15:07:15 -05:00
Trowbridge
191b735061 alter scnaerio package for part, bill, ship 2019-03-18 16:02:45 -04:00
Paul Trowbridge
582683cd15 adjust labels 2019-03-14 11:05:00 -04:00
Paul Trowbridge
932c95e83c dont use iterdet anymore since not in osm. iter = source + behavior 2019-03-14 10:47:29 -04:00