New file |
| | |
| | | { |
| | | "name": "north-glass-erp", |
| | | "lockfileVersion": 2, |
| | | "requires": true, |
| | | "packages": { |
| | | "node_modules/default-passive-events": { |
| | | "version": "2.0.0", |
| | | "resolved": "https://registry.npmjs.org/default-passive-events/-/default-passive-events-2.0.0.tgz", |
| | | "integrity": "sha512-eMtt76GpDVngZQ3ocgvRcNCklUMwID1PaNbCNxfpDXuiOXttSh0HzBbda1HU9SIUsDc02vb7g9+3I5tlqe/qMQ==" |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | The MIT License (MIT) |
| | | |
| | | Copyright (c) 2016 Hector Zarco |
| | | |
| | | Permission is hereby granted, free of charge, to any person obtaining a copy |
| | | of this software and associated documentation files (the "Software"), to deal |
| | | in the Software without restriction, including without limitation the rights |
| | | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| | | copies of the Software, and to permit persons to whom the Software is |
| | | furnished to do so, subject to the following conditions: |
| | | |
| | | The above copyright notice and this permission notice shall be included in all |
| | | copies or substantial portions of the Software. |
| | | |
| | | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| | | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| | | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| | | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| | | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| | | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
| | | SOFTWARE. |
New file |
| | |
| | | # `default-passive-events` [](https://travis-ci.org/zzarcon/default-passive-events) [](https://david-dm.org/zzarcon/default-passive-events) [](https://bundlephobia.com/result?p=default-passive-events) |
| | | |
| | | > Makes {passive: true} by default when EventListenerOptions are supported |
| | | |
| | | 50 lines snippet that enables [passive event listeners](https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md) by default for some events ([see list below](#targeted-events)). It basically will set **{ passive: true }** automatically every time you declare a new [event listener](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener). |
| | | |
| | | ## Installation |
| | | |
| | | ```bash |
| | | yarn add default-passive-events |
| | | ``` |
| | | |
| | | ## Usage |
| | | |
| | | Simply require the package: |
| | | |
| | | ```javascript |
| | | require('default-passive-events'); |
| | | ``` |
| | | |
| | | or include it locally: |
| | | |
| | | ```html |
| | | <script type="text/javascript" src="node_modules/default-passive-events/dist/index.js"></script> |
| | | ``` |
| | | |
| | | or from [unpkg](https://unpkg.com/#/) [CDN](https://en.wikipedia.org/wiki/Content_delivery_network): |
| | | |
| | | ```html |
| | | <script type="text/javascript" src="https://unpkg.com/default-passive-events"></script> |
| | | ``` |
| | | |
| | | ## Bundle formats |
| | | |
| | | This package is distributed as multiple, different types of output bundles. The most often your bundler will properly choose the correct version by itself. |
| | | |
| | | To get more information about supported bundle formats have a look at [official `microbundle` documentation](https://github.com/developit/microbundle#-output-formats-). Especially interesting is the `modern` format which - if used properly with your bundle system - might produce significantly smaller output code. |
| | | |
| | | ## Examples |
| | | |
| | | Those are some examples and their output: |
| | | |
| | | ```javascript |
| | | document.addEventListener('mouseup', onMouseUp); // {passive: true, capture: false} |
| | | document.addEventListener('mouseup', onMouseUp, true); // {passive: true, capture: true} |
| | | document.addEventListener('mouseup', onMouseUp, false); // {passive: true, capture: false} |
| | | document.addEventListener('mouseup', onMouseUp, {passive: false}); // {passive: false, capture: false} |
| | | document.addEventListener('mouseup', onMouseUp, {passive: false, capture: false}); // {passive: false, capture: false} |
| | | document.addEventListener('mouseup', onMouseUp, {passive: false, capture: true}); // {passive: false, capture: true} |
| | | document.addEventListener('mouseup', onMouseUp, {passive: true, capture: false}); // {passive: true, capture: false} |
| | | document.addEventListener('mouseup', onMouseUp, {passive: true, capture: true}); // {passive: true, capture: true} |
| | | ``` |
| | | |
| | | ## Demo |
| | | |
| | | Check the [demo page](https://zzarcon.github.io/default-passive-events) for a working example. |
| | | |
| | | ## Motivation |
| | | |
| | | Just to take benefit in your apps without having to edit every single event listener you already have. |
| | | |
| | | ## Targeted events |
| | | |
| | | Default-passive-events package makes following event listeners passive by default: |
| | | |
| | | * scroll |
| | | * wheel |
| | | * touchstart |
| | | * touchmove |
| | | * touchenter |
| | | * touchend |
| | | * touchleave |
| | | * mouseout |
| | | * mouseleave |
| | | * mouseup |
| | | * mousedown |
| | | * mousemove |
| | | * mouseenter |
| | | * mousewheel |
| | | * mouseover |
| | | |
| | | ## Q&A |
| | | |
| | | ### Browser rises weird error when I try to preventDefault event inside of a passive listener. |
| | | |
| | | Well, that's true, partly. First of all specification says that you shouldn't ever try to preventDefault from the context of passive listener. But if that's not a possibility you should know that in the console you see only *error-looking log messages*, which are *not actual errors* (ergo: they *do not break your code*). |
| | | |
| | | ### Is there a possibility to hide these messages? |
| | | |
| | | Unfortunately, no. Since they are not actual errors there is no way to catch them and (more importantly) there is no way to distinguish whether you're inside of the passive listener context to know when not to call/override preventDefault method. Now, we look at the regarding issue in WHATWG repo whatwg/dom#587. |
| | | |
| | | ### Is there a possibility to bring default addEventListener method back for chosen elements/globally (e.g. for time of running some of the code)? |
| | | |
| | | Yes, original addEventListener is available under `_original` property of our's addEventListener's implementation (so - `element.addEventListener._original`). Having that in mind, you can bring it back for however you want, e.g.: |
| | | |
| | | ```javascript |
| | | element.addEventListener = element.addEventListener._original; |
| | | ``` |
| | | |
| | | ## Resources |
| | | |
| | | * About passive event listeners https://medium.com/@devlucky/about-passive-event-listeners-224ff620e68c |
| | | * EventListenerOptions https://github.com/WICG/EventListenerOptions |
| | | * Explanation https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md |
| | | * Polyfill https://github.com/WICG/EventListenerOptions/blob/gh-pages/EventListenerOptions.polyfill.js |
| | | * Spec https://dom.spec.whatwg.org/#dictdef-eventlisteneroptions |
| | | * Chrome feature https://www.chromestatus.com/features#passive |
| | | * About scrolling performance https://plus.google.com/+RickByers/posts/cmzrtyBYPQc |
| | | * Nice Chrome blog article https://blog.chromium.org/2016/05/new-apis-to-help-developers-improve.html |
| | | |
| | | ## Author |
| | | |
| | | [@zzarcon](https://github.com/zzarcon) |
| | | |
| | | ## Maintainers |
| | | |
| | | [@zzarcon](https://github.com/zzarcon) |
| | | [@frsgit](https://github.com/frsgit) |
New file |
| | |
| | | var e,t=["scroll","wheel","touchstart","touchmove","touchenter","touchend","touchleave","mouseout","mouseleave","mouseup","mousedown","mousemove","mouseenter","mousewheel","mouseover"];if(function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(e){}return e}()){var o=EventTarget.prototype.addEventListener;e=o,EventTarget.prototype.addEventListener=function(o,r,n){var s,a="object"==typeof n&&null!==n,i=a?n.capture:n;(n=a?function(e){var t=Object.getOwnPropertyDescriptor(e,"passive");return t&&!0!==t.writable&&void 0===t.set?Object.assign({},e):e}(n):{}).passive=void 0!==(s=n.passive)?s:-1!==t.indexOf(o)&&!0,n.capture=void 0!==i&&i,e.call(this,o,r,n)},EventTarget.prototype.addEventListener._original=e} |
| | | //# sourceMappingURL=index.js.map |
New file |
| | |
| | | {"version":3,"file":"index.js","sources":["../src/index.js","../src/utils.js"],"sourcesContent":["import { eventListenerOptionsSupported } from './utils';\n\nconst defaultOptions = {\n passive: true,\n capture: false\n};\nconst supportedPassiveTypes = [\n 'scroll', 'wheel',\n 'touchstart', 'touchmove', 'touchenter', 'touchend', 'touchleave',\n 'mouseout', 'mouseleave', 'mouseup', 'mousedown', 'mousemove', 'mouseenter', 'mousewheel', 'mouseover'\n];\nconst getDefaultPassiveOption = (passive, eventName) => {\n if (passive !== undefined) return passive;\n\n return supportedPassiveTypes.indexOf(eventName) === -1 ? false : defaultOptions.passive;\n};\n\nconst getWritableOptions = (options) => {\n const passiveDescriptor = Object.getOwnPropertyDescriptor(options, 'passive');\n \n return passiveDescriptor && passiveDescriptor.writable !== true && passiveDescriptor.set === undefined\n ? Object.assign({}, options)\n : options;\n};\n\nconst overwriteAddEvent = (superMethod) => {\n EventTarget.prototype.addEventListener = function (type, listener, options) {\n const usesListenerOptions = typeof options === 'object' && options !== null;\n const useCapture = usesListenerOptions ? options.capture : options;\n\n options = usesListenerOptions ? getWritableOptions(options) : {};\n options.passive = getDefaultPassiveOption(options.passive, type);\n options.capture = useCapture === undefined ? defaultOptions.capture : useCapture;\n\n superMethod.call(this, type, listener, options);\n };\n\n EventTarget.prototype.addEventListener._original = superMethod;\n};\n\nconst supportsPassive = eventListenerOptionsSupported();\n\nif (supportsPassive) {\n const addEvent = EventTarget.prototype.addEventListener;\n overwriteAddEvent(addEvent);\n}\n","export const eventListenerOptionsSupported = () => {\n let supported = false;\n\n try {\n const opts = Object.defineProperty({}, 'passive', {\n get() {\n supported = true;\n }\n });\n\n window.addEventListener('test', null, opts);\n window.removeEventListener('test', null, opts);\n } catch (e) {}\n\n return supported;\n}\n"],"names":["superMethod","supportedPassiveTypes","supported","opts","Object","defineProperty","get","window","addEventListener","removeEventListener","e","eventListenerOptionsSupported","addEvent","EventTarget","prototype","type","listener","options","passive","usesListenerOptions","useCapture","capture","passiveDescriptor","getOwnPropertyDescriptor","writable","undefined","set","assign","getWritableOptions","indexOf","call","this","_original"],"mappings":"IAyB2BA,EAnBrBC,EAAwB,CAC5B,SAAU,QACV,aAAc,YAAa,aAAc,WAAY,aACrD,WAAY,aAAc,UAAW,YAAa,YAAa,aAAc,aAAc,aAiC7F,GC1C6C,WAC3C,IAAIC,GAAY,EAEhB,IACE,IAAMC,EAAOC,OAAOC,eAAe,GAAI,UAAW,CAChDC,eACEJ,GAAY,KAIhBK,OAAOC,iBAAiB,OAAQ,KAAML,GACtCI,OAAOE,oBAAoB,OAAQ,KAAMN,GACzC,MAAOO,IAET,OAAOR,ED0BeS,GAEH,CACnB,IAAMC,EAAWC,YAAYC,UAAUN,iBAlBdR,EAmBPY,EAlBlBC,YAAYC,UAAUN,iBAAmB,SAAUO,EAAMC,EAAUC,GACjE,IAhB6BC,EAgBvBC,EAAyC,iBAAZF,GAAoC,OAAZA,EACrDG,EAAsBD,EAAsBF,EAAQI,QAAUJ,GAEpEA,EAAkBE,EAbK,SAACF,GAC1B,IAAMK,EAAoBlB,OAAOmB,yBAAyBN,EAAS,WAEnE,OAAOK,IAAoD,IAA/BA,EAAkBE,eAA+CC,IAA1BH,EAAkBI,IACjFtB,OAAOuB,OAAO,GAAIV,GAClBA,EAQsCW,CAAmBX,GAAW,IAC9DC,aAnBMO,KADeP,EAoBaD,EAAQC,SAnBlBA,GAEmB,IAA9CjB,EAAsB4B,QAiBgCd,KA5BpD,EA6BPE,EAAQI,aAAyBI,IAAfL,GAAoDA,EAEtEpB,EAAY8B,KAAKC,KAAMhB,EAAMC,EAAUC,IAGzCJ,YAAYC,UAAUN,iBAAiBwB,UAAYhC"} |
New file |
| | |
| | | const e=["scroll","wheel","touchstart","touchmove","touchenter","touchend","touchleave","mouseout","mouseleave","mouseup","mousedown","mousemove","mouseenter","mousewheel","mouseover"];var t;(()=>{let e=!1;try{const t=Object.defineProperty({},"passive",{get(){e=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(e){}return e})()&&(t=EventTarget.prototype.addEventListener,EventTarget.prototype.addEventListener=function(o,n,r){const s="object"==typeof r&&null!==r,a=s?r.capture:r;var i;(r=s?(e=>{const t=Object.getOwnPropertyDescriptor(e,"passive");return t&&!0!==t.writable&&void 0===t.set?Object.assign({},e):e})(r):{}).passive=void 0!==(i=r.passive)?i:-1!==e.indexOf(o)&&!0,r.capture=void 0!==a&&a,t.call(this,o,n,r)},EventTarget.prototype.addEventListener._original=t); |
| | | //# sourceMappingURL=index.modern.js.map |
New file |
| | |
| | | {"version":3,"file":"index.modern.js","sources":["../src/index.js","../src/utils.js"],"sourcesContent":["import { eventListenerOptionsSupported } from './utils';\n\nconst defaultOptions = {\n passive: true,\n capture: false\n};\nconst supportedPassiveTypes = [\n 'scroll', 'wheel',\n 'touchstart', 'touchmove', 'touchenter', 'touchend', 'touchleave',\n 'mouseout', 'mouseleave', 'mouseup', 'mousedown', 'mousemove', 'mouseenter', 'mousewheel', 'mouseover'\n];\nconst getDefaultPassiveOption = (passive, eventName) => {\n if (passive !== undefined) return passive;\n\n return supportedPassiveTypes.indexOf(eventName) === -1 ? false : defaultOptions.passive;\n};\n\nconst getWritableOptions = (options) => {\n const passiveDescriptor = Object.getOwnPropertyDescriptor(options, 'passive');\n \n return passiveDescriptor && passiveDescriptor.writable !== true && passiveDescriptor.set === undefined\n ? Object.assign({}, options)\n : options;\n};\n\nconst overwriteAddEvent = (superMethod) => {\n EventTarget.prototype.addEventListener = function (type, listener, options) {\n const usesListenerOptions = typeof options === 'object' && options !== null;\n const useCapture = usesListenerOptions ? options.capture : options;\n\n options = usesListenerOptions ? getWritableOptions(options) : {};\n options.passive = getDefaultPassiveOption(options.passive, type);\n options.capture = useCapture === undefined ? defaultOptions.capture : useCapture;\n\n superMethod.call(this, type, listener, options);\n };\n\n EventTarget.prototype.addEventListener._original = superMethod;\n};\n\nconst supportsPassive = eventListenerOptionsSupported();\n\nif (supportsPassive) {\n const addEvent = EventTarget.prototype.addEventListener;\n overwriteAddEvent(addEvent);\n}\n","export const eventListenerOptionsSupported = () => {\n let supported = false;\n\n try {\n const opts = Object.defineProperty({}, 'passive', {\n get() {\n supported = true;\n }\n });\n\n window.addEventListener('test', null, opts);\n window.removeEventListener('test', null, opts);\n } catch (e) {}\n\n return supported;\n}\n"],"names":["supportedPassiveTypes","superMethod","supported","opts","Object","defineProperty","get","window","addEventListener","removeEventListener","e","eventListenerOptionsSupported","EventTarget","prototype","type","listener","options","usesListenerOptions","useCapture","capture","passive","passiveDescriptor","getOwnPropertyDescriptor","writable","undefined","set","assign","getWritableOptions","indexOf","call","this","_original"],"mappings":"MAMMA,EAAwB,CAC5B,SAAU,QACV,aAAc,YAAa,aAAc,WAAY,aACrD,WAAY,aAAc,UAAW,YAAa,YAAa,aAAc,aAAc,aAgBlEC,IAAAA,ECzBkB,MAC3C,IAAIC,GAAY,EAEhB,IACE,MAAMC,EAAOC,OAAOC,eAAe,GAAI,UAAW,CAChDC,MACEJ,GAAY,KAIhBK,OAAOC,iBAAiB,OAAQ,KAAML,GACtCI,OAAOE,oBAAoB,OAAQ,KAAMN,GACzC,MAAOO,IAET,OAAOR,GD0BeS,KAfGV,EAkBRW,YAAYC,UAAUL,iBAjBvCI,YAAYC,UAAUL,iBAAmB,SAAUM,EAAMC,EAAUC,GACjE,MAAMC,EAAyC,iBAAZD,GAAoC,OAAZA,EACrDE,EAAsBD,EAAsBD,EAAQG,QAAUH,EAjBxC,IAACI,GAmB7BJ,EAAkBC,EAbMD,CAAAA,IAC1B,MAAMK,EAAoBjB,OAAOkB,yBAAyBN,EAAS,WAEnE,OAAOK,IAAoD,IAA/BA,EAAkBE,eAA+CC,IAA1BH,EAAkBI,IACjFrB,OAAOsB,OAAO,GAAIV,GAClBA,GAQsCW,CAAmBX,GAAW,IAC9DI,aAnBMI,KADeJ,EAoBaJ,EAAQI,SAnBlBA,GAEmB,IAA9CpB,EAAsB4B,QAiBgCd,KA5BpD,EA6BPE,EAAQG,aAAyBK,IAAfN,GAAoDA,EAEtEjB,EAAY4B,KAAKC,KAAMhB,EAAMC,EAAUC,IAGzCJ,YAAYC,UAAUL,iBAAiBuB,UAAY9B"} |
New file |
| | |
| | | var e,t=["scroll","wheel","touchstart","touchmove","touchenter","touchend","touchleave","mouseout","mouseleave","mouseup","mousedown","mousemove","mouseenter","mousewheel","mouseover"];if(function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(e){}return e}()){var o=EventTarget.prototype.addEventListener;e=o,EventTarget.prototype.addEventListener=function(o,r,n){var s,a="object"==typeof n&&null!==n,i=a?n.capture:n;(n=a?function(e){var t=Object.getOwnPropertyDescriptor(e,"passive");return t&&!0!==t.writable&&void 0===t.set?Object.assign({},e):e}(n):{}).passive=void 0!==(s=n.passive)?s:-1!==t.indexOf(o)&&!0,n.capture=void 0!==i&&i,e.call(this,o,r,n)},EventTarget.prototype.addEventListener._original=e} |
| | | //# sourceMappingURL=index.module.js.map |
New file |
| | |
| | | {"version":3,"file":"index.module.js","sources":["../src/index.js","../src/utils.js"],"sourcesContent":["import { eventListenerOptionsSupported } from './utils';\n\nconst defaultOptions = {\n passive: true,\n capture: false\n};\nconst supportedPassiveTypes = [\n 'scroll', 'wheel',\n 'touchstart', 'touchmove', 'touchenter', 'touchend', 'touchleave',\n 'mouseout', 'mouseleave', 'mouseup', 'mousedown', 'mousemove', 'mouseenter', 'mousewheel', 'mouseover'\n];\nconst getDefaultPassiveOption = (passive, eventName) => {\n if (passive !== undefined) return passive;\n\n return supportedPassiveTypes.indexOf(eventName) === -1 ? false : defaultOptions.passive;\n};\n\nconst getWritableOptions = (options) => {\n const passiveDescriptor = Object.getOwnPropertyDescriptor(options, 'passive');\n \n return passiveDescriptor && passiveDescriptor.writable !== true && passiveDescriptor.set === undefined\n ? Object.assign({}, options)\n : options;\n};\n\nconst overwriteAddEvent = (superMethod) => {\n EventTarget.prototype.addEventListener = function (type, listener, options) {\n const usesListenerOptions = typeof options === 'object' && options !== null;\n const useCapture = usesListenerOptions ? options.capture : options;\n\n options = usesListenerOptions ? getWritableOptions(options) : {};\n options.passive = getDefaultPassiveOption(options.passive, type);\n options.capture = useCapture === undefined ? defaultOptions.capture : useCapture;\n\n superMethod.call(this, type, listener, options);\n };\n\n EventTarget.prototype.addEventListener._original = superMethod;\n};\n\nconst supportsPassive = eventListenerOptionsSupported();\n\nif (supportsPassive) {\n const addEvent = EventTarget.prototype.addEventListener;\n overwriteAddEvent(addEvent);\n}\n","export const eventListenerOptionsSupported = () => {\n let supported = false;\n\n try {\n const opts = Object.defineProperty({}, 'passive', {\n get() {\n supported = true;\n }\n });\n\n window.addEventListener('test', null, opts);\n window.removeEventListener('test', null, opts);\n } catch (e) {}\n\n return supported;\n}\n"],"names":["superMethod","supportedPassiveTypes","supported","opts","Object","defineProperty","get","window","addEventListener","removeEventListener","e","eventListenerOptionsSupported","addEvent","EventTarget","prototype","type","listener","options","passive","usesListenerOptions","useCapture","capture","passiveDescriptor","getOwnPropertyDescriptor","writable","undefined","set","assign","getWritableOptions","indexOf","call","this","_original"],"mappings":"IAyB2BA,EAnBrBC,EAAwB,CAC5B,SAAU,QACV,aAAc,YAAa,aAAc,WAAY,aACrD,WAAY,aAAc,UAAW,YAAa,YAAa,aAAc,aAAc,aAiC7F,GC1C6C,WAC3C,IAAIC,GAAY,EAEhB,IACE,IAAMC,EAAOC,OAAOC,eAAe,GAAI,UAAW,CAChDC,eACEJ,GAAY,KAIhBK,OAAOC,iBAAiB,OAAQ,KAAML,GACtCI,OAAOE,oBAAoB,OAAQ,KAAMN,GACzC,MAAOO,IAET,OAAOR,ED0BeS,GAEH,CACnB,IAAMC,EAAWC,YAAYC,UAAUN,iBAlBdR,EAmBPY,EAlBlBC,YAAYC,UAAUN,iBAAmB,SAAUO,EAAMC,EAAUC,GACjE,IAhB6BC,EAgBvBC,EAAyC,iBAAZF,GAAoC,OAAZA,EACrDG,EAAsBD,EAAsBF,EAAQI,QAAUJ,GAEpEA,EAAkBE,EAbK,SAACF,GAC1B,IAAMK,EAAoBlB,OAAOmB,yBAAyBN,EAAS,WAEnE,OAAOK,IAAoD,IAA/BA,EAAkBE,eAA+CC,IAA1BH,EAAkBI,IACjFtB,OAAOuB,OAAO,GAAIV,GAClBA,EAQsCW,CAAmBX,GAAW,IAC9DC,aAnBMO,KADeP,EAoBaD,EAAQC,SAnBlBA,GAEmB,IAA9CjB,EAAsB4B,QAiBgCd,KA5BpD,EA6BPE,EAAQI,aAAyBI,IAAfL,GAAoDA,EAEtEpB,EAAY8B,KAAKC,KAAMhB,EAAMC,EAAUC,IAGzCJ,YAAYC,UAAUN,iBAAiBwB,UAAYhC"} |
New file |
| | |
| | | !function(e){"function"==typeof define&&define.amd?define(e):e()}(function(){var e,t=["scroll","wheel","touchstart","touchmove","touchenter","touchend","touchleave","mouseout","mouseleave","mouseup","mousedown","mousemove","mouseenter","mousewheel","mouseover"];if(function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(e){}return e}()){var n=EventTarget.prototype.addEventListener;e=n,EventTarget.prototype.addEventListener=function(n,o,r){var i,s="object"==typeof r&&null!==r,u=s?r.capture:r;(r=s?function(e){var t=Object.getOwnPropertyDescriptor(e,"passive");return t&&!0!==t.writable&&void 0===t.set?Object.assign({},e):e}(r):{}).passive=void 0!==(i=r.passive)?i:-1!==t.indexOf(n)&&!0,r.capture=void 0!==u&&u,e.call(this,n,o,r)},EventTarget.prototype.addEventListener._original=e}}); |
| | | //# sourceMappingURL=index.umd.js.map |
New file |
| | |
| | | {"version":3,"file":"index.umd.js","sources":["../src/index.js","../src/utils.js"],"sourcesContent":["import { eventListenerOptionsSupported } from './utils';\n\nconst defaultOptions = {\n passive: true,\n capture: false\n};\nconst supportedPassiveTypes = [\n 'scroll', 'wheel',\n 'touchstart', 'touchmove', 'touchenter', 'touchend', 'touchleave',\n 'mouseout', 'mouseleave', 'mouseup', 'mousedown', 'mousemove', 'mouseenter', 'mousewheel', 'mouseover'\n];\nconst getDefaultPassiveOption = (passive, eventName) => {\n if (passive !== undefined) return passive;\n\n return supportedPassiveTypes.indexOf(eventName) === -1 ? false : defaultOptions.passive;\n};\n\nconst getWritableOptions = (options) => {\n const passiveDescriptor = Object.getOwnPropertyDescriptor(options, 'passive');\n \n return passiveDescriptor && passiveDescriptor.writable !== true && passiveDescriptor.set === undefined\n ? Object.assign({}, options)\n : options;\n};\n\nconst overwriteAddEvent = (superMethod) => {\n EventTarget.prototype.addEventListener = function (type, listener, options) {\n const usesListenerOptions = typeof options === 'object' && options !== null;\n const useCapture = usesListenerOptions ? options.capture : options;\n\n options = usesListenerOptions ? getWritableOptions(options) : {};\n options.passive = getDefaultPassiveOption(options.passive, type);\n options.capture = useCapture === undefined ? defaultOptions.capture : useCapture;\n\n superMethod.call(this, type, listener, options);\n };\n\n EventTarget.prototype.addEventListener._original = superMethod;\n};\n\nconst supportsPassive = eventListenerOptionsSupported();\n\nif (supportsPassive) {\n const addEvent = EventTarget.prototype.addEventListener;\n overwriteAddEvent(addEvent);\n}\n","export const eventListenerOptionsSupported = () => {\n let supported = false;\n\n try {\n const opts = Object.defineProperty({}, 'passive', {\n get() {\n supported = true;\n }\n });\n\n window.addEventListener('test', null, opts);\n window.removeEventListener('test', null, opts);\n } catch (e) {}\n\n return supported;\n}\n"],"names":["superMethod","supportedPassiveTypes","supported","opts","Object","defineProperty","get","window","addEventListener","removeEventListener","e","eventListenerOptionsSupported","addEvent","EventTarget","prototype","type","listener","options","passive","usesListenerOptions","useCapture","capture","passiveDescriptor","getOwnPropertyDescriptor","writable","undefined","set","assign","getWritableOptions","indexOf","call","this","_original"],"mappings":"iFAyB2BA,EAnBrBC,EAAwB,CAC5B,SAAU,QACV,aAAc,YAAa,aAAc,WAAY,aACrD,WAAY,aAAc,UAAW,YAAa,YAAa,aAAc,aAAc,aAiC7F,GC1C6C,WAC3C,IAAIC,GAAY,EAEhB,IACE,IAAMC,EAAOC,OAAOC,eAAe,GAAI,UAAW,CAChDC,eACEJ,GAAY,KAIhBK,OAAOC,iBAAiB,OAAQ,KAAML,GACtCI,OAAOE,oBAAoB,OAAQ,KAAMN,GACzC,MAAOO,IAET,OAAOR,ED0BeS,GAEH,CACnB,IAAMC,EAAWC,YAAYC,UAAUN,iBAlBdR,EAmBPY,EAlBlBC,YAAYC,UAAUN,iBAAmB,SAAUO,EAAMC,EAAUC,GACjE,IAhB6BC,EAgBvBC,EAAyC,iBAAZF,GAAoC,OAAZA,EACrDG,EAAsBD,EAAsBF,EAAQI,QAAUJ,GAEpEA,EAAkBE,EAbK,SAACF,GAC1B,IAAMK,EAAoBlB,OAAOmB,yBAAyBN,EAAS,WAEnE,OAAOK,IAAoD,IAA/BA,EAAkBE,eAA+CC,IAA1BH,EAAkBI,IACjFtB,OAAOuB,OAAO,GAAIV,GAClBA,EAQsCW,CAAmBX,GAAW,IAC9DC,aAnBMO,KADeP,EAoBaD,EAAQC,SAnBlBA,GAEmB,IAA9CjB,EAAsB4B,QAiBgCd,KA5BpD,EA6BPE,EAAQI,aAAyBI,IAAfL,GAAoDA,EAEtEpB,EAAY8B,KAAKC,KAAMhB,EAAMC,EAAUC,IAGzCJ,YAAYC,UAAUN,iBAAiBwB,UAAYhC"} |
New file |
| | |
| | | { |
| | | "name": "default-passive-events", |
| | | "version": "2.0.0", |
| | | "description": "Makes {passive: true} by default when EventListenerOptions are supported", |
| | | "main": "dist/index.js", |
| | | "source": "src/index.js", |
| | | "module": "dist/index.module.js", |
| | | "esmodule": "dist/index.modern.js", |
| | | "unpkg": "dist/index.umd.js", |
| | | "scripts": { |
| | | "test": "jest", |
| | | "test-ci": "jest --runInBand --coverage", |
| | | "build": "microbundle", |
| | | "watch": "microbundle watch", |
| | | "prepublishOnly": "yarn test-ci && yarn build", |
| | | "version": "yarn build && git add dist" |
| | | }, |
| | | "repository": { |
| | | "type": "git", |
| | | "url": "git+https://github.com/zzarcon/default-passive-events.git" |
| | | }, |
| | | "author": "zzarcon", |
| | | "contributors": [ |
| | | "FRS <jakub.freisler@gmail.com> (https://github.com/frsgit)" |
| | | ], |
| | | "license": "MIT", |
| | | "bugs": { |
| | | "url": "https://github.com/zzarcon/default-passive-events/issues" |
| | | }, |
| | | "homepage": "https://github.com/zzarcon/default-passive-events#readme", |
| | | "dependencies": {}, |
| | | "devDependencies": { |
| | | "jest": "^26.1.0", |
| | | "microbundle": "^0.12.2" |
| | | }, |
| | | "files": [ |
| | | "dist/", |
| | | "src/", |
| | | "LICENSE", |
| | | "yarn.lock" |
| | | ], |
| | | "jest": { |
| | | "resetMocks": true |
| | | } |
| | | } |
New file |
| | |
| | | import { eventListenerOptionsSupported } from './utils'; |
| | | |
| | | const defaultOptions = { |
| | | passive: true, |
| | | capture: false |
| | | }; |
| | | const supportedPassiveTypes = [ |
| | | 'scroll', 'wheel', |
| | | 'touchstart', 'touchmove', 'touchenter', 'touchend', 'touchleave', |
| | | 'mouseout', 'mouseleave', 'mouseup', 'mousedown', 'mousemove', 'mouseenter', 'mousewheel', 'mouseover' |
| | | ]; |
| | | const getDefaultPassiveOption = (passive, eventName) => { |
| | | if (passive !== undefined) return passive; |
| | | |
| | | return supportedPassiveTypes.indexOf(eventName) === -1 ? false : defaultOptions.passive; |
| | | }; |
| | | |
| | | const getWritableOptions = (options) => { |
| | | const passiveDescriptor = Object.getOwnPropertyDescriptor(options, 'passive'); |
| | | |
| | | return passiveDescriptor && passiveDescriptor.writable !== true && passiveDescriptor.set === undefined |
| | | ? Object.assign({}, options) |
| | | : options; |
| | | }; |
| | | |
| | | const overwriteAddEvent = (superMethod) => { |
| | | EventTarget.prototype.addEventListener = function (type, listener, options) { |
| | | const usesListenerOptions = typeof options === 'object' && options !== null; |
| | | const useCapture = usesListenerOptions ? options.capture : options; |
| | | |
| | | options = usesListenerOptions ? getWritableOptions(options) : {}; |
| | | options.passive = getDefaultPassiveOption(options.passive, type); |
| | | options.capture = useCapture === undefined ? defaultOptions.capture : useCapture; |
| | | |
| | | superMethod.call(this, type, listener, options); |
| | | }; |
| | | |
| | | EventTarget.prototype.addEventListener._original = superMethod; |
| | | }; |
| | | |
| | | const supportsPassive = eventListenerOptionsSupported(); |
| | | |
| | | if (supportsPassive) { |
| | | const addEvent = EventTarget.prototype.addEventListener; |
| | | overwriteAddEvent(addEvent); |
| | | } |
New file |
| | |
| | | export const eventListenerOptionsSupported = () => { |
| | | let supported = false; |
| | | |
| | | try { |
| | | const opts = Object.defineProperty({}, 'passive', { |
| | | get() { |
| | | supported = true; |
| | | } |
| | | }); |
| | | |
| | | window.addEventListener('test', null, opts); |
| | | window.removeEventListener('test', null, opts); |
| | | } catch (e) {} |
| | | |
| | | return supported; |
| | | } |
| | |
| | | background-color: white; |
| | | box-shadow: inset 0 0 6px rgba(0,0,0,.3); |
| | | } |
| | | /*.mytable-scrollbar:active ::-webkit-scrollbar-thumb {*/ |
| | | /* background-color: white;*/ |
| | | /*}*/ |
| | | .mytable-scrollbar:active ::-webkit-scrollbar-thumb { |
| | | background-color: white; |
| | | } |
| | | /*边角,即两个滚动条的交汇处*/ |
| | | .mytable-scrollbar ::-webkit-scrollbar-corner { |
| | | background-color: #FFFFFF; |
| | |
| | | import {ElMessage} from "element-plus"; |
| | | import {addListener,toolbarButtonClickEvent} from "@/hook/mouseMove"; |
| | | import { useI18n } from 'vue-i18n' |
| | | import OrderOtherMoney from "@/components/sd/order/OrderOtherMoney.vue"; |
| | | |
| | | //语言获取 |
| | | const { t } = useI18n() |
| | |
| | | const userid = userStore.user.userId |
| | | let produceList = ref([]) |
| | | let cellArea = ref() |
| | | let otherMoneyVisible = ref(false) |
| | | let otherMoney = ref(null) |
| | | |
| | | |
| | | const hasDecimal=(value)=>{ |
| | |
| | | |
| | | //定义接收加载表头下拉数据 |
| | | const titleSelectJson = ref({ |
| | | deliveryOtherMoney:[], |
| | | paymentTerms:[], |
| | | payMethod:[] |
| | | }) |
| | |
| | | |
| | | if(res.code==200){ |
| | | titleSelectJson.value=deepClone(res.data) |
| | | //其他金额 |
| | | otherMoney.value = titleSelectJson.value.deliveryOtherMoney[0] |
| | | //let columns = [] |
| | | otherMoney.value.forEach(item => { |
| | | let column = {field: `otherColumns.${item.column}`,width:50, title: item.alias,editRender: { name: 'input'}} |
| | | //columns.push(column) |
| | | gridOptions.columns.push(column) |
| | | }) |
| | | const today = new Date |
| | | today.setTime(today.getTime() + (15 * 24 * 60 * 60 * 1000)) |
| | | titleUploadData.value.deliveryDate = today.getFullYear() + |
| | |
| | | } |
| | | pageNum=1 |
| | | produceList = deepClone(res.data.data) |
| | | |
| | | const orderDetails = res.data.data |
| | | orderDetails.forEach(item => { |
| | | item.otherColumns = JSON.parse(item.otherColumns) |
| | | }) |
| | | otherMoney.value =res.data.orderOtherMoneyList |
| | | |
| | | xGrid.value.reloadData(orderDetails) |
| | | xGrid.value.loadData(produceList) |
| | | //隐藏复选框 |
| | | /*xGrid.value.hideColumn("select") |
| | |
| | | options: [ |
| | | [ |
| | | { code: 'copyChecked', name: '选中相同', prefixIcon: 'vxe-icon-copy', visible: true, disabled: false }, |
| | | { code: 'otherMoney', name: '其他金额', prefixIcon: 'vxe-icon-chart-bar-x', visible: true, disabled: false } |
| | | ] |
| | | ] |
| | | } |
| | |
| | | {field: 'finishedGoodsInventory.quantityAvailable',width:120, title: t('delivery.availableStock'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'order.quantity',width:120, title: t('delivery.unpaidQuantity'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'quantity',width:120, title: t('order.quantity'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'deliveryDetail.quantity',width:120, title: t('delivery.deliveryQuantity'),editRender: { name: 'input', attrs: { placeholder: '' } },filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'deliveryDetail.quantity',width:120, title: t('delivery.deliveryQuantity'),editRender: { name: 'input' },filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | //{field: 'buildingNumber',width:120, title: '楼号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'productId',width:120, title: t('order.productId'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'productName',width:120, title: t('order.product'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | |
| | | let flowData = ref({ |
| | | delivery: selectRecords, |
| | | title: titleUploadData.value, |
| | | deliveryId: route.query.deliveryID |
| | | deliveryId: route.query.deliveryID, |
| | | otherMoney:otherMoney.value |
| | | |
| | | }) |
| | | request.post("/Delivery/insertDelivery", flowData.value).then((res) => { |
| | |
| | | } |
| | | break |
| | | } |
| | | case 'otherMoney' :{ |
| | | otherMoneyVisible.value=true |
| | | break |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | //关闭其他金额界面 |
| | | const refOtherMoney = ref() |
| | | const closeOtherMoneyDialog = async (done) => { |
| | | const flag = await refOtherMoney.value.validate() |
| | | if(flag){ |
| | | done() |
| | | titleUploadData.value.money=countMoney(xGrid.value.getTableData().fullData).toString() |
| | | } |
| | | } |
| | | |
| | | /*数据校验*/ |
| | | const validRules = ref({ |
| | | quantity: [ |
| | | { type: 'number', min: 0, message: t('delivery.pleaseEnterANumericalValueGreaterThanOrEqualTo0') } |
| | | ], |
| | | |
| | | "deliveryDetail.quantity": [{ |
| | | "deliveryDetail.quantity": [{ |
| | | validator (e) { |
| | | if (e.row.deliveryDetail.quantity > e.row.finishedGoodsInventory.quantityAvailable) { |
| | | return new Error(t('delivery.theShipmentQuantityCannotBeGreaterThanTheInventoryQuantity')) |
| | |
| | | |
| | | } |
| | | |
| | | }] |
| | | }], |
| | | price: [ |
| | | { |
| | | validator ({ cellValue }) { |
| | | const regex = /^(0(\.\d{1,2})?|([1-9]\d{0,4})(\.\d{1,2})?|99999(\.9{1,2})?)$/ |
| | | if ( !regex.test(cellValue) ) { |
| | | return new Error(t('basicData.msg.range99999Dec2') ) |
| | | } |
| | | } |
| | | } |
| | | ], |
| | | |
| | | }) |
| | | |
| | |
| | | |
| | | <span class="vxe-table--cell-active-area" ></span> |
| | | </div> |
| | | |
| | | <el-dialog v-model="otherMoneyVisible" |
| | | :title="'其他金额'" |
| | | :close-on-click-modal="false" |
| | | :close-on-press-escape="false" |
| | | :before-close="closeOtherMoneyDialog" |
| | | style="width: 614px;height:445px "> |
| | | <order-other-money |
| | | ref="refOtherMoney" |
| | | :otherMoney="otherMoney" |
| | | style="width: 100%;height: 100%" /> |
| | | </el-dialog> |
| | | </div> |
| | | |
| | | </template> |
| | |
| | | |
| | | //语言获取 |
| | | const { t } = useI18n() |
| | | |
| | | |
| | | const router = useRouter() |
| | | const route = useRoute() |
| | | let indexFlag=$ref(1) |
| | |
| | | .el-overlay-dialog{ |
| | | overflow-y: scroll; |
| | | } |
| | | ::-webkit-scrollbar { |
| | | /*::-webkit-scrollbar { |
| | | display: none; |
| | | } |
| | | }*/ |
| | | .bottom{ |
| | | font-size: 10px; |
| | | font-weight: bold; |
| | |
| | | </style> |
| | | |
| | | |
| | | <!-- |
| | | <template> |
| | | |
| | | <div> |
| | | <div id="pis" style="width: 100%;height: 100%"> |
| | | <div style="font-size: 35px;text-align: center;font-weight: bold;">常州市吉利玻璃有限公司</div> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="6"><div></div></el-col> |
| | | <el-col :span="12"><div style="font-size: 30px;text-align: center;font-weight: bold;">销售发货单</div></el-col> |
| | | <el-col :span="6"> |
| | | <div style="font-size: 20px;display: flex;margin-top: 10px"> |
| | | <div style="font-weight: bold;">发货单号:</div> |
| | | <div style="font-weight: bold;">{{delivery.deliveryId}}</div> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <div style="border: 1px solid #d3dce6;border-collapse: collapse;width: 100%;height: 100%;"> |
| | | <table id="table1" style="border: 1px solid #d3dce6;border-collapse: collapse;width: 100%;height: 100%;"> |
| | | <tr> |
| | | <th style="text-align: left;border:none;font-size: 15px;font-weight: bold;" colspan="3">客户名称:{{delivery.customerName}}</th> |
| | | <th style="text-align: left;border:none;font-size: 15px;font-weight: bold;" colspan="3">项目名称:{{delivery.project}}</th> |
| | | <th style="text-align: left;border:none;font-size: 15px;font-weight: bold;" colspan="2">联系人:{{delivery.contacts}}</th> |
| | | |
| | | </tr> |
| | | <tr> |
| | | <th style="text-align: left;border:none;font-size: 15px;font-weight: bold;" colspan="6">送货地址:{{delivery.deliveryAddress}}</th> |
| | | <th style="text-align: left;border:none;font-size: 15px;font-weight: bold;" colspan="2">联系电话:{{delivery.contactNumber}}</th> |
| | | |
| | | </tr> |
| | | <tr> |
| | | <th style="width: 6%;font-size: 15px;font-weight: bold;">序号</th> |
| | | <th style="width: 20%;font-size: 15px;font-weight: bold;">楼层编号</th> |
| | | <th style="width: 20%;font-size: 15px;font-weight: bold;">宽(弧度)*高</th> |
| | | <th style="width: 10%;font-size: 15px;font-weight: bold;">数量</th> |
| | | <th style="width: 10%;font-size: 15px;font-weight: bold;">面积</th> |
| | | <th style="width: 10%;font-size: 15px;font-weight: bold;">单价</th> |
| | | <th style="width: 12%;font-size: 15px;font-weight: bold;">金额</th> |
| | | <th style="width: 12%;font-size: 15px;font-weight: bold;">加工要求</th> |
| | | </tr> |
| | | |
| | | <template v-for="(item, index) in produceList" :key="index" > |
| | | <tr> |
| | | <td style="font-size: 15px;font-weight: bold;" colspan="3">产品名称:{{item.DeliveryDetail.orderDetail.productName}}</td> |
| | | <td style="font-size: 15px;font-weight: bold;" colspan="3">对方单号:</td> |
| | | <td style="font-size: 15px;font-weight: bold;" colspan="2">订单编号:{{item.DeliveryDetail.orderDetail.orderId}}</td> |
| | | </tr> |
| | | |
| | | <tr class="day-in" v-for="(items, index1) in item.DeliveryDetailList" :key="index1"> |
| | | <td>{{items.order_number}}</td> |
| | | <td>{{items.buildingNumber}}</td> |
| | | <td style="font-size: 15px;font-weight: bold;">{{items.width}}x{{items.height}}</td> |
| | | <td>{{items.quantity}}</td> |
| | | <td>{{items.area}}</td> |
| | | <td>{{items.price}}</td> |
| | | <td>{{items.money}}</td> |
| | | <td>{{items.processingNote}}</td> |
| | | </tr> |
| | | <tr class="day-in"> |
| | | <td style="font-size: 15px;font-weight: bold;" colspan="3">小计:</td> |
| | | <td>{{item.DeliveryDetail.quantity}}</td> |
| | | <td>{{item.DeliveryDetail.area}}</td> |
| | | <td></td> |
| | | <td>{{item.DeliveryDetail.money}}</td> |
| | | <td></td> |
| | | </tr> |
| | | |
| | | </template> |
| | | <tr class="day-in"> |
| | | <td style="font-size: 15px;font-weight: bold;" colspan="3">合计:</td> |
| | | <td>{{delivery.quantity}}</td> |
| | | <td>{{delivery.area}}</td> |
| | | <td></td> |
| | | <td>{{delivery.money}}</td> |
| | | <td></td> |
| | | </tr> |
| | | <tr class="day-in"> |
| | | <td style="text-align: left;border-width: 0 1px 0 0; border-style: solid; border-color: #d3dce6" colspan="3"> |
| | | <div style="display: flex"> |
| | | <div>加工费用</div> |
| | | <div style="margin-left: 20%">单价</div> |
| | | <div style="margin-left: 20%">数量</div> |
| | | <div style="margin-left: 20%">金额</div> |
| | | </div> |
| | | |
| | | </td> |
| | | <td style="text-align: left;border:none;font-size: 15px;font-weight: bold;" colspan="5">总金额: {{delivery.money}}</td> |
| | | </tr> |
| | | <tr class="day-in"> |
| | | <td style="text-align: left;border-width: 0 1px 0 0; border-style: solid; border-color: #d3dce6;" colspan="3"></td> |
| | | <td style="text-align: left;border:none;font-size: 15px;font-weight: bold;" colspan="5">大写金额: {{money}}</td> |
| | | </tr> |
| | | </table> |
| | | </div> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="3"><div class="bottom">制单员:<span style="font-size: 15px">{{delivery.creator}}</span></div></el-col> |
| | | <el-col :span="5"><div class="bottom">制单日期:<span style="font-size: 15px">{{delivery.createTime}}</span></div></el-col> |
| | | <el-col :span="4"><div class="bottom">发货员:</div></el-col> |
| | | <el-col :span="4"><div class="bottom">司机:</div></el-col> |
| | | <el-col :span="4"><div class="bottom">客户签字:</div></el-col> |
| | | <el-col :span="4"><div class="bottom">签收日期:</div></el-col> |
| | | |
| | | </el-row> |
| | | <el-row :gutter="20" style="margin-top: 20px;"> |
| | | <el-col :span="3"><div class="bottom">架子 只</div></el-col> |
| | | <el-col :span="21"><div class="bottom">{{takeCare}}</div></el-col> |
| | | </el-row> |
| | | <el-row :gutter="20" style="margin-top: 20px;"> |
| | | <el-col :span="24"><div class="bottom">{{remark}}</div></el-col> |
| | | </el-row> |
| | | |
| | | |
| | | |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <style > |
| | | #table1 tr{ |
| | | height: 30px; |
| | | } |
| | | #table1 th{ |
| | | height: 30px; |
| | | border: 1px solid #d3dce6; |
| | | border-collapse: collapse; |
| | | } |
| | | .day-in td{ |
| | | text-align: center; |
| | | } |
| | | #table1 td{ |
| | | border: 1px solid #d3dce6; |
| | | border-collapse: collapse; |
| | | } |
| | | #deliveryPrinting .el-dialog__header{ |
| | | visibility:hidden |
| | | } |
| | | |
| | | .el-overlay-dialog{ |
| | | overflow-y: scroll; |
| | | } |
| | | ::-webkit-scrollbar { |
| | | display: none; |
| | | } |
| | | .bottom{ |
| | | font-size: 20px; |
| | | font-weight: bold; |
| | | |
| | | } |
| | | |
| | | </style>--> |
| | |
| | | break |
| | | } |
| | | case 'printing' :{ |
| | | /*const url = router.resolve({path: '/main/delivery/deliveryPrinting', query: { deliveryID: row.deliveryId }}) |
| | | window.open(url.href, '_blank') |
| | | break*/ |
| | | router.push({path: '/main/delivery/deliveryPrinting', query: { deliveryID: row.deliveryId }}) |
| | | break |
| | | } |
| | |
| | | <vxe-grid |
| | | max-height="97%" |
| | | @filter-change="filterChanged" |
| | | @cell-dblclick="cellClickEvent" |
| | | class="mytable-scrollbar" |
| | | ref="xGrid" |
| | | v-bind="gridOptions" |
| | |
| | | |
| | | </template> |
| | | |
| | | <style scoped> |
| | | </style> |
New file |
| | |
| | | { |
| | | "name": "north-glass-erp", |
| | | "lockfileVersion": 2, |
| | | "requires": true, |
| | | "packages": { |
| | | "": { |
| | | "dependencies": { |
| | | "default-passive-events": "^2.0.0" |
| | | } |
| | | }, |
| | | "node_modules/default-passive-events": { |
| | | "version": "2.0.0", |
| | | "resolved": "https://registry.npmjs.org/default-passive-events/-/default-passive-events-2.0.0.tgz", |
| | | "integrity": "sha512-eMtt76GpDVngZQ3ocgvRcNCklUMwID1PaNbCNxfpDXuiOXttSh0HzBbda1HU9SIUsDc02vb7g9+3I5tlqe/qMQ==" |
| | | } |
| | | }, |
| | | "dependencies": { |
| | | "default-passive-events": { |
| | | "version": "2.0.0", |
| | | "resolved": "https://registry.npmjs.org/default-passive-events/-/default-passive-events-2.0.0.tgz", |
| | | "integrity": "sha512-eMtt76GpDVngZQ3ocgvRcNCklUMwID1PaNbCNxfpDXuiOXttSh0HzBbda1HU9SIUsDc02vb7g9+3I5tlqe/qMQ==" |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | { |
| | | "dependencies": { |
| | | "default-passive-events": "^2.0.0" |
| | | } |
| | | } |
| | |
| | | private Double area; |
| | | private Integer quantity; |
| | | private Double money; |
| | | private Double otherMoney; |
| | | private String remarks; |
| | | private LocalDate createTime; |
| | | private LocalDate updateTime; |
| | |
| | | private Double money; |
| | | private String deliveryDetailRemakes; |
| | | private Integer deliveryDetailState; |
| | | private String otherColumns; |
| | | private LocalDate createTime; |
| | | private LocalDate updateTime; |
| | | private Delivery delivery; |
New file |
| | |
| | | package com.example.erp.entity.sd; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Data |
| | | public class DeliveryOtherMoney { |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | private String deliveryId; |
| | | @TableField(value = "`column`") |
| | | private String column; |
| | | private Double quantity; |
| | | private Double price; |
| | | private Double money; |
| | | @TableField(select = false,exist= false) |
| | | private String alias; |
| | | private LocalDateTime createTime; |
| | | } |
| | |
| | | |
| | | Integer getdeliveryDetailmaximum(@Param("deliveryId") String deliveryId); |
| | | |
| | | Integer getSelectDetailNum(@Param("orderId") String orderId); |
| | | |
| | | Integer getSelectDetailQuantity(@Param("orderId") String orderId); |
| | | |
| | | Boolean updateOrderDetailDeliveryNum(OrderDetail orderDetail); |
| | | |
| | | Boolean updateOrderDelivery(@Param("orderDetail") OrderDetail orderDetail,@Param("state") Integer state); |
| | | |
| | | Boolean updateIsNotOrderDetailDeliveryNum(@Param("orderId") String orderId, |
| | | @Param("orderNumber") Integer orderNumber, |
| | | @Param("quantity") Integer quantity); |
| | |
| | | Boolean updatedelivery(@Param("area") Double area, |
| | | @Param("quantity") Integer quantity, |
| | | @Param("money") Double money, |
| | | @Param("otherMoney") Double otherMoney, |
| | | @Param("oddNumber") String oddNumber); |
| | | |
| | | |
New file |
| | |
| | | package com.example.erp.mapper.sd; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.example.erp.entity.sd.DeliveryOtherMoney; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Mapper |
| | | public interface DeliveryOtherMoneyMapper extends BaseMapper<DeliveryOtherMoney> { |
| | | |
| | | List<DeliveryOtherMoney> findById(String deliveryId); |
| | | |
| | | Boolean insertDeliveryOtherMoney(@Param("deliveryOtherMoney") DeliveryOtherMoney deliveryOtherMoney); |
| | | |
| | | Boolean deleteDeliveryOtherMoney(String deliveryId); |
| | | } |
| | |
| | | //将数据放入List中 |
| | | BasicDataMap.get(item.getBasicCategory()).add(item); |
| | | } |
| | | BasicDataMap.put("deliveryOtherMoney", Collections.singletonList(basicOtherMoneyMapper.selectList(null))); |
| | | return BasicDataMap; |
| | | } |
| | | |
| | |
| | | package com.example.erp.service.sd; |
| | | |
| | | import com.alibaba.excel.util.StringUtils; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.alibaba.fastjson.TypeReference; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.example.erp.entity.sd.Delivery; |
| | | import com.example.erp.entity.sd.DeliveryDetail; |
| | | import com.example.erp.entity.sd.Order; |
| | | import com.example.erp.entity.sd.OrderDetail; |
| | | import com.example.erp.entity.sd.*; |
| | | import com.example.erp.entity.userInfo.SysError; |
| | | import com.example.erp.mapper.mm.FinishedGoodsInventoryMapper; |
| | | import com.example.erp.mapper.sd.DeliveryDetailMapper; |
| | | import com.example.erp.mapper.sd.DeliveryMapper; |
| | | import com.example.erp.mapper.sd.OrderDetailMapper; |
| | | import com.example.erp.mapper.sd.OrderMapper; |
| | | import com.example.erp.mapper.sd.*; |
| | | import com.example.erp.service.userInfo.SysErrorService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDate; |
| | | import java.util.*; |
| | | import java.math.BigDecimal; |
| | | import java.util.concurrent.atomic.AtomicReference; |
| | | |
| | | @Service |
| | | @DS("sd") |
| | |
| | | OrderDetailMapper orderDetailMapper; |
| | | @Autowired |
| | | FinishedGoodsInventoryMapper finishedGoodsInventoryMapper; |
| | | @Autowired |
| | | DeliveryOtherMoneyMapper deliveryOtherMoneyMapper; |
| | | @Autowired |
| | | SysErrorService sysErrorService; |
| | | |
| | |
| | | map.put("data", deliveryDetailMapper.getSelectShippingOrderDetail(offset, pageSize, orderDetail)); |
| | | map.put("delivery", deliveryMapper.getSelectShippingOrderDetailDelivery(offset, pageSize, orderDetail)); |
| | | map.put("total", deliveryDetailMapper.getSelectShippingOrderDetailPageTotal(offset, pageSize, orderDetail)); |
| | | map.put("orderOtherMoneyList",deliveryOtherMoneyMapper.findById(orderDetail.getDeliveryDetail().getDeliveryId())); |
| | | |
| | | return map; |
| | | } |
| | |
| | | boolean saveState = true; |
| | | //设置回滚点 |
| | | Object savePoint = TransactionAspectSupport.currentTransactionStatus().createSavepoint(); |
| | | try { |
| | | try{ |
| | | |
| | | String deliveryId = ""; |
| | | String deliveryId=""; |
| | | String oddNumber; |
| | | if (object.get("deliveryId") != null) { |
| | | deliveryId = object.get("deliveryId").toString(); |
| | | } else { |
| | | deliveryId = ""; |
| | | } |
| | | Delivery delivery = JSONObject.parseObject(JSONObject.toJSONString(object.get("title")), Delivery.class); |
| | | List<OrderDetail> orderDetaillist = JSONArray.parseArray(JSONObject.toJSONString(object.get("delivery")), OrderDetail.class); |
| | | List<DeliveryOtherMoney> deliveryOtherMoneyList = JSONArray.parseArray(JSONObject.toJSONString(object.get("otherMoney")), DeliveryOtherMoney.class); |
| | | //查询发货单是否存在 |
| | | Integer deliveryConut = deliveryMapper.getDeliveryConut(deliveryId); |
| | | |
| | |
| | | |
| | | } |
| | | } |
| | | |
| | | List<DeliveryDetail> deliveryDetaillist = deliveryDetailMapper.getIsNotDeliveryDetail(deliveryDetailNumber, deliveryId); |
| | | if (!deliveryDetaillist.isEmpty()) { |
| | | for (DeliveryDetail deliveryDetail : deliveryDetaillist) { |
| | |
| | | } |
| | | } |
| | | //还原发货表的面积数量金额 |
| | | deliveryMapper.updatedelivery(0.0, 0, 0.0, deliveryId); |
| | | deliveryMapper.updatedelivery(0.0, 0, 0.0,0.0, deliveryId); |
| | | //删除发货明细的数据 |
| | | deliveryDetailMapper.deleteDeliveryDetail(deliveryId); |
| | | //删除订单额外金额的数据 |
| | | deliveryOtherMoneyMapper.deleteDeliveryOtherMoney(deliveryId); |
| | | oddNumber = deliveryId; |
| | | } else { |
| | | //获取单号 |
| | |
| | | //新增发货表数据 |
| | | deliveryMapper.insertDelivery(delivery, oddNumber, orderDetaillist.get(0).getOrderId()); |
| | | } |
| | | Double area = 0.0; |
| | | double area = 0.0; |
| | | Integer quantity = 0; |
| | | Double money = 0.0; |
| | | double money = 0.0; |
| | | AtomicReference<Double> otherMoney = new AtomicReference<>(0.0); |
| | | //获取对象集合循环进行新增修改 |
| | | |
| | | if (!orderDetaillist.isEmpty()) { |
| | |
| | | area += orderDetail.getFinishedGoodsInventory().getActualSignalArea() * orderDetail.getDeliveryDetail().getQuantity(); |
| | | money += orderDetail.getPrice() * orderDetail.getDeliveryDetail().getQuantity(); |
| | | Integer deliveryDetailmaximum = deliveryDetailMapper.getdeliveryDetailmaximum(oddNumber); |
| | | |
| | | Map<String,Double> otherColumns = JSON.parseObject(orderDetail.getOtherColumns(), new TypeReference<Map<String, Double>>(){}); |
| | | if(otherColumns!=null){ |
| | | otherColumns.forEach((key, value) ->{ |
| | | deliveryOtherMoneyList.forEach(deliveryOtherMoney ->{ |
| | | if(deliveryOtherMoney.getColumn().equals(key)){ |
| | | deliveryOtherMoney.setQuantity (otherColumns.get(key)==null?0:otherColumns.get(key)); |
| | | deliveryOtherMoney.setQuantity(((value==null?0:value)*orderDetail.getDeliveryDetail().getQuantity())); |
| | | } |
| | | }); |
| | | |
| | | }); |
| | | } |
| | | |
| | | |
| | | //新增发货明细数据 |
| | | deliveryDetailMapper.insertDeliveryDetail(orderDetail, oddNumber, deliveryDetailmaximum + 1); |
| | | //修改订单明细 |
| | |
| | | finishedGoodsInventoryMapper.updateInventoryquantityOut(orderDetail.getOrderId(), orderDetail.getOrderNumber(), orderDetail.getDeliveryDetail().getQuantity()); |
| | | |
| | | } |
| | | //往订单其他金额副表传入数据 |
| | | deliveryOtherMoneyList.forEach(deliveryOtherMoney ->{ |
| | | deliveryOtherMoney.setId(null); |
| | | deliveryOtherMoney.setDeliveryId(oddNumber); |
| | | if(deliveryOtherMoney.getQuantity()!=null && deliveryOtherMoney.getPrice()!=null){ |
| | | deliveryOtherMoney.setMoney((deliveryOtherMoney.getQuantity()*deliveryOtherMoney.getPrice())); |
| | | otherMoney.updateAndGet(v -> new Double((double) (v + deliveryOtherMoney.getMoney()))); |
| | | deliveryOtherMoneyMapper.insertDeliveryOtherMoney(deliveryOtherMoney); |
| | | } |
| | | }); |
| | | //修改发货明细累加面积数量金额 |
| | | deliveryMapper.updatedelivery(Double.valueOf(String.format("%.2f", area)), quantity, Double.valueOf(String.format("%.2f", money)), oddNumber); |
| | | deliveryMapper.updatedelivery(Double.valueOf(String.format("%.2f", area)), quantity, Double.valueOf(String.format("%.2f", money)), otherMoney.get(), oddNumber); |
| | | |
| | | } else { |
| | | return false; |
| | | } |
| | | } catch (Exception e) { |
| | | }catch (Exception e) { |
| | | TransactionAspectSupport.currentTransactionStatus().rollbackToSavepoint(savePoint); |
| | | //将异常传入数据库 |
| | | SysError sysError = new SysError(); |
| | |
| | | saveState = false; |
| | | |
| | | } |
| | | |
| | | return saveState; |
| | | } |
| | | |
| | |
| | | update sd.order_detail set delivery_num=delivery_num-#{quantity} where order_id=#{orderId} and order_number=#{orderNumber} |
| | | </update> |
| | | |
| | | <update id="updateOrderDelivery"> |
| | | update sd.`order` set delivery=#{state} where order_id=#{orderDetail.orderId} |
| | | </update> |
| | | |
| | | <select id="getdeliveryDetailmaximum" > |
| | | select count(*) from sd.delivery_detail where delivery_id=#{deliveryId} |
| | | </select> |
| | |
| | | select * from sd.delivery_detail where delivery_id=#{deliveryId} |
| | | </select> |
| | | |
| | | <select id="getSelectDetailQuantity" > |
| | | select quantity from sd.`order` where order_id=#{orderId} |
| | | </select> |
| | | |
| | | <select id="getSelectDetailNum" > |
| | | select sum(quantity) from sd.order_detail where order_id=#{orderId} |
| | | </select> |
| | | |
| | | |
| | | <insert id="insertDeliveryDetail" useGeneratedKeys="true" > |
| | | insert into sd.delivery_detail (delivery_id,delivery_number,order_number, |
| | | area,order_id,quantity,money,delivery_detail_remakes,delivery_detail_state,create_time) |
| | | area,order_id,quantity,money,delivery_detail_remakes,delivery_detail_state,other_columns,create_time) |
| | | values ( |
| | | #{number} ,#{deliveryNumber},#{orderDetail.orderNumber},#{orderDetail.computeGrossArea}, |
| | | #{orderDetail.orderId},#{orderDetail.deliveryDetail.quantity}, |
| | | #{orderDetail.price}*#{orderDetail.deliveryDetail.quantity},'',1,now() |
| | | #{orderDetail.price}*#{orderDetail.deliveryDetail.quantity},'',1,#{orderDetail.otherColumns},now() |
| | | ) |
| | | </insert> |
| | | |
| | |
| | | od.processing_note, |
| | | od.edging_type, |
| | | od.perimeter, |
| | | dd.delivery_detail_remakes |
| | | dd.delivery_detail_remakes, |
| | | dd.other_columns |
| | | from sd.delivery_detail dd |
| | | left join sd.delivery d on dd.delivery_id=d.delivery_id |
| | | left join sd.order_detail od on dd.order_id=od.order_id and dd.order_number=od.order_number |
| | |
| | | </update> |
| | | |
| | | <update id="updatedelivery"> |
| | | update sd.delivery set area=#{area},quantity=#{quantity},money=#{money} where delivery_id=#{oddNumber} |
| | | update sd.delivery set area=#{area},quantity=#{quantity},money=#{money},other_money=#{otherMoney} where delivery_id=#{oddNumber} |
| | | </update> |
| | | |
| | | |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.example.erp.mapper.sd.DeliveryOtherMoneyMapper"> |
| | | <select id="findById"> |
| | | select |
| | | a.*, |
| | | b.alias |
| | | from sd.delivery_other_money as a |
| | | left join sd.basic_other_money as b |
| | | on a.`column` = b.`column` |
| | | where a.delivery_id = #{deliveryId} |
| | | </select> |
| | | |
| | | <insert id="insertDeliveryOtherMoney" useGeneratedKeys="true"> |
| | | insert into sd.delivery_other_money(delivery_id, `column`, quantity, price, money, create_time) |
| | | values |
| | | (#{deliveryOtherMoney.deliveryId},#{deliveryOtherMoney.column},#{deliveryOtherMoney.quantity}, |
| | | #{deliveryOtherMoney.price},#{deliveryOtherMoney.money},now()) |
| | | </insert> |
| | | |
| | | <delete id="deleteDeliveryOtherMoney"> |
| | | delete from sd.delivery_other_money where delivery_id = #{deliveryId} |
| | | </delete> |
| | | |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.example.erp.mapper.sd.BasicDateMapper"> |
| | | <select id="getOrderBasicData"> |
| | | select |
| | | * |
| | | from |
| | | basic_data as a |
| | | where a.basic_type=#{type} |
| | | </select> |
| | | <select id="getOrderBasicDataByTypeAndChildType"> |
| | | select |
| | | * |
| | | from |
| | | basic_data as a |
| | | where a.basic_type=#{type} and a.basic_category = #{childType} |
| | | </select> |
| | | |
| | | <select id="getOrderBasicDataType"> |
| | | select |
| | | a.basic_category |
| | | from |
| | | basic_data as a |
| | | where a.basic_type=#{type} |
| | | group by a.basic_category |
| | | |
| | | </select> |
| | | |
| | | <select id="getBasicData"> |
| | | select * from basic_data |
| | | order by id desc |
| | | </select> |
| | | |
| | | <select id="getBasicDataFirstType"> |
| | | select * from basic_data |
| | | group by basic_type |
| | | </select> |
| | | <select id="getBasicDataLastType"> |
| | | select * from basic_data |
| | | group by basic_category |
| | | </select> |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.example.erp.mapper.sd.BasicGlassTypeMapper"> |
| | | <select id="getOneLevel"> |
| | | select |
| | | * |
| | | from |
| | | basic_glass_type as a |
| | | where a.level=1 |
| | | </select> |
| | | <select id="getTwoLevel"> |
| | | select |
| | | * |
| | | from |
| | | basic_glass_type as a |
| | | where a.level=2 |
| | | ORDER BY a.id ; |
| | | </select> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.example.erp.mapper.sd.BasicOtherMoneyMapper"> |
| | | |
| | | |
| | | </mapper> |
New file |
| | |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.example.erp.mapper.sd.CustomerMapper"> |
| | | |
| | | <resultMap id="selectCustomerOrderDetail" type="com.example.erp.entity.sd.OrderDetail"> |
| | | |
| | | <result column="order_id" property="orderId"/> |
| | | <result column="order_number" property="orderNumber"/> |
| | | <result column="quantity" property="quantity"/> |
| | | <result column="building_number" property="buildingNumber"/> |
| | | <result column="product_name" property="productName"/> |
| | | <result column="product_id" property="productId"/> |
| | | <result column="price" property="price"/> |
| | | <result column="width" property="width"/> |
| | | <result column="height" property="height"/> |
| | | <result column="area" property="area"/> |
| | | <result column="shape" property="shape"/> |
| | | <result column="gross_area" property="grossArea"/> |
| | | <result column="compute_area" property="computeArea"/> |
| | | <result column="compute_gross_area" property="computeGrossArea"/> |
| | | <result column="processing_note" property="processingNote"/> |
| | | <result column="edging_type" property="edgingType"/> |
| | | <result column="perimeter" property="perimeter"/> |
| | | |
| | | |
| | | <result column="batch" property="order.batch"/> |
| | | <result column="project" property="order.project"/> |
| | | <result column="customer_id" property="order.customerId"/> |
| | | <result column="customer_name" property="order.customerName"/> |
| | | <result column="money" property="order.money"/> |
| | | <result column="order_type" property="order.orderType"/> |
| | | <result column="salesman" property="order.salesman"/> |
| | | <result column="create_time" property="order.createTime"/> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | </resultMap> |
| | | |
| | | |
| | | <select id="getSelectCustomerOderDate" resultMap="selectCustomerOrderDetail"> |
| | | select od.order_id, |
| | | od.order_number, |
| | | o.project, |
| | | od.product_id, |
| | | od.product_name, |
| | | o.customer_id, |
| | | o.customer_name, |
| | | sum(od.quantity) as quantity, |
| | | sum(od.area) as area, |
| | | od.shape, |
| | | od.width, |
| | | od.height, |
| | | o.batch, |
| | | o.money, |
| | | o.order_type, |
| | | o.salesman, |
| | | o.create_time |
| | | from order_detail od |
| | | left join `order` o on o.order_id = od.order_id |
| | | <where> |
| | | and date(o.create_time)>=#{startDate} and date(o.create_time) <= #{endDate} |
| | | <if test="orderDetail.order.customerId != null and orderDetail.order.customerId != ''"> |
| | | and o.customer_id = #{orderDetail.order.customerId} |
| | | </if> |
| | | <if test="orderDetail.order.project != null and orderDetail.order.project != ''"> |
| | | and o.project regexp #{orderDetail.order.project} |
| | | </if> |
| | | <if test="orderDetail.order.batch != null and orderDetail.order.batch != ''"> |
| | | and o.batch regexp #{orderDetail.order.batch} |
| | | </if> |
| | | <if test="orderDetail.order.money != null and orderDetail.order.money != ''"> |
| | | and o.money regexp REGEXP_REPLACE(#{orderDetail.order.money},'\\.0+$','') |
| | | </if> |
| | | <if test="orderDetail.order.orderType != null and orderDetail.order.orderType != ''"> |
| | | and o.order_type regexp #{orderDetail.order.orderType} |
| | | </if> |
| | | <if test="orderDetail.order.salesman != null and orderDetail.order.salesman != ''"> |
| | | and o.salesman regexp #{orderDetail.order.salesman} |
| | | </if> |
| | | <if test="orderDetail.orderId != null and orderDetail.orderId != ''"> |
| | | and od.order_id regexp #{orderDetail.orderId} |
| | | </if> |
| | | <if test="orderDetail.orderNumber != null and orderDetail.orderNumber != ''"> |
| | | and od.order_number regexp #{orderDetail.orderNumber} |
| | | </if> |
| | | <if test="orderDetail.productId != null and orderDetail.productId != ''"> |
| | | and od.product_id regexp #{orderDetail.productId} |
| | | </if> |
| | | <if test="orderDetail.productName != null and orderDetail.productName != ''"> |
| | | and od.product_name regexp #{orderDetail.productName} |
| | | </if> |
| | | <if test="orderDetail.shape != null and orderDetail.shape != ''"> |
| | | and od.shape regexp #{orderDetail.shape} |
| | | </if> |
| | | <if test="orderDetail.width != null and orderDetail.width != ''"> |
| | | and od.width regexp REGEXP_REPLACE(#{orderDetail.width},'\\.0+$','') |
| | | </if> |
| | | <if test="orderDetail.height != null and orderDetail.height != ''"> |
| | | and od.height regexp REGEXP_REPLACE(#{orderDetail.height},'\\.0+$','') |
| | | </if> |
| | | |
| | | </where> |
| | | group by od.product_id, od.width, od.height |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | <select id="getSelectCustomerOderDatePageTotal" > |
| | | select |
| | | CEILING(count(zu.id)/#{pageSize}) as 'pageTotal', |
| | | count(zu.id) as 'total' from (select od.product_id,od.id |
| | | from order_detail od |
| | | left join `order` o on o.order_id = od.order_id |
| | | <where> |
| | | and date(o.create_time)>=#{startDate} and date(o.create_time) <= #{endDate} |
| | | <if test="orderDetail.order.customerId != null and orderDetail.order.customerId != ''"> |
| | | and o.customer_id = #{orderDetail.order.customerId} |
| | | </if> |
| | | <if test="orderDetail.order.project != null and orderDetail.order.project != ''"> |
| | | and o.project regexp #{orderDetail.order.project} |
| | | </if> |
| | | <if test="orderDetail.order.batch != null and orderDetail.order.batch != ''"> |
| | | and o.batch regexp #{orderDetail.order.batch} |
| | | </if> |
| | | <if test="orderDetail.order.money != null and orderDetail.order.money != ''"> |
| | | and o.money regexp REGEXP_REPLACE(#{orderDetail.order.money},'\\.0+$','') |
| | | </if> |
| | | <if test="orderDetail.order.orderType != null and orderDetail.order.orderType != ''"> |
| | | and o.order_type regexp #{orderDetail.order.orderType} |
| | | </if> |
| | | <if test="orderDetail.order.salesman != null and orderDetail.order.salesman != ''"> |
| | | and o.salesman regexp #{orderDetail.order.salesman} |
| | | </if> |
| | | <if test="orderDetail.orderId != null and orderDetail.orderId != ''"> |
| | | and od.order_id regexp #{orderDetail.orderId} |
| | | </if> |
| | | <if test="orderDetail.orderNumber != null and orderDetail.orderNumber != ''"> |
| | | and od.order_number regexp #{orderDetail.orderNumber} |
| | | </if> |
| | | <if test="orderDetail.productId != null and orderDetail.productId != ''"> |
| | | and od.product_id regexp #{orderDetail.productId} |
| | | </if> |
| | | <if test="orderDetail.productName != null and orderDetail.productName != ''"> |
| | | and od.product_name regexp #{orderDetail.productName} |
| | | </if> |
| | | <if test="orderDetail.shape != null and orderDetail.shape != ''"> |
| | | and od.shape regexp #{orderDetail.shape} |
| | | </if> |
| | | <if test="orderDetail.width != null and orderDetail.width != ''"> |
| | | and od.width regexp REGEXP_REPLACE(#{orderDetail.width},'\\.0+$','') |
| | | </if> |
| | | <if test="orderDetail.height != null and orderDetail.height != ''"> |
| | | and od.height regexp REGEXP_REPLACE(#{orderDetail.height},'\\.0+$','') |
| | | </if> |
| | | |
| | | </where> |
| | | group by od.product_id, od.width, od.height) as zu |
| | | </select> |
| | | |
| | | <select id="getCustomerList"> |
| | | select |
| | | * |
| | | from |
| | | sd.customer |
| | | </select> |
| | | <select id="getSelectCustomer"> |
| | | select |
| | | * |
| | | from |
| | | sd.customer c |
| | | <where> |
| | | <if test="customer.id != null and customer.id != ''"> |
| | | and c.id regexp #{customer.id} |
| | | </if> |
| | | <if test="customer.customerName != null and customer.customerName != ''"> |
| | | and c.customer_name regexp #{customer.customerName} |
| | | </if> |
| | | <if test="customer.grade != null and customer.grade != ''"> |
| | | and c.grade regexp #{customer.grade} |
| | | </if> |
| | | <if test="customer.moneyLimit != null and customer.moneyLimit != ''"> |
| | | and c.money_limit regexp REGEXP_REPLACE(#{customer.moneyLimit},'\\.0+$','') |
| | | </if> |
| | | <if test="customer.address != null and customer.address != ''"> |
| | | and c.address regexp #{customer.address} |
| | | </if> |
| | | <if test="customer.contact != null and customer.contact != ''"> |
| | | and c.contact regexp #{customer.contact} |
| | | </if> |
| | | <if test="customer.phone != null and customer.phone != ''"> |
| | | and c.phone regexp #{customer.phone} |
| | | </if> |
| | | |
| | | </where> |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | <select id="getSelectCustomerPageTotal"> |
| | | select |
| | | CEILING(count(id)/#{pageSize}) as 'pageTotal', |
| | | count(id) as 'total' |
| | | from |
| | | sd.customer c |
| | | <where> |
| | | <if test="customer.id != null and customer.id != ''"> |
| | | and c.id regexp #{customer.id} |
| | | </if> |
| | | <if test="customer.customerName != null and customer.customerName != ''"> |
| | | and c.customer_name regexp #{customer.customerName} |
| | | </if> |
| | | <if test="customer.grade != null and customer.grade != ''"> |
| | | and c.grade regexp #{customer.grade} |
| | | </if> |
| | | <if test="customer.moneyLimit != null and customer.moneyLimit != ''"> |
| | | and c.money_limit regexp REGEXP_REPLACE(#{customer.moneyLimit},'\\.0+$','') |
| | | </if> |
| | | <if test="customer.address != null and customer.address != ''"> |
| | | and c.address regexp #{customer.address} |
| | | </if> |
| | | <if test="customer.contact != null and customer.contact != ''"> |
| | | and c.contact regexp #{customer.contact} |
| | | </if> |
| | | <if test="customer.phone != null and customer.phone != ''"> |
| | | and c.phone regexp #{customer.phone} |
| | | </if> |
| | | |
| | | </where> |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | <insert id="insertCustomer" useGeneratedKeys="true" > |
| | | insert into sd.customer(customer_name,grade,money_limit,address,contact,phone) |
| | | values ( |
| | | #{customer.customerName},#{customer.grade},#{customer.moneyLimit}, |
| | | #{customer.address},#{customer.contact},#{customer.phone} |
| | | ) |
| | | </insert> |
| | | |
| | | <update id="updateCustomer" useGeneratedKeys="true" > |
| | | update sd.customer set customer_name=#{customer.customerName},grade=#{customer.grade}, |
| | | money_limit=#{customer.moneyLimit},address= #{customer.address}, |
| | | contact=#{customer.contact},phone=#{customer.phone} where id=#{customer.id} |
| | | </update> |
| | | |
| | | <delete id="deleteCustomer" > |
| | | delete from sd.customer where id=#{customer.id} |
| | | </delete> |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.example.erp.mapper.sd.DeliveryDetailMapper"> |
| | | |
| | | <resultMap id="selectDeliveryFinishedGoodsInventoryOrderDetail" type="com.example.erp.entity.sd.OrderDetail"> |
| | | |
| | | <result column="order_id" property="orderId"/> |
| | | <result column="order_number" property="orderNumber"/> |
| | | <result column="o_quantity" property="quantity"/> |
| | | <result column="building_number" property="buildingNumber"/> |
| | | <result column="product_name" property="productName"/> |
| | | <result column="product_id" property="productId"/> |
| | | <result column="price" property="price"/> |
| | | <result column="width" property="width"/> |
| | | <result column="height" property="height"/> |
| | | <result column="shape" property="shape"/> |
| | | <result column="gross_area" property="grossArea"/> |
| | | <result column="compute_area" property="computeArea"/> |
| | | <result column="compute_gross_area" property="computeGrossArea"/> |
| | | <result column="processing_note" property="processingNote"/> |
| | | <result column="edging_type" property="edgingType"/> |
| | | <result column="perimeter" property="perimeter"/> |
| | | |
| | | <result column="delivery_num" property="deliveryNum"/> |
| | | |
| | | <result column="delivery_id" property="deliveryDetail.deliveryid"/> |
| | | |
| | | <result column="d_quantity" property="deliveryDetail.quantity"/> |
| | | <result column="money" property="deliveryDetail.money"/> |
| | | <result column="delivery_number" property="deliveryDetail.deliveryNumber"/> |
| | | <result column="delivery_detail_remakes" property="deliveryDetail.deliveryDetailRemakes"/> |
| | | |
| | | <result column="batch" property="order.batch"/> |
| | | <result column="t_quantity" property="order.quantity"/> |
| | | |
| | | |
| | | <result column="customer_id" property="delivery.customerId"/> |
| | | <result column="customer_name" property="delivery.customerName"/> |
| | | <result column="project" property="delivery.project"/> |
| | | <result column="pay_method" property="delivery.payMethod"/> |
| | | <result column="pay_date" property="delivery.payDate"/> |
| | | <result column="contacts" property="delivery.contacts"/> |
| | | <result column="contact_number" property="delivery.contactNumber"/> |
| | | <result column="delivery_address" property="delivery.deliveryAddress"/> |
| | | <result column="remarks" property="delivery.remarks"/> |
| | | <result column="create_time" property="delivery.createTime"/> |
| | | <result column="delivery_date" property="delivery.deliveryDate"/> |
| | | <result column="creator" property="delivery.creator"/> |
| | | |
| | | <result column="quantity_available" property="finishedGoodsInventory.quantityAvailable"/> |
| | | <result column="storage_region" property="finishedGoodsInventory.storageRegion"/> |
| | | <result column="actual_signal_area" property="finishedGoodsInventory.actualSignalArea"/> |
| | | |
| | | |
| | | </resultMap> |
| | | |
| | | <resultMap id="selectDeliveryDetail" type="com.example.erp.entity.sd.DeliveryDetail"> |
| | | |
| | | <result column="order_id" property="orderId"/> |
| | | <result column="order_number" property="orderNumber"/> |
| | | <result column="o_quantity" property="quantity"/> |
| | | <result column="delivery_id" property="deliveryId"/> |
| | | <result column="delivery_number" property="deliveryNumber"/> |
| | | <result column="quantity" property="quantity"/> |
| | | <result column="area" property="area"/> |
| | | <result column="money" property="money"/> |
| | | <result column="delivery_detail_remakes" property="deliveryDetailRemakes"/> |
| | | <result column="delivery_detail_state" property="deliveryDetailState"/> |
| | | <result column="create_time" property="createTime"/> |
| | | |
| | | <result column="customer_id" property="delivery.customerId"/> |
| | | <result column="customer_name" property="delivery.customerName"/> |
| | | <result column="project" property="delivery.project"/> |
| | | <result column="pay_method" property="delivery.payMethod"/> |
| | | <result column="payment_terms" property="delivery.paymentTerms"/> |
| | | <result column="pay_date" property="delivery.payDate"/> |
| | | <result column="contacts" property="delivery.contacts"/> |
| | | <result column="contact_number" property="delivery.contactNumber"/> |
| | | <result column="delivery_address" property="delivery.deliveryAddress"/> |
| | | <result column="delivery_date" property="delivery.deliveryDate"/> |
| | | <result column="creator" property="delivery.creator"/> |
| | | <result column="salesman" property="delivery.salesman"/> |
| | | |
| | | |
| | | |
| | | </resultMap> |
| | | |
| | | <resultMap id="selectDeliveryDetailOrderDetail" type="com.example.erp.entity.sd.DeliveryDetail"> |
| | | |
| | | <result column="order_number" property="orderNumber"/> |
| | | <result column="o_quantity" property="quantity"/> |
| | | <result column="delivery_id" property="deliveryId"/> |
| | | <result column="delivery_number" property="deliveryNumber"/> |
| | | <result column="quantity" property="quantity"/> |
| | | <result column="area" property="area"/> |
| | | <result column="money" property="money"/> |
| | | <result column="delivery_detail_remakes" property="deliveryDetailRemakes"/> |
| | | <result column="delivery_detail_state" property="deliveryDetailState"/> |
| | | <result column="create_time" property="createTime"/> |
| | | |
| | | <result column="product_id" property="orderDetail.productId"/> |
| | | <result column="product_name" property="orderDetail.productName"/> |
| | | <result column="order_id" property="orderDetail.orderId"/> |
| | | |
| | | |
| | | |
| | | |
| | | </resultMap> |
| | | |
| | | <delete id="deleteDeliveryDetail"> |
| | | delete from sd.delivery_detail where delivery_id=#{deliveryId} |
| | | </delete> |
| | | |
| | | <update id="updateOrderDetailDeliveryNum"> |
| | | update sd.order_detail set delivery_num=delivery_num+#{deliveryDetail.quantity} where order_id=#{orderId} and order_number=#{orderNumber} |
| | | </update> |
| | | |
| | | <update id="updateIsNotOrderDetailDeliveryNum"> |
| | | update sd.order_detail set delivery_num=delivery_num-#{quantity} where order_id=#{orderId} and order_number=#{orderNumber} |
| | | </update> |
| | | |
| | | <update id="updateOrderDelivery"> |
| | | update sd.`order` set delivery=#{state} where order_id=#{orderDetail.orderId} |
| | | </update> |
| | | |
| | | <select id="getdeliveryDetailmaximum" > |
| | | select count(*) from sd.delivery_detail where delivery_id=#{deliveryId} |
| | | </select> |
| | | |
| | | <select id="getIsNotDeliveryDetail" > |
| | | select * from sd.delivery_detail where delivery_id=#{deliveryId} |
| | | </select> |
| | | |
| | | <select id="getSelectDetailQuantity" > |
| | | select quantity from sd.`order` where order_id=#{orderId} |
| | | </select> |
| | | |
| | | <select id="getSelectDetailNum" > |
| | | select sum(quantity) from sd.order_detail where order_id=#{orderId} |
| | | </select> |
| | | |
| | | |
| | | <insert id="insertDeliveryDetail" useGeneratedKeys="true" > |
| | | insert into sd.delivery_detail (delivery_id,delivery_number,order_number, |
| | | area,order_id,quantity,money,delivery_detail_remakes,delivery_detail_state,other_columns,create_time) |
| | | values ( |
| | | #{number} ,#{deliveryNumber},#{orderDetail.orderNumber},#{orderDetail.computeGrossArea}, |
| | | #{orderDetail.orderId},#{orderDetail.deliveryDetail.quantity}, |
| | | #{orderDetail.price}*#{orderDetail.deliveryDetail.quantity},'',1,#{orderDetail.otherColumns},now() |
| | | ) |
| | | </insert> |
| | | |
| | | |
| | | |
| | | <select id="getSelectShippingOrderDetail" resultMap="selectDeliveryFinishedGoodsInventoryOrderDetail"> |
| | | select od.order_id, |
| | | o.batch, |
| | | dd.delivery_number, |
| | | fgi.quantity_available + dd.quantity as quantity_available, |
| | | od.order_number, |
| | | od.quantity-dd.quantity as t_quantity, |
| | | od.quantity as o_quantity, |
| | | dd.quantity as d_quantity, |
| | | od.building_number, |
| | | od.product_id, |
| | | od.product_name, |
| | | od.price, |
| | | fgi.storage_region, |
| | | dd.money, |
| | | od.width, |
| | | od.height, |
| | | od.shape, |
| | | fgi.actual_signal_area, |
| | | od.gross_area, |
| | | od.compute_area, |
| | | od.compute_gross_area, |
| | | od.processing_note, |
| | | od.edging_type, |
| | | od.perimeter, |
| | | dd.delivery_detail_remakes, |
| | | dd.other_columns |
| | | from sd.delivery_detail dd |
| | | left join sd.delivery d on dd.delivery_id=d.delivery_id |
| | | left join sd.order_detail od on dd.order_id=od.order_id and dd.order_number=od.order_number |
| | | left join sd.`order` o on dd.order_id=o.order_id |
| | | left join mm.finished_goods_inventory fgi on dd.order_id=fgi.order_id and dd.order_number=fgi.order_number |
| | | <where> |
| | | <if test="orderDetail.deliveryDetail.deliveryId != null and orderDetail.deliveryDetail.deliveryId != ''"> |
| | | and dd.delivery_id regexp #{orderDetail.deliveryDetail.deliveryId} |
| | | </if> |
| | | <if test="orderDetail.orderId != null and orderDetail.orderId != ''"> |
| | | and od.order_id regexp #{orderDetail.orderId} |
| | | </if> |
| | | <if test="orderDetail.order.batch != null and orderDetail.order.batch != ''"> |
| | | and o.batch regexp #{orderDetail.order.batch} |
| | | </if> |
| | | <if test="orderDetail.finishedGoodsInventory.quantityAvailable != null and orderDetail.finishedGoodsInventory.quantityAvailable != ''"> |
| | | and fgi.quantity_available regexp #{orderDetail.finishedGoodsInventory.quantityAvailable} |
| | | </if> |
| | | <if test="orderDetail.quantity != null and orderDetail.quantity != ''"> |
| | | and od.quantity regexp #{orderDetail.quantity} |
| | | </if> |
| | | <if test="orderDetail.deliveryDetail.quantity != null and orderDetail.deliveryDetail.quantity != ''"> |
| | | and dd.quantity regexp #{orderDetail.deliveryDetail.quantity} |
| | | </if> |
| | | <if test="orderDetail.buildingNumber != null and orderDetail.buildingNumber != ''"> |
| | | and od.building_number regexp #{orderDetail.buildingNumber} |
| | | </if> |
| | | <if test="orderDetail.productId != null and orderDetail.productId != ''"> |
| | | and od.product_id regexp #{orderDetail.productId} |
| | | </if> |
| | | <if test="orderDetail.productName != null and orderDetail.productName != ''"> |
| | | and od.product_name regexp #{orderDetail.productName} |
| | | </if> |
| | | <if test="orderDetail.price != null and orderDetail.price != ''"> |
| | | and od.price regexp #{orderDetail.price} |
| | | </if> |
| | | <if test="orderDetail.finishedGoodsInventory.storageRegion != null and orderDetail.finishedGoodsInventory.storageRegion != ''"> |
| | | and fgi.storage_region regexp #{orderDetail.finishedGoodsInventory.storageRegion} |
| | | </if> |
| | | <if test="orderDetail.deliveryDetail.money != null and orderDetail.deliveryDetail.money != ''"> |
| | | and dd.money regexp REGEXP_REPLACE(#{orderDetail.deliveryDetail.money},'\\.0+$','') |
| | | </if> |
| | | <if test="orderDetail.width != null and orderDetail.width != ''"> |
| | | and od.width regexp REGEXP_REPLACE(#{orderDetail.width},'\\.0+$','') |
| | | </if> |
| | | <if test="orderDetail.height != null and orderDetail.height != ''"> |
| | | and od.height regexp REGEXP_REPLACE(#{orderDetail.height},'\\.0+$','') |
| | | </if> |
| | | <if test="orderDetail.shape != null and orderDetail.shape != ''"> |
| | | and od.shape regexp #{orderDetail.shape} |
| | | </if> |
| | | <if test="orderDetail.finishedGoodsInventory.actualSignalArea != null and orderDetail.finishedGoodsInventory.actualSignalArea != ''"> |
| | | and fgi.actual_signal_area regexp REGEXP_REPLACE(#{orderDetail.finishedGoodsInventory.actualSignalArea},'\\.0+$','') |
| | | </if> |
| | | <if test="orderDetail.grossArea != null and orderDetail.grossArea != ''"> |
| | | and od.gross_area regexp REGEXP_REPLACE(#{orderDetail.grossArea},'\\.0+$','') |
| | | </if> |
| | | <if test="orderDetail.computeArea != null and orderDetail.computeArea != ''"> |
| | | and od.compute_area regexp REGEXP_REPLACE(#{orderDetail.computeArea},'\\.0+$','') |
| | | </if> |
| | | <if test="orderDetail.computeGrossArea != null and orderDetail.computeGrossArea != ''"> |
| | | and od.compute_gross_area regexp REGEXP_REPLACE(#{orderDetail.computeGrossArea},'\\.0+$','') |
| | | </if> |
| | | <if test="orderDetail.processingNote != null and orderDetail.processingNote != ''"> |
| | | and od.processing_note regexp #{orderDetail.processingNote} |
| | | </if> |
| | | <if test="orderDetail.edgingType != null and orderDetail.edgingType != ''"> |
| | | and od.edging_type regexp #{orderDetail.edgingType} |
| | | </if> |
| | | <if test="orderDetail.perimeter != null and orderDetail.perimeter != ''"> |
| | | and od.perimeter regexp #{orderDetail.perimeter} |
| | | </if> |
| | | <if test="orderDetail.deliveryDetail.deliveryDetailRemakes != null and orderDetail.deliveryDetail.deliveryDetailRemakes != ''"> |
| | | and dd.delivery_detail_remakes regexp #{orderDetail.deliveryDetail.deliveryDetailRemakes} |
| | | </if> |
| | | |
| | | </where> |
| | | order by dd.id desc |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | <select id="getSelectShippingOrderDetailPageTotal"> |
| | | select |
| | | CEILING(count(dd.id)/#{pageSize}) |
| | | from sd.delivery_detail dd |
| | | left join sd.delivery d on dd.delivery_id=d.delivery_id |
| | | left join sd.order_detail od on dd.order_id=od.order_id and dd.order_number=od.order_number |
| | | left join sd.`order` o on dd.order_id=o.order_id |
| | | left join mm.finished_goods_inventory fgi on dd.order_id=fgi.order_id and dd.order_number=fgi.order_number |
| | | <where> |
| | | <if test="orderDetail.deliveryDetail.deliveryId != null and orderDetail.deliveryDetail.deliveryId != ''"> |
| | | and dd.delivery_id regexp #{orderDetail.deliveryDetail.deliveryId} |
| | | </if> |
| | | <if test="orderDetail.orderId != null and orderDetail.orderId != ''"> |
| | | and od.order_id regexp #{orderDetail.orderId} |
| | | </if> |
| | | <if test="orderDetail.order.batch != null and orderDetail.order.batch != ''"> |
| | | and o.batch regexp #{orderDetail.order.batch} |
| | | </if> |
| | | <if test="orderDetail.finishedGoodsInventory.quantityAvailable != null and orderDetail.finishedGoodsInventory.quantityAvailable != ''"> |
| | | and fgi.quantity_available regexp #{orderDetail.finishedGoodsInventory.quantityAvailable} |
| | | </if> |
| | | <if test="orderDetail.quantity != null and orderDetail.quantity != ''"> |
| | | and od.quantity regexp #{orderDetail.quantity} |
| | | </if> |
| | | <if test="orderDetail.deliveryDetail.quantity != null and orderDetail.deliveryDetail.quantity != ''"> |
| | | and dd.quantity regexp #{orderDetail.deliveryDetail.quantity} |
| | | </if> |
| | | <if test="orderDetail.buildingNumber != null and orderDetail.buildingNumber != ''"> |
| | | and od.building_number regexp #{orderDetail.buildingNumber} |
| | | </if> |
| | | <if test="orderDetail.productId != null and orderDetail.productId != ''"> |
| | | and od.product_id regexp #{orderDetail.productId} |
| | | </if> |
| | | <if test="orderDetail.productName != null and orderDetail.productName != ''"> |
| | | and od.product_name regexp #{orderDetail.productName} |
| | | </if> |
| | | <if test="orderDetail.price != null and orderDetail.price != ''"> |
| | | and od.price regexp #{orderDetail.price} |
| | | </if> |
| | | <if test="orderDetail.finishedGoodsInventory.storageRegion != null and orderDetail.finishedGoodsInventory.storageRegion != ''"> |
| | | and fgi.storage_region regexp #{orderDetail.finishedGoodsInventory.storageRegion} |
| | | </if> |
| | | <if test="orderDetail.deliveryDetail.money != null and orderDetail.deliveryDetail.money != ''"> |
| | | and dd.money regexp REGEXP_REPLACE(#{orderDetail.deliveryDetail.money},'\\.0+$','') |
| | | </if> |
| | | <if test="orderDetail.width != null and orderDetail.width != ''"> |
| | | and od.width regexp REGEXP_REPLACE(#{orderDetail.width},'\\.0+$','') |
| | | </if> |
| | | <if test="orderDetail.height != null and orderDetail.height != ''"> |
| | | and od.height regexp REGEXP_REPLACE(#{orderDetail.height},'\\.0+$','') |
| | | </if> |
| | | <if test="orderDetail.shape != null and orderDetail.shape != ''"> |
| | | and od.shape regexp #{orderDetail.shape} |
| | | </if> |
| | | <if test="orderDetail.finishedGoodsInventory.actualSignalArea != null and orderDetail.finishedGoodsInventory.actualSignalArea != ''"> |
| | | and fgi.actual_signal_area regexp REGEXP_REPLACE(#{orderDetail.finishedGoodsInventory.actualSignalArea},'\\.0+$','') |
| | | </if> |
| | | <if test="orderDetail.grossArea != null and orderDetail.grossArea != ''"> |
| | | and od.gross_area regexp REGEXP_REPLACE(#{orderDetail.grossArea},'\\.0+$','') |
| | | </if> |
| | | <if test="orderDetail.computeArea != null and orderDetail.computeArea != ''"> |
| | | and od.compute_area regexp REGEXP_REPLACE(#{orderDetail.computeArea},'\\.0+$','') |
| | | </if> |
| | | <if test="orderDetail.computeGrossArea != null and orderDetail.computeGrossArea != ''"> |
| | | and od.compute_gross_area regexp REGEXP_REPLACE(#{orderDetail.computeGrossArea},'\\.0+$','') |
| | | </if> |
| | | <if test="orderDetail.processingNote != null and orderDetail.processingNote != ''"> |
| | | and od.processing_note regexp #{orderDetail.processingNote} |
| | | </if> |
| | | <if test="orderDetail.edgingType != null and orderDetail.edgingType != ''"> |
| | | and od.edging_type regexp #{orderDetail.edgingType} |
| | | </if> |
| | | <if test="orderDetail.perimeter != null and orderDetail.perimeter != ''"> |
| | | and od.perimeter regexp #{orderDetail.perimeter} |
| | | </if> |
| | | <if test="orderDetail.deliveryDetail.deliveryDetailRemakes != null and orderDetail.deliveryDetail.deliveryDetailRemakes != ''"> |
| | | and dd.delivery_detail_remakes regexp #{orderDetail.deliveryDetail.deliveryDetailRemakes} |
| | | </if> |
| | | </where> |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | <select id="getSelectShippingOrderDetails" resultMap="selectDeliveryFinishedGoodsInventoryOrderDetail"> |
| | | select od.order_id, |
| | | od.order_number, |
| | | o.batch, |
| | | fgi.quantity_available, |
| | | od.quantity- od.delivery_num as t_quantity, |
| | | od.quantity as o_quantity, |
| | | fgi.quantity_available as d_quantity, |
| | | od.building_number, |
| | | od.product_id, |
| | | od.product_name, |
| | | od.price, |
| | | fgi.storage_region, |
| | | od.width, |
| | | od.height, |
| | | od.shape, |
| | | fgi.actual_signal_area, |
| | | od.gross_area, |
| | | od.compute_area, |
| | | od.compute_gross_area, |
| | | od.processing_note, |
| | | od.edging_type, |
| | | od.perimeter |
| | | from sd.order_detail od |
| | | left join sd.`order` o on od.order_id = o.order_id |
| | | left join mm.finished_goods_inventory fgi |
| | | on od.order_id = fgi.order_id and od.order_number = fgi.order_number |
| | | <where> |
| | | fgi.quantity_available > 0 and od.quantity > od.delivery_num |
| | | <if test="orderDetail.orderId != null and orderDetail.orderId != ''"> |
| | | and od.order_id regexp #{orderDetail.orderId} |
| | | </if> |
| | | <if test="orderDetail.order.batch != null and orderDetail.order.batch != ''"> |
| | | and o.batch regexp #{orderDetail.order.batch} |
| | | </if> |
| | | <if test="orderDetail.finishedGoodsInventory.quantityAvailable != null and orderDetail.finishedGoodsInventory.quantityAvailable != ''"> |
| | | and fgi.quantity_available regexp #{orderDetail.finishedGoodsInventory.quantityAvailable} |
| | | </if> |
| | | <if test="orderDetail.quantity != null and orderDetail.quantity != ''"> |
| | | and od.quantity regexp #{orderDetail.quantity} |
| | | </if> |
| | | <if test="orderDetail.deliveryNum != null and orderDetail.deliveryNum != ''"> |
| | | and od.delivery_num regexp #{orderDetail.deliveryNum} |
| | | </if> |
| | | <if test="orderDetail.buildingNumber != null and orderDetail.buildingNumber != ''"> |
| | | and od.building_number regexp #{orderDetail.buildingNumber} |
| | | </if> |
| | | <if test="orderDetail.productId != null and orderDetail.productId != ''"> |
| | | and od.product_id regexp #{orderDetail.productId} |
| | | </if> |
| | | <if test="orderDetail.productName != null and orderDetail.productName != ''"> |
| | | and od.product_name regexp #{orderDetail.productName} |
| | | </if> |
| | | <if test="orderDetail.price != null and orderDetail.price != ''"> |
| | | and od.price regexp REGEXP_REPLACE(#{orderDetail.price},'\\.0+$','') |
| | | </if> |
| | | <if test="orderDetail.finishedGoodsInventory.storageRegion != null and orderDetail.finishedGoodsInventory.storageRegion != ''"> |
| | | and fgi.storage_region regexp #{orderDetail.finishedGoodsInventory.storageRegion} |
| | | </if> |
| | | <if test="orderDetail.width != null and orderDetail.width != ''"> |
| | | and od.width regexp REGEXP_REPLACE(#{orderDetail.width},'\\.0+$','') |
| | | </if> |
| | | <if test="orderDetail.height != null and orderDetail.height != ''"> |
| | | and od.height regexp REGEXP_REPLACE(#{orderDetail.height},'\\.0+$','') |
| | | </if> |
| | | <if test="orderDetail.shape != null and orderDetail.shape != ''"> |
| | | and od.shape regexp #{orderDetail.shape} |
| | | </if> |
| | | <if test="orderDetail.finishedGoodsInventory.actualSignalArea != null and orderDetail.finishedGoodsInventory.actualSignalArea != ''"> |
| | | and fgi.actual_signal_area regexp REGEXP_REPLACE(#{orderDetail.finishedGoodsInventory.actualSignalArea},'\\.0+$','') |
| | | </if> |
| | | <if test="orderDetail.grossArea != null and orderDetail.grossArea != ''"> |
| | | and od.gross_area regexp REGEXP_REPLACE(#{orderDetail.grossArea},'\\.0+$','') |
| | | </if> |
| | | <if test="orderDetail.computeArea != null and orderDetail.computeArea != ''"> |
| | | and od.compute_area regexp REGEXP_REPLACE(#{orderDetail.computeArea},'\\.0+$','') |
| | | </if> |
| | | <if test="orderDetail.computeGrossArea != null and orderDetail.computeGrossArea != ''"> |
| | | and od.compute_gross_area regexp REGEXP_REPLACE(#{orderDetail.computeGrossArea},'\\.0+$','') |
| | | </if> |
| | | <if test="orderDetail.processingNote != null and orderDetail.processingNote != ''"> |
| | | and od.processing_note regexp #{orderDetail.processingNote} |
| | | </if> |
| | | <if test="orderDetail.edgingType != null and orderDetail.edgingType != ''"> |
| | | and od.edging_type regexp #{orderDetail.edgingType} |
| | | </if> |
| | | <if test="orderDetail.perimeter != null and orderDetail.perimeter != ''"> |
| | | and od.perimeter regexp #{orderDetail.perimeter} |
| | | </if> |
| | | </where> |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | <select id="getSelectShippingOrderDetailsPageTotal"> |
| | | select |
| | | CEILING(count(od.id)/#{pageSize}) |
| | | from sd.order_detail od |
| | | left join sd.`order` o on od.order_id = o.order_id |
| | | left join mm.finished_goods_inventory fgi |
| | | on od.order_id = fgi.order_id and od.order_number = fgi.order_number |
| | | <where> |
| | | fgi.quantity_available > 0 and od.quantity > od.delivery_num |
| | | <if test="orderDetail.orderId != null and orderDetail.orderId != ''"> |
| | | and od.order_id regexp #{orderDetail.orderId} |
| | | </if> |
| | | <if test="orderDetail.order.batch != null and orderDetail.order.batch != ''"> |
| | | and o.batch regexp #{orderDetail.order.batch} |
| | | </if> |
| | | <if test="orderDetail.finishedGoodsInventory.quantityAvailable != null and orderDetail.finishedGoodsInventory.quantityAvailable != ''"> |
| | | and fgi.quantity_available regexp #{orderDetail.finishedGoodsInventory.quantityAvailable} |
| | | </if> |
| | | <if test="orderDetail.quantity != null and orderDetail.quantity != ''"> |
| | | and od.quantity regexp #{orderDetail.quantity} |
| | | </if> |
| | | <if test="orderDetail.deliveryNum != null and orderDetail.deliveryNum != ''"> |
| | | and od.delivery_num regexp #{orderDetail.deliveryNum} |
| | | </if> |
| | | <if test="orderDetail.buildingNumber != null and orderDetail.buildingNumber != ''"> |
| | | and od.building_number regexp #{orderDetail.buildingNumber} |
| | | </if> |
| | | <if test="orderDetail.productId != null and orderDetail.productId != ''"> |
| | | and od.product_id regexp #{orderDetail.productId} |
| | | </if> |
| | | <if test="orderDetail.productName != null and orderDetail.productName != ''"> |
| | | and od.product_name regexp #{orderDetail.productName} |
| | | </if> |
| | | <if test="orderDetail.price != null and orderDetail.price != ''"> |
| | | and od.price regexp REGEXP_REPLACE(#{orderDetail.price},'\\.0+$','') |
| | | </if> |
| | | <if test="orderDetail.finishedGoodsInventory.storageRegion != null and orderDetail.finishedGoodsInventory.storageRegion != ''"> |
| | | and fgi.storage_region regexp #{orderDetail.finishedGoodsInventory.storageRegion} |
| | | </if> |
| | | <if test="orderDetail.width != null and orderDetail.width != ''"> |
| | | and od.width regexp REGEXP_REPLACE(#{orderDetail.width},'\\.0+$','') |
| | | </if> |
| | | <if test="orderDetail.height != null and orderDetail.height != ''"> |
| | | and od.height regexp REGEXP_REPLACE(#{orderDetail.height},'\\.0+$','') |
| | | </if> |
| | | <if test="orderDetail.shape != null and orderDetail.shape != ''"> |
| | | and od.shape regexp #{orderDetail.shape} |
| | | </if> |
| | | <if test="orderDetail.finishedGoodsInventory.actualSignalArea != null and orderDetail.finishedGoodsInventory.actualSignalArea != ''"> |
| | | and fgi.actual_signal_area regexp REGEXP_REPLACE(#{orderDetail.finishedGoodsInventory.actualSignalArea},'\\.0+$','') |
| | | </if> |
| | | <if test="orderDetail.grossArea != null and orderDetail.grossArea != ''"> |
| | | and od.gross_area regexp REGEXP_REPLACE(#{orderDetail.grossArea},'\\.0+$','') |
| | | </if> |
| | | <if test="orderDetail.computeArea != null and orderDetail.computeArea != ''"> |
| | | and od.compute_area regexp REGEXP_REPLACE(#{orderDetail.computeArea},'\\.0+$','') |
| | | </if> |
| | | <if test="orderDetail.computeGrossArea != null and orderDetail.computeGrossArea != ''"> |
| | | and od.compute_gross_area regexp REGEXP_REPLACE(#{orderDetail.computeGrossArea},'\\.0+$','') |
| | | </if> |
| | | <if test="orderDetail.processingNote != null and orderDetail.processingNote != ''"> |
| | | and od.processing_note regexp #{orderDetail.processingNote} |
| | | </if> |
| | | <if test="orderDetail.edgingType != null and orderDetail.edgingType != ''"> |
| | | and od.edging_type regexp #{orderDetail.edgingType} |
| | | </if> |
| | | <if test="orderDetail.perimeter != null and orderDetail.perimeter != ''"> |
| | | and od.perimeter regexp #{orderDetail.perimeter} |
| | | </if> |
| | | </where> |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | |
| | | <select id="getSelectDeliveryDetailReport" resultMap="selectDeliveryDetail"> |
| | | select dd.delivery_id, |
| | | dd.delivery_number, |
| | | d.payment_terms, |
| | | d.project, |
| | | d.customer_id, |
| | | d.customer_name, |
| | | d.delivery_date, |
| | | d.pay_method, |
| | | d.pay_date, |
| | | d.salesman, |
| | | d.creator, |
| | | d.contacts, |
| | | d.contact_number, |
| | | d.delivery_address, |
| | | dd.order_id, |
| | | dd.order_number, |
| | | dd.area, |
| | | dd.money, |
| | | dd.quantity, |
| | | dd.delivery_detail_remakes, |
| | | dd.create_time |
| | | from sd.delivery_detail dd |
| | | left join sd.delivery d on dd.delivery_id=d.delivery_id |
| | | <where> |
| | | and date(dd.create_time)>=#{startDate} and date(dd.create_time) <= #{endDate} |
| | | <if test="deliveryDetail.deliveryId != null and deliveryDetail.deliveryId != ''"> |
| | | and dd.delivery_id like concat('%',#{deliveryDetail.deliveryId},'%') |
| | | </if> |
| | | <if test="deliveryDetail.deliveryNumber != null and deliveryDetail.deliveryNumber != ''"> |
| | | and dd.delivery_number like concat('%',#{deliveryDetail.deliveryNumber},'%') |
| | | </if> |
| | | <if test="deliveryDetail.orderId != null and deliveryDetail.orderId != ''"> |
| | | and dd.order_id like concat('%', #{deliveryDetail.orderId},'%') |
| | | </if> |
| | | <if test="deliveryDetail.orderNumber != null and deliveryDetail.orderNumber != ''"> |
| | | and dd.order_number like concat('%', #{deliveryDetail.orderNumber},'%') |
| | | </if> |
| | | <if test="deliveryDetail.area != null and deliveryDetail.area != ''"> |
| | | and dd.area like concat('%', #{deliveryDetail.area},'%') |
| | | </if> |
| | | <if test="deliveryDetail.money != null and deliveryDetail.money != ''"> |
| | | and dd.money like concat('%', #{deliveryDetail.money},'%') |
| | | </if> |
| | | <if test="deliveryDetail.quantity != null and deliveryDetail.quantity != ''"> |
| | | and dd.quantity like concat('%', #{deliveryDetail.quantity},'%') |
| | | </if> |
| | | <if test="deliveryDetail.deliveryDetailRemakes != null and deliveryDetail.deliveryDetailRemakes != ''"> |
| | | and dd.delivery_detail_remakes like concat('%', #{deliveryDetail.deliveryDetailRemakes},'%') |
| | | </if> |
| | | <if test="deliveryDetail.createTime != null and deliveryDetail.createTime != ''"> |
| | | and dd.create_time like concat('%', #{deliveryDetail.createTime},'%') |
| | | </if> |
| | | <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.paymentTerms != null and deliveryDetail.delivery.paymentTerms != '')"> |
| | | and d.payment_terms like concat('%', #{deliveryDetail.delivery.paymentTerms},'%') |
| | | </if> |
| | | <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.project != null and deliveryDetail.delivery.project != '')"> |
| | | and d.project like concat('%', #{deliveryDetail.delivery.project},'%') |
| | | </if> |
| | | <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.customerId != null and deliveryDetail.delivery.customerId != '')"> |
| | | and d.customer_id like concat('%', #{deliveryDetail.delivery.customerId},'%') |
| | | </if> |
| | | <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.customerName != null and deliveryDetail.delivery.customerName != '')"> |
| | | and d.customer_name like concat('%', #{deliveryDetail.delivery.customerName},'%') |
| | | </if> |
| | | <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.deliveryDate != null and deliveryDetail.delivery.deliveryDate != '')"> |
| | | and d.delivery_date like concat('%', #{deliveryDetail.delivery.deliveryDate},'%') |
| | | </if> |
| | | <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.payMethod != null and deliveryDetail.delivery.payMethod != '')"> |
| | | and d.pay_method like concat('%', #{deliveryDetail.delivery.payMethod},'%') |
| | | </if> |
| | | <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.payDate != null and deliveryDetail.delivery.payDate != '')"> |
| | | and d.pay_date like concat('%', #{deliveryDetail.delivery.payDate},'%') |
| | | </if> |
| | | <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.salesman != null and deliveryDetail.delivery.salesman != '')"> |
| | | and d.salesman like concat('%', #{deliveryDetail.delivery.salesman},'%') |
| | | </if> |
| | | <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.creator != null and deliveryDetail.delivery.creator != '')"> |
| | | and d.creator like concat('%', #{deliveryDetail.delivery.creator},'%') |
| | | </if> |
| | | <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.contacts != null and deliveryDetail.delivery.contacts != '')"> |
| | | and d.contacts like concat('%', #{deliveryDetail.delivery.contacts},'%') |
| | | </if> |
| | | <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.contactNumber != null and deliveryDetail.delivery.contactNumber != '')"> |
| | | and d.contact_number like concat('%', #{deliveryDetail.delivery.contactNumber},'%') |
| | | </if> |
| | | <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.deliveryAddress != null and deliveryDetail.delivery.deliveryAddress != '')"> |
| | | and d.delivery_address like concat('%', #{deliveryDetail.delivery.deliveryAddress},'%') |
| | | </if> |
| | | |
| | | </where> |
| | | order by dd.delivery_id,dd.delivery_number |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | <select id="getSelectDeliveryDetailReportPageTotal"> |
| | | select CEILING(count(dd.id)/#{pageSize}) as 'pageTotal', |
| | | count(dd.id) as 'total' |
| | | from sd.delivery_detail dd |
| | | left join sd.delivery d on dd.delivery_id=d.delivery_id |
| | | <where> |
| | | and date(dd.create_time)>=#{startDate} and date(dd.create_time) <= #{endDate} |
| | | <if test="deliveryDetail.deliveryId != null and deliveryDetail.deliveryId != ''"> |
| | | and dd.delivery_id like concat('%',#{deliveryDetail.deliveryId},'%') |
| | | </if> |
| | | <if test="deliveryDetail.deliveryNumber != null and deliveryDetail.deliveryNumber != ''"> |
| | | and dd.delivery_number like concat('%',#{deliveryDetail.deliveryNumber},'%') |
| | | </if> |
| | | <if test="deliveryDetail.orderId != null and deliveryDetail.orderId != ''"> |
| | | and dd.order_id like concat('%', #{deliveryDetail.orderId},'%') |
| | | </if> |
| | | <if test="deliveryDetail.orderNumber != null and deliveryDetail.orderNumber != ''"> |
| | | and dd.order_number like concat('%', #{deliveryDetail.orderNumber},'%') |
| | | </if> |
| | | <if test="deliveryDetail.area != null and deliveryDetail.area != ''"> |
| | | and dd.area like concat('%', #{deliveryDetail.area},'%') |
| | | </if> |
| | | <if test="deliveryDetail.money != null and deliveryDetail.money != ''"> |
| | | and dd.money like concat('%', #{deliveryDetail.money},'%') |
| | | </if> |
| | | <if test="deliveryDetail.quantity != null and deliveryDetail.quantity != ''"> |
| | | and dd.quantity like concat('%', #{deliveryDetail.quantity},'%') |
| | | </if> |
| | | <if test="deliveryDetail.deliveryDetailRemakes != null and deliveryDetail.deliveryDetailRemakes != ''"> |
| | | and dd.delivery_detail_remakes like concat('%', #{deliveryDetail.deliveryDetailRemakes},'%') |
| | | </if> |
| | | <if test="deliveryDetail.createTime != null and deliveryDetail.createTime != ''"> |
| | | and dd.create_time like concat('%', #{deliveryDetail.createTime},'%') |
| | | </if> |
| | | <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.paymentTerms != null and deliveryDetail.delivery.paymentTerms != '')"> |
| | | and d.payment_terms like concat('%', #{deliveryDetail.delivery.paymentTerms},'%') |
| | | </if> |
| | | <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.project != null and deliveryDetail.delivery.project != '')"> |
| | | and d.project like concat('%', #{deliveryDetail.delivery.project},'%') |
| | | </if> |
| | | <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.customerId != null and deliveryDetail.delivery.customerId != '')"> |
| | | and d.customer_id like concat('%', #{deliveryDetail.delivery.customerId},'%') |
| | | </if> |
| | | <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.customerName != null and deliveryDetail.delivery.customerName != '')"> |
| | | and d.customer_name like concat('%', #{deliveryDetail.delivery.customerName},'%') |
| | | </if> |
| | | <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.deliveryDate != null and deliveryDetail.delivery.deliveryDate != '')"> |
| | | and d.delivery_date like concat('%', #{deliveryDetail.delivery.deliveryDate},'%') |
| | | </if> |
| | | <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.payMethod != null and deliveryDetail.delivery.payMethod != '')"> |
| | | and d.pay_method like concat('%', #{deliveryDetail.delivery.payMethod},'%') |
| | | </if> |
| | | <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.payDate != null and deliveryDetail.delivery.payDate != '')"> |
| | | and d.pay_date like concat('%', #{deliveryDetail.delivery.payDate},'%') |
| | | </if> |
| | | <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.salesman != null and deliveryDetail.delivery.salesman != '')"> |
| | | and d.salesman like concat('%', #{deliveryDetail.delivery.salesman},'%') |
| | | </if> |
| | | <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.creator != null and deliveryDetail.delivery.creator != '')"> |
| | | and d.creator like concat('%', #{deliveryDetail.delivery.creator},'%') |
| | | </if> |
| | | <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.contacts != null and deliveryDetail.delivery.contacts != '')"> |
| | | and d.contacts like concat('%', #{deliveryDetail.delivery.contacts},'%') |
| | | </if> |
| | | <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.contactNumber != null and deliveryDetail.delivery.contactNumber != '')"> |
| | | and d.contact_number like concat('%', #{deliveryDetail.delivery.contactNumber},'%') |
| | | </if> |
| | | <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.deliveryAddress != null and deliveryDetail.delivery.deliveryAddress != '')"> |
| | | and d.delivery_address like concat('%', #{deliveryDetail.delivery.deliveryAddress},'%') |
| | | </if> |
| | | |
| | | </where> |
| | | order by dd.delivery_id,dd.delivery_number |
| | | </select> |
| | | |
| | | <select id="getSelectDeliveryPrinting" resultMap="selectDeliveryDetailOrderDetail" > |
| | | select dd.delivery_id,od.order_id,od.product_id,od.product_name,sum(dd.area) as area,sum(dd.money) as money,sum(dd.quantity) as quantity from |
| | | delivery_detail dd left join order_detail od on dd.order_id=od.order_id and dd.order_number=od.order_number |
| | | |
| | | <where> |
| | | <if test="deliveryDetail.deliveryId != null and deliveryDetail.deliveryId != ''"> |
| | | and dd.delivery_id like concat('%',#{deliveryDetail.deliveryId},'%') |
| | | </if> |
| | | </where> |
| | | group by od.order_id,od.product_name,od.product_id |
| | | </select> |
| | | |
| | | <select id="getSelectDeliveryDetailPrinting" > |
| | | select od.order_id, |
| | | od.order_number, |
| | | od.product_name, |
| | | od.width, |
| | | od.height, |
| | | dd.quantity, |
| | | dd.money, |
| | | dd.area, |
| | | ifnull(od.processing_note,"") as processingNote, |
| | | ifnull(od.building_number,"") as buildingNumber, |
| | | od.price |
| | | from delivery_detail dd |
| | | left join order_detail od on dd.order_id = od.order_id and dd.order_number = od.order_number |
| | | where delivery_id = #{deliveryId} |
| | | and od.order_id = #{orderId} |
| | | and od.product_id = #{productId} |
| | | </select> |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.example.erp.mapper.sd.DeliveryMapper"> |
| | | |
| | | <resultMap id="selectOrderInventory" type="com.example.erp.entity.sd.Order"> |
| | | |
| | | <result column="create_order" property="createOrder"/> |
| | | <result column="process_review" property="processReview"/> |
| | | <result column="order_review" property="orderReview"/> |
| | | <result column="production_order" property="productionOrder"/> |
| | | <result column="processing_card" property="processingCard"/> |
| | | <result column="warehousing" property="warehousing"/> |
| | | <result column="delivery" property="delivery"/> |
| | | <result column="order_id" property="orderId"/> |
| | | <result column="customer_id" property="customerId"/> |
| | | <result column="customer_name" property="customerName"/> |
| | | <result column="quantity" property="quantity"/> |
| | | <result column="project" property="project"/> |
| | | <result column="batch" property="batch"/> |
| | | <result column="money" property="money"/> |
| | | <result column="area" property="area"/> |
| | | <result column="create_time" property="createTime"/> |
| | | <result column="pack_type" property="packType"/> |
| | | <result column="order_type" property="orderType"/> |
| | | <result column="creator" property="creator"/> |
| | | <result column="quantity_available" property="finishedGoodsInventory.quantityAvailable"/> |
| | | </resultMap> |
| | | |
| | | |
| | | <delete id="deleteDelivery"> |
| | | delete from sd.delivery where delivery_id=#{deliveryId} |
| | | </delete> |
| | | <update id="updateDeliveryToExamine"> |
| | | update sd.delivery set delivery_state=#{deliveryState} where delivery_id=#{deliveryId} |
| | | </update> |
| | | |
| | | <update id="updatedelivery"> |
| | | update sd.delivery set area=#{area},quantity=#{quantity},money=#{money},other_money=#{otherMoney} where delivery_id=#{oddNumber} |
| | | </update> |
| | | |
| | | |
| | | <select id="getmaximum" > |
| | | select count(*) from sd.delivery where date(create_time)=CURDATE() |
| | | </select> |
| | | |
| | | <select id="getDeliveryConut" > |
| | | select count(*) from sd.delivery where delivery_id=#{deliveryId} |
| | | </select> |
| | | |
| | | |
| | | <insert id="insertDelivery" useGeneratedKeys="true" > |
| | | insert into sd.delivery(delivery_state,stock_state,payment_terms,delivery_id,order_id,project,customer_id,customer_name, |
| | | delivery_date,pay_method,pay_date,salesman_id,salesman,creator_id,creator,contacts,contact_number,delivery_address, |
| | | area,quantity,money,remarks,create_time) |
| | | values ( |
| | | 0,0,#{delivery.paymentTerms},#{number} ,#{orderId},#{delivery.project},#{delivery.customerId},#{delivery.customerName},#{delivery.deliveryDate},#{delivery.payMethod}, |
| | | #{delivery.payDate},#{delivery.salesmanId},#{delivery.salesman},#{delivery.creatorId},#{delivery.creator},#{delivery.contacts},#{delivery.contactNumber},#{delivery.deliveryAddress}, |
| | | 0,0,0,#{delivery.remarks},now() |
| | | ) |
| | | </insert> |
| | | |
| | | <select id="getSelectOrderInventory" resultMap="selectOrderInventory"> |
| | | select o.create_order, |
| | | o.process_review, |
| | | o.order_review, |
| | | o.production_order, |
| | | o.processing_card, |
| | | o.warehousing, |
| | | o.delivery, |
| | | o.order_id, |
| | | o.customer_id, |
| | | o.customer_name, |
| | | o.quantity, |
| | | sum(fgi.quantity_available) as quantity_available, |
| | | o.project, |
| | | o.batch, |
| | | o.money, |
| | | o.area, |
| | | o.create_time, |
| | | o.pack_type, |
| | | o.order_type, |
| | | o.creator |
| | | from sd.`order` o |
| | | left join mm.finished_goods_inventory fgi on o.order_id = fgi.order_id |
| | | <where> |
| | | fgi.quantity_available > 0 and date(o.create_time)>=#{startDate} and date(o.create_time) <= #{endDate} |
| | | <if test="order.orderId != null and order.orderId != ''"> |
| | | and o.order_id REGEXP #{order.orderId} |
| | | </if> |
| | | <if test="order.customerId != null and order.customerId != ''"> |
| | | and o.customer_id REGEXP #{order.customerId} |
| | | </if> |
| | | <if test="order.customerName != null and order.customerName != ''"> |
| | | and o.customer_name REGEXP #{order.customerName} |
| | | </if> |
| | | <if test="order.quantity != null and order.quantity != ''"> |
| | | and o.quantity REGEXP #{order.quantity} |
| | | </if> |
| | | <if test="order.project != null and order.project != ''"> |
| | | and o.project REGEXP #{order.project} |
| | | </if> |
| | | <if test="order.batch != null and order.batch != ''"> |
| | | and o.batch REGEXP #{order.batch} |
| | | </if> |
| | | <if test="order.money != null and order.money != ''"> |
| | | and o.money REGEXP REGEXP_REPLACE(#{order.money},'\\.0+$','') |
| | | </if> |
| | | <if test="order.area != null and order.area != ''"> |
| | | and o.area REGEXP REGEXP_REPLACE(#{order.area},'\\.0+$','') |
| | | </if> |
| | | <if test="order.packType != null and order.packType != ''"> |
| | | and o.pack_type REGEXP #{order.packType} |
| | | </if> |
| | | <if test="order.orderType != null and order.orderType != ''"> |
| | | and o.order_type REGEXP #{order.orderType} |
| | | </if> |
| | | <if test="order.creator != null and order.creator != ''"> |
| | | and o.creator REGEXP #{order.creator} |
| | | </if> |
| | | <if test="order.createTime != null and order.createTime != ''"> |
| | | and o.create_time REGEXP #{order.createTime} |
| | | </if> |
| | | <if test="order.finishedGoodsInventory.quantityAvailable != null and order.finishedGoodsInventory.quantityAvailable != ''"> |
| | | and fgi.quantity_available REGEXP #{order.finishedGoodsInventory.quantityAvailable} |
| | | </if> |
| | | </where> |
| | | group by o.order_id order by o.id desc |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | <select id="getSelectOrderInventoryPageTotal" > |
| | | select CEILING(count(zu.order_id)/#{pageSize}) as 'pageTotal', |
| | | count(zu.order_id) as 'total' from |
| | | (select o.create_order,o.process_review,o.order_review,o.production_order, |
| | | o.processing_card,o.warehousing,o.delivery,o.order_id,o.customer_id, |
| | | o.customer_name,o.quantity,sum(fgi.quantity_available),o.project,o.batch, |
| | | o.money,o.area,o.create_time,o.pack_type,o.order_type,o.creator |
| | | from sd.`order` o left join mm.finished_goods_inventory fgi on o.order_id=fgi.order_id |
| | | <where> |
| | | fgi.quantity_available > 0 and date(o.create_time)>=#{startDate} and date(o.create_time) <= #{endDate} |
| | | <if test="order.orderId != null and order.orderId != ''"> |
| | | and o.order_id REGEXP #{order.orderId} |
| | | </if> |
| | | <if test="order.customerId != null and order.customerId != ''"> |
| | | and o.customer_id REGEXP #{order.customerId} |
| | | </if> |
| | | <if test="order.customerName != null and order.customerName != ''"> |
| | | and o.customer_name REGEXP #{order.customerName} |
| | | </if> |
| | | <if test="order.quantity != null and order.quantity != ''"> |
| | | and o.quantity REGEXP #{order.quantity} |
| | | </if> |
| | | <if test="order.project != null and order.project != ''"> |
| | | and o.project REGEXP #{order.project} |
| | | </if> |
| | | <if test="order.batch != null and order.batch != ''"> |
| | | and o.batch REGEXP #{order.batch} |
| | | </if> |
| | | <if test="order.money != null and order.money != ''"> |
| | | and o.money REGEXP REGEXP_REPLACE(#{order.money},'\\.0+$','') |
| | | </if> |
| | | <if test="order.area != null and order.area != ''"> |
| | | and o.area REGEXP REGEXP_REPLACE(#{order.area},'\\.0+$','') |
| | | </if> |
| | | <if test="order.packType != null and order.packType != ''"> |
| | | and o.pack_type REGEXP #{order.packType} |
| | | </if> |
| | | <if test="order.orderType != null and order.orderType != ''"> |
| | | and o.order_type REGEXP #{order.orderType} |
| | | </if> |
| | | <if test="order.creator != null and order.creator != ''"> |
| | | and o.creator REGEXP #{order.creator} |
| | | </if> |
| | | <if test="order.createTime != null and order.createTime != ''"> |
| | | and o.create_time REGEXP #{order.createTime} |
| | | </if> |
| | | <if test="order.finishedGoodsInventory.quantityAvailable != null and order.finishedGoodsInventory.quantityAvailable != ''"> |
| | | and fgi.quantity_available REGEXP #{order.finishedGoodsInventory.quantityAvailable} |
| | | </if> |
| | | </where> |
| | | group by o.order_id limit #{offset},#{pageSize}) as zu; |
| | | |
| | | |
| | | |
| | | |
| | | </select> |
| | | |
| | | <select id="getSelectShippingOrderDetailDelivery" > |
| | | select |
| | | d.delivery_state,d.stock_state,d.payment_terms, |
| | | d.customer_id,d.customer_name,d.project,d.pay_method,d.pay_date,d.contacts,d.contact_number, |
| | | d.delivery_address,d.remarks,d.create_time,d.delivery_date,d.creator,d.salesman,d.salesman_id |
| | | from sd.delivery d |
| | | <where> |
| | | <if test="orderDetail.deliveryDetail.deliveryId != null and orderDetail.deliveryDetail.deliveryId != ''"> |
| | | and d.delivery_id regexp #{orderDetail.deliveryDetail.deliveryId} |
| | | </if> |
| | | |
| | | </where> |
| | | limit 0,1 |
| | | </select> |
| | | |
| | | <select id="getSelectShippingOrderDetailDeliveryPrinting" > |
| | | select |
| | | d.delivery_id,d.quantity,d.money,d.area,d.project, |
| | | d.customer_id,d.customer_name,d.project,d.pay_method,d.pay_date,d.contacts,d.contact_number, |
| | | d.delivery_address,d.remarks,d.create_time,d.delivery_date,d.creator,d.salesman,d.salesman_id |
| | | from sd.delivery d |
| | | <where> |
| | | <if test="deliveryDetail.deliveryId != null and deliveryDetail.deliveryId != ''"> |
| | | and d.delivery_id like concat('%',#{deliveryDetail.deliveryId},'%') |
| | | </if> |
| | | |
| | | </where> |
| | | </select> |
| | | |
| | | |
| | | <select id="getSelectShippingOrderDetailDeliverys" > |
| | | select customer_id,customer_name,project,salesman,salesman_id,contacts,contact_number,delivery_address from sd.`order` |
| | | <where> |
| | | <if test="orderDetail.orderId != null and orderDetail.orderId != ''"> |
| | | and order_id regexp #{orderDetail.orderId} |
| | | </if> |
| | | |
| | | </where> |
| | | limit 0,1 |
| | | </select> |
| | | |
| | | <select id="getSelectShippingOrder"> |
| | | select * from sd.delivery d |
| | | <where> |
| | | date(d.create_time)>=#{startDate} and date(d.create_time) <= #{endDate} |
| | | <if test="delivery.deliveryId != null and delivery.deliveryId != ''"> |
| | | and d.delivery_id regexp #{delivery.deliveryId} |
| | | </if> |
| | | <if test="delivery.creator != null and delivery.creator != ''"> |
| | | and d.creator regexp #{delivery.creator} |
| | | </if> |
| | | <if test="delivery.deliveryDate != null and delivery.deliveryDate != ''"> |
| | | and d.delivery_date regexp #{delivery.deliveryDate} |
| | | </if> |
| | | <if test="delivery.customerId != null and delivery.customerId != ''"> |
| | | and d.customer_id regexp #{delivery.customerId} |
| | | </if> |
| | | <if test="delivery.customerName != null and delivery.customerName != ''"> |
| | | and d.customer_name regexp #{delivery.customerName} |
| | | </if> |
| | | <if test="delivery.project != null and delivery.project != ''"> |
| | | and d.project regexp #{delivery.project} |
| | | </if> |
| | | <if test="delivery.orderId != null and delivery.orderId != ''"> |
| | | and d.order_id regexp #{delivery.orderId} |
| | | </if> |
| | | <if test="delivery.payMethod != null and delivery.payMethod != ''"> |
| | | and d.pay_method regexp #{delivery.payMethod} |
| | | </if> |
| | | <if test="delivery.quantity != null and delivery.quantity != ''"> |
| | | and d.quantity regexp #{delivery.quantity} |
| | | </if> |
| | | <if test="delivery.area != null and delivery.area != ''"> |
| | | and d.area regexp REGEXP_REPLACE(#{delivery.area},'\\.0+$','') |
| | | </if> |
| | | |
| | | </where> |
| | | order by d.id desc |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | <select id="getSelectShippingOrderPageTotal"> |
| | | select |
| | | CEILING(count(id)/#{pageSize}) as 'pageTotal', |
| | | count(id) as 'total' |
| | | from sd.delivery d |
| | | <where> |
| | | date(d.create_time)>=#{startDate} and date(d.create_time) <= #{endDate} |
| | | <if test="delivery.deliveryId != null and delivery.deliveryId != ''"> |
| | | and d.delivery_id regexp #{delivery.deliveryId} |
| | | </if> |
| | | <if test="delivery.creator != null and delivery.creator != ''"> |
| | | and d.creator regexp #{delivery.creator} |
| | | </if> |
| | | <if test="delivery.deliveryDate != null and delivery.deliveryDate != ''"> |
| | | and d.delivery_date regexp #{delivery.deliveryDate} |
| | | </if> |
| | | <if test="delivery.customerId != null and delivery.customerId != ''"> |
| | | and d.customer_id regexp #{delivery.customerId} |
| | | </if> |
| | | <if test="delivery.customerName != null and delivery.customerName != ''"> |
| | | and d.customer_name regexp #{delivery.customerName} |
| | | </if> |
| | | <if test="delivery.project != null and delivery.project != ''"> |
| | | and d.project regexp #{delivery.project} |
| | | </if> |
| | | <if test="delivery.orderId != null and delivery.orderId != ''"> |
| | | and d.order_id regexp #{delivery.orderId} |
| | | </if> |
| | | <if test="delivery.payMethod != null and delivery.payMethod != ''"> |
| | | and d.pay_method regexp #{delivery.payMethod} |
| | | </if> |
| | | <if test="delivery.quantity != null and delivery.quantity != ''"> |
| | | and d.quantity regexp #{delivery.quantity} |
| | | </if> |
| | | <if test="delivery.area != null and delivery.area != ''"> |
| | | and d.area regexp REGEXP_REPLACE(#{delivery.area},'\\.0+$','') |
| | | </if> |
| | | </where> |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.example.erp.mapper.sd.DeliveryOtherMoneyMapper"> |
| | | <select id="findById"> |
| | | select |
| | | a.*, |
| | | b.alias |
| | | from sd.delivery_other_money as a |
| | | left join sd.basic_other_money as b |
| | | on a.`column` = b.`column` |
| | | where a.delivery_id = #{deliveryId} |
| | | </select> |
| | | |
| | | <insert id="insertDeliveryOtherMoney" useGeneratedKeys="true"> |
| | | insert into sd.delivery_other_money(delivery_id, `column`, quantity, price, money, create_time) |
| | | values |
| | | (#{deliveryOtherMoney.deliveryId},#{deliveryOtherMoney.column},#{deliveryOtherMoney.quantity}, |
| | | #{deliveryOtherMoney.price},#{deliveryOtherMoney.money},now()) |
| | | </insert> |
| | | |
| | | <delete id="deleteDeliveryOtherMoney"> |
| | | delete from sd.delivery_other_money where delivery_id = #{deliveryId} |
| | | </delete> |
| | | |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.example.erp.mapper.sd.OrderDetailMapper"> |
| | | <insert id="insertBatch" parameterType="java.util.List"> |
| | | INSERT INTO |
| | | order_detail (order_id, |
| | | order_number, |
| | | building_number, |
| | | product_id, |
| | | product_name, |
| | | price, |
| | | quantity, |
| | | gross_amount, |
| | | width, |
| | | height, |
| | | shape, |
| | | area, |
| | | gross_area, |
| | | compute_area, |
| | | compute_gross_area, |
| | | processing_note, |
| | | remarks, |
| | | bend_radius, |
| | | edging_type, |
| | | weight, |
| | | perimeter, |
| | | other_columns |
| | | ) |
| | | values |
| | | <foreach collection ="orderDetails" item="orderDetail" separator =","> |
| | | (#{orderDetail.orderId}, |
| | | #{orderDetail.orderNumber}, |
| | | #{orderDetail.buildingNumber}, |
| | | #{orderDetail.productId}, |
| | | #{orderDetail.productName}, |
| | | #{orderDetail.price}, |
| | | #{orderDetail.quantity}, |
| | | #{orderDetail.grossAmount}, |
| | | #{orderDetail.width}, |
| | | #{orderDetail.height}, |
| | | #{orderDetail.shape}, |
| | | #{orderDetail.area}, |
| | | #{orderDetail.grossArea}, |
| | | #{orderDetail.computeArea}, |
| | | #{orderDetail.computeGrossArea}, |
| | | #{orderDetail.processingNote}, |
| | | #{orderDetail.remarks}, |
| | | #{orderDetail.bendRadius}, |
| | | #{orderDetail.edgingType}, |
| | | #{orderDetail.weight}, |
| | | #{orderDetail.perimeter}, |
| | | #{orderDetail.otherColumns} |
| | | ) |
| | | </foreach> |
| | | </insert> |
| | | |
| | | <update id="updateOrderMoney" parameterType="java.util.List"> |
| | | <foreach collection="orderDetails" item="item" index="index" open="" close="" separator=";"> |
| | | update order_detail as a |
| | | set |
| | | a.price = #{item.price}, |
| | | a.gross_amount = #{item.grossAmount} |
| | | where |
| | | a.order_id = #{item.orderId} and |
| | | a.order_number = #{item.orderNumber} |
| | | |
| | | </foreach> |
| | | |
| | | </update> |
| | | |
| | | <resultMap id="orderMap" type="com.example.erp.entity.sd.OrderDetail"> |
| | | <result column="order_number" property="orderNumber"/> |
| | | |
| | | <result column="product_id" property="productId"/> |
| | | <result column="product_name" property="productName"/> |
| | | <result column="price" property="price"/> |
| | | <result column="width" property="width"/> |
| | | <result column="height" property="height"/> |
| | | <result column="quantity" property="quantity"/> |
| | | <result column="bend_radius" property="bendRadius"/> |
| | | <result column="gross_area" property="grossArea"/> |
| | | <result column="compute_gross_area" property="computeGrossArea"/> |
| | | <result column="shape" property="shape"/> |
| | | <result column="edging_type" property="edgingType"/> |
| | | <result column="processing_note" property="processingNote"/> |
| | | <result column="remarks" property="remarks"/> |
| | | <result column="perimeter" property="perimeter"/> |
| | | <result column="gross_amount" property="grossAmount"/> |
| | | <result column="levelOne" property="levelOne"/> |
| | | <result column="levelTwo" property="levelTwo"/> |
| | | <result column="total_thickness" property="totalThickness"/> |
| | | <result column="createTime" property="createTime"/> |
| | | |
| | | <result column="order_type" property="order.orderType"/> |
| | | <result column="customer_name" property="order.customerName"/> |
| | | <result column="project" property="order.project"/> |
| | | <result column="order_id" property="order.orderId"/> |
| | | <result column="batch" property="order.batch"/> |
| | | <result column="b.processing_note" property="order.processingNote"/> |
| | | <result column="icon" property="order.icon"/> |
| | | <result column="packType" property="order.packType"/> |
| | | <result column="salesman" property="order.salesman"/> |
| | | <result column="delivery_address" property="order.deliveryAddress"/> |
| | | <result column="creator" property="order.creator"/> |
| | | <result column="verifier" property="order.verifier"/> |
| | | <result column="customer_batch" property="order.customerBatch"/> |
| | | |
| | | </resultMap> |
| | | |
| | | |
| | | <select id="getOrderReport" resultMap="orderMap"> |
| | | SELECT |
| | | *, |
| | | a.create_time as createTime, |
| | | d.type_name as levelOne, |
| | | e.type_name as levelTwo |
| | | from order_detail as a |
| | | left join sd.`order` as b |
| | | on b.order_id = a.order_id |
| | | left join sd.product as c |
| | | on c.id = a.product_id |
| | | left join sd.basic_glass_type as d |
| | | on d.type_id = c.type_id |
| | | left join sd.basic_glass_type as e |
| | | on e.type_id = d.belong |
| | | where date(b.create_time)>=#{startDate} and date(b.create_time) <= #{endDate} |
| | | |
| | | <if test="orderDetail.order!=null and (orderDetail.order.orderType != null and orderDetail.order.orderType != '')"> |
| | | and b.order_type like concat('%',#{orderDetail.order.orderType},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.customerId != null and orderDetail.order.customerId != ''"> |
| | | and b.customer_id like concat('%',#{orderDetail.order.customerId},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.project != null and orderDetail.order.project != ''"> |
| | | and b.project like concat('%',#{orderDetail.order.project},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.orderId != null and orderDetail.order.orderId != ''"> |
| | | and b.order_id like concat('%',#{orderDetail.order.orderId},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.batch != null and orderDetail.order.batch != ''"> |
| | | and b.batch like concat('%',#{orderDetail.order.batch},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.productId != null and orderDetail.productId != ''"> |
| | | and a.product_id like concat('%',#{orderDetail.productId},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.productName != null and orderDetail.productName != ''"> |
| | | and a.product_name like concat('%',#{orderDetail.productName},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.orderNumber != null and orderDetail.orderNumber != ''"> |
| | | and a.order_number like concat('%',#{orderDetail.orderNumber},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.width != null and orderDetail.width != ''"> |
| | | and a.width like concat('%',#{orderDetail.width},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.height != null and orderDetail.height != ''"> |
| | | and a.height like concat('%',#{orderDetail.height},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.quantity != null and orderDetail.quantity != ''"> |
| | | and a.quantity like concat('%',#{orderDetail.quantity},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.bendRadius != null and orderDetail.bendRadius != ''"> |
| | | and a.bend_radius like concat('%',#{orderDetail.bendRadius},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.grossArea != null and orderDetail.grossArea != ''"> |
| | | and a.gross_area like concat('%',#{orderDetail.grossArea},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.computeGrossArea != null and orderDetail.computeGrossArea != ''"> |
| | | and a.compute_gross_area like concat('%',#{orderDetail.computeGrossArea},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.shape != null and orderDetail.shape != ''"> |
| | | and a.shape like concat('%',#{orderDetail.shape},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.edgingType != null and orderDetail.edgingType != ''"> |
| | | and a.edging_type like concat('%',#{orderDetail.edgingType},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.processingNote != null and orderDetail.order.processingNote != ''"> |
| | | and b.processing_note like concat('%',#{orderDetail.order.processingNote},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.processingNote != null and orderDetail.processingNote != ''"> |
| | | and a.processing_note like concat('%',#{orderDetail.processingNote},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.icon != null and orderDetail.order.icon != ''"> |
| | | and b.icon like concat('%',#{orderDetail.order.icon},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.packType != null and orderDetail.order.packType != ''"> |
| | | and b.pack_type like concat('%',#{orderDetail.order.packType},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.perimeter != null and orderDetail.perimeter != ''"> |
| | | and a.perimeter like concat('%',#{orderDetail.perimeter},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.price != null and orderDetail.price != ''"> |
| | | and a.price like concat('%',#{orderDetail.price},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.grossAmount != null and orderDetail.grossAmount != ''"> |
| | | and a.gross_amount like concat('%',#{orderDetail.grossAmount},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.alType != null and orderDetail.order.alType != ''"> |
| | | and b.al_type like concat('%',#{orderDetail.order.alType},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.salesman != null and orderDetail.order.salesman != ''"> |
| | | and b.salesman like concat('%',#{orderDetail.order.salesman},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.deliveryAddress != null and orderDetail.order.deliveryAddress != ''"> |
| | | and b.delivery_address like concat('%',#{orderDetail.order.deliveryAddress},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.creator != null and orderDetail.order.creator != ''"> |
| | | and b.creator like concat('%',#{orderDetail.order.creator},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.totalThickness != null and orderDetail.totalThickness != ''"> |
| | | and c.total_thickness like concat('%',#{orderDetail.totalThickness},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.levelOne != null and orderDetail.levelOne != ''"> |
| | | and d.type_name like concat('%',#{orderDetail.levelOne},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.levelTwo != null and orderDetail.levelTwo != ''"> |
| | | and e.type_name like concat('%',#{orderDetail.levelTwo},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.customerBatch != null and orderDetail.order.customerBatch != ''"> |
| | | and b.customer_batch like concat('%',#{orderDetail.order.customerBatch},'%') |
| | | </if> |
| | | order by a.id desc |
| | | limit #{offset},#{pageSize} |
| | | </select> |
| | | <select id="getOrderReportTotal" > |
| | | SELECT |
| | | CEILING(count(a.id)/#{pageSize}) as 'pageTotal', |
| | | count(a.id) as 'total' |
| | | from order_detail as a |
| | | left join sd.`order` as b |
| | | on b.order_id = a.order_id |
| | | left join sd.product as c |
| | | on c.id = a.product_id |
| | | left join sd.basic_glass_type as d |
| | | on d.type_id = c.type_id |
| | | left join sd.basic_glass_type as e |
| | | on e.type_id = d.belong |
| | | where date(b.create_time)>=#{startDate} and date(b.create_time) <= #{endDate} |
| | | <if test="orderDetail.order!=null and (orderDetail.order.orderType != null and orderDetail.order.orderType != '')"> |
| | | and b.order_type like concat('%',#{orderDetail.order.orderType},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.customerId != null and orderDetail.order.customerId != ''"> |
| | | and b.customer_id like concat('%',#{orderDetail.order.customerId},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.project != null and orderDetail.order.project != ''"> |
| | | and b.project like concat('%',#{orderDetail.order.project},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.orderId != null and orderDetail.order.orderId != ''"> |
| | | and b.order_id like concat('%',#{orderDetail.order.orderId},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.batch != null and orderDetail.order.batch != ''"> |
| | | and b.batch like concat('%',#{orderDetail.order.batch},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.productId != null and orderDetail.productId != ''"> |
| | | and a.product_id like concat('%',#{orderDetail.productId},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.productName != null and orderDetail.productName != ''"> |
| | | and a.product_name like concat('%',#{orderDetail.productName},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.orderNumber != null and orderDetail.orderNumber != ''"> |
| | | and a.order_number like concat('%',#{orderDetail.orderNumber},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.width != null and orderDetail.width != ''"> |
| | | and a.width like concat('%',#{orderDetail.width},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.height != null and orderDetail.height != ''"> |
| | | and a.height like concat('%',#{orderDetail.height},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.quantity != null and orderDetail.quantity != ''"> |
| | | and a.quantity like concat('%',#{orderDetail.quantity},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.bendRadius != null and orderDetail.bendRadius != ''"> |
| | | and a.bend_radius like concat('%',#{orderDetail.bendRadius},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.grossArea != null and orderDetail.grossArea != ''"> |
| | | and a.gross_area like concat('%',#{orderDetail.grossArea},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.computeGrossArea != null and orderDetail.computeGrossArea != ''"> |
| | | and a.compute_gross_area like concat('%',#{orderDetail.computeGrossArea},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.shape != null and orderDetail.shape != ''"> |
| | | and a.shape like concat('%',#{orderDetail.shape},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.edgingType != null and orderDetail.edgingType != ''"> |
| | | and a.edging_type like concat('%',#{orderDetail.edgingType},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.processingNote != null and orderDetail.order.processingNote != ''"> |
| | | and b.processing_note like concat('%',#{orderDetail.order.processingNote},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.processingNote != null and orderDetail.processingNote != ''"> |
| | | and a.processing_note like concat('%',#{orderDetail.processingNote},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.icon != null and orderDetail.order.icon != ''"> |
| | | and b.icon like concat('%',#{orderDetail.order.icon},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.packType != null and orderDetail.order.packType != ''"> |
| | | and b.pack_type like concat('%',#{orderDetail.order.packType},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.perimeter != null and orderDetail.perimeter != ''"> |
| | | and a.perimeter like concat('%',#{orderDetail.perimeter},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.price != null and orderDetail.price != ''"> |
| | | and a.price like concat('%',#{orderDetail.price},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.grossAmount != null and orderDetail.grossAmount != ''"> |
| | | and a.gross_amount like concat('%',#{orderDetail.grossAmount},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.alType != null and orderDetail.order.alType != ''"> |
| | | and b.al_type like concat('%',#{orderDetail.order.alType},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.salesman != null and orderDetail.order.salesman != ''"> |
| | | and b.salesman like concat('%',#{orderDetail.order.salesman},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.deliveryAddress != null and orderDetail.order.deliveryAddress != ''"> |
| | | and b.delivery_address like concat('%',#{orderDetail.order.deliveryAddress},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.creator != null and orderDetail.order.creator != ''"> |
| | | and b.creator like concat('%',#{orderDetail.order.creator},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.totalThickness != null and orderDetail.totalThickness != ''"> |
| | | and c.total_thickness like concat('%',#{orderDetail.totalThickness},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.levelOne != null and orderDetail.levelOne != ''"> |
| | | and d.type_name like concat('%',#{orderDetail.levelOne},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.levelTwo != null and orderDetail.levelTwo != ''"> |
| | | and e.type_name like concat('%',#{orderDetail.levelTwo},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.customerBatch != null and orderDetail.order.customerBatch != ''"> |
| | | and b.customer_batch like concat('%',#{orderDetail.order.customerBatch},'%') |
| | | </if> |
| | | order by a.id desc |
| | | </select> |
| | | |
| | | <select id="exportOrderReport"> |
| | | SELECT |
| | | *, |
| | | a.create_time as createTime, |
| | | d.type_name as levelOne, |
| | | e.type_name as levelTwo |
| | | from order_detail as a |
| | | left join sd.`order` as b |
| | | on b.order_id = a.order_id |
| | | left join sd.product as c |
| | | on c.id = a.product_id |
| | | left join sd.basic_glass_type as d |
| | | on d.type_id = c.type_id |
| | | left join sd.basic_glass_type as e |
| | | on e.type_id = d.belong |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.example.erp.mapper.sd.OrderOtherMoneyMapper"> |
| | | <select id="findById"> |
| | | select |
| | | a.*, |
| | | b.alias |
| | | from order_other_money as a |
| | | left join basic_other_money as b |
| | | on a.`column` = b.`column` |
| | | where a.order_id = #{orderId} |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.example.erp.mapper.sd.OrderProcessDetailMapper"> |
| | | |
| | | <insert id="insertOrderProcessDetail" > |
| | | insert into |
| | | order_process_detail( |
| | | order_id, |
| | | order_number, |
| | | technology_number, |
| | | process, |
| | | process_id |
| | | ) |
| | | values |
| | | <foreach collection ="processDetailList" item="processDetail" separator =","> |
| | | ( |
| | | #{processDetail.orderId}, |
| | | #{processDetail.orderNumber}, |
| | | #{processDetail.technologyNumber}, |
| | | #{processDetail.process}, |
| | | #{processDetail.processId} |
| | | ) |
| | | </foreach> |
| | | |
| | | |
| | | </insert> |
| | | <update id="updateQuantity"> |
| | | update sd.order_process_detail as a |
| | | inner join |
| | | (select |
| | | rwd.completed_quantity, |
| | | rwd.breakage_quantity, |
| | | rw.process_id, |
| | | rwd.order_number, |
| | | rwd.technology_number |
| | | from pp.reporting_work_detail as rwd |
| | | left join pp.reporting_work as rw |
| | | on rwd.reporting_work_id = rw.reporting_work_id |
| | | where rwd.reporting_work_id =#{reportingWorkId} ) as b |
| | | on a.process_id = b.process_id |
| | | and a.order_number = b.order_number |
| | | and a.technology_number = b.technology_number |
| | | |
| | | <if test="type == 'delete'"> |
| | | set a.reporting_work_num_count |
| | | = a.reporting_work_num_count-b.completed_quantity, |
| | | |
| | | a.reporting_work_num |
| | | = a.reporting_work_num-b.completed_quantity, |
| | | |
| | | a.broken_num |
| | | = a.broken_num-b.breakage_quantity |
| | | </if> |
| | | |
| | | <if test="type == 'add'"> |
| | | set a.reporting_work_num_count |
| | | = a.reporting_work_num_count+b.completed_quantity, |
| | | |
| | | a.reporting_work_num |
| | | = a.reporting_work_num+b.completed_quantity, |
| | | |
| | | a.broken_num |
| | | = a.broken_num+b.breakage_quantity |
| | | </if> |
| | | |
| | | where a.process = #{process} |
| | | |
| | | </update> |
| | | |
| | | <!--查询筛选后唯一的流程卡号--> |
| | | <select id="filterOrderProcess"> |
| | | select id,process,order_number,technology_number |
| | | from order_process_detail |
| | | where order_id = #{orderId} |
| | | group by process |
| | | |
| | | </select> |
| | | |
| | | <select id="filterLastProcess"> |
| | | select id,process,order_number,technology_number |
| | | from order_process_detail |
| | | where order_id = #{orderId} |
| | | and order_number = #{orderNumber} |
| | | and technology_number = #{technologyNumber} |
| | | and id > #{id} |
| | | group by process |
| | | </select> |
| | | |
| | | |
| | | |
| | | <select id="getGlassLRow"> |
| | | select |
| | | max(a.technology_number) as rowCount, |
| | | RowNum |
| | | from order_process_detail as a |
| | | left join |
| | | (select min((@i:=@i+1)) AS RowNum,c.* |
| | | from sd.order_glass_detail as c, |
| | | (SELECT @i:=-1) as d |
| | | where order_id = #{orderId} |
| | | GROUP BY order_number |
| | | ) as b |
| | | on b.order_number = a.order_number |
| | | where a.order_id = #{orderId} |
| | | group by a.order_number |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.example.erp.mapper.sd.ProductDetailMapper"> |
| | | <select id="getGlassDetailList"> |
| | | select * from product_detail where prod_id = #{productId} and detail_type = 'glass' |
| | | </select> |
| | | |
| | | <insert id="insertList"> |
| | | insert into product_detail ( |
| | | prod_id, sort_num, glass_sort, detail_type, detail, glass_group, process,separation |
| | | ) |
| | | values |
| | | <foreach collection ="getProductDetails" item="ProductDetail" separator =","> |
| | | ( |
| | | #{ProductDetail.prodId}, |
| | | #{ProductDetail.sortNum}, |
| | | #{ProductDetail.glassSort}, |
| | | #{ProductDetail.detailType}, |
| | | #{ProductDetail.detail}, |
| | | #{ProductDetail.glassGroup}, |
| | | #{ProductDetail.process}, |
| | | #{ProductDetail.separation} |
| | | ) |
| | | </foreach> |
| | | </insert> |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.example.erp.mapper.sd.ProductMapper"> |
| | | <resultMap id="productMap" type="com.example.erp.entity.sd.Product" > |
| | | <id column="id" property="id"/> |
| | | <result column="product_name" property="productName"/> |
| | | <result column="product" property="productName"/> |
| | | <result column="total_thickness" property="totalThickness"/> |
| | | <result column="thickness" property="thickness"/> |
| | | <result column="query" property="query"/> |
| | | <result column="remarks" property="remarks"/> |
| | | <result column="state" property="state"/> |
| | | <result column="creator" property="creator"/> |
| | | <result column="create_time" property="createTime"/> |
| | | <result column="update_time" property="updateTime"/> |
| | | <!--接收其他外键实体类数据--> |
| | | <association property="basicGlassType" javaType="com.example.erp.entity.sd.BasicGlassType"> |
| | | <result column="type_id" property="typeID"/> |
| | | <result column="type_name" property="typeName"/> |
| | | </association> |
| | | |
| | | <!--<result column="g_typeId" property="glassTypes.typeId"/> |
| | | <result column="g_type" property="glassTypes.type"/>--> |
| | | |
| | | </resultMap> |
| | | |
| | | <select id="defaultProduct" resultMap="productMap"> |
| | | select a.id , |
| | | a.product_name, |
| | | a.total_thickness, |
| | | a.thickness, |
| | | a.query, |
| | | a.remarks, |
| | | a.state, |
| | | a.creator, |
| | | date(a.create_time) as create_time, |
| | | a.update_time as update_time, |
| | | a.type_id as type_id, |
| | | bgt.type_name |
| | | from product as a |
| | | left join basic_glass_type bgt on bgt.type_id = a.type_id |
| | | <where> |
| | | <if test="glassTypeId != null and glassTypeId != ''"> |
| | | and a.type_id regexp #{glassTypeId} |
| | | </if> |
| | | <if test="product.id != null and product.id != ''"> |
| | | and a.id regexp #{product.id} |
| | | </if> |
| | | <if test="product.productName != null and product.productName != ''"> |
| | | and a.product_name regexp #{product.productName} |
| | | </if> |
| | | <if test="product.basicGlassType.typeName != null and product.basicGlassType.typeName!= ''"> |
| | | and bgt.type_name regexp #{product.basicGlassType.typeName} |
| | | </if> |
| | | <if test="product.query != null and product.query != ''"> |
| | | and a.query regexp #{product.query} |
| | | </if> |
| | | <if test="product.creator != null and product.creator != ''"> |
| | | and a.creator regexp #{product.creator} |
| | | </if> |
| | | <if test="product.createTime != null and product.createTime != ''"> |
| | | and date(a.create_time) regexp #{product.createTime} |
| | | </if> |
| | | </where> |
| | | |
| | | order by id desc |
| | | limit #{offset},#{pageSize} |
| | | ; |
| | | </select> |
| | | |
| | | <select id="getPageTotal" > |
| | | select |
| | | CEILING(count(a.id)/#{pageSize}) |
| | | from product as a |
| | | left join basic_glass_type bgt on bgt.type_id = a.type_id |
| | | <where> |
| | | <if test="glassTypeId != null and glassTypeId != ''"> |
| | | and a.type_id regexp #{glassTypeId} |
| | | </if> |
| | | <if test="product.id != null and product.id != ''"> |
| | | and a.id regexp #{product.id} |
| | | </if> |
| | | <if test="product.productName != null and product.productName != ''"> |
| | | and a.product_name regexp #{product.productName} |
| | | </if> |
| | | <if test="product.basicGlassType.typeName != null and product.basicGlassType.typeName!= ''"> |
| | | and bgt.type_name regexp #{product.basicGlassType.typeName} |
| | | </if> |
| | | <if test="product.query != null and product.query != ''"> |
| | | and a.query regexp #{product.query} |
| | | </if> |
| | | <if test="product.creator != null and product.creator != ''"> |
| | | and a.creator regexp #{product.creator} |
| | | </if> |
| | | <if test="product.createTime != null and product.createTime != ''"> |
| | | and date(a.create_time) regexp #{product.createTime} |
| | | </if> |
| | | </where> |
| | | |
| | | order by a.id desc |
| | | limit #{offset},#{pageSize} |
| | | ; |
| | | </select> |
| | | |
| | | <update id="updateProductStateById"> |
| | | update product set state = #{state} where id = #{id} |
| | | </update> |
| | | </mapper> |