Merge remote-tracking branch 'origin/master'
# Conflicts:
# admin-web/src/views/stock/procure/purchaseOrder/index.vue
5个文件已添加
27个文件已删除
80个文件已修改
| | |
| | | <title><%= webpackConfig.name %></title> |
| | | </head> |
| | | <body> |
| | | <script type="text/javascript" src="<%= BASE_URL %>static/config.js"></script> |
| | | <script src="<%= BASE_URL %>static/tinymce4.7.5/tinymce.min.js"></script> |
| | | <script src="<%= BASE_URL %>static/js/jquery.min.js"></script> |
| | | <script src="<%= BASE_URL %>static/js/reconnecting-websocket.js"></script> |
| | | <script src="<%= BASE_URL %>static/js/niuniucapture.js"></script> |
| | | <script src="<%= BASE_URL %>static/js/capturewrapper.js"></script> |
| | | <script src="https://map.qq.com/api/gljs?v=1.exp&key=PGNBZ-XZ7C3-MPE34-OF2VP-7MRH6-BOFUG"></script> |
| | | <div id="app"></div> |
| | | <!-- built files will be auto injected --> |
| | |
| | | |
| | | // è¯·æ±æ¥å£å°å å¦ææ²¡æé
ç½®èªå¨è·åå½åç½åè·¯å¾ |
| | | const VUE_APP_API_URL = process.env.VUE_APP_BASE_API || `${location.origin}`; |
| | | const VUE_APP_WS_URL = |
| | | process.env.VUE_APP_WS_URL || (location.protocol === 'https' ? 'wss' : 'ws') + ':' + location.hostname; |
| | | |
| | | const SettingIplatform = { |
| | | // æå¡å¨å°å |
| | | // æå¡å¨å°å |
| | | httpUrl: VUE_APP_API_URL, |
| | | // ä¸ä¼ è·¯å¾ |
| | | ftpUrl: 'https://yqzx.jinmingyuan.com/lowConsum',//å¼å |
| | | // ftpUrl:'https://jmy.jinmingyuan.com/progress',// æµè¯, |
| | | // æ¥å£è¯·æ±å°å |
| | | // apiBaseURL: 'http://116.198.39.83:8082/progress', // æ£å¼ |
| | | // apiBaseURL: 'http://172.16.60.90:8082/progress',//å¼å |
| | | // æ¥å£è¯·æ±å°å |
| | | apiBaseURL: 'http://172.16.20.2:8083/lowConsum',//å¼å |
| | | // apiBaseURL: 'https://yqzx.jinmingyuan.com/lowConsum',//å¼å |
| | | // apiBaseURL: 'https://jmy.jinmingyuan.com/progress',// æµè¯, |
| | | // socketè¿æ¥ |
| | | wsSocketUrl: VUE_APP_WS_URL, |
| | | debug: true //è°è¯å¼å
³ trueæ¶ä¼è¾åºè¯·æ±æ¥å¿ |
| | | debug: false //è°è¯å¼å
³ trueæ¶ä¼è¾åºè¯·æ±æ¥å¿ |
| | | }; |
| | | |
| | | export default SettingIplatform; |
| | |
| | | <el-input |
| | | :type="item.inputType || 'text'" |
| | | v-if="item.type === 'text'" |
| | | :placeholder="item.placeholder || ''" |
| | | :placeholder="item.placeholder || '请è¾å
¥'" |
| | | @change="(e) => inputChange(e)" |
| | | :clearable="true" |
| | | v-model="val" |
| | |
| | | <el-cascader |
| | | v-model="val" |
| | | v-if="item.type === 'cascader'" |
| | | :placeholder="item.placeholder || 'è¯·éæ©'" |
| | | :options="item.options" |
| | | :props="item.optionsConfig.props||{ checkStrictly: true,emitPath: false,value: 'id' }" |
| | | :show-all-levels="false" |
| | |
| | | <!-- 䏿--> |
| | | <el-select |
| | | v-if="item.type === 'select'" |
| | | :placeholder="item.placeholder || ''" |
| | | :placeholder="item.placeholder || 'è¯·éæ©'" |
| | | v-model="val" |
| | | filterable |
| | | :multiple="item.multiple || false" |
| | |
| | | <!--æ¶é´--> |
| | | <el-time-select |
| | | v-if="item.type === 'time-picker'" |
| | | :placeholder="item.placeholder || ''" |
| | | :placeholder="item.placeholder || 'è¯·éæ©'" |
| | | v-model="val" |
| | | :clearable="true" |
| | | style="width: 150px" |
| | |
| | | v-model="val" |
| | | type="year" |
| | | :clearable="true" |
| | | :placeholder="item.placeholder || 'è¯·éæ©'" |
| | | style="width: 150px" |
| | | :value-format="item.format?item.format:'yyyy'" |
| | | @change="(v) => panelChange(v, 'yyyy')" |
| | | /> |
| | | <!--æéæ©å¨--> |
| | |
| | | v-model="val" |
| | | type="month" |
| | | :clearable="true" |
| | | :placeholder="item.placeholder || 'è¯·éæ©'" |
| | | style="width: 150px" |
| | | :value-format="item.format?item.format:'yyyyMM'" |
| | | @change="(v) => panelChange(v, 'yyyy-MM')" |
| | | /> |
| | | <!--æ¥éæ©å¨--> |
| | |
| | | v-model="val" |
| | | type="date" |
| | | :clearable="true" |
| | | :placeholder="item.placeholder || 'è¯·éæ©'" |
| | | style="width: 150px" |
| | | :value-format="item.format?item.format:'yyyyMMdd'" |
| | | @change="(v) => panelChange(v, 'yyyy-MM-dd')" |
| | | /> |
| | | <!--æ¥æå¸¦æ¶é´éæ©å¨--> |
| | |
| | | v-model="val" |
| | | type="datetime" |
| | | :clearable="true" |
| | | :placeholder="item.placeholder || 'è¯·éæ©'" |
| | | style="width: 150px" |
| | | format="yyyy-MM-dd HH:mm:ss" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | |
| | | v-if="item.type === 'datetimerange-picker'" |
| | | v-model="val" |
| | | style="width: 378px" |
| | | :placeholder="item.placeholder || ''" |
| | | :placeholder="item.placeholder || 'è¯·éæ©'" |
| | | type="datetimerange" |
| | | :pickerOptions='pickerOptions' |
| | | :disabled="item.disabled" |
| | |
| | | } |
| | | }, |
| | | panelChange(v, type) { |
| | | var info = null |
| | | if (v && this.item.type !== 'date-time-picker') { |
| | | info = formatDates(v, type) |
| | | } else { |
| | | info = v |
| | | } |
| | | this.val = info |
| | | this.$emit('change', info) |
| | | this.$emit('change', v) |
| | | }, |
| | | filterOption(input, option) { |
| | | return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0; |
| | |
| | | title: 'éä»¶ä¸ä¼ ', |
| | | max: 100, // æå¤§å¤§å°ï¼åä½M |
| | | num: 10, // æ¯æä¸ä¼ å¾çä¸ªæ° |
| | | accept: '.jpg,.jpeg,.png,.bmp,.pdf,.doc,.docx,.xls,.xlsx,.apk,.zip', // éå¶æ ¼å¼ |
| | | accept: '.jpg,.jpeg,.png,.pdf,.doc,.docx,.xls,.xlsx', // éå¶æ ¼å¼ |
| | | tip: '', // æç¤º é»è®¤ï¼`åªè½ä¸ä¼ ${this.defaultSettings.num}个${this.defaultSettings.accept}æä»¶ï¼ä¸ä¸è¶
è¿${this.defaultSettings.max}kb` |
| | | uploadUrl: '', // ä¸ä¼ è·¯å¾ |
| | | multiple: true, // æ¯å¦æ¯ææ¹éä¸ä¼ |
| | |
| | | if (obj.url.indexOf('http') !== 0) { |
| | | url = SettingIplatform.ftpUrl + url |
| | | } |
| | | window.open(routeUrl.href + '?url=' + encodeURIComponent(url) + '&docName=' + encodeURIComponent(encodeURIComponent(obj.fileName)), '_blank') |
| | | const newWindow = window.open(routeUrl.href + '?url=' + encodeURIComponent(url) + '&docName=' + encodeURIComponent(encodeURIComponent(obj.fileName)), '_blank') |
| | | if (newWindow) newWindow.opener = null |
| | | } else { |
| | | Message.warning('æä»¶æ ¼å¼ä¸æ¯æé¢è§ï¼') |
| | | } |
| | |
| | | |
| | | // è¯·æ±æ¥å£å°å å¦ææ²¡æé
ç½®èªå¨è·åå½åç½åè·¯å¾ |
| | | const VUE_APP_API_URL = process.env.VUE_APP_BASE_API || `${location.origin}`; |
| | | const VUE_APP_WS_URL = |
| | | process.env.VUE_APP_WS_URL || (location.protocol === 'https' ? 'wss' : 'ws') + ':' + location.hostname; |
| | | |
| | | import config from '../../public/static/config.js' |
| | | const SettingIplatform = { |
| | | // æå¡å¨å°å |
| | | httpUrl: VUE_APP_API_URL, |
| | | // ä¸ä¼ è·¯å¾ |
| | | ftpUrl: 'https://yqzx.jinmingyuan.com/lowConsum',//å¼å |
| | | // ftpUrl:'https://jmy.jinmingyuan.com/progress',// æµè¯, |
| | | // æ¥å£è¯·æ±å°å |
| | | // apiBaseURL: 'http://116.198.39.83:8082/progress', // æ£å¼ |
| | | // apiBaseURL: 'http://172.16.60.90:8082/progress',//å¼å |
| | | // apiBaseURL: 'http://172.16.60.175:8083/lowConsum',//å¼å |
| | | apiBaseURL: 'http://172.16.20.2:8083/lowConsum',//å¼å |
| | | // apiBaseURL: 'https://yqzx.jinmingyuan.com/lowConsum',//å¼å |
| | | // apiBaseURL: 'https://jmy.jinmingyuan.com/progress',// æµè¯, |
| | | // socketè¿æ¥ |
| | | wsSocketUrl: VUE_APP_WS_URL, |
| | | ftpUrl: config.ftpUrl, |
| | | // æ¥å£è¯·æ±å°å |
| | | apiBaseURL: config.apiBaseURL, |
| | | }; |
| | | |
| | | export default SettingIplatform; |
| | |
| | | function stockType(row) { |
| | | let result = ''; |
| | | let arr = ['éè´å
¥åº', 'è°æ¨', 'å
¶ä»åºåº', 'é¨é¨åå', 'æ¥åºåºåº', 'é¨é¨ç©ååéä»åº', 'ç©åçç¹']; |
| | | let arr = ['éè´å
¥åº', 'è°æ¨', 'å
¶ä»åºåº', 'é¨é¨åå', 'æ¥åºåºåº', 'ç©åéå', 'ç©åçç¹']; |
| | | if (row.businessType == 7) { |
| | | if (row.thisType == 1) { |
| | | result = 'ççå
¥åº'; |
| | |
| | | <el-col :span="24"> |
| | | <el-form> |
| | | <el-form-item v-if="templateSettings.templateUrl != null" label="ä¸è½½æ¨¡æ¿ï¼" prop="lon"> |
| | | <a class="blue-txt" style="color:#409EFF" :href="templateSettings.templateUrl" target="_blank">{{ templateSettings.templateName }}</a> |
| | | <a class="blue-txt" style="color:#409EFF" :href="templateSettings.templateUrl" target="_blank" rel="noreferrer noopener">{{ templateSettings.templateName }}</a> |
| | | </el-form-item> |
| | | <el-form-item label="éåæä»¶ï¼" prop="lon"> |
| | | <el-upload |
| | |
| | | <div class="table-tool-bar" style="margin-bottom: 15px"> |
| | | <my-button name="æ°å¢" @click="handleAdd" site="tools" size="medium" /> |
| | | </div> |
| | | <div :style="{ 'overflow-y': 'auto', height: `${clientHeight - 320}px` }" v-loading="loading"> |
| | | <div :style="{ 'overflow-y': 'auto', height: `calc(100vh - 320px)` }" v-loading="loading"> |
| | | <el-row v-if="list.length" class="card" :gutter="5"> |
| | | <el-col v-for="(item, index) in list" :key="index" class="cm-item"> |
| | | <el-card class="card-data"> |
| | |
| | | <div class="table-tool-bar" style="margin-bottom: 15px;"> |
| | | <my-button name="æ°å¢" @click="handleAdd" site="tools" size="medium" /> |
| | | </div> |
| | | <div :style="{ 'overflow-y': 'auto', height: `${clientHeight - 320}px` }" v-loading="loading"> |
| | | <div :style="{ 'overflow-y': 'auto', height: 'calc(100vh - 352px)' }" v-loading="loading"> |
| | | <el-row v-if="list.length" class="card" :gutter="5"> |
| | | <el-col v-for="(item, index) in list" :key="index" class="cm-item"> |
| | | <el-card class="card-data"> |
| | |
| | | <div class="table-tool-bar" style="margin-bottom: 15px;"> |
| | | <my-button name="æ°å¢" @click="handleAdd" site="tools" size="medium" /> |
| | | </div> |
| | | <div :style="{ 'overflow-y': 'auto', height: `${clientHeight - 320}px` }" v-loading="loading"> |
| | | <div :style="{ 'overflow-y': 'auto', height: 'calc(100vh - 352px)' }" v-loading="loading"> |
| | | <el-row v-if="list.length" class="card" :gutter="5"> |
| | | <el-col v-for="(item, index) in list" :key="index" class="cm-item"> |
| | | <el-card class="card-data"> |
| | |
| | | increases the possibility of page problems, a small negligence may lead to the entire page deadlock. Fortunately |
| | | Vue provides a way to catch handling exceptions, where you can handle errors or report exceptions. |
| | | <a |
| | | rel="noreferrer noopener" |
| | | target="_blank" |
| | | class="link-type" |
| | | href="https://panjiachen.github.io/vue-element-admin-site/guide/advanced/error.html" |
| | |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <h1 class="text-jumbo text-ginormous">Oops!</h1> |
| | | gifæ¥æº<a href="https://zh.airbnb.com/" target="_blank">airbnb</a> é¡µé¢ |
| | | gifæ¥æº<a href="https://zh.airbnb.com/" target="_blank" rel="noreferrer noopener">airbnb</a> é¡µé¢ |
| | | <h2>ä½ æ²¡ææéå»è¯¥é¡µé¢</h2> |
| | | <h6>妿䏿»¡è¯·èç³»ä½ é¢å¯¼</h6> |
| | | <ul class="list-unstyled"> |
| | |
| | | <div class="table-tool-bar" style="margin-bottom: 15px;"> |
| | | <my-button name="æ°å¢" @click="handleAdd" site="tools" size="medium" /> |
| | | </div> |
| | | <div :style="{ 'overflow-y': 'auto', height: `${clientHeight - 320}px` }" v-loading="loading"> |
| | | <el-row v-if="list.length" class="card" :gutter="5"> |
| | | <el-col v-for="(item, index) in list" :key="index" class="cm-item"> |
| | | <el-card class="card-data"> |
| | | <div class="card-container"> |
| | | <div class="card-header"> |
| | | <div class="card-header-left"> |
| | | <span>åºåºåå·ï¼</span> |
| | | <span class="value">{{ item.businessFormCode }}</span> |
| | | </div> |
| | | <div class="card-header-right"> |
| | | <div> |
| | | <div :style="{ 'overflow-y': 'auto', height: 'calc(100vh - 352px)' }" v-loading="loading"> |
| | | <el-row v-if="list.length" class="card" :gutter="5"> |
| | | <el-col v-for="(item, index) in list" :key="index" class="cm-item"> |
| | | <el-card class="card-data"> |
| | | <div class="card-container"> |
| | | <div class="card-header"> |
| | | <div class="card-header-left"> |
| | | <span>åºåºåå·ï¼</span> |
| | | <span class="value">{{ item.businessFormCode }}</span> |
| | | </div> |
| | | <div class="card-header-right"> |
| | | <el-button site="form" type="success" size="mini" @click="handleExport(item)" |
| | | >导åºåºåºå</el-button |
| | | >导åºåºåºå</el-button |
| | | > |
| | | <el-button name="æ¥ç详æ
" site="form" type="info" size="mini" @click="handleDetail(item)" |
| | | <el-button name="æ¥ç详æ
" site="form" type="info" size="mini" @click="handleDetail(item)" |
| | | >æ¥ç详æ
</el-button |
| | | > |
| | | > |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="one-hed"> |
| | | <div class="box"><span class="span-two">æºæï¼</span>{{ item.agencyName }}</div> |
| | | <div class="box"><span class="span-two">æä½äººï¼</span>{{ item.operatorName }}</div> |
| | | <div class="box"> |
| | | <span class="span-two">åºåºæ¶é´ï¼</span>{{ item.dealTime | formatTime }} |
| | | <div class="one-hed"> |
| | | <div class="box"><span class="span-two">æºæï¼</span>{{ item.agencyName }}</div> |
| | | <div class="box"><span class="span-two">æä½äººï¼</span>{{ item.operatorName }}</div> |
| | | <div class="box"> |
| | | <span class="span-two">åºåºæ¶é´ï¼</span>{{ item.dealTime | formatTime }} |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="card-end"> |
| | | <div v-for="(just, index) in item.formOutputTemplateInfoList" :key="index" class="item"> |
| | | <div class="name">{{ just.goodsName }}</div> |
| | | <div class="value-box"> |
| | | <div class="value-box-item"> |
| | | <span class="label">æ°éï¼</span> |
| | | <span class="value">{{ just.count }}</span> |
| | | <span class="unit">{{ just.unit }}</span> |
| | | <div class="card-end"> |
| | | <div v-for="(just, index) in item.formOutputTemplateInfoList" :key="index" class="item"> |
| | | <div class="name">{{ just.goodsName }}</div> |
| | | <div class="value-box"> |
| | | <div class="value-box-item"> |
| | | <span class="label">æ°éï¼</span> |
| | | <span class="value">{{ just.count }}</span> |
| | | <span class="unit">{{ just.unit }}</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </el-card> |
| | | </el-col> |
| | | </el-row> |
| | | <div class="no-data" v-else>ææ æ°æ®</div> |
| | | </el-card> |
| | | </el-col> |
| | | </el-row> |
| | | <div class="no-data" v-else>ææ æ°æ®</div> |
| | | </div> |
| | | </div> |
| | | |
| | | <el-pagination |
| | | :small="false" |
| | | :current-page="pageNum" |
| | |
| | | <el-row style="margin-top: 15px"> |
| | | <el-col> |
| | | <!--å表--> |
| | | <my-table-v2 ref="myTable" :filter="filterFrom" :table="table" /> |
| | | <my-table-v2 ref="myTable" :filter="filterFrom" :table="table"/> |
| | | </el-col> |
| | | </el-row> |
| | | <!--æ·»å /ç¼è¾å¼¹çª--> |
| | | <detail v-if="detailSetting.show" :setting="detailSetting" @close="detailSetting.show = false" /> |
| | | <!-- <detail/>--> |
| | | <component v-if="detailSetting.show" :setting="detailSetting" @close="detailSetting.show = false" |
| | | :is="activeDetail"></component> |
| | | </el-card> |
| | | </el-container> |
| | | </el-container> |
| | |
| | | import MyTableV2 from '@/components/myTable/myTableV2'; |
| | | import MyButton from '@/components/myButton/myButton'; |
| | | import SettingIplatform from '@/utils/settingIplatform'; |
| | | import detail from '../outbound/detail'; |
| | | import * as finsystenant from '@/api/baseSetting/finsystenant'; |
| | | import myImport from '@/views/components/myImport'; |
| | | import { goodsTemplate, goodsModel } from '@/api/baseSetting/finsystenant'; |
| | | import { outputDtailList } from '@/api/stock/accessStock'; |
| | | import * as DateFormatter from '@/utils/DateFormatter'; |
| | | import stockType from '@/utils/stockType'; |
| | | import detail from '../outbound/detail'; |
| | | import purchaseDetail from '@/views/stock/procure/purchaseOrder/detail.vue';// éè´å详æ
|
| | | import transferDetail from '@/views/stock/transfer/transferissue/detail.vue';// è°æ¨å详æ
|
| | | import inventoryDetail from '@/views/stock/inventorycount/inventorytask/detail.vue';// çç¹å详æ
|
| | | import scrapDetail from '@/views/stock/scrap/itemScrapping/detail.vue';// æ¥åºå详æ
|
| | | import distributionDetail from '@/views/departmentitem/itemdis/distribution/detail.vue';// ååå详æ
|
| | | import itemscrDetail from '@/views/departmentitem/itemscr/scrapping/detail.vue';// é¨é¨æ¥åºå详æ
|
| | | import returnNoteDetail from '@/views/departmentitem/itemret/returnNote/detail.vue';// é¨é¨éè¿å详æ
|
| | | |
| | | export default { |
| | | name: 'index', |
| | | components: { MyButton, MyTableV2, detail, myImport }, |
| | | components: { |
| | | MyButton, |
| | | MyTableV2, |
| | | detail, |
| | | myImport, |
| | | purchaseDetail, |
| | | transferDetail, |
| | | inventoryDetail, |
| | | scrapDetail, |
| | | distributionDetail, |
| | | itemscrDetail, |
| | | returnNoteDetail |
| | | }, |
| | | data() { |
| | | return { |
| | | activeDetail: '', |
| | | // æç´¢æ¡ |
| | | items: [ |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'businessFormId', |
| | | dataIndex: 'businessFormCode', |
| | | label: 'åå·', |
| | | placeholder: '请è¾å
¥', |
| | | defaultValue: '', |
| | |
| | | placeholder: 'è¯·éæ©', |
| | | defaultValue: '', |
| | | options: [], |
| | | cascader: [{ key: 'baseGoodsModelsId', queryKey: 'goodsTemplatesId' }], |
| | | cascader: [{key: 'baseGoodsModelsId', queryKey: 'goodsTemplatesId'}], |
| | | optionsConfig: { |
| | | label: 'goodsName', |
| | | value: 'id', |
| | |
| | | dataIndex: 'agencyId', |
| | | label: 'æºæ', |
| | | placeholder: 'è¯·éæ©', |
| | | optionsConfig: { url: '/pc/fin/sys/tenant/select/tree_fin_tenant', props: null }, |
| | | optionsConfig: {url: '/pc/fin/sys/tenant/select/tree_fin_tenant', props: null}, |
| | | defaultValue: '', |
| | | options: [], |
| | | }, |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'createdName', |
| | | dataIndex: 'createName', |
| | | label: 'å建人', |
| | | placeholder: '请è¾å
¥', |
| | | defaultValue: '', |
| | | }, |
| | | { |
| | | type: 'date-picker', |
| | | dataIndex: 'dealTimeStart', |
| | | dataIndex: 'startTime', |
| | | label: 'æ¶é´', |
| | | defaultValue: '', |
| | | }, |
| | | { |
| | | type: 'date-picker', |
| | | dataIndex: 'dealTimeEnd', |
| | | dataIndex: 'endTime', |
| | | label: 'è³', |
| | | defaultValue: '', |
| | | }, |
| | |
| | | }, |
| | | // åä¿¡æ¯ |
| | | columns: [ |
| | | { title: 'ç±»å', field: 'thisType', align: 'left' }, |
| | | { title: 'åå·', field: 'businessFormId', align: 'center' }, |
| | | { title: 'ç©ååç§°', field: 'goodsTemplateName', align: 'center' }, |
| | | { title: 'è§æ ¼åå·', field: 'baseGoodsModelsName', align: 'center' }, |
| | | { title: 'åºå
¥åºæ°é', field: 'thisCount', align: 'left' }, |
| | | { title: 'éé¢', field: 'totalPrice', align: 'left' }, |
| | | { title: 'æå±æºæ', field: 'agencyName', align: 'left' }, |
| | | { title: 'å建人', field: 'createdName', align: 'left' }, |
| | | { |
| | | title: 'ç±»å', field: 'thisType', align: 'left', |
| | | formatter: (row) => { |
| | | let result = stockType(row) |
| | | return {value: result}; |
| | | }, |
| | | }, |
| | | {title: 'åå·', field: 'businessFormCode', align: 'center', width: 130}, |
| | | {title: 'ç©ååç§°', field: 'goodsTemplateName', align: 'left', minWidth: 130}, |
| | | {title: 'è§æ ¼åå·', field: 'baseGoodsModelsName', align: 'left', minWidth: 130}, |
| | | {title: 'åºå
¥åºæ°é', field: 'thisCount', align: 'center', width: 100}, |
| | | {title: 'éé¢', field: 'totalPrice', align: 'center', width: 100}, |
| | | {title: 'æå±æºæ', field: 'agencyName', align: 'left', minWidth: 130}, |
| | | {title: 'å建人', field: 'operatorName', align: 'left', width: 100}, |
| | | { |
| | | title: 'æä½æ¶é´', |
| | | field: 'dealTime', |
| | | align: 'center', |
| | | width: 160, |
| | | formatter: (row) => { |
| | | return { value: DateFormatter.LongToDateTime(row.createTime) }; |
| | | return {value: DateFormatter.LongToDateTime(row.dealTime)}; |
| | | }, |
| | | }, |
| | | ], |
| | | // æä½ä¿¡æ¯ |
| | | operation: { |
| | | show: true, // æ¾ç¤ºæä½å |
| | | width: '150', // å宽 |
| | | width: 100, // å宽 |
| | | attr: [ |
| | | { |
| | | title: '详æ
', |
| | |
| | | }, |
| | | }, |
| | | }, |
| | | components: { |
| | | '1': 'purchaseDetail', |
| | | '2': 'returnNoteDetail', |
| | | '3': 'transferDetail', |
| | | '4': 'inventoryDetail', |
| | | '5': 'itemscrDetail', |
| | | '6': 'transferDetail', |
| | | '7': 'inventoryDetail', |
| | | '8': 'scrapDetail', |
| | | '9': 'detail', |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | }, |
| | | methods: { |
| | | showDetail(row) { |
| | | this.activeDetail = this.components[row.mixType] |
| | | this.detailSetting.id = row.id; |
| | | this.detailSetting.info = JSON.stringify(row); |
| | | this.detailSetting.title = '详æ
'; |
| | |
| | | // æ¥è¯¢tableå表 |
| | | search(pageNum) { |
| | | if (pageNum != undefined) { |
| | | this.$refs.myTable.search(pageNum); |
| | | this.$refs.myTable.search({pageNum}); |
| | | } else { |
| | | this.$refs.myTable.search(); |
| | | } |
| | |
| | | <el-row style="margin-top: 15px"> |
| | | <el-col> |
| | | <!--å表--> |
| | | <my-table-v2 ref="myTable" :filter="filterFrom" :table="table" /> |
| | | <my-table-v2 ref="myTable" :filter="filterFrom" :table="table"/> |
| | | </el-col> |
| | | </el-row> |
| | | </el-card> |
| | |
| | | import MyTableV2 from '@/components/myTable/myTableV2'; |
| | | import MyButton from '@/components/myButton/myButton'; |
| | | import SettingIplatform from '@/utils/settingIplatform'; |
| | | import * as finsystenant from '@/api/baseSetting/finsystenant'; |
| | | import { getBaseUrl } from '@/utils/base'; |
| | | import { mapGetters } from 'vuex'; |
| | | import { selectTenantWarehouse, goodsModel } from '@/api/baseSetting/finsystenant'; |
| | | import { getDicts } from '@/api/system/dict/data'; |
| | | import {mapGetters} from 'vuex'; |
| | | import * as DateFormatter from '@/utils/DateFormatter'; |
| | | |
| | | export default { |
| | | name: 'index', |
| | | components: { MyButton, MyTableV2 }, |
| | | components: {MyButton, MyTableV2}, |
| | | data() { |
| | | return { |
| | | // æç´¢æ¡ |
| | |
| | | dataIndex: 'agencyId', |
| | | label: 'æºæ', |
| | | placeholder: 'è¯·éæ©', |
| | | optionsConfig: { url: '/pc/fin/sys/tenant/select/tree_fin_tenant', props: null }, |
| | | optionsConfig: {url: '/pc/fin/sys/tenant/select/tree_fin_tenant', props: null}, |
| | | defaultValue: '', |
| | | options: [], |
| | | }, |
| | |
| | | placeholder: '请è¾å
¥', |
| | | defaultValue: '', |
| | | options: [], |
| | | cascader: [{ key: 'baseGoodsModelsId', queryKey: 'goodsTemplatesId' }], |
| | | cascader: [{key: 'baseGoodsModelsId', queryKey: 'goodsTemplatesId'}], |
| | | optionsConfig: { |
| | | label: 'goodsName', |
| | | value: 'id', |
| | |
| | | // æ æ°æ® |
| | | treeDataList: [], |
| | | // æç´¢æ¡ä»¶ |
| | | filterFrom: { |
| | | }, |
| | | filterFrom: {}, |
| | | // è¡¨æ ¼æ°æ® |
| | | table: { |
| | | showIndex: true, // æ¯å¦æ¾ç¤ºåºå· |
| | |
| | | }, |
| | | // åä¿¡æ¯ |
| | | columns: [ |
| | | { title: 'ä»åº', field: 'warehouseName', align: 'left' }, |
| | | { title: 'ç©ååç§°', field: 'goodsTemplateName', align: 'center' }, |
| | | { title: 'è§æ ¼åå·', field: 'baseGoodsModelsName', align: 'center' }, |
| | | { title: 'ç±»å', field: 'inventoryResultType', align: 'center' }, |
| | | { title: 'åºåæ°é', field: 'initCounts', align: 'left' }, |
| | | { title: 'çç¹æ°é', field: 'inventoryCounts', align: 'left' }, |
| | | { title: 'å¼å¸¸æ°é', field: 'errorCounts', align: 'left' }, |
| | | {title: 'ä»åº', field: 'warehouseName', align: 'left', width: 140}, |
| | | {title: 'ç©ååç§°', field: 'goodsTemplateName', align: 'left', minWidth: 130}, |
| | | {title: 'è§æ ¼åå·', field: 'baseGoodsModelsName', align: 'left', width: 120}, |
| | | {title: 'ç±»å', field: 'inventoryResultType', align: 'center'}, |
| | | {title: 'åºåæ°é', field: 'initCounts', align: 'left'}, |
| | | {title: 'çç¹æ°é', field: 'inventoryCounts', align: 'left'}, |
| | | {title: 'å¼å¸¸æ°é', field: 'errorCounts', align: 'left'}, |
| | | { |
| | | title: 'åºå
¥åºç±»å', |
| | | field: 'inventoryType', |
| | | align: 'left', |
| | | align: 'center', |
| | | width: 100, |
| | | formatter: (row) => { |
| | | return { value: row.inventoryType, type: row.inventoryType && row.inventoryType.includes('çç') ? 'success' : 'danger' }; |
| | | return { |
| | | value: row.inventoryType, |
| | | type: row.inventoryType && row.inventoryType.includes('çç') ? 'success' : 'danger' |
| | | }; |
| | | }, |
| | | }, |
| | | { title: 'åºå
¥åºåå·', field: 'warehouseFormCode', align: 'left' }, |
| | | { title: 'æºæ', field: 'agencyName', align: 'left' }, |
| | | { title: 'æä½äºº', field: 'operatorName', align: 'left' }, |
| | | {title: 'åºå
¥åºåå·', field: 'warehouseFormCode', align: 'center', width: 130}, |
| | | {title: 'æºæ', field: 'agencyName', align: 'left', width: 130}, |
| | | {title: 'æä½äºº', field: 'operatorName', align: 'center', width: 90}, |
| | | { |
| | | title: 'æä½æ¶é´', |
| | | field: 'operatorTime', |
| | | align: 'center', |
| | | width: 160, |
| | | formatter: (row) => { |
| | | return { value: row.operatorTime ? DateFormatter.LongToDateTime(row.operatorTime) : '-' }; |
| | | return {value: row.operatorTime ? DateFormatter.LongToDateTime(row.operatorTime) : '-'}; |
| | | }, |
| | | }, |
| | | ], |
| | |
| | | computed: { |
| | | ...mapGetters(['userInfo']), |
| | | }, |
| | | created() {}, |
| | | created() { |
| | | }, |
| | | methods: { |
| | | showAudit(row) { |
| | | this.editSetting.id = row.id; |
| | |
| | | <el-table-column prop="baseGoodsModelsName" label="åå·" align="center"> </el-table-column> |
| | | <el-table-column prop="inventoryCount" label="åºçæ°é" align="center"></el-table-column> |
| | | <el-table-column prop="realNum" label="å®çæ°é" align="center"></el-table-column> |
| | | <el-table-column prop="states" label="ç¶æ" align="center"></el-table-column> |
| | | <el-table-column prop="states" label="ç¶æ" align="center"> |
| | | <template slot-scope="{row}"> |
| | | {{row.inventoryResultType}} |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </win-md> |
| | | </template> |
| | |
| | | <template> |
| | | <win-sm :title="`${setting.title}çç¹`" @close="close" :width="'800px'"> |
| | | <el-form ref="ruleForm" :model="formData" :rules="rules" class="demo-ruleForm" label-width="100px"> |
| | | <el-form v-loading="loading" ref="ruleForm" :model="formData" :rules="rules" class="demo-ruleForm" label-width="100px"> |
| | | <el-form-item label="çç¹åå" prop="businessFormName"> |
| | | <el-input |
| | | v-model="formData.businessFormName" |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | loading:true, |
| | | count: 0, |
| | | loading: true, |
| | | checkAll: false, |
| | | checkedList: [], |
| | | warehouseOptions: [], // ä»åºå表 |
| | | operatorOptions: [], |
| | | operatorOptions2: [], |
| | | formData: {}, |
| | | formData: { |
| | | businessFormName: '', |
| | | warehouseId: '', |
| | | operatorUserId: '', |
| | | monitorUserId: '', |
| | | remark: '', |
| | | }, |
| | | rules: { |
| | | businessFormName: [{ required: true, message: '请è¾å
¥', trigger: 'blur' }], |
| | | warehouseId: [{ required: true, message: 'è¯·éæ©', trigger: 'blur' }], |
| | |
| | | // è·åä»åºå表 |
| | | handleSelectTenantWarehouse() { |
| | | selectTenantWarehouse({ agencyId: this.userInfo.tenantId }).then((res) => { |
| | | this.count++ |
| | | this.warehouseOptions = res; |
| | | if(this.count>1){ |
| | | this.loading = false |
| | | } |
| | | }); |
| | | }, |
| | | // è·åçç¹äºº |
| | | getPdr() { |
| | | warehouseManagerList({ tenantId: this.userInfo.tenantId }).then((res) => { |
| | | this.count++ |
| | | this.operatorOptions = res; |
| | | if(this.count>1){ |
| | | this.loading = false |
| | | } |
| | | }); |
| | | }, |
| | | // è·åçç人 |
| | | getJpr() { |
| | | tenantUserQueryUser({ tenantId: this.userInfo.tenantId }).then((res) => { |
| | | this.count++ |
| | | this.operatorOptions2 = res; |
| | | if(this.count>1){ |
| | | this.loading = false |
| | | } |
| | | }); |
| | | }, |
| | | getEditInfo(id) {}, |
| | |
| | | this.$refs.ruleForm.validate((valid) => { |
| | | if (valid) { |
| | | const params = Object.assign({}, this.formData); |
| | | this.loading = true |
| | | if (this.setting.id) { |
| | | // ç¼è¾æ¥å£ |
| | | inventoryEdit(params).then((res) => { |
| | | this.loading = false |
| | | this.$message.success('ä¿åæåï¼'); |
| | | this.close(); |
| | | this.$emit('search'); |
| | | }).catch(()=>{ |
| | | this.loading = false |
| | | }); |
| | | } else { |
| | | inventoryAdd(params).then((res) => { |
| | | this.loading = false |
| | | this.$message.success('ä¿åæåï¼'); |
| | | this.close(); |
| | | this.$emit('search'); |
| | | }).catch(()=>{ |
| | | this.loading = false |
| | | }); |
| | | } |
| | | } else { |
| | |
| | | }, |
| | | // åä¿¡æ¯ |
| | | columns: [ |
| | | { title: 'çç¹åå·', field: 'businessFormCode', align: 'left' }, |
| | | { title: 'ä»»å¡åç§°', field: 'businessFormName', align: 'left' }, |
| | | { title: 'çç¹ä»åº', field: 'warehouseName', align: 'left' }, |
| | | { title: 'çç¹äºº', field: 'operatorName', align: 'left' }, |
| | | { title: 'çç人', field: 'operatorName2', align: 'left' }, |
| | | { title: 'çç¹åå·', field: 'businessFormCode', align: 'center', width: 130 }, |
| | | { title: 'ä»»å¡åç§°', field: 'businessFormName', align: 'left', minWidth: 140 }, |
| | | { title: 'çç¹ä»åº', field: 'warehouseName', align: 'left', minWidth: 130 }, |
| | | { title: 'çç¹äºº', field: 'operatorName', align: 'center', width: 120 }, |
| | | { title: 'çç人', field: 'operatorName2', align: 'center', width: 120 }, |
| | | { |
| | | title: 'çç¹æ¶é´', |
| | | field: 'inventoryDate', |
| | |
| | | { |
| | | title: 'ç¶æ', |
| | | field: 'states', |
| | | align: 'left', |
| | | align: 'center', |
| | | width: 90, |
| | | type: 'primary', |
| | | formatter: (row) => { |
| | | return { |
| | |
| | | }, |
| | | }, |
| | | { |
| | | title: 'ç产çç¹è¡¨', |
| | | title: 'çæçç¹è¡¨', |
| | | type: 'primary', |
| | | hidden: (row) => { |
| | | if (row.states != 2) { |
| | |
| | | <template> |
| | | <win-md :title="setting.title" @close="close" :width="'1200px'"> |
| | | <el-form class="form" ref="ruleForm" :model="formData" :rules="rules"> |
| | | <el-form v-loading="loading" class="form" ref="ruleForm" :model="formData" :rules="rules"> |
| | | <el-row :gutter="20" style="margin-bottom: 20px" type="flex" align="middle"> |
| | | <el-col :span="6">çç¹åå·ï¼{{ formData.businessFormCode }}</el-col> |
| | | <el-col :span="6">çç¹ä»»å¡ï¼{{ formData.businessFormName }}</el-col> |
| | |
| | | </el-col> |
| | | </el-row> |
| | | <el-table |
| | | v-loading="loading" |
| | | :data="formData.formInventoryGoodsList" |
| | | :rules="rules" |
| | | height="500" |
| | |
| | | <el-table-column prop="realNum" label="å®çæ°é" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-form-item |
| | | style="margin-bottom: 0" |
| | | label-width="0" |
| | | :prop="`formInventoryGoodsList[${scope.$index}].realNum`" |
| | | :rules="rules.realNum" |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | loading: false, |
| | | loading: true, |
| | | btnLoading: false, |
| | | formData: { |
| | | businessFormCode: '', |
| | |
| | | }, |
| | | created() { |
| | | const info = JSON.parse(this.setting.info); |
| | | console.log('info', info); |
| | | if (info.states == 1) { |
| | | // ç»§ç»çç¹ |
| | | inventoryDetail({ id: this.setting.id }).then((res) => { |
| | | this.loading = false |
| | | this.formData = res; |
| | | this.formData.id = this.setting.id; |
| | | }).catch(()=>{ |
| | | this.loading = false |
| | | }); |
| | | } else { |
| | | inventoryQuery({ id: this.setting.id }).then((res) => { |
| | | this.loading = false |
| | | this.formData = res; |
| | | this.formData.id = this.setting.id; |
| | | }).catch(()=>{ |
| | | this.loading = false |
| | | }); |
| | | } |
| | | }, |
| | |
| | | id: this.formData.id, |
| | | inventoryGoodsList: this.formData.formInventoryGoodsList, |
| | | }; |
| | | this.loading = true |
| | | inventoryTemporaryStorage(params).then(() => { |
| | | this.loading = false |
| | | this.$message.success('æåæåï¼'); |
| | | this.close(); |
| | | this.$emit('search'); |
| | | }).catch(()=>{ |
| | | this.loading = false |
| | | }); |
| | | }, |
| | | save() { |
| | |
| | | ...this.formData, |
| | | inventoryGoodsList: this.formData.formInventoryGoodsList, |
| | | }; |
| | | this.loading = true |
| | | inventoryFinish(params).then(() => { |
| | | this.$message.success('æåæåï¼'); |
| | | this.close(); |
| | | this.$emit('search'); |
| | | }).catch(()=>{ |
| | | this.loading = false |
| | | }); |
| | | } |
| | | }); |
| | |
| | | <el-row style="margin-top: 15px"> |
| | | <el-col> |
| | | <!--å表--> |
| | | <my-table-v2 ref="myTable" :filter="filterFrom" :table="table" /> |
| | | <my-table-v2 ref="myTable" :filter="filterFrom" :table="table"/> |
| | | </el-col> |
| | | </el-row> |
| | | </el-card> |
| | |
| | | import MyButton from '@/components/myButton/myButton'; |
| | | import SettingIplatform from '@/utils/settingIplatform'; |
| | | import * as finsystenant from '@/api/baseSetting/finsystenant'; |
| | | import { goodsModel, getCategorySelectTree } from '@/api/baseSetting/finsystenant'; |
| | | import { getDicts } from '@/api/system/dict/data'; |
| | | import {goodsModel, getCategorySelectTree} from '@/api/baseSetting/finsystenant'; |
| | | import {getDicts} from '@/api/system/dict/data'; |
| | | import * as DateFormatter from '@/utils/DateFormatter'; |
| | | |
| | | export default { |
| | | name: 'index', |
| | | components: { MyButton, MyTableV2 }, |
| | | components: {MyButton, MyTableV2}, |
| | | data() { |
| | | return { |
| | | // æç´¢æ¡ |
| | |
| | | placeholder: 'è¯·éæ©', |
| | | defaultValue: '', |
| | | options: [], |
| | | cascader: [{key:'baseGoodsModelsId',queryKey: 'goodsTemplatesId'}], |
| | | cascader: [{key: 'baseGoodsModelsId', queryKey: 'goodsTemplatesId'}], |
| | | optionsConfig: { |
| | | label: 'label', |
| | | value: 'id', |
| | | url: SettingIplatform.apiBaseURL + '/pc/base/category/select/tree', |
| | | props:{checkStrictly:false} |
| | | props: {checkStrictly: false} |
| | | }, |
| | | }, |
| | | { |
| | |
| | | placeholder: '请è¾å
¥', |
| | | defaultValue: '', |
| | | options: [], |
| | | cascader: [{key:'baseGoodsModelsId',queryKey: 'goodsTemplatesId'}], |
| | | cascader: [{key: 'baseGoodsModelsId', queryKey: 'goodsTemplatesId'}], |
| | | optionsConfig: { |
| | | label: 'goodsName', |
| | | value: 'id', |
| | |
| | | placeholder: 'è¯·éæ©', |
| | | defaultValue: '', |
| | | options: [{ |
| | | label:'A', |
| | | value:'1' |
| | | },{ |
| | | label:'B', |
| | | value:'2' |
| | | },{ |
| | | label:'C', |
| | | value:'3' |
| | | label: 'A', |
| | | value: '1' |
| | | }, { |
| | | label: 'B', |
| | | value: '2' |
| | | }, { |
| | | label: 'C', |
| | | value: '3' |
| | | }], |
| | | }, |
| | | ], |
| | |
| | | }, |
| | | // åä¿¡æ¯ |
| | | columns: [ |
| | | { title: 'ç©ååç§°', field: 'baseGoodsTemplateName', align: 'left' }, |
| | | { title: 'è§æ ¼åå·', field: 'baseGoodsModelsName', align: 'center' }, |
| | | { title: 'åä½', field: 'unit', align: 'center' }, |
| | | { title: 'å½ååºå', field: 'warehouseCount', align: 'center' }, |
| | | { title: 'ä¿åºåºå', field: 'lowerLimit', align: 'left' }, |
| | | { title: 'å°é¡¶åºå', field: 'upperLimit', align: 'left' }, |
| | | {title: 'ç©ååç§°', field: 'baseGoodsTemplateName', align: 'left', minWidth: 140}, |
| | | {title: 'è§æ ¼åå·', field: 'baseGoodsModelsName', align: 'left', minWidth: 130}, |
| | | {title: 'åä½', field: 'unit', align: 'center', width: 80}, |
| | | {title: 'å½ååºå', field: 'warehouseCount', align: 'center', width: 130}, |
| | | {title: 'ä¿åºåºå', field: 'lowerLimit', align: 'center', width: 130}, |
| | | {title: 'å°é¡¶åºå', field: 'upperLimit', align: 'center', width: 130}, |
| | | { |
| | | title: 'ç¶æ', |
| | | field: 'warningType', |
| | | align: 'left', |
| | | align: 'center', |
| | | width: 90, |
| | | formatter: (row) => { |
| | | return { |
| | | type: row.warningType == 1 ? 'warning' : 'danger', |
| | |
| | | { |
| | | title: 'é¢è¦æ¶é´', |
| | | field: 'warningTime', |
| | | align: 'left', |
| | | align: 'center', |
| | | width: 160, |
| | | formatter: (row) => { |
| | | return { value: DateFormatter.LongToDateTime(row.warningTime) }; |
| | | return {value: DateFormatter.LongToDateTime(row.warningTime)}; |
| | | }, |
| | | }, |
| | | ], |
| | |
| | | this.$modal |
| | | .confirm('æ¯å¦ç¡®è®¤å é¤å称为"' + row.name + '"çæºæåï¼') |
| | | .then(function () { |
| | | finsystenant.del({ id: row.id }).then((res) => {}); |
| | | finsystenant.del({id: row.id}).then((res) => { |
| | | }); |
| | | }) |
| | | .then((res) => { |
| | | this.$message.success('å 餿åï¼'); |
| | | this.search(); |
| | | }) |
| | | .catch(() => {}); |
| | | .catch(() => { |
| | | }); |
| | | }, |
| | | // æ¥è¯¢tableå表 |
| | | search(pageNum) { |
| | |
| | | }, |
| | | // åä¿¡æ¯ |
| | | columns: [ |
| | | { title: 'æºæ', field: 'agencyName', align: 'left' }, |
| | | { title: 'ä»åº', field: 'warehouseName', align: 'center' }, |
| | | { title: 'åç±»', field: 'categoryName', align: 'center' }, |
| | | { title: 'æå±ç±»å«', field: 'costType', align: 'center' }, |
| | | { title: 'ç©ååç§°', field: 'goodsName', align: 'left' }, |
| | | { title: 'è§æ ¼åå·', field: 'modelName', align: 'left' }, |
| | | { title: 'ä¿åºåºå', field: 'lowerLimit', align: 'left' }, |
| | | { title: 'å°é¡¶åºå', field: 'upperLimit', align: 'left' }, |
| | | { title: 'æºæ', field: 'agencyName', align: 'left', minWidth: 130 }, |
| | | { title: 'ä»åº', field: 'warehouseName', align: 'left', minWidth: 130 }, |
| | | { title: 'åç±»', field: 'categoryName', align: 'left', minWidth: 130 }, |
| | | { title: 'æå±ç±»å«', field: 'costType', align: 'center', width: 80 }, |
| | | { title: 'ç©ååç§°', field: 'goodsName', align: 'left', minWidth: 130 }, |
| | | { title: 'è§æ ¼åå·', field: 'modelName', align: 'left', minWidth: 130 }, |
| | | { title: 'ä¿åºåºå', field: 'lowerLimit', align: 'center', width: 100 }, |
| | | { title: 'å°é¡¶åºå', field: 'upperLimit', align: 'center', width: 100 }, |
| | | ], |
| | | // æä½ä¿¡æ¯ |
| | | operation: { |
| | |
| | | </el-card> |
| | | </el-container> |
| | | </el-container> |
| | | |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | }, |
| | | // åä¿¡æ¯ |
| | | columns: [ |
| | | { title: 'æºæ', field: 'agencyName', align: 'center' }, |
| | | { title: 'ä»åº', field: 'warehouseName', align: 'center' }, |
| | | { title: 'åç±»', field: 'categoryName', align: 'center' }, |
| | | { title: 'æå±ç±»å«', field: 'costType', align: 'center' }, |
| | | { title: 'ç©ååç§°', field: 'goodsTemplateName', align: 'left' }, |
| | | { title: 'è§æ ¼åå·', field: 'baseGoodsModelsName', align: 'left' }, |
| | | { title: 'åä½', field: 'unit', align: 'left' }, |
| | | { title: 'å½ååºå', field: 'kucun', align: 'left' }, |
| | | { title: 'æºæ', field: 'agencyName', align: 'left', minWidth: 130 }, |
| | | { title: 'ä»åº', field: 'warehouseName', align: 'left', minWidth: 130 }, |
| | | { title: 'åç±»', field: 'categoryName', align: 'left', minWidth: 130 }, |
| | | { title: 'æå±ç±»å«', field: 'costType', align: 'center', width:80 }, |
| | | { title: 'ç©ååç§°', field: 'goodsTemplateName', align: 'left', minWidth: 140 }, |
| | | { title: 'è§æ ¼åå·', field: 'baseGoodsModelsName', align: 'left', minWidth: 130 }, |
| | | { title: 'åä½', field: 'unit', align: 'center', width:80 }, |
| | | { title: 'å½ååºå', field: 'kucun', align: 'center' }, |
| | | ], |
| | | paging: { |
| | | show: true, // æ¾ç¤ºå页 |
| | |
| | | }, |
| | | // åä¿¡æ¯ |
| | | columns: [ |
| | | { title: 'æºæ', field: 'agencyName', align: 'left' }, |
| | | { title: 'ä»åº', field: 'warehouseName', align: 'center' }, |
| | | { title: 'ç©ååç§°', field: 'goodsTemplateName', align: 'center' }, |
| | | { title: 'è§æ ¼åå·', field: 'baseGoodsModelsName', align: 'center' }, |
| | | { title: 'æºæ', field: 'agencyName', align: 'left', width: 130 }, |
| | | { title: 'ä»åº', field: 'warehouseName', align: 'left', width: 130 }, |
| | | { title: 'ç©ååç§°', field: 'goodsTemplateName', align: 'left', minWidth: 130 }, |
| | | { title: 'è§æ ¼åå·', field: 'baseGoodsModelsName', align: 'left', width: 130 }, |
| | | { |
| | | title: 'ç±»å', |
| | | field: 'summary', |
| | | align: 'left', |
| | | align: 'center', |
| | | formatter: (row) => { |
| | | let result = stockType(row) |
| | | return { value: result }; |
| | | }, |
| | | }, |
| | | { title: 'åå·', field: 'businessFormCode', align: 'left' }, |
| | | { title: 'æ°é', field: 'thisCount', align: 'left' }, |
| | | { title: 'æä½åæ°é', field: 'initialCount', align: 'left' }, |
| | | { title: 'æä½åæ°é', field: 'endCount', align: 'left' }, |
| | | { title: 'å¨é', field: 'zaiTuCount', align: 'left' }, |
| | | { title: 'åå·', field: 'businessFormCode', align: 'center', width: 130 }, |
| | | { title: 'æ°é', field: 'thisCount', align: 'center', width: 100 }, |
| | | { title: 'æä½åæ°é', field: 'initialCount', align: 'center', width: 100 }, |
| | | { title: 'æä½åæ°é', field: 'endCount', align: 'center', width: 100 }, |
| | | { title: 'å¨é', field: 'zaiTuCount', align: 'center', width: 100 }, |
| | | { |
| | | title: 'æä½æ¶é´', |
| | | field: 'dealTime', |
| | | align: 'left', |
| | | align: 'center', |
| | | width: 160, |
| | | formatter: (row) => { |
| | | return { value: DateFormatter.LongToDateTime(row.dealTime) }; |
| | | }, |
| | |
| | | }; |
| | | // é颿 ¡éª |
| | | var checkPrice = (rule, value, callback) => { |
| | | console.log(value); |
| | | if (!value) { |
| | | return callback(new Error('请è¾å
¥')); |
| | | } |
| | |
| | | }; |
| | | // æ°éæ ¡éª |
| | | var checkCounts = (rule, value, callback) => { |
| | | console.log(value); |
| | | if (!value) { |
| | | return callback(new Error('请è¾å
¥')); |
| | | } |
| | |
| | | title: 'ä¸ä¼ ', |
| | | max: 20, // æå¤§å¤§å°ï¼åä½M |
| | | num: 10, // æ¯æä¸ä¼ å¾çä¸ªæ° |
| | | accept: '.jpg,.png', // éå¶æ ¼å¼ |
| | | tip: '', // æç¤º é»è®¤ï¼`åªè½ä¸ä¼ ${this.defaultSettings.num}个${this.defaultSettings.accept}æä»¶ï¼ä¸ä¸è¶
è¿${this.defaultSettings.max}kb` |
| | | uploadUrl: getUploadUrl(), // ä¸ä¼ è·¯å¾ |
| | | multiple: true, // æ¯å¦æ¯ææ¹éä¸ä¼ |
| | |
| | | this.$refs['ruleForm'].validate((valid) => { |
| | | if (valid) { |
| | | this.loading = true; |
| | | console.log('formData', this.formData); |
| | | if (!this.setting.id) { |
| | | procureAdd(this.formData) |
| | | .then((res) => { |
| | |
| | | this.$emit('search'); |
| | | }) |
| | | .catch((err) => { |
| | | console.log('create err', err); |
| | | this.loading = false; |
| | | this.$message.error('ä¿å失败'); |
| | | }); |
| | |
| | | this.$emit('search'); |
| | | }) |
| | | .catch((err) => { |
| | | console.log('edit err', err); |
| | | this.loading = false; |
| | | this.$message.error('ä¿å失败'); |
| | | }); |
| | |
| | | <my-button name="æ°å¢" @click="handleAdd" site="tools" size="medium" /> |
| | | <my-button name="导å
¥" @click="importSetting.dialogShow = true" site="tools" size="medium" /> |
| | | </div> |
| | | <div :style="{ 'overflow-y': 'auto', height: `${clientHeight - 320}px` }" v-loading="loading"> |
| | | <el-row v-if="list.length" class="card" :gutter="5"> |
| | | <el-col v-for="(item, index) in list" :key="index" class="cm-item"> |
| | | <el-card class="card-data"> |
| | | <div class="card-container"> |
| | | <div class="card-header"> |
| | | <div class="card-header-left"> |
| | | <span>å
¥åºåå·ï¼</span> |
| | | <span class="value">{{ item.businessFormCode }}</span> |
| | | <div class="states" :class="item.states == 1 ? '' : 'states-success'"> |
| | | {{ item.states == 1 ? 'å¾
å
¥åº' : 'å·²å
¥åº' }} |
| | | <div v-loading="loading" style="margin-bottom: 15px"> |
| | | <div :style="{ 'overflow-y': 'auto', height: 'calc(100vh - 352px)' }"> |
| | | <el-row v-if="list.length" class="card" :gutter="5"> |
| | | <el-col v-for="(item, index) in list" :key="index" class="cm-item"> |
| | | <el-card class="card-data"> |
| | | <div class="card-container"> |
| | | <div class="card-header"> |
| | | <div class="card-header-left"> |
| | | <span>å
¥åºåå·ï¼</span> |
| | | <span class="value">{{ item.businessFormCode }}</span> |
| | | <div class="states" :class="item.states == 1 ? '' : 'states-success'"> |
| | | {{ item.states == 1 ? 'å¾
å
¥åº' : 'å·²å
¥åº' }} |
| | | </div> |
| | | </div> |
| | | <div class="card-header-right"> |
| | | <template v-if="item.states == 1"> |
| | | <el-button name="ç¼è¾" site="form" type="success" size="mini" @click="handleEdit(item)" |
| | | >ç¼è¾</el-button |
| | | > |
| | | <el-button name="å
¥åº" site="form" type="primary" size="mini" @click="handleIncome(item)" |
| | | >å
¥åº</el-button |
| | | > |
| | | <el-button name="å é¤" site="form" type="danger" size="mini" @click="del(item)" |
| | | >å é¤</el-button |
| | | > |
| | | </template> |
| | | <template v-if="item.states != 1"> |
| | | <el-button site="form" type="success" size="mini" @click="handleExport(item)" |
| | | >导åºå
¥åºå</el-button |
| | | > |
| | | </template> |
| | | <el-button name="æ¥ç详æ
" site="form" type="info" size="mini" @click="handleDetail(item)" |
| | | >æ¥ç详æ
</el-button |
| | | > |
| | | </div> |
| | | </div> |
| | | <div class="card-header-right"> |
| | | <template v-if="item.states == 1"> |
| | | <el-button name="ç¼è¾" site="form" type="success" size="mini" @click="handleEdit(item)" |
| | | >ç¼è¾</el-button |
| | | > |
| | | <el-button name="å
¥åº" site="form" type="primary" size="mini" @click="handleIncome(item)" |
| | | >å
¥åº</el-button |
| | | > |
| | | <el-button name="å é¤" site="form" type="danger" size="mini" @click="del(item)" |
| | | >å é¤</el-button |
| | | > |
| | | </template> |
| | | <template v-if="item.states != 1"> |
| | | <el-button site="form" type="success" size="mini" @click="handleExport(item)" |
| | | >导åºå
¥åºå</el-button |
| | | > |
| | | </template> |
| | | <el-button name="æ¥ç详æ
" site="form" type="info" size="mini" @click="handleDetail(item)" |
| | | >æ¥ç详æ
</el-button |
| | | > |
| | | <div class="one-hed"> |
| | | <div class="box"><span class="span-two">æºæï¼</span>{{ item.agencyId }}</div> |
| | | <div class="box"><span class="span-two">æä½äººï¼</span>{{ item.buyerName }}</div> |
| | | <div class="box"> |
| | | <span class="span-two">éè´æ¶é´ï¼</span>{{ item.procureTime | formatTime }} |
| | | </div> |
| | | <div class="box"> |
| | | <span class="span-two">å
¥åºæ¶é´ï¼</span>{{ item.incomeTime | formatTime }} |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="one-hed"> |
| | | <div class="box"><span class="span-two">æºæï¼</span>{{ item.agencyId }}</div> |
| | | <div class="box"><span class="span-two">æä½äººï¼</span>{{ item.buyerName }}</div> |
| | | <div class="box"> |
| | | <span class="span-two">éè´æ¶é´ï¼</span>{{ item.procureTime | formatTime }} |
| | | </div> |
| | | <div class="box"> |
| | | <span class="span-two">å
¥åºæ¶é´ï¼</span>{{ item.incomeTime | formatTime }} |
| | | </div> |
| | | </div> |
| | | <div class="card-end"> |
| | | <div v-for="(just, index) in item.fromProcureTemplateInfoList" :key="index" class="item"> |
| | | <div class="name">{{ just.goodsTemplateName }}</div> |
| | | <div class="value-box"> |
| | | <div class="value-box-item"> |
| | | <span class="label">æ°éï¼</span> |
| | | <span class="value">{{ just.count }}</span> |
| | | <span class="unit">{{ just.unit }}</span> |
| | | <div class="card-end"> |
| | | <div v-for="(just, index) in item.fromProcureTemplateInfoList" :key="index" class="item"> |
| | | <div class="name">{{ just.goodsTemplateName }}</div> |
| | | <div class="value-box"> |
| | | <div class="value-box-item"> |
| | | <span class="label">æ°éï¼</span> |
| | | <span class="value">{{ just.count }}</span> |
| | | <span class="unit">{{ just.unit }}</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </el-card> |
| | | </el-col> |
| | | </el-row> |
| | | <div class="no-data" v-else>ææ æ°æ®</div> |
| | | </el-card> |
| | | </el-col> |
| | | </el-row> |
| | | <div class="no-data" v-else>ææ æ°æ®</div> |
| | | </div> |
| | | </div> |
| | | |
| | | <el-pagination |
| | | :small="false" |
| | | :current-page="pageNum" |
| | |
| | | this.list = res.datas; |
| | | this.total = res.totalRows; |
| | | this.loading = false; |
| | | console.log(this.list); |
| | | }); |
| | | }, |
| | | |
| | |
| | | }, |
| | | // åä¿¡æ¯ |
| | | columns: [ |
| | | { title: 'åå·', field: 'businessFormCode', align: 'center' }, |
| | | { title: 'ç©ååç§°', field: 'goodsTemplateName', align: 'center' }, |
| | | { title: 'è§æ ¼åå·', field: 'baseGoodsModelsName', align: 'center' }, |
| | | { title: 'åå·', field: 'businessFormCode', align: 'center', width: 130 }, |
| | | { title: 'ç©ååç§°', field: 'goodsTemplateName', align: 'left', width: 140 }, |
| | | { title: 'è§æ ¼åå·', field: 'baseGoodsModelsName', align: 'left', width: 130 }, |
| | | { |
| | | title: 'åä»·', |
| | | field: 'price', |
| | |
| | | return { value: row.price / 100 }; |
| | | }, |
| | | }, |
| | | { title: 'æå±æºæ', field: 'agencyName', align: 'center' }, |
| | | { title: 'å建人', field: 'buyerName', align: 'center' }, |
| | | { title: 'æå±æºæ', field: 'agencyName', align: 'center', width: 130 }, |
| | | { title: 'å建人', field: 'buyerName', align: 'center', width: 90 }, |
| | | { |
| | | title: 'æä½æ¶é´', |
| | | field: 'procureTime', |
| | |
| | | // æä½ä¿¡æ¯ |
| | | operation: { |
| | | show: true, // æ¾ç¤ºæä½å |
| | | width: '150', // å宽 |
| | | width: 100, // å宽 |
| | | attr: [ |
| | | { |
| | | title: '详æ
', |
| | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="8"> |
| | | <span>ç©ååç±»ï¼</span> |
| | | <span>{{ goodsItem.baseCategoryName }}</span> |
| | | <span>{{ goodsItem.categoryName }}</span> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <span>ç©ååç§°ï¼</span> |
| | | <span>{{ goodsItem.goodsTemplateName }}</span> |
| | | <span>{{ goodsItem.goodsName }}</span> |
| | | </el-col> |
| | | </el-row> |
| | | <el-table :data="goodsItem.models" :stripe="true" style="margin-top: 20px"> |
| | | <el-table-column prop="baseGoodsModelsName" label="è§æ ¼åå·" align="center"> |
| | | <template slot-scope="scope"> |
| | | {{ scope.row.baseGoodsModelsName }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="åä½" align="center"> |
| | | <template slot-scope="scope"> |
| | | {{ scope.row.unit }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="counts" label="æ¥åºæ°é" align="center"> |
| | | <template slot-scope="scope"> |
| | | {{ scope.row.counts }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="scrappedCode" label="æ¥åºåå " align="center"> |
| | | <template slot-scope="scope"> |
| | | {{ getDictName(scope.row.scrappedCode) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="baseGoodsModelsName" label="è§æ ¼åå·" align="center"></el-table-column> |
| | | <el-table-column label="åä½" prop="unit" align="center"></el-table-column> |
| | | <el-table-column prop="counts" label="æ¥åºæ°é" align="center"></el-table-column> |
| | | <el-table-column prop="scrappedName" label="æ¥åºåå " align="center"></el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <div id="uploadPreviewImages" style="display: none"> |
| | |
| | | states: '', |
| | | createName: '', |
| | | time: '', |
| | | scrappedGoodsInfo: [], |
| | | scrappedGoods: [], |
| | | }, |
| | | }; |
| | | }, |
| | |
| | | <el-select v-model="scope.row.scrappedCode" placeholder="è¯·éæ©"> |
| | | <el-option |
| | | v-for="item in scrapReasonOptions" |
| | | :key="item.dict_value" |
| | | :key="item.dict_code" |
| | | :label="item.dict_label" |
| | | :value="item.dict_value" |
| | | :value="item.dict_code" |
| | | /> |
| | | </el-select> |
| | | </template> |
| | |
| | | warehouseId: [{ required: true, message: 'è¯·éæ©', trigger: 'change' }], |
| | | dealTime: [{ required: true, message: 'è¯·éæ©', trigger: 'change' }], |
| | | buyType: [{ required: true, message: 'è¯·éæ©', trigger: 'change' }], |
| | | |
| | | uploadFiles: [{ required: true, message: '请ä¸ä¼ ', trigger: 'change' }], |
| | | baseCategoryIds: [{ required: true, message: 'è¯·éæ©', trigger: 'change' }], |
| | | baseGoodsTemplateId: [{ validator: checkGoodsTemplateId, trigger: ['blur', 'change'] }], |
| | |
| | | title: 'ä¸ä¼ ', |
| | | max: 20, // æå¤§å¤§å°ï¼åä½M |
| | | num: 10, // æ¯æä¸ä¼ å¾çä¸ªæ° |
| | | accept: '.jpg,.png', // éå¶æ ¼å¼ |
| | | tip: '', // æç¤º é»è®¤ï¼`åªè½ä¸ä¼ ${this.defaultSettings.num}个${this.defaultSettings.accept}æä»¶ï¼ä¸ä¸è¶
è¿${this.defaultSettings.max}kb` |
| | | uploadUrl: getUploadUrl(), // ä¸ä¼ è·¯å¾ |
| | | multiple: true, // æ¯å¦æ¯ææ¹éä¸ä¼ |
| | |
| | | this.getWarehouseList(); |
| | | this.getgoodsTemplate(); |
| | | this.getgoodsModel(); |
| | | this.getCategoryTree(); |
| | | await this.getCategoryTree(); |
| | | this.formData.scrappedGoodsInfo.push(JSON.parse(JSON.stringify(this.goodsItem))); |
| | | this.formData.operatorId = this.userInfo.id; |
| | | this.formData.operatorName = this.userInfo.userName; |
| | |
| | | |
| | | // è·åæ¥åºä»åºå表 |
| | | getWarehouseList() { |
| | | selectTenantWarehouse() |
| | | selectTenantWarehouse({ agencyId: this.userInfo.tenantId }) |
| | | .then((res) => { |
| | | this.warehouses = res; |
| | | if (this.warehouses.length && !this.formData.warehouseId) { |
| | |
| | | handleSubmit() { |
| | | this.$refs['ruleForm'].validate((valid) => { |
| | | if (valid) { |
| | | console.log('this.formData', this.formData); |
| | | scrappedAdd(this.formData) |
| | | .then((res) => { |
| | | this.$message.success('ä¿åæåï¼'); |
| | |
| | | <div class="table-tool-bar" style="margin-bottom: 15px"> |
| | | <my-button name="æ°å¢" @click="handleAdd" site="tools" size="medium" /> |
| | | </div> |
| | | <div :style="{ 'overflow-y': 'auto', height: `${clientHeight - 320}px` }"> |
| | | <div :style="{ 'overflow-y': 'auto', height: 'calc(100vh - 352px)' }"> |
| | | <el-row class="card" :gutter="5" v-loading="loading"> |
| | | <el-col v-for="(item, index) in list" :key="index" class="cm-item"> |
| | | <el-card class="card-data"> |
| | |
| | | <div class="card-header-left"> |
| | | <span>æ¥åºåå·ï¼</span> |
| | | <span class="value">{{ item.businessFormCode }}</span> |
| | | |
| | | |
| | | </div> |
| | | <div class="card-header-right"> |
| | | <el-button site="form" type="success" size="mini" @click="handleExport(item)" |
| | |
| | | }, |
| | | { |
| | | type: 'date-picker', |
| | | dataIndex: 'incomeTimeStart', |
| | | dataIndex: 'startTime', |
| | | label: 'æ¥åºæ¶é´', |
| | | defaultValue: '', |
| | | }, |
| | | { |
| | | type: 'date-picker', |
| | | dataIndex: 'incomeTimeEnd', |
| | | dataIndex: 'endTime', |
| | | label: 'è³', |
| | | defaultValue: '', |
| | | }, |
| | |
| | | this.list = res.datas; |
| | | this.total = res.totalRows; |
| | | this.loading = false; |
| | | console.log(this.list); |
| | | }); |
| | | }, |
| | | |
| | |
| | | }, |
| | | // åä¿¡æ¯ |
| | | columns: [ |
| | | { title: 'åå·', field: 'businessFormCode', align: 'left' }, |
| | | { title: 'ç©ååç§°', field: 'goodsTemplateName', align: 'center' }, |
| | | { title: 'è§æ ¼åå·', field: 'baseGoodsModelsName', align: 'center' }, |
| | | { title: 'æ¥åºæ°é', field: 'lv', align: 'center' }, |
| | | { title: 'æå±æºæ', field: 'agencyName', align: 'left' }, |
| | | { title: 'åå·', field: 'businessFormCode', align: 'center', width: 130 }, |
| | | { title: 'ç©ååç§°', field: 'goodsTemplateName', align: 'left', minWidth: 130 }, |
| | | { title: 'è§æ ¼åå·', field: 'baseGoodsModelsName', align: 'left', minWidth: 130 }, |
| | | { title: 'æ¥åºæ°é', field: 'counts', align: 'center' }, |
| | | { title: 'æå±æºæ', field: 'agencyName', align: 'left', minWidth: 130 }, |
| | | { title: 'å建人', field: 'operatorName', align: 'left' }, |
| | | { |
| | | title: 'æä½æ¶é´', |
| | | field: 'dealTime', |
| | | align: 'left', |
| | | align: 'center', |
| | | width: 160, |
| | | formatter: (row) => { |
| | | return { value: DateFormatter.LongToDateTime(row.dealTime) }; |
| | | }, |
| | |
| | | // æä½ä¿¡æ¯ |
| | | operation: { |
| | | show: true, // æ¾ç¤ºæä½å |
| | | width: '150', // å宽 |
| | | width: 100, // å宽 |
| | | attr: [ |
| | | { |
| | | title: '详æ
', |
| | |
| | | <div class="table-tool-bar" style="margin-bottom: 15px"> |
| | | <my-button name="è°æ¨ç³è¯·" icon="el-icon-plus" @click="handleAdd" site="tools" size="medium" /> |
| | | </div> |
| | | <div :style="{ 'overflow-y': 'auto', height: `${clientHeight - 320}px` }" v-loading="loading"> |
| | | <div :style="{ 'overflow-y': 'auto', height: 'calc(100vh - 352px)' }" v-loading="loading"> |
| | | <el-row v-if="list.length" class="card" :gutter="5"> |
| | | <el-col v-for="(item, index) in list" :key="index" class="cm-item"> |
| | | <el-card class="card-data"> |
| | |
| | | }, |
| | | // åä¿¡æ¯ |
| | | columns: [ |
| | | { title: 'åå·', field: 'businessFormCode', align: 'center' }, |
| | | { title: 'ç©ååç§°', field: 'goodsName', align: 'center' }, |
| | | { title: 'è§æ ¼åå·', field: 'baseGoodsModelsName', align: 'center' }, |
| | | { title: 'æ°é', field: 'counts', align: 'left' }, |
| | | { title: 'æ¥åæºæ', field: 'inAgencyName', align: 'left' }, |
| | | { title: 'å建人', field: 'operatorName', align: 'left' }, |
| | | { title: 'åå·', field: 'businessFormCode', align: 'center', width: 130 }, |
| | | { title: 'ç©ååç§°', field: 'goodsName', align: 'left', width: 140 }, |
| | | { title: 'è§æ ¼åå·', field: 'baseGoodsModelsName', align: 'left', width: 130 }, |
| | | { title: 'æ°é', field: 'counts', align: 'center' }, |
| | | { title: 'æ¥åæºæ', field: 'inAgencyName', align: 'left', width: 130 }, |
| | | { title: 'å建人', field: 'operatorName', align: 'center', width: 90 }, |
| | | { |
| | | title: 'ç³è¯·æ¶é´', |
| | | field: 'createTime', |
| | |
| | | return { value: row.inTime ? DateFormatter.LongToDateTime(row.inTime) : '-' }; |
| | | }, |
| | | }, |
| | | { title: 'è°æ¨æºæ', field: 'outAgencyName', align: 'left' }, |
| | | { title: 'è°æ¨æºæ', field: 'outAgencyName', align: 'left', width: 130 }, |
| | | { |
| | | title: 'è°æ¨äºº', |
| | | field: 'outOperatorName', |
| | | align: 'center', |
| | | width: 90, |
| | | formatter: (row) => { |
| | | return { value: row.outOperatorName || '-' }; |
| | | }, |
| | |
| | | // æä½ä¿¡æ¯ |
| | | operation: { |
| | | show: true, // æ¾ç¤ºæä½å |
| | | width: '150', // å宽 |
| | | width: 100, // å宽 |
| | | attr: [ |
| | | { |
| | | title: '详æ
', |
| | |
| | | <el-row style="margin-top: 15px"> |
| | | <el-col> |
| | | <!--å表--> |
| | | <div :style="{ 'overflow-y': 'auto', height: `${clientHeight - 320}px` }" v-loading="loading"> |
| | | <div :style="{ 'overflow-y': 'auto', height: 'calc(100vh - 352px)' }" v-loading="loading"> |
| | | <el-row v-if="list.length" class="card" :gutter="5"> |
| | | <el-col v-for="(item, index) in list" :key="index" class="cm-item"> |
| | | <el-card class="card-data"> |
| | |
| | | package com.consum.base.controller; |
| | | |
| | | import com.consum.base.BaseController; |
| | | import com.consum.base.core.utils.CommonUtil; |
| | | import com.consum.base.pojo.BaseCategoryParam; |
| | | import com.consum.base.pojo.ProjectTreeResult; |
| | | import com.consum.base.service.BaseCategoryServiceImpl; |
| | |
| | | import com.walker.infrastructure.tree.TreeNode; |
| | | import com.walker.infrastructure.utils.StringUtils; |
| | | import com.walker.web.ResponseValue; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.TreeMap; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * @Description ç©ååç±» |
| | |
| | | * @Date 2023/10/30 |
| | | */ |
| | | @GetMapping("/select/tree") |
| | | public ResponseValue tree(String categoryName) { |
| | | public ResponseValue trees() { |
| | | List<ProjectTreeResult> tree = this.baseCategoryService.tree(); |
| | | return ResponseValue.success(tree); |
| | | } |
| | |
| | | * @Date 2023/10/23 |
| | | */ |
| | | @PostMapping("/add") |
| | | public ResponseValue add(@RequestBody BaseCategoryParam param) { |
| | | public ResponseValue add() { |
| | | BaseCategoryParam param = CommonUtil.getObjFromReqBody(BaseCategoryParam.class); |
| | | BaseCategoryParam param2 = new BaseCategoryParam(); |
| | | CommonUtil.copyProperties(param, param2); |
| | | param = param2; |
| | | if (StringUtils.isEmpty(param.getCategoryName())) { |
| | | return ResponseValue.error("åç±»å称为空"); |
| | | } |
| | |
| | | * @Date 2023/10/23 |
| | | */ |
| | | @GetMapping("/list") |
| | | public ResponseValue queryBaseCategoryList(BaseCategoryParam param) { |
| | | public ResponseValue queryBaseCategoryList() { |
| | | BaseCategoryParam param = CommonUtil.getObjFromReq(BaseCategoryParam.class); |
| | | BaseCategoryParam param2 = new BaseCategoryParam(); |
| | | CommonUtil.copyProperties(param, param2); |
| | | param = param2; |
| | | |
| | | S_user_core currentUser = this.getCurrentUser(); |
| | | if (currentUser == null) { |
| | | return ResponseValue.error("ç»å½ç¨æ·ä¿¡æ¯ä¸åå¨"); |
| | |
| | | * @Date 2023/10/23 |
| | | */ |
| | | @PostMapping("/edit") |
| | | public ResponseValue edit(@RequestBody BaseCategory baseCategory) { |
| | | public ResponseValue edit() { |
| | | BaseCategory baseCategory = CommonUtil.getObjFromReqBody(BaseCategory.class); |
| | | BaseCategory param2 = new BaseCategory(); |
| | | CommonUtil.copyProperties(baseCategory, param2); |
| | | baseCategory = param2; |
| | | |
| | | Long id = baseCategory.getId(); |
| | | if (id == null || id.longValue() <= 0) { |
| | | return ResponseValue.error("ç¼è¾çç©ååç±»ä¸åå¨"); |
| | |
| | | */ |
| | | //åç±»ä¸ææ£å¸¸ç¶æçç©åæ¶ï¼ä¸å
许ç¦ç¨ |
| | | @PostMapping("/updStatus") |
| | | public ResponseValue updateStatus(@RequestBody BaseCategory baseCategory) { |
| | | public ResponseValue updateStatus() { |
| | | BaseCategory baseCategory = CommonUtil.getObjFromReqBody(BaseCategory.class); |
| | | BaseCategory param2 = new BaseCategory(); |
| | | CommonUtil.copyProperties(baseCategory, param2); |
| | | baseCategory = param2; |
| | | |
| | | if (baseCategory == null || baseCategory.getId() == null || baseCategory.getStates() == null) { |
| | | return ResponseValue.error("åæ°é误"); |
| | | } |
| | |
| | | * @Date 2023/10/23 |
| | | */ |
| | | @DeleteMapping("/del") |
| | | public ResponseValue updateById(@RequestBody BaseCategory baseCategory) { |
| | | public ResponseValue updateById() { |
| | | BaseCategory baseCategory = CommonUtil.getObjFromReqBody(BaseCategory.class); |
| | | BaseCategory param2 = new BaseCategory(); |
| | | CommonUtil.copyProperties(baseCategory, param2); |
| | | baseCategory = param2; |
| | | |
| | | if (baseCategory.getId() == null) { |
| | | return ResponseValue.error("åç±»id为空"); |
| | | } |
| | |
| | | package com.consum.base.controller; |
| | | |
| | | import com.consum.base.BaseController; |
| | | import com.consum.base.core.utils.CommonUtil; |
| | | import com.consum.base.service.BaseGoodsModelsServiceImpl; |
| | | import com.consum.model.po.BaseGoodsModels; |
| | | import com.iplatform.model.po.S_user_core; |
| | |
| | | * @Date 2023/10/23 |
| | | */ |
| | | @PostMapping("/add") |
| | | public ResponseValue add(@RequestBody BaseGoodsModels models) { |
| | | public ResponseValue add() { |
| | | BaseGoodsModels models = CommonUtil.getObjFromReqBody(BaseGoodsModels.class); |
| | | BaseGoodsModels param2 = new BaseGoodsModels(); |
| | | CommonUtil.copyProperties(models, param2); |
| | | models = param2; |
| | | |
| | | if (models.getGoodsTemplatesId() == null || StringUtils.isEmpty(models.getModelName()) || StringUtils.isEmpty(models.getUnit()) || models.getStates() == null) { |
| | | return ResponseValue.error("åæ°é误"); |
| | | } |
| | |
| | | * @date 2023/10/25 |
| | | */ |
| | | @PostMapping("/updStatus") |
| | | public ResponseValue updateStatus(@RequestBody BaseGoodsModels models) { |
| | | public ResponseValue updateStatus() { |
| | | BaseGoodsModels models = CommonUtil.getObjFromReqBody(BaseGoodsModels.class); |
| | | BaseGoodsModels param2 = new BaseGoodsModels(); |
| | | CommonUtil.copyProperties(models, param2); |
| | | models = param2; |
| | | |
| | | if (models == null || models.getId() == null || models.getStates() == null) { |
| | | return ResponseValue.error("åæ°é误"); |
| | | } |
| | |
| | | * @Date 2023/10/25 |
| | | */ |
| | | @DeleteMapping("/del") |
| | | public ResponseValue updateById(@RequestBody BaseGoodsModels models) { |
| | | public ResponseValue updateById() { |
| | | BaseGoodsModels models = CommonUtil.getObjFromReqBody(BaseGoodsModels.class); |
| | | BaseGoodsModels param2 = new BaseGoodsModels(); |
| | | CommonUtil.copyProperties(models, param2); |
| | | models = param2; |
| | | |
| | | if (models.getId() == null) { |
| | | return ResponseValue.error("è§æ ¼åå·id为空"); |
| | | } |
| | |
| | | package com.consum.base.controller; |
| | | |
| | | import com.consum.base.BaseController; |
| | | import com.consum.base.core.utils.CommonUtil; |
| | | import com.consum.base.core.utils.MapUtils; |
| | | import com.consum.base.core.utils.MapperUtil; |
| | | import com.consum.base.pojo.BaseGoodsTemplateParam; |
| | |
| | | import com.consum.base.service.BaseGoodsTemplateServiceImpl; |
| | | import com.consum.base.service.BaseWarehouseServiceImpl; |
| | | import com.consum.base.service.LWhGoodsService; |
| | | import com.consum.model.po.BaseGoodsModels; |
| | | import com.consum.model.po.BaseGoodsTemplate; |
| | | import com.consum.model.po.BaseWarehouse; |
| | | import com.consum.model.po.FinSysTenantUser; |
| | | import com.consum.model.po.SDictData; |
| | | import com.consum.model.po.*; |
| | | import com.consum.model.vo.BaseGoodsTemplateVo; |
| | | import com.walker.db.page.GenericPager; |
| | | import com.walker.infrastructure.utils.StringUtils; |
| | |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import org.apache.commons.compress.utils.Lists; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Description ç©åæ¨¡æ¿ |
| | |
| | | * @Date 2023/10/24 |
| | | */ |
| | | @PostMapping("/add") |
| | | public ResponseValue add(@RequestBody BaseGoodsTemplateParam param) { |
| | | public ResponseValue add() { |
| | | BaseGoodsTemplateParam param = CommonUtil.getObjFromReqBody(BaseGoodsTemplateParam.class); |
| | | BaseGoodsTemplateParam param2 = new BaseGoodsTemplateParam(); |
| | | CommonUtil.copyProperties(param, param2); |
| | | param = param2; |
| | | |
| | | FinSysTenantUser sysInfo = this.getSysInfo(); |
| | | if (param.getCategoryId() == null) { |
| | | return ResponseValue.error("ç»å½ç¨æ·ä¿¡æ¯ä¸åå¨"); |
| | |
| | | * @Date 2023/10/24 |
| | | */ |
| | | @GetMapping("/list") |
| | | public ResponseValue queryList(BaseGoodsTemplateParam param) { |
| | | public ResponseValue queryList() { |
| | | BaseGoodsTemplateParam param = CommonUtil.getObjFromReq(BaseGoodsTemplateParam.class); |
| | | BaseGoodsTemplateParam param2 = new BaseGoodsTemplateParam(); |
| | | CommonUtil.copyProperties(param, param2); |
| | | param = param2; |
| | | |
| | | FinSysTenantUser sysInfo = this.getSysInfo(); |
| | | if (sysInfo == null) { |
| | | return ResponseValue.error("ç»å½ç¨æ·ä¿¡æ¯ä¸åå¨"); |
| | |
| | | * @Date 2023/10/24 |
| | | */ |
| | | @PostMapping("/edit") |
| | | public ResponseValue edit(@RequestBody BaseGoodsTemplateParam param) { |
| | | public ResponseValue edit() { |
| | | BaseGoodsTemplateParam param = CommonUtil.getObjFromReqBody(BaseGoodsTemplateParam.class); |
| | | BaseGoodsTemplateParam param2 = new BaseGoodsTemplateParam(); |
| | | CommonUtil.copyProperties(param, param2); |
| | | param = param2; |
| | | |
| | | if (StringUtils.isEmpty(param.getGoodsName())) { |
| | | return ResponseValue.error("ç©åå称为空"); |
| | | } |
| | |
| | | */ |
| | | //TODO ç©åçç¦ç¨æå é¤ï¼ä¸å½±åå·²ç»éè´å
¥è¿åºçç©åä¿¡æ¯ã |
| | | @PostMapping("/updStatus") |
| | | public ResponseValue updateStatus(@RequestBody BaseGoodsTemplate goodsTemplate) { |
| | | public ResponseValue updateStatus() { |
| | | BaseGoodsTemplate goodsTemplate = CommonUtil.getObjFromReqBody(BaseGoodsTemplate.class); |
| | | BaseGoodsTemplate param2 = new BaseGoodsTemplate(); |
| | | CommonUtil.copyProperties(goodsTemplate, param2); |
| | | goodsTemplate = param2; |
| | | |
| | | if (goodsTemplate == null || goodsTemplate.getId() == null || goodsTemplate.getStates() == null) { |
| | | return ResponseValue.error("åæ°é误"); |
| | | } |
| | |
| | | */ |
| | | //TODO ç©åçç¦ç¨æå é¤ï¼ä¸å½±åå·²ç»éè´å
¥è¿åºçç©åä¿¡æ¯ã |
| | | @DeleteMapping("/del") |
| | | public ResponseValue updateById(@RequestBody BaseGoodsTemplate goodsTemplate) { |
| | | public ResponseValue updateById() { |
| | | BaseGoodsTemplate goodsTemplate = CommonUtil.getObjFromReqBody(BaseGoodsTemplate.class); |
| | | BaseGoodsTemplate param2 = new BaseGoodsTemplate(); |
| | | CommonUtil.copyProperties(goodsTemplate, param2); |
| | | goodsTemplate = param2; |
| | | |
| | | if (goodsTemplate.getId() == null) { |
| | | return ResponseValue.error("ç©åid为空"); |
| | | } |
| | |
| | | package com.consum.base.controller; |
| | | |
| | | import com.consum.base.BaseController; |
| | | import com.consum.base.core.utils.CommonUtil; |
| | | import com.consum.base.pojo.BaseWarehouseParam; |
| | | import com.consum.base.pojo.query.WarehouseQry; |
| | | import com.consum.base.service.BaseWarehouseServiceImpl; |
| | |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import java.util.List; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Description ä»åºç®¡ç |
| | |
| | | * @Date 2023/10/26 |
| | | */ |
| | | @PostMapping("/add") |
| | | public ResponseValue add(@RequestBody BaseWarehouseParam param) { |
| | | public ResponseValue add() { |
| | | BaseWarehouseParam param = CommonUtil.getObjFromReqBody(BaseWarehouseParam.class); |
| | | BaseWarehouseParam param2 = new BaseWarehouseParam(); |
| | | CommonUtil.copyProperties(param, param2); |
| | | param = param2; |
| | | |
| | | if (StringUtils.isEmpty(param.getWarehouseName())) { |
| | | return ResponseValue.error("ä»åºå称为空"); |
| | | } |
| | |
| | | * @Date 2023/10/26 |
| | | */ |
| | | @GetMapping("/list") |
| | | public ResponseValue queryList(BaseWarehouseParam param) { |
| | | public ResponseValue queryList() { |
| | | BaseWarehouseParam param = CommonUtil.getObjFromReq(BaseWarehouseParam.class); |
| | | BaseWarehouseParam param2 = new BaseWarehouseParam(); |
| | | CommonUtil.copyProperties(param, param2); |
| | | param = param2; |
| | | |
| | | FinSysTenantUser sysInfo = this.getSysInfo(); |
| | | if (sysInfo == null) { |
| | | return ResponseValue.error("ç»å½ç¨æ·ä¿¡æ¯ä¸åå¨"); |
| | |
| | | * @Date 2023/10/26 |
| | | */ |
| | | @PostMapping("/edit") |
| | | public ResponseValue edit(@RequestBody BaseWarehouse baseWarehouse) { |
| | | public ResponseValue edit() { |
| | | BaseWarehouse baseWarehouse = CommonUtil.getObjFromReqBody(BaseWarehouse.class); |
| | | BaseWarehouse param2 = new BaseWarehouse(); |
| | | CommonUtil.copyProperties(baseWarehouse, param2); |
| | | baseWarehouse = param2; |
| | | |
| | | Long id = baseWarehouse.getId(); |
| | | if (id == null || id <= 0) { |
| | | return ResponseValue.error("ç¼è¾çä»åºä¸åå¨"); |
| | |
| | | * @Date 2023/10/26 |
| | | */ |
| | | @DeleteMapping("/del") |
| | | public ResponseValue updateById(@RequestBody BaseWarehouse baseWarehouse) { |
| | | public ResponseValue updateById() { |
| | | BaseWarehouse baseWarehouse = CommonUtil.getObjFromReqBody(BaseWarehouse.class); |
| | | BaseWarehouse param2 = new BaseWarehouse(); |
| | | CommonUtil.copyProperties(baseWarehouse, param2); |
| | | baseWarehouse = param2; |
| | | |
| | | if (baseWarehouse.getId() == null) { |
| | | return ResponseValue.error("ä»åºid为空"); |
| | | } |
| | |
| | | @ApiImplicitParam(name = "warehouseQry", value = "ä»åºidååå·id", required = true, dataType = "WarehouseQry", paramType = "query") |
| | | }) |
| | | @GetMapping("/select/number") |
| | | public ResponseValue selectNumber(@Validated WarehouseQry warehouseQry) { |
| | | public ResponseValue selectNumber() { |
| | | WarehouseQry warehouseQry = CommonUtil.getObjFromReq(WarehouseQry.class); |
| | | WarehouseQry param2 = new WarehouseQry(); |
| | | CommonUtil.copyProperties(warehouseQry, param2); |
| | | warehouseQry = param2; |
| | | |
| | | Long warehouseId = warehouseQry.getWarehouseId(); |
| | | if (warehouseId == null) { |
| | | Long agencyId = warehouseQry.getAgencyId(); |
| | |
| | | package com.consum.base.controller; |
| | | |
| | | import com.consum.base.BaseController; |
| | | import com.consum.base.core.utils.CommonUtil; |
| | | import com.consum.base.pojo.request.WarehouseManagerParam; |
| | | import com.consum.base.service.BaseWarehouseManagerServiceImpl; |
| | | import com.consum.model.po.BaseWarehouseManager; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | |
| | | @ApiOperation(value = "æ°å¢", notes = "æ°å¢") |
| | | @ApiImplicitParam(name = "warehouseManagerParam", value = "åºç®¡åä¿¡æ¯", required = true, dataType = "WarehouseManagerParam", paramType = "body") |
| | | @PostMapping("/save") |
| | | public ResponseValue add(@RequestBody WarehouseManagerParam warehouseManagerParam) throws Exception { |
| | | public ResponseValue add() throws Exception { |
| | | WarehouseManagerParam param = CommonUtil.getObjFromReqBody(WarehouseManagerParam.class); |
| | | WarehouseManagerParam baseWarehouseParam = new WarehouseManagerParam(); |
| | | CommonUtil.copyProperties(param, baseWarehouseParam); |
| | | param = baseWarehouseParam; |
| | | |
| | | FinSysTenantUser sysInfo = this.getSysInfo(); |
| | | if (sysInfo == null) { |
| | | return ResponseValue.error("请å
ç»å½"); |
| | | } |
| | | this.baseWarehouseManagerService.add(warehouseManagerParam); |
| | | this.baseWarehouseManagerService.add(param); |
| | | return ResponseValue.success(); |
| | | } |
| | | |
New file |
| | |
| | | package com.consum.base.controller; |
| | | |
| | | import cn.afterturn.easypoi.excel.ExcelExportUtil; |
| | | import cn.afterturn.easypoi.excel.entity.TemplateExportParams; |
| | | import com.consum.base.BaseController; |
| | | import com.consum.base.core.utils.CommonUtil; |
| | | import com.consum.base.pojo.query.LWhLedgerQry; |
| | | import com.consum.base.service.FinWarehouseLedgerServiceImpl; |
| | | import com.consum.model.po.FinSysTenantUser; |
| | | import com.iplatform.model.po.S_user_core; |
| | | import com.walker.db.page.GenericPager; |
| | | import com.walker.web.ResponseValue; |
| | | import org.apache.poi.ss.usermodel.Workbook; |
| | | import org.apache.poi.xssf.usermodel.XSSFWorkbook; |
| | | import org.springframework.core.io.ClassPathResource; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.InputStream; |
| | | import java.io.OutputStream; |
| | | import java.net.URLEncoder; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * é¨é¨å°è´¦ |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/pc/fin/warehouse/departLedger") |
| | | public class FinDepartLedgerController extends BaseController { |
| | | @Resource |
| | | private FinWarehouseLedgerServiceImpl finWarehouseLedgerService; |
| | | |
| | | /** |
| | | * @Description å页å表æ¥è¯¢ |
| | | * @Author wh |
| | | * @Date 2023/7/11 13:59 |
| | | */ |
| | | @RequestMapping("/getList") |
| | | public ResponseValue getLedgerList() { |
| | | LWhLedgerQry param = CommonUtil.getObjFromReq(LWhLedgerQry.class); |
| | | LWhLedgerQry query = new LWhLedgerQry(); |
| | | CommonUtil.copyProperties(param, query); |
| | | param = query; |
| | | S_user_core currentUser = this.getCurrentUser(); |
| | | if (currentUser == null) { |
| | | return ResponseValue.error("ç»å½ç¨æ·ä¿¡æ¯ä¸åå¨"); |
| | | } |
| | | /*å½åç»å½äººåªè½çå°èªå·±æºæä¸çå表*/ |
| | | FinSysTenantUser sysInfo = this.getSysInfo(); |
| | | String tenantId = sysInfo.getTenantId(); |
| | | Long paramAgencyId = param.getAgencyId(); |
| | | if (paramAgencyId == null || !paramAgencyId.toString().startsWith(tenantId)) { |
| | | param.setAgencyId(Long.valueOf(tenantId)); |
| | | } |
| | | param.setStates((short) 1); |
| | | param.setWarehouseType((short) 1); |
| | | GenericPager pager = finWarehouseLedgerService.departLedgerList(param); |
| | | return ResponseValue.success(pager); |
| | | } |
| | | |
| | | @RequestMapping("/getListExport") |
| | | public void getListExport(HttpServletResponse response) throws Exception { |
| | | LWhLedgerQry param = CommonUtil.getObjFromReq(LWhLedgerQry.class); |
| | | LWhLedgerQry query = new LWhLedgerQry(); |
| | | CommonUtil.copyProperties(param, query); |
| | | param = query; |
| | | S_user_core currentUser = this.getCurrentUser(); |
| | | if (currentUser == null) { |
| | | return; |
| | | } |
| | | /*å½åç»å½äººåªè½çå°èªå·±æºæä¸çå表*/ |
| | | FinSysTenantUser sysInfo = this.getSysInfo(); |
| | | String tenantId = sysInfo.getTenantId(); |
| | | Long paramAgencyId = param.getAgencyId(); |
| | | if (paramAgencyId == null || !paramAgencyId.toString().startsWith(tenantId)) { |
| | | param.setAgencyId(Long.valueOf(tenantId)); |
| | | } |
| | | param.setStates((short) 1); |
| | | param.setWarehouseType((short) 1); |
| | | param.setPageNum(1); |
| | | param.setPageSize(Integer.MAX_VALUE); |
| | | GenericPager<Map<String, Object>> pager = finWarehouseLedgerService.departLedgerList(param); |
| | | List<Map<String, Object>> datas = pager.getDatas(); |
| | | org.springframework.core.io.Resource resource = new ClassPathResource("import/depTaiZhangExpTemp.xlsx"); |
| | | // è·åæä»¶è¾å
¥æµ |
| | | InputStream inputStream = resource.getInputStream(); |
| | | Workbook wb = new XSSFWorkbook(inputStream); |
| | | TemplateExportParams params = new TemplateExportParams(); |
| | | params.setTemplateWb(wb); |
| | | |
| | | Map<String, Object> map = new HashMap<String, Object>(); |
| | | map.put("dataList", datas); |
| | | |
| | | Workbook workbook = ExcelExportUtil.exportExcel(params, map); |
| | | // 设置ååºå¤´ |
| | | response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8"); |
| | | response.setHeader("Content-disposition", "attachment;filename=" + URLEncoder.encode("åºåæ¥è¯¢.xlsx", "utf-8")); |
| | | try (OutputStream outputStream = response.getOutputStream()) { |
| | | workbook.write(outputStream); |
| | | workbook.close(); |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | package com.consum.base.controller; |
| | | |
| | | import com.consum.base.BaseController; |
| | | import com.consum.base.core.utils.CommonUtil; |
| | | import com.consum.base.pojo.FinSysServerSearchParam; |
| | | import com.consum.base.pojo.FinSysServerVo; |
| | | import com.consum.base.service.FinSysServerImpl; |
| | | import com.consum.model.po.FinSysServer; |
| | | import com.walker.db.page.GenericPager; |
| | | import com.walker.db.page.ListPageContext; |
| | | import com.walker.db.page.PageSearch; |
| | | import com.walker.infrastructure.utils.DateUtils; |
| | | import com.walker.infrastructure.utils.NumberGenerator; |
| | | import com.walker.web.ResponseValue; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | @RestController |
| | | @RequestMapping("/pc/fin/sys/server") |
| | | public class FinSysServerController extends BaseController { |
| | | |
| | | private FinSysServerImpl finSysServerImpl; |
| | | |
| | | @Autowired |
| | | public void setfinSysCategory(FinSysServerImpl finSysServerImpl){ |
| | | this.finSysServerImpl= finSysServerImpl; |
| | | public void setfinSysCategory(FinSysServerImpl finSysServerImpl) { |
| | | this.finSysServerImpl = finSysServerImpl; |
| | | } |
| | | |
| | | /** |
| | |
| | | * @Date 2023/9/13 9:27 |
| | | */ |
| | | @GetMapping("/selectByDataScope") |
| | | public ResponseValue selectByDataScope(Integer dataScope){ |
| | | public ResponseValue selectByDataScope(Integer dataScope) { |
| | | return ResponseValue.success(finSysServerImpl.getByDataScope(dataScope)); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢å·¦ä¾§æ |
| | | * |
| | | * @return |
| | | */ |
| | | @GetMapping("/select/tree") |
| | | public ResponseValue selectFinSysCategoryTree(){ |
| | | public ResponseValue selectFinSysCategoryTree() { |
| | | |
| | | List<FinSysServerVo> finSysCategoryVos = finSysServerImpl.queryAllCategory(); |
| | | if(finSysCategoryVos!=null){ |
| | | if (finSysCategoryVos != null) { |
| | | return ResponseValue.success(finSysCategoryVos); |
| | | } |
| | | return ResponseValue.error("æªæ¥è¯¢å°æ°æ®ï¼"); |
| | |
| | | } |
| | | |
| | | @GetMapping("/select/detail") |
| | | public ResponseValue selectById(@RequestParam(name = "id") Long Id){ |
| | | FinSysServer finSysServer = this.finSysServerImpl.get(new FinSysServer(Id)); |
| | | if (finSysServer == null) return ResponseValue.error("æ¥è¯¢å¤±è´¥ï¼"); |
| | | return ResponseValue.success("æ¥è¯¢æå!",finSysServer); |
| | | public ResponseValue selectById(@RequestParam(name = "id") Long Id) { |
| | | FinSysServer finSysServer = this.finSysServerImpl.get(new FinSysServer(Id)); |
| | | if (finSysServer == null) { |
| | | return ResponseValue.error("æ¥è¯¢å¤±è´¥ï¼"); |
| | | } |
| | | return ResponseValue.success("æ¥è¯¢æå!", finSysServer); |
| | | } |
| | | |
| | | /** |
| | | * å页æ¥è¯¢ |
| | | * @param param |
| | | * |
| | | * @return |
| | | */ |
| | | @RequestMapping("/select/list") |
| | | public ResponseValue finSysServerList(FinSysServerSearchParam param){ |
| | | PageSearch pageSearch = ListPageContext.getPageSearch(); |
| | | public ResponseValue finSysServerList() { |
| | | FinSysServerSearchParam param = CommonUtil.getObjFromReq(FinSysServerSearchParam.class); |
| | | FinSysServerSearchParam param2 = new FinSysServerSearchParam(); |
| | | CommonUtil.copyProperties(param, param2); |
| | | param = param2; |
| | | |
| | | GenericPager<FinSysServer> pager = this.finSysServerImpl.selectServerListByPage(param); |
| | | return ResponseValue.success(pager); |
| | |
| | | |
| | | /** |
| | | * æ·»å |
| | | * @param finSysServer |
| | | * |
| | | * @return |
| | | */ |
| | | @PostMapping("/insert") |
| | | public ResponseValue addFinSysServer(@RequestBody FinSysServer finSysServer){ |
| | | if(finSysServer==null) return ResponseValue.error("åæ°ä¸ºç©º"); |
| | | finSysServer.setId(NumberGenerator.getLongSequenceNumber()); |
| | | finSysServer.setCreatedTime(DateUtils.getDateTimeNumber(System.currentTimeMillis())); |
| | | finSysServer.setCreatedBy(this.getCurrentUser().getUser_name()); |
| | | finSysServer.setLv(finSysServer.getParentId()+1); |
| | | int num = this.finSysServerImpl.insert(finSysServer); |
| | | if(num>0) return ResponseValue.success(1); |
| | | public ResponseValue addFinSysServer() { |
| | | FinSysServer param = CommonUtil.getObjFromReqBody(FinSysServer.class); |
| | | FinSysServer finSysServer = new FinSysServer(); |
| | | CommonUtil.copyProperties(param, finSysServer); |
| | | param = finSysServer; |
| | | |
| | | if (param == null) { |
| | | return ResponseValue.error("åæ°ä¸ºç©º"); |
| | | } |
| | | param.setId(NumberGenerator.getLongSequenceNumber()); |
| | | param.setCreatedTime(DateUtils.getDateTimeNumber(System.currentTimeMillis())); |
| | | param.setCreatedBy(this.getCurrentUser().getUser_name()); |
| | | param.setLv(param.getParentId() + 1); |
| | | int num = this.finSysServerImpl.insert(param); |
| | | if (num > 0) { |
| | | return ResponseValue.success(1); |
| | | } |
| | | return ResponseValue.error("æå
¥å¤±è´¥ï¼"); |
| | | } |
| | | |
| | | /** |
| | | * ç¼è¾ |
| | | */ |
| | | @PostMapping("/edit") |
| | | public ResponseValue editFinSysServer(@RequestBody FinSysServer finSysServer){ |
| | | if (finSysServer==null) return ResponseValue.error("åæ°ä¸ºç©º"); |
| | | public ResponseValue editFinSysServer() { |
| | | FinSysServer param = CommonUtil.getObjFromReqBody(FinSysServer.class); |
| | | FinSysServer finSysServer = new FinSysServer(); |
| | | CommonUtil.copyProperties(param, finSysServer); |
| | | param = finSysServer; |
| | | |
| | | if (param == null) { |
| | | return ResponseValue.error("åæ°ä¸ºç©º"); |
| | | } |
| | | // if(finSysServer.getLvType()!=null) { |
| | | // finSysServer.setLv(Long.valueOf(finSysServer.getLvType())); |
| | | // } |
| | | int num = this.finSysServerImpl.save(finSysServer); |
| | | return num>0 ? ResponseValue.success(1):ResponseValue.error("ç¼è¾å¤±è´¥ï¼"); |
| | | int num = this.finSysServerImpl.save(param); |
| | | return num > 0 ? ResponseValue.success(1) : ResponseValue.error("ç¼è¾å¤±è´¥ï¼"); |
| | | } |
| | | } |
| | |
| | | import com.alibaba.excel.event.AnalysisEventListener; |
| | | import com.alibaba.excel.exception.ExcelDataConvertException; |
| | | import com.consum.base.BaseController; |
| | | import com.consum.base.core.utils.CommonUtil; |
| | | import com.consum.base.core.utils.FinSysTenantUtils; |
| | | import com.consum.base.pojo.FinSysTenantParam; |
| | | import com.consum.base.pojo.FinSysTenantSearchParam; |
| | |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | |
| | | * @Date 2023/7/14 13:59 |
| | | */ |
| | | @RequestMapping("/select/list") |
| | | public ResponseValue allocatedList(FinSysTenantSearchParam param) { |
| | | public ResponseValue allocatedList() { |
| | | FinSysTenantSearchParam param = CommonUtil.getObjFromReq(FinSysTenantSearchParam.class); |
| | | FinSysTenantSearchParam param2 = new FinSysTenantSearchParam(); |
| | | CommonUtil.copyProperties(param, param2); |
| | | param = param2; |
| | | |
| | | FinSysTenantUser sysInfo = getSysInfo(); |
| | | if (sysInfo == null) { |
| | | return ResponseValue.error("ç»å½ç¨æ·ä¿¡æ¯ä¸åå¨"); |
| | |
| | | * @Description ä¸å页æ¥è¯¢ |
| | | */ |
| | | @RequestMapping("/select/allList") |
| | | public ResponseValue allList(FinSysTenantSearchParam param) { |
| | | public ResponseValue allList() { |
| | | FinSysTenantSearchParam param = CommonUtil.getObjFromReq(FinSysTenantSearchParam.class); |
| | | FinSysTenantSearchParam param2 = new FinSysTenantSearchParam(); |
| | | CommonUtil.copyProperties(param, param2); |
| | | param = param2; |
| | | |
| | | StringBuilder whStr = new StringBuilder("where 1=1 and status = 1 and is_delete = 0 "); |
| | | HashMap parameter = new HashMap<>(); |
| | | if (param.getFirstZmS() != null && !param.getFirstZmS().equals("")) { |
| | |
| | | * @date 2023/10/4 |
| | | */ |
| | | @PostMapping("/del") |
| | | public ResponseValue del(@RequestBody FinSysTenantParam param) { |
| | | public ResponseValue del() { |
| | | FinSysTenantParam param = CommonUtil.getObjFromReqBody(FinSysTenantParam.class); |
| | | FinSysTenantParam finSysTenantParam = new FinSysTenantParam(); |
| | | CommonUtil.copyProperties(param, finSysTenantParam); |
| | | param = finSysTenantParam; |
| | | |
| | | if (param.getId() == null) { |
| | | return ResponseValue.error("æºæid为空"); |
| | | } |
| | |
| | | * @date 2023/10/4 |
| | | */ |
| | | @PostMapping("/add") |
| | | public ResponseValue add(@RequestBody FinSysTenantParam param) { |
| | | public ResponseValue add() { |
| | | FinSysTenantParam param = CommonUtil.getObjFromReqBody(FinSysTenantParam.class); |
| | | FinSysTenantParam finSysTenantParam = new FinSysTenantParam(); |
| | | CommonUtil.copyProperties(param, finSysTenantParam); |
| | | param = finSysTenantParam; |
| | | |
| | | if (param == null) { |
| | | return ResponseValue.error("åæ°ä¸ºç©º"); |
| | | } |
| | |
| | | * @date 2023/10/6 |
| | | */ |
| | | @PostMapping("/edit") |
| | | public ResponseValue edit(@RequestBody FinSysTenant finSysTenant) { |
| | | Long id = finSysTenant.getId(); |
| | | public ResponseValue edit() { |
| | | FinSysTenant param = CommonUtil.getObjFromReqBody(FinSysTenant.class); |
| | | FinSysTenant finSysTenant = new FinSysTenant(); |
| | | CommonUtil.copyProperties(param, finSysTenant); |
| | | param = finSysTenant; |
| | | |
| | | Long id = param.getId(); |
| | | if (id == null || id.longValue() <= 0) { |
| | | return ResponseValue.error("ç¼è¾çæºæä¸åå¨"); |
| | | } |
| | |
| | | // if (finSysTenant1.getLv() != 1) { |
| | | // return ResponseValue.error("ææ ä¿®æ¹æé"); |
| | | // } |
| | | int num = this.finSysTenantService.updateFinSysTenant(finSysTenant, this.getSysInfo()); |
| | | int num = this.finSysTenantService.updateFinSysTenant(param, this.getSysInfo()); |
| | | return num > 0 ? ResponseValue.success(1) : ResponseValue.error("ç¼è¾å¤±è´¥ï¼"); |
| | | } |
| | | |
| | |
| | | package com.consum.base.controller; |
| | | |
| | | import com.consum.base.BaseController; |
| | | import com.consum.base.core.utils.CommonUtil; |
| | | import com.consum.base.pojo.FinSysTenantDepartmentParam; |
| | | import com.consum.base.service.FinSysTenantDepartmentServiceImpl; |
| | | import com.consum.model.po.FinSysTenantDepartment; |
| | |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | |
| | | @ApiImplicitParam(name = "param", value = "é¨é¨ä¿¡æ¯", required = true, dataType = "FinSysTenantDepartmentParam") |
| | | }) |
| | | @PostMapping("/add") |
| | | public ResponseValue add(@RequestBody FinSysTenantDepartmentParam param) { |
| | | public ResponseValue add() { |
| | | FinSysTenantDepartmentParam param = CommonUtil.getObjFromReqBody(FinSysTenantDepartmentParam.class); |
| | | FinSysTenantDepartmentParam finSysTenantDepartmentParam = new FinSysTenantDepartmentParam(); |
| | | CommonUtil.copyProperties(param, finSysTenantDepartmentParam); |
| | | param = finSysTenantDepartmentParam; |
| | | |
| | | if (StringUtils.isEmpty(param.getName())) { |
| | | return ResponseValue.error("é¨é¨å称为空"); |
| | | } |
| | |
| | | */ |
| | | //妿ä¸ä¼ æºæidï¼é»è®¤æ¥ççº§æºæçé¨é¨ |
| | | @GetMapping("/list") |
| | | public ResponseValue queryList(FinSysTenantDepartmentParam param) { |
| | | public ResponseValue queryList() { |
| | | FinSysTenantDepartmentParam param = CommonUtil.getObjFromReq(FinSysTenantDepartmentParam.class); |
| | | FinSysTenantDepartmentParam param2 = new FinSysTenantDepartmentParam(); |
| | | CommonUtil.copyProperties(param, param2); |
| | | param = param2; |
| | | |
| | | FinSysTenantUser sysInfo = this.getSysInfo(); |
| | | if (sysInfo == null) { |
| | | return ResponseValue.error("ç»å½ç¨æ·ä¿¡æ¯ä¸åå¨"); |
| | |
| | | * @Date 2023/10/26 |
| | | */ |
| | | @PostMapping("/edit") |
| | | public ResponseValue edit(@RequestBody FinSysTenantDepartment department) { |
| | | Long id = department.getId(); |
| | | public ResponseValue edit() { |
| | | FinSysTenantDepartment param = CommonUtil.getObjFromReqBody(FinSysTenantDepartment.class); |
| | | FinSysTenantDepartment finSysTenantDepartment = new FinSysTenantDepartment(); |
| | | CommonUtil.copyProperties(param, finSysTenantDepartment); |
| | | param = finSysTenantDepartment; |
| | | |
| | | Long id = param.getId(); |
| | | if (id == null || id <= 0) { |
| | | return ResponseValue.error("ç¼è¾çé¨é¨ä¸åå¨"); |
| | | } |
| | | if (StringUtils.isEmpty(department.getName())) { |
| | | if (StringUtils.isEmpty(param.getName())) { |
| | | return ResponseValue.error("é¨é¨å称为空"); |
| | | } |
| | | if (StringUtils.isEmpty(department.getCode())) { |
| | | if (StringUtils.isEmpty(param.getCode())) { |
| | | return ResponseValue.error("é¨é¨ç¼å·ä¸ºç©º"); |
| | | } |
| | | FinSysTenantUser sysInfo = this.getSysInfo(); |
| | | if (sysInfo == null) { |
| | | return ResponseValue.error("ç»å½ç¨æ·ä¿¡æ¯ä¸åå¨"); |
| | | } |
| | | FinSysTenantDepartment tenantDepartment = this.departmentService.selectByCode(department.getCode()); |
| | | FinSysTenantDepartment tenantDepartment = this.departmentService.selectByCode(param.getCode()); |
| | | if (tenantDepartment != null) { |
| | | return ResponseValue.error("é¨é¨ç¼å·å·²åå¨"); |
| | | } |
| | | int num = this.departmentService.updateFinSysTenantDepartment(department, sysInfo); |
| | | int num = this.departmentService.updateFinSysTenantDepartment(param, sysInfo); |
| | | return num > 0 ? ResponseValue.success() : ResponseValue.error("ç¼è¾å¤±è´¥ï¼"); |
| | | } |
| | | |
| | |
| | | * @Date 2023/10/26 |
| | | */ |
| | | @DeleteMapping("/del") |
| | | public ResponseValue updateById(@RequestBody FinSysTenantDepartment department) { |
| | | if (department.getId() == null) { |
| | | public ResponseValue updateById() { |
| | | FinSysTenantDepartment param = CommonUtil.getObjFromReqBody(FinSysTenantDepartment.class); |
| | | FinSysTenantDepartment finSysTenantDepartment = new FinSysTenantDepartment(); |
| | | CommonUtil.copyProperties(param, finSysTenantDepartment); |
| | | param = finSysTenantDepartment; |
| | | |
| | | if (param.getId() == null) { |
| | | return ResponseValue.error("é¨é¨id为空"); |
| | | } |
| | | FinSysTenantUser sysInfo = this.getSysInfo(); |
| | | if (sysInfo == null) { |
| | | return ResponseValue.error("ç»å½ç¨æ·ä¿¡æ¯ä¸åå¨"); |
| | | } |
| | | int num = this.departmentService.updateById(department, sysInfo); |
| | | int num = this.departmentService.updateById(param, sysInfo); |
| | | |
| | | return num > 0 ? ResponseValue.success(1) : ResponseValue.error("å é¤å¤±è´¥ï¼"); |
| | | } |
| | |
| | | package com.consum.base.controller; |
| | | |
| | | import cn.hutool.core.util.ReflectUtil; |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.alibaba.excel.context.AnalysisContext; |
| | |
| | | import com.iplatform.model.po.S_role; |
| | | import com.iplatform.model.po.S_user_core; |
| | | import com.walker.db.page.GenericPager; |
| | | import com.walker.infrastructure.utils.CollectionUtils; |
| | | import com.walker.infrastructure.utils.DateUtils; |
| | | import com.walker.infrastructure.utils.NumberGenerator; |
| | | import com.walker.infrastructure.utils.PhoneNumberUtils; |
| | | import com.walker.infrastructure.utils.StringUtils; |
| | | import com.walker.infrastructure.utils.*; |
| | | import com.walker.web.ResponseValue; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import java.io.IOException; |
| | | import java.lang.reflect.Field; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.HashMap; |
| | | import java.util.HashSet; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | import java.util.Optional; |
| | | import java.util.Set; |
| | | import org.apache.commons.compress.utils.Lists; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.io.IOException; |
| | | import java.lang.reflect.Field; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * @Description ç³»ç»ç¨æ· |
| | |
| | | |
| | | try { |
| | | Field fieldDatas = GenericPager.class.getDeclaredField("datas"); |
| | | fieldDatas.setAccessible(true); |
| | | fieldDatas.set(pager, resultList); |
| | | // fieldDatas.setAccessible(true); |
| | | // fieldDatas.set(pager, resultList); |
| | | ReflectUtil.setFieldValue(pager, fieldDatas, resultList); |
| | | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | |
| | | user.setSysUserId(NumberGenerator.getLongSequenceNumber()); |
| | | // å 坿æºå· |
| | | String key = PlatformRSAUtils.AES_KEY; |
| | | String pwdPhone = ""; |
| | | String encPhone = ""; |
| | | if (user.getUserPhone() != null) { |
| | | pwdPhone = AESUtils.encryptStrAES(user.getUserPhone(), key); |
| | | encPhone = AESUtils.encryptStrAES(user.getUserPhone(), key); |
| | | } |
| | | user.setUserPhone(pwdPhone); |
| | | user.setUserPhone(encPhone); |
| | | //æä¹è·åå·¦ä¾§æºææ æ°æ® |
| | | user.setSysDeptId(3L); //对åºå¹³å°æºæid é»è®¤ä¸ºå¹³å°ç®¡ç |
| | | this.finSysTenantUserService.insert(user); |
| | |
| | | userCore.setNick_name(user.getUserName()); |
| | | //ç¨æ·ç±»å å
é»è®¤è®¾ç½®ä¸º2 |
| | | userCore.setUser_type(2); |
| | | userCore.setPhonenumber(pwdPhone); |
| | | userCore.setPhonenumber(encPhone); |
| | | userCore.setSex(user.getSex().toString()); |
| | | //åå§åå¯ç 123456 |
| | | String pws = this.getArgumentVariable(ArgumentsConstants.KEY_SECURITY_PASSWORD_INIT).getStringValue(); |
| | |
| | | user.setRemark("æ¹é导å
¥"); |
| | | // å 坿æºå· |
| | | String key = PlatformRSAUtils.AES_KEY; |
| | | String pwdPhone = AESUtils.encryptStrAES(data.getUserPhone(), key); |
| | | user.setUserPhone(pwdPhone); |
| | | String encPhone = AESUtils.encryptStrAES(data.getUserPhone(), key); |
| | | user.setUserPhone(encPhone); |
| | | |
| | | user.setIsDelete(1); |
| | | //æä¹è·åå·¦ä¾§æºææ æ°æ® |
| | |
| | | return ResponseValue.error("åæ°ä¸ºç©º"); |
| | | } |
| | | String key = PlatformRSAUtils.AES_KEY; |
| | | String pwdPhone = ""; |
| | | String encPhone = ""; |
| | | if (user.getUserPhone() != null) { |
| | | pwdPhone = AESUtils.encryptStrAES(user.getUserPhone(), key); |
| | | encPhone = AESUtils.encryptStrAES(user.getUserPhone(), key); |
| | | } |
| | | user.setUserPhone(pwdPhone); |
| | | user.setUserPhone(encPhone); |
| | | // 1.æ´æ°ç³»ç»ç¨æ· FIN_SYS_TENANT_USER |
| | | finSysTenantUserService.update(user); |
| | | // 2.æ´æ°å¹³å°ç¨æ· S_USER_CORE |
| | |
| | | // å 坿æºå· |
| | | String key = PlatformRSAUtils.AES_KEY; |
| | | String userPhone = user.getUserPhone(); |
| | | String pwdPhone = ""; |
| | | String encPhone = ""; |
| | | if (userPhone != null) { |
| | | pwdPhone = AESUtils.encryptStrAES(userPhone, key); |
| | | user.setUserPhone(pwdPhone); |
| | | encPhone = AESUtils.encryptStrAES(userPhone, key); |
| | | user.setUserPhone(encPhone); |
| | | } |
| | | |
| | | this.finSysTenantUserService.insert(user); |
| | |
| | | updUser.setEmail(user.getEmail()); |
| | | updUser.setUserName(user.getUserName()); |
| | | updUser.setSex(user.getSex()); |
| | | String pwdPhone = ""; |
| | | String encPhone = ""; |
| | | if (user.getUserPhone() != null) { |
| | | String key = PlatformRSAUtils.AES_KEY; |
| | | pwdPhone = AESUtils.encryptStrAES(user.getUserPhone(), key); |
| | | encPhone = AESUtils.encryptStrAES(user.getUserPhone(), key); |
| | | } |
| | | updUser.setUserPhone(pwdPhone); |
| | | updUser.setUserPhone(encPhone); |
| | | // 1.æ´æ°ç³»ç»ç¨æ· FIN_SYS_TENANT_USER |
| | | finSysTenantUserService.update(updUser); |
| | | // 2.æ´æ°å¹³å°ç¨æ· S_USER_CORE |
| | |
| | | @RequestMapping("/getList") |
| | | public ResponseValue getLedgerList() { |
| | | LWhLedgerQry param = CommonUtil.getObjFromReq(LWhLedgerQry.class); |
| | | LWhLedgerQry query = new LWhLedgerQry(); |
| | | CommonUtil.copyProperties(param, query); |
| | | param = query; |
| | | S_user_core currentUser = this.getCurrentUser(); |
| | | if (currentUser == null) { |
| | | return ResponseValue.error("ç»å½ç¨æ·ä¿¡æ¯ä¸åå¨"); |
| | |
| | | @RequestMapping("/getListExport") |
| | | public void getListExport(HttpServletResponse response) throws Exception { |
| | | LWhLedgerQry param = CommonUtil.getObjFromReq(LWhLedgerQry.class); |
| | | LWhLedgerQry query = new LWhLedgerQry(); |
| | | CommonUtil.copyProperties(param, query); |
| | | param = query; |
| | | S_user_core currentUser = this.getCurrentUser(); |
| | | if (currentUser == null) { |
| | | return; |
| | |
| | | package com.consum.base.controller; |
| | | |
| | | import cn.hutool.core.util.ReflectUtil; |
| | | import com.consum.base.BaseController; |
| | | import com.consum.base.core.utils.CommonUtil; |
| | | import com.consum.base.core.utils.MapUtils; |
| | |
| | | private LWarehouseFlowService lWarehouseFlowService; |
| | | |
| | | @GetMapping("/list") |
| | | public ResponseValue queryFormProcureList(LWarehouseFlowParam param) { |
| | | public ResponseValue queryFormProcureList() { |
| | | LWarehouseFlowParam param = CommonUtil.getObjFromReq(LWarehouseFlowParam.class); |
| | | LWarehouseFlowParam param2 = new LWarehouseFlowParam(); |
| | | CommonUtil.copyProperties(param, param2); |
| | | param = param2; |
| | | |
| | | S_user_core currentUser = this.getCurrentUser(); |
| | | if (currentUser == null) { |
| | | return ResponseValue.error("ç»å½ç¨æ·ä¿¡æ¯ä¸åå¨"); |
| | |
| | | }); |
| | | try { |
| | | Field fieldDatas = GenericPager.class.getDeclaredField("datas"); |
| | | fieldDatas.setAccessible(true); |
| | | fieldDatas.set(genericPager, result); |
| | | // fieldDatas.setAccessible(true); |
| | | // fieldDatas.set(genericPager, result); |
| | | ReflectUtil.setFieldValue(genericPager, fieldDatas, result); |
| | | } catch (Exception e) { |
| | | logger.error(e.getMessage(), e); |
| | | } |
| | |
| | | |
| | | |
| | | @GetMapping("/detail/list") |
| | | public ResponseValue queryFormProcureList1(LWarehouseFlowParam param) { |
| | | public ResponseValue queryFormProcureList1() { |
| | | LWarehouseFlowParam param = CommonUtil.getObjFromReq(LWarehouseFlowParam.class); |
| | | LWarehouseFlowParam param2 = new LWarehouseFlowParam(); |
| | | CommonUtil.copyProperties(param, param2); |
| | | param = param2; |
| | | S_user_core currentUser = this.getCurrentUser(); |
| | | if (currentUser == null) { |
| | | return ResponseValue.error("ç»å½ç¨æ·ä¿¡æ¯ä¸åå¨"); |
| | |
| | | return ResponseValue.error("ç»å½ç¨æ·ä¿¡æ¯ä¸åå¨"); |
| | | } |
| | | LWarehouseFlowParam param = CommonUtil.getObjFromReq(LWarehouseFlowParam.class); |
| | | LWarehouseFlowParam param2 = new LWarehouseFlowParam(); |
| | | CommonUtil.copyProperties(param, param2); |
| | | param = param2; |
| | | /*å½åç»å½äººåªè½çå°èªå·±æºæä¸çå表*/ |
| | | FinSysTenantUser sysInfo = this.getSysInfo(); |
| | | String tenantId = sysInfo.getTenantId(); |
| | |
| | | package com.consum.base.controller; |
| | | |
| | | import com.consum.base.BaseController; |
| | | import com.consum.base.core.utils.CommonUtil; |
| | | import com.consum.base.core.utils.PageUtil; |
| | | import com.consum.base.pojo.query.LWhFormInventoryQry; |
| | | import com.consum.base.pojo.request.FormInventoryParam; |
| | |
| | | import com.consum.base.pojo.response.FormInventoryGoodsVO; |
| | | import com.consum.base.pojo.response.FormInventoryVO; |
| | | import com.consum.base.service.FinSysTenantUserServiceImpl; |
| | | import com.consum.base.service.LWhFormInventoryGoodsServiceImpl; |
| | | import com.consum.base.service.LWhFormInventoryServiceImpl; |
| | | import com.consum.model.po.FinSysTenantUser; |
| | | import com.consum.model.po.LWhFormInventory; |
| | | import com.iplatform.model.po.S_user_core; |
| | | import com.walker.db.page.GenericPager; |
| | | import com.walker.web.ResponseValue; |
| | | import io.swagger.annotations.Api; |
| | |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | |
| | | private LWhFormInventoryServiceImpl lWhFormInventoryService; |
| | | @Autowired |
| | | private FinSysTenantUserServiceImpl finSysTenantUserService; |
| | | @Autowired |
| | | private LWhFormInventoryGoodsServiceImpl inventoryGoodsService; |
| | | |
| | | |
| | | /** |
| | | * @Description æ°å¢ |
| | |
| | | @ApiImplicitParam(name = "param", value = "çç¹åä¿¡æ¯", dataType = "FormInventoryParam") |
| | | }) |
| | | @PostMapping("/add") |
| | | public ResponseValue add(@RequestBody FormInventoryParam param) { |
| | | public ResponseValue add() { |
| | | |
| | | FormInventoryParam param = CommonUtil.getObjFromReqBody(FormInventoryParam.class); |
| | | FormInventoryParam formInventoryParam = new FormInventoryParam(); |
| | | CommonUtil.copyProperties(param, formInventoryParam); |
| | | param = formInventoryParam; |
| | | |
| | | FinSysTenantUser sysInfo = this.getSysInfo(); |
| | | if (sysInfo == null) { |
| | | return ResponseValue.error("ç»å½ç¨æ·ä¿¡æ¯ä¸åå¨"); |
| | |
| | | @ApiImplicitParam(name = "param", value = "çç¹æ¡ä»¶", dataType = "LWhFormInventoryParam", required = true, paramType = "query") |
| | | }) |
| | | @GetMapping("/list") |
| | | public ResponseValue queryList(LWhFormInventoryQry param) { |
| | | public ResponseValue queryList() { |
| | | LWhFormInventoryQry param = CommonUtil.getObjFromReq(LWhFormInventoryQry.class); |
| | | LWhFormInventoryQry param2 = new LWhFormInventoryQry(); |
| | | CommonUtil.copyProperties(param, param2); |
| | | param = param2; |
| | | |
| | | FinSysTenantUser sysInfo = this.getSysInfo(); |
| | | if (sysInfo == null) { |
| | | return ResponseValue.error("ç»å½ç¨æ·ä¿¡æ¯ä¸åå¨"); |
| | |
| | | @ApiImplicitParam(name = "param", value = "çç¹åä¿¡æ¯", dataType = "FormInventoryParam") |
| | | }) |
| | | @PostMapping("/edit") |
| | | public ResponseValue edit(@RequestBody FormInventoryParam param) { |
| | | public ResponseValue edit() { |
| | | FormInventoryParam param = CommonUtil.getObjFromReqBody(FormInventoryParam.class); |
| | | FormInventoryParam formInventoryParam = new FormInventoryParam(); |
| | | CommonUtil.copyProperties(param, formInventoryParam); |
| | | param = formInventoryParam; |
| | | |
| | | LWhFormInventory lWhFormInventory = lWhFormInventoryService.get(new LWhFormInventory(param.getId())); |
| | | if (lWhFormInventory == null) { |
| | | return ResponseValue.error("ç¼è¾å¤±è´¥ï¼"); |
| | |
| | | if (num == 0) { |
| | | return ResponseValue.error("ç¼è¾å¤±è´¥ï¼"); |
| | | } |
| | | ResponseValue add = this.add(param); |
| | | if (add.getCode() == ResponseValue.CODE_SUCCESS) { |
| | | |
| | | //æ ¹æ®çç¹äººidæ¥è¯¢çç¹äºº |
| | | FinSysTenantUser finSysTenantUser = new FinSysTenantUser(); |
| | | finSysTenantUser.setId(param.getOperatorUserId()); |
| | | FinSysTenantUser operatorUser = finSysTenantUserService.get(finSysTenantUser); |
| | | //æ ¹æ®çç人idæ¥è¯¢çç人 |
| | | FinSysTenantUser monitorUserInfo = new FinSysTenantUser(); |
| | | monitorUserInfo.setId(param.getMonitorUserId()); |
| | | FinSysTenantUser monitorUser = finSysTenantUserService.get(monitorUserInfo); |
| | | int result = this.lWhFormInventoryService.add(param, this.getSysInfo(), operatorUser, monitorUser); |
| | | |
| | | if (result > 0) { |
| | | return ResponseValue.success(); |
| | | } |
| | | |
| | |
| | | @ApiImplicitParam(name = "param", value = "çç¹åä¿¡æ¯", dataType = "LWhFormInventoryDto") |
| | | }) |
| | | @PostMapping("/temporary/storage") |
| | | public ResponseValue temporaryStorage(@RequestBody LWhFormInventoryParam dto) { |
| | | if (dto == null) { |
| | | public ResponseValue updateTemporaryStorage() { |
| | | LWhFormInventoryParam param = CommonUtil.getObjFromReqBody(LWhFormInventoryParam.class); |
| | | LWhFormInventoryParam formInventoryParam = new LWhFormInventoryParam(); |
| | | CommonUtil.copyProperties(param, formInventoryParam); |
| | | param = formInventoryParam; |
| | | |
| | | if (param == null) { |
| | | return ResponseValue.error("åæ°é误"); |
| | | } |
| | | |
| | | int num = this.lWhFormInventoryService.updateInventoryInfo(dto, 1); |
| | | int num = this.lWhFormInventoryService.updateInventoryInfo(param, 1, null, null); |
| | | return num > 0 ? ResponseValue.success(1) : ResponseValue.error("æå失败ï¼"); |
| | | } |
| | | |
| | |
| | | @ApiImplicitParam(name = "param", value = "çç¹åä¿¡æ¯", dataType = "LWhFormInventoryDto") |
| | | }) |
| | | @PostMapping("/finish") |
| | | public ResponseValue finishPd(@RequestBody LWhFormInventoryParam dto) { |
| | | if (dto == null) { |
| | | public ResponseValue updateFinishPd() { |
| | | LWhFormInventoryParam param = CommonUtil.getObjFromReqBody(LWhFormInventoryParam.class); |
| | | LWhFormInventoryParam formInventoryParam = new LWhFormInventoryParam(); |
| | | CommonUtil.copyProperties(param, formInventoryParam); |
| | | param = formInventoryParam; |
| | | |
| | | if (param == null) { |
| | | return ResponseValue.error("åæ°é误"); |
| | | } |
| | | S_user_core currentUser = this.getCurrentUser(); |
| | | FinSysTenantUser sysInfo = this.getSysInfo(); |
| | | int num = this.lWhFormInventoryService.updateInventoryInfo(param, 2, currentUser, sysInfo); |
| | | |
| | | int num = this.lWhFormInventoryService.updateInventoryInfo(dto, 2); |
| | | return num > 0 ? ResponseValue.success(1) : ResponseValue.error("çç¹å¤±è´¥ï¼"); |
| | | } |
| | | |
| | |
| | | @ApiImplicitParam(name = "param", value = "çç¹æ¡ä»¶", dataType = "LWhFormInventoryParam", paramType = "query") |
| | | }) |
| | | @GetMapping("/list/PdDetail") |
| | | public ResponseValue queryPdDetailList(LWhFormInventoryQry param) { |
| | | public ResponseValue queryPdDetailList() { |
| | | LWhFormInventoryQry param = CommonUtil.getObjFromReq(LWhFormInventoryQry.class); |
| | | LWhFormInventoryQry param2 = new LWhFormInventoryQry(); |
| | | CommonUtil.copyProperties(param, param2); |
| | | param = param2; |
| | | |
| | | FinSysTenantUser sysInfo = this.getSysInfo(); |
| | | if (sysInfo == null) { |
| | | return ResponseValue.error("ç»å½ç¨æ·ä¿¡æ¯ä¸åå¨"); |
| | |
| | | package com.consum.base.controller; |
| | | |
| | | import cn.afterturn.easypoi.excel.ExcelExportUtil; |
| | | import cn.afterturn.easypoi.excel.entity.TemplateExportParams; |
| | | import cn.hutool.core.util.ReflectUtil; |
| | | import com.consum.base.BaseController; |
| | | import com.consum.base.core.utils.CommonUtil; |
| | | import com.consum.base.core.utils.MapUtils; |
| | |
| | | import com.iplatform.model.po.S_user_core; |
| | | import com.walker.db.page.GenericPager; |
| | | import com.walker.infrastructure.utils.CollectionUtils; |
| | | import com.walker.infrastructure.utils.DateUtils; |
| | | import com.walker.web.ResponseValue; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import java.io.IOException; |
| | | import java.io.OutputStream; |
| | | import java.lang.reflect.Field; |
| | | import java.net.URLEncoder; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import org.apache.commons.compress.utils.Lists; |
| | | import org.apache.poi.ss.usermodel.Workbook; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | |
| | | } |
| | | try { |
| | | Field fieldDatas = GenericPager.class.getDeclaredField("datas"); |
| | | fieldDatas.setAccessible(true); |
| | | fieldDatas.set(genericPager, resultList); |
| | | // fieldDatas.setAccessible(true); |
| | | // fieldDatas.set(genericPager, resultList); |
| | | ReflectUtil.setFieldValue(genericPager, fieldDatas, resultList); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | |
| | | if (currentUser == null) { |
| | | return ResponseValue.error("ç»å½ç¨æ·ä¿¡æ¯ä¸åå¨"); |
| | | } |
| | | GenericPager<Map<String, Object>> mapGenericPager = lWarehouseFlowService.queryBusinessFlowDetail(formOutputQry); |
| | | return ResponseValue.success(mapGenericPager); |
| | | GenericPager<Map<String, Object>> genericPager = lWarehouseFlowService.queryAllBusinessFlow(formOutputQry); |
| | | return ResponseValue.success(genericPager); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "åºåºå导åº", notes = "åºåºå导åº") |
| | | @GetMapping("/list/export") |
| | | public void export(Long id, HttpServletRequest request, HttpServletResponse response) throws IOException { |
| | | TemplateExportParams params = new TemplateExportParams( |
| | | "import/éè´éè´§å.xls"); |
| | | |
| | | FinSysTenantUser sysInfo = this.getSysInfo(); |
| | | String userName = sysInfo.getUserName(); |
| | | |
| | | String sql = "SELECT\n" |
| | | + "\tfo.BUSINESS_FORM_CODE,\n" |
| | | + "\tfo.AGENCY_NAME tenantName,\n" |
| | | + "\tGOODS_NAME goodsName,\n" |
| | | + "\tpm.BASE_GOODS_MODELS_NAME goodsModeName,\n" |
| | | + "\tcounts num,\n" |
| | | + "\ttotal_amount sqje,\n" |
| | | + "\tBEIZ remark\n" |
| | | + "FROM\n" |
| | | + "\tl_wh_procure_model pm\n" |
| | | + "\tLEFT JOIN base_goods_models bgm ON pm.BASE_GOODS_MODELS_ID = bgm.id\n" |
| | | + "\tLEFT JOIN base_goods_template bgt ON bgm.GOODS_TEMPLATES_ID = bgt.id\n" |
| | | + "\tLEFT JOIN l_wh_form_output fo ON fo.ID = pm.BUSINESS_ID\n" |
| | | + "WHERE\n" |
| | | + "\tpm.BUSINESS_ID = 1393373943914496"; |
| | | |
| | | Map<String, Object> param = new HashMap<>(); |
| | | param.put("id", id); |
| | | List<Map<String, Object>> select = lWhFormOutputService.select(sql, param, new MapperUtil()); |
| | | |
| | | String dateForHuman = DateUtils.getDateForHuman(System.currentTimeMillis()); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | //è·åselectä¸çBUSINESS_FORM_CODEå¼ï¼ |
| | | for (Map<String, Object> item : select) { |
| | | String businessFormCode = (String) item.get("businessFormCode"); |
| | | map.put("code", businessFormCode); |
| | | Object num = item.get("num"); |
| | | map.put("numCount", 100); |
| | | map.put("amountCount", 100); |
| | | } |
| | | List<Map<String, String>> listMap = new ArrayList<>(); |
| | | map.put("code", "è´°ä½°ä¸"); |
| | | map.put("date", dateForHuman); |
| | | map.put("name", userName); |
| | | // for (int i = 0; i < 4; i++) { |
| | | // Map<String, String> lm = new HashMap<>(); |
| | | // lm.put("tenantName", i + 1 + ""); |
| | | // lm.put("goodsName", "A001"); |
| | | // lm.put("goodsModeName", "设计"); |
| | | // lm.put("num", "EasyPoi " + i + "æ"); |
| | | // lm.put("price", "弿ºé¡¹ç®"); |
| | | // lm.put("sqje", i * 10000 + ""); |
| | | // lm.put("remark", i * 10000 + ""); |
| | | // listMap.add(lm); |
| | | // } |
| | | map.put("maplist", select); |
| | | |
| | | Workbook workbook = ExcelExportUtil.exportExcel(params, map); |
| | | |
| | | try (OutputStream outputStream = response.getOutputStream()) { |
| | | response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8"); |
| | | response.setHeader("Content-disposition", "attachment;filename=" + URLEncoder.encode("éè´éè´§å.xls", "utf-8")); |
| | | workbook.write(outputStream); |
| | | workbook.close(); |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | package com.consum.base.controller; |
| | | |
| | | import cn.hutool.core.util.ReflectUtil; |
| | | import com.consum.base.BaseController; |
| | | import com.consum.base.core.CodeGeneratorEnum; |
| | | import com.consum.base.core.CodeGeneratorService; |
| | |
| | | import com.consum.base.pojo.LWhFormProcureParam; |
| | | import com.consum.base.pojo.LWhProcureModelParam; |
| | | import com.consum.base.pojo.query.FormProcureQry; |
| | | import com.consum.base.pojo.response.FormProcureVO; |
| | | import com.consum.base.pojo.response.FromProcureTemplateInfoVO; |
| | | import com.consum.base.pojo.response.GoodsModelVO; |
| | | import com.consum.base.pojo.response.LWhFormProcureExtendVO; |
| | | import com.consum.base.pojo.response.LWhFormProcureGoodsVO; |
| | | import com.consum.base.service.BaseGoodsTemplateServiceImpl; |
| | | import com.consum.base.service.BaseWarehouseServiceImpl; |
| | | import com.consum.base.service.FinSysTenantServiceImpl; |
| | | import com.consum.base.service.LOrgSupplierServiceImpl; |
| | | import com.consum.base.service.LWhFormProcureCoreService; |
| | | import com.consum.base.service.LWhFormProcureGoodsService; |
| | | import com.consum.base.service.LWhFormProcureService; |
| | | import com.consum.base.service.LWhGoodsService; |
| | | import com.consum.base.service.LWhProcureModelService; |
| | | import com.consum.model.po.BaseGoodsTemplate; |
| | | import com.consum.model.po.BaseWarehouse; |
| | | import com.consum.model.po.FinSysTenantUser; |
| | | import com.consum.model.po.LOrgSupplier; |
| | | import com.consum.model.po.LWhFormProcure; |
| | | import com.consum.model.po.LWhFormProcureGoods; |
| | | import com.consum.model.po.LWhProcureModel; |
| | | import com.consum.base.pojo.response.*; |
| | | import com.consum.base.service.*; |
| | | import com.consum.model.po.*; |
| | | import com.iplatform.model.po.S_user_core; |
| | | import com.walker.db.page.GenericPager; |
| | | import com.walker.infrastructure.utils.CollectionUtils; |
| | |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import java.lang.reflect.Field; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.HashSet; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Set; |
| | | import javax.annotation.Resource; |
| | | import org.apache.commons.compress.utils.Lists; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.lang.reflect.Field; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * @ClassName LWhFormProcureController |
| | |
| | | * @Description æ°å¢ |
| | | */ |
| | | @PostMapping("/add") |
| | | public ResponseValue add(@RequestBody LWhFormProcureParam param) { |
| | | public ResponseValue add() { |
| | | LWhFormProcureParam param = CommonUtil.getObjFromReqBody(LWhFormProcureParam.class); |
| | | LWhFormProcureParam param2 = new LWhFormProcureParam(); |
| | | CommonUtil.copyProperties(param, param2); |
| | | param = param2; |
| | | return this.add(param); |
| | | } |
| | | |
| | | private ResponseValue add(LWhFormProcureParam param) { |
| | | Long warehouseId = param.getWarehouseId(); |
| | | if (param.getWarehouseId() == null) { |
| | | return ResponseValue.error("ä»åºIDä¸è½ä¸ºç©º"); |
| | |
| | | */ |
| | | @ApiOperation(value = "éè´åå表æ¥è¯¢", notes = "éè´åå表æ¥è¯¢") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "param", value = "éè´æ¥è¯¢æ¡ä»¶", required = true, dataType = "FormProcureQryDto", paramType = "query") |
| | | @ApiImplicitParam(name = "param", value = "éè´æ¥è¯¢æ¡ä»¶", required = true, dataType = "FormProcureQryDto", paramType = "query") |
| | | }) |
| | | @GetMapping("/list") |
| | | public ResponseValue queryFormProcureList(FormProcureQry param) { |
| | | public ResponseValue queryFormProcureList() { |
| | | FormProcureQry param = CommonUtil.getObjFromReq(FormProcureQry.class); |
| | | FormProcureQry param2 = new FormProcureQry(); |
| | | CommonUtil.copyProperties(param, param2); |
| | | param = param2; |
| | | S_user_core currentUser = this.getCurrentUser(); |
| | | if (currentUser == null) { |
| | | return ResponseValue.error("ç»å½ç¨æ·ä¿¡æ¯ä¸åå¨"); |
| | |
| | | |
| | | // æ¥è¯¢åå·æ°é |
| | | String sql = "select fpg.id,BASE_CATEGORY_ID ,BASE_GOODS_TEMPLATE_ID ,GOODS_TEMPLATE_NAME ,sum(counts) count " |
| | | + "from L_WH_FORM_PROCURE_GOODS fpg left join L_WH_PROCURE_MODEL pm on fpg.id = pm.FROM_PROCURE_GOODS_ID " |
| | | + "where fpg.WH_FORM_PROCURE_ID =:id group by pm.FROM_PROCURE_GOODS_ID"; |
| | | + "from L_WH_FORM_PROCURE_GOODS fpg left join L_WH_PROCURE_MODEL pm on fpg.id = pm.FROM_PROCURE_GOODS_ID " |
| | | + "where fpg.WH_FORM_PROCURE_ID =:id group by pm.FROM_PROCURE_GOODS_ID"; |
| | | Map<String, Object> paramMap = new HashMap<>(); |
| | | paramMap.put("id", item.getId()); |
| | | List<Map<String, Object>> procureModelList = lWhProcureModelService.select(sql, paramMap, new MapperUtil()); |
| | |
| | | } |
| | | try { |
| | | Field fieldDatas = GenericPager.class.getDeclaredField("datas"); |
| | | fieldDatas.setAccessible(true); |
| | | fieldDatas.set(genericPager, result); |
| | | // fieldDatas.setAccessible(true); |
| | | // fieldDatas.set(genericPager, result); |
| | | ReflectUtil.setFieldValue(genericPager, fieldDatas, result); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | |
| | | * @Description ç¼è¾ |
| | | */ |
| | | @PostMapping("/edit") |
| | | public ResponseValue edit(@RequestBody LWhFormProcureParam param) { |
| | | public ResponseValue edit() { |
| | | LWhFormProcureParam param = CommonUtil.getObjFromReqBody(LWhFormProcureParam.class); |
| | | LWhFormProcureParam param2 = new LWhFormProcureParam(); |
| | | CommonUtil.copyProperties(param, param2); |
| | | param = param2; |
| | | ResponseValue delFlag = delById(param.getId()); |
| | | if (delFlag.getCode() == ResponseValue.CODE_SUCCESS) { |
| | | return this.add(param); |
| | |
| | | lWhFormProcureGoods.setWhFormProcureId(id); |
| | | List<LWhFormProcureGoods> formProcureGoods = lWhFormProcureGoodsService.select(lWhFormProcureGoods); |
| | | |
| | | Field fieldModels = null; |
| | | try { |
| | | fieldModels = LWhFormProcureGoodsVO.class.getDeclaredField("models"); |
| | | } catch (NoSuchFieldException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | fieldModels.setAccessible(true); |
| | | // Field fieldModels = null; |
| | | // try { |
| | | // fieldModels = LWhFormProcureGoodsVO.class.getDeclaredField("models"); |
| | | // } catch (NoSuchFieldException e) { |
| | | // e.printStackTrace(); |
| | | // } |
| | | // fieldModels.setAccessible(true); |
| | | ArrayList<LWhFormProcureGoodsVO> procureGoodsVOList = new ArrayList<>(); |
| | | for (LWhFormProcureGoods formProcureGood : formProcureGoods) { |
| | | LWhFormProcureGoodsVO lWhFormProcureGoodsVO = new LWhFormProcureGoodsVO(); |
| | |
| | | Map<String, Object> paramMap = new HashMap<>(); |
| | | paramMap.put("formProcureGoodId", formProcureGood.getId()); |
| | | String sql = "SELECT\n" + "pm.BASE_GOODS_MODELS_ID,pm.BASE_GOODS_MODELS_NAME,pm.PRICE,pm.COUNTS,pm.WOREHOUSE_COUNT,bgm.unit " + "FROM\n" |
| | | + "\tl_wh_procure_model pm\n" |
| | | + "\tLEFT JOIN base_goods_models bgm on pm.BASE_GOODS_MODELS_ID = bgm.id where pm.FROM_PROCURE_GOODS_ID =:formProcureGoodId"; |
| | | + "\tl_wh_procure_model pm\n" |
| | | + "\tLEFT JOIN base_goods_models bgm on pm.BASE_GOODS_MODELS_ID = bgm.id where pm.FROM_PROCURE_GOODS_ID =:formProcureGoodId"; |
| | | List<Map<String, Object>> procureModelList = lWhProcureModelService.select(sql, paramMap, new MapperUtil()); |
| | | List<GoodsModelVO> goodsModelVOList = Lists.newArrayList(); |
| | | procureModelList.forEach(item -> { |
| | | GoodsModelVO goodsModelVO = MapUtils.convertMapToObj(item, GoodsModelVO.class); |
| | | goodsModelVOList.add(goodsModelVO); |
| | | }); |
| | | fieldModels.set(lWhFormProcureGoodsVO, goodsModelVOList); |
| | | // fieldModels.set(lWhFormProcureGoodsVO, goodsModelVOList); |
| | | ReflectUtil.setFieldValue(lWhFormProcureGoodsVO, "models", goodsModelVOList); |
| | | |
| | | procureGoodsVOList.add(lWhFormProcureGoodsVO); |
| | | } |
| | | lWhFormProcureExtendVO.setProcureGoods(procureGoodsVOList); |
| | |
| | | @GetMapping("detail/list") |
| | | public ResponseValue queryFormProcureDetailList() { |
| | | FormProcureQry formProcureQry = CommonUtil.getObjFromReq(FormProcureQry.class); |
| | | FormProcureQry param2 = new FormProcureQry(); |
| | | CommonUtil.copyProperties(formProcureQry, param2); |
| | | formProcureQry = param2; |
| | | |
| | | S_user_core currentUser = this.getCurrentUser(); |
| | | if (currentUser == null) { |
| | | return ResponseValue.error("ç»å½ç¨æ·ä¿¡æ¯ä¸åå¨"); |
| | |
| | | import cn.afterturn.easypoi.excel.ExcelExportUtil; |
| | | import cn.afterturn.easypoi.excel.entity.ExportParams; |
| | | import com.consum.base.BaseController; |
| | | import com.consum.base.core.utils.CommonUtil; |
| | | import com.consum.base.core.utils.MapUtils; |
| | | import com.consum.base.core.utils.MapperUtil; |
| | | import com.consum.base.core.utils.PageUtil; |
| | |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.commons.compress.utils.Lists; |
| | | import org.apache.poi.ss.usermodel.Workbook; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.io.OutputStream; |
| | | import java.net.URLEncoder; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import org.apache.commons.compress.utils.Lists; |
| | | import org.apache.poi.ss.usermodel.Workbook; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * @Description æ¥åºå |
| | |
| | | */ |
| | | @ApiOperation(value = "æ°å¢æ¥åºå", notes = "æ°å¢æ¥åºå") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "param") |
| | | @ApiImplicitParam(name = "param") |
| | | }) |
| | | @PostMapping("/add") |
| | | public ResponseValue add(@RequestBody LWhFormScrappedParam param) { |
| | | public ResponseValue add() { |
| | | LWhFormScrappedParam param = CommonUtil.getObjFromReqBody(LWhFormScrappedParam.class); |
| | | LWhFormScrappedParam query = new LWhFormScrappedParam(); |
| | | CommonUtil.copyProperties(param, query); |
| | | param = query; |
| | | FinSysTenantUser sysInfo = this.getSysInfo(); |
| | | int result = this.lWhFormScrappedService.add(param, this.getCurrentUser(), sysInfo); |
| | | int result = this.lWhFormScrappedService.add(param,0, this.getCurrentUser(), sysInfo); |
| | | if (result > 0) { |
| | | return ResponseValue.success(1); |
| | | } |
| | | return ResponseValue.error("æ°å¢å¤±è´¥ï¼"); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ°å¢æ¥åºå", notes = "æ°å¢æ¥åºå") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "param") |
| | | }) |
| | | @PostMapping("/deprAdd") |
| | | public ResponseValue deprAdd() { |
| | | LWhFormScrappedParam param = CommonUtil.getObjFromReqBody(LWhFormScrappedParam.class); |
| | | LWhFormScrappedParam query = new LWhFormScrappedParam(); |
| | | CommonUtil.copyProperties(param, query); |
| | | param = query; |
| | | |
| | | FinSysTenantUser sysInfo = this.getSysInfo(); |
| | | int result = this.lWhFormScrappedService.add(param,1, this.getCurrentUser(), sysInfo); |
| | | if (result > 0) { |
| | | return ResponseValue.success(1); |
| | | } |
| | |
| | | */ |
| | | @ApiOperation(value = "å表æ¥è¯¢", notes = "å表æ¥è¯¢") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "param", value = "æ¥è¯¢æ¡ä»¶", dataType = "LWhFormScrappedQry", paramType = "query") |
| | | @ApiImplicitParam(name = "param", value = "æ¥è¯¢æ¡ä»¶", dataType = "LWhFormScrappedQry", paramType = "query") |
| | | }) |
| | | @GetMapping("/list") |
| | | public ResponseValue queryList(LWhFormScrappedQry param) { |
| | | public ResponseValue queryList() { |
| | | LWhFormScrappedQry param = CommonUtil.getObjFromReq(LWhFormScrappedQry.class); |
| | | LWhFormScrappedQry query = new LWhFormScrappedQry(); |
| | | CommonUtil.copyProperties(param, query); |
| | | param = query; |
| | | |
| | | FinSysTenantUser sysInfo = getSysInfo(); |
| | | if (sysInfo == null) { |
| | | return ResponseValue.error("ç»å½ç¨æ·ä¿¡æ¯ä¸åå¨"); |
| | |
| | | List<FromTransferTemplateInfoVO> list = Lists.newArrayList(); |
| | | // æ¥è¯¢åå·æ°é |
| | | String sql = |
| | | "SELECT fsg.id,fsg.BASE_GOODS_TEMPLATE_ID goodsTemplatesId,fsg.GOODS_TEMPLATE_NAME goodsName,sum(counts) count FROM l_wh_form_scrapped fs left join l_wh_form_scrapped_goods fsg on fs.id = fsg.FORM_SCRAPPED_ID " |
| | | + "where fsg.FORM_SCRAPPED_ID =:id group by fsg.BASE_GOODS_TEMPLATE_ID"; |
| | | "SELECT fsg.id,fsg.BASE_GOODS_TEMPLATE_ID goodsTemplatesId,fsg.GOODS_TEMPLATE_NAME goodsName,sum(counts) count FROM l_wh_form_scrapped fs left join l_wh_form_scrapped_goods fsg on fs.id = fsg.FORM_SCRAPPED_ID " |
| | | + "where fsg.FORM_SCRAPPED_ID =:id group by fsg.BASE_GOODS_TEMPLATE_ID"; |
| | | Map<String, Object> paramMap = new HashMap<>(); |
| | | paramMap.put("id", item.getId()); |
| | | List<Map<String, Object>> procureModelList = lWhFormScrappedService.select(sql, paramMap, new MapperUtil()); |
| | |
| | | */ |
| | | @ApiOperation(value = "æ ¹æ®idæ¥è¯¢è¯¦æ
", notes = "æ ¹æ®idæ¥è¯¢è¯¦æ
") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "id", value = "æ¥åºåid", dataType = "Long", paramType = "query") |
| | | @ApiImplicitParam(name = "id", value = "æ¥åºåid", dataType = "Long", paramType = "query") |
| | | }) |
| | | @GetMapping("/detail") |
| | | public ResponseValue getById(Long id) { |
| | |
| | | /** |
| | | * æ¥åºæç» |
| | | * |
| | | * @param param |
| | | * @param |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "æ¥åºæç»", notes = "æ¥åºæç»") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "param", value = "æ¥è¯¢æ¡ä»¶", dataType = "LWhFormScrappedQry", paramType = "query") |
| | | @ApiImplicitParam(name = "param", value = "æ¥è¯¢æ¡ä»¶", dataType = "LWhFormScrappedQry", paramType = "query") |
| | | }) |
| | | @GetMapping("/list/detailList") |
| | | public ResponseValue queryDetailList(LWhFormScrappedQry param) { |
| | | public ResponseValue queryDetailList( ) { |
| | | LWhFormScrappedQry param = CommonUtil.getObjFromReq(LWhFormScrappedQry.class); |
| | | LWhFormScrappedQry query = new LWhFormScrappedQry(); |
| | | CommonUtil.copyProperties(param, query); |
| | | param = query; |
| | | |
| | | FinSysTenantUser sysInfo = this.getSysInfo(); |
| | | if (sysInfo == null) { |
| | | return ResponseValue.error("ç»å½ç¨æ·ä¿¡æ¯ä¸åå¨"); |
| | |
| | | package com.consum.base.controller; |
| | | |
| | | import cn.hutool.core.util.ReflectUtil; |
| | | import com.consum.base.BaseController; |
| | | import com.consum.base.core.utils.IdUtil; |
| | | import com.consum.base.core.utils.MapUtils; |
| | | import com.consum.base.core.utils.MapperUtil; |
| | | import com.consum.base.pojo.GoodsUseRecordVO; |
| | | import com.consum.base.pojo.LWhFormTransferGoodsInfoParam; |
| | | import com.consum.base.pojo.request.ProcureModelInfoParam; |
| | | import com.consum.base.pojo.RecordUserInfoVO; |
| | | import com.consum.base.pojo.UseRecordSkuVO; |
| | | import com.consum.base.pojo.dto.UseRecordDTO; |
| | | import com.consum.base.pojo.query.TransferQry; |
| | | import com.consum.base.pojo.request.LWhFormTransferParam; |
| | | import com.consum.base.pojo.request.ProcureModelInfoParam; |
| | | import com.consum.base.pojo.response.FormTransferVO; |
| | | import com.consum.base.pojo.response.FromTransferTemplateInfoVO; |
| | | import com.consum.base.pojo.response.LWHFromTransferExtendVO; |
| | | import com.consum.base.pojo.response.TransferInfoVO; |
| | | import com.consum.base.service.BaseGoodsModelsServiceImpl; |
| | | import com.consum.base.service.BaseWarehouseServiceImpl; |
| | | import com.consum.base.service.LWhFormTransferCoreService; |
| | | import com.consum.base.service.LWhFormTransferServiceImpl; |
| | | import com.consum.base.service.LWhProcureModelService; |
| | | import com.consum.base.service.LWhProcureModelUserRecordServiceImpl; |
| | | import com.consum.base.service.LWhProcureModelUserServiceImpl; |
| | | import com.consum.model.po.BaseWarehouse; |
| | | import com.consum.model.po.FinSysTenantUser; |
| | | import com.consum.model.po.LWhFormTransfer; |
| | | import com.consum.model.po.LWhProcureModelUser; |
| | | import com.consum.model.po.LWhProcureModelUserRecord; |
| | | import com.consum.base.service.*; |
| | | import com.consum.model.po.*; |
| | | import com.consum.model.vo.LWhFormOutputVo; |
| | | import com.iplatform.model.po.S_user_core; |
| | | import com.walker.db.page.GenericPager; |
| | |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import java.lang.reflect.Field; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Optional; |
| | | import java.util.stream.Collectors; |
| | | import org.apache.commons.compress.utils.Lists; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.lang.reflect.Field; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @Description è°æ¨ç®¡ç |
| | |
| | | } |
| | | try { |
| | | Field fieldDatas = GenericPager.class.getDeclaredField("datas"); |
| | | fieldDatas.setAccessible(true); |
| | | fieldDatas.set(genericPager, result); |
| | | // fieldDatas.setAccessible(true); |
| | | // fieldDatas.set(genericPager, result); |
| | | ReflectUtil.setFieldValue(genericPager, fieldDatas, result); |
| | | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
New file |
| | |
| | | package com.consum.base.controller; |
| | | |
| | | import cn.hutool.core.convert.Convert; |
| | | import com.consum.base.BaseController; |
| | | import com.consum.base.service.LWhGoodsService; |
| | | import com.consum.model.po.FinSysTenantUser; |
| | | import com.walker.web.ResponseValue; |
| | | import io.swagger.annotations.Api; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @ClassName LWhHomeStatisticsController |
| | | * @Author cy |
| | | * @Date 2023/11/27 |
| | | * @Description |
| | | * @Version 1.0 |
| | | **/ |
| | | |
| | | @RestController |
| | | @RequestMapping("/pc/warehouse/homeStatistics") |
| | | @Api(value = "é¦é¡µç»è®¡", tags = "é¦é¡µç»è®¡") |
| | | public class LWhHomeStatisticsController extends BaseController { |
| | | @Resource |
| | | private LWhGoodsService lWhGoodsService; |
| | | |
| | | /** |
| | | * ç©åæ°ééé¢ç»è®¡ |
| | | * |
| | | * @return |
| | | */ |
| | | @GetMapping("getGoodsNumPrice") |
| | | public ResponseValue goodsNumPrice() { |
| | | /*å½åç»å½äººåªè½çå°èªå·±æºæä¸çå表*/ |
| | | FinSysTenantUser sysInfo = this.getSysInfo(); |
| | | String tenantId = sysInfo.getTenantId(); |
| | | List<Map<String, Object>> goodsNumPrice = lWhGoodsService.getGoodsNumPrice(Convert.toLong(tenantId, 0l)); |
| | | return ResponseValue.success(goodsNumPrice.get(0)); |
| | | } |
| | | } |
| | |
| | | @PostMapping("/add") |
| | | public ResponseValue add() throws Exception { |
| | | WhWarningConfigParam param = CommonUtil.getObjFromReqBody(WhWarningConfigParam.class); |
| | | WhWarningConfigParam param2 = new WhWarningConfigParam(); |
| | | CommonUtil.copyProperties(param, param2); |
| | | param = param2; |
| | | |
| | | String modelConfigStr = param.getModelConfigStr(); |
| | | Long baseWarehouseId = param.getBaseWarehouseId(); |
| | | Long baseGoodsTemplateId = param.getBaseGoodsTemplateId(); |
| | |
| | | @PostMapping("/upd") |
| | | public ResponseValue upd() { |
| | | WhWarningConfig param = CommonUtil.getObjFromReqBody(WhWarningConfig.class); |
| | | WhWarningConfig param2 = new WhWarningConfig(); |
| | | CommonUtil.copyProperties(param, param2); |
| | | param = param2; |
| | | |
| | | if (param.getId() == null || (param.getUpperLimit() == null && param.getLowerLimit() == null)) { |
| | | return ResponseValue.error("åºåä¸éãä¸éä¸è½å
¨ä¸ºç©ºï¼"); |
| | | } |
| | |
| | | @DeleteMapping("del") |
| | | public ResponseValue delById() { |
| | | WhWarningConfig param = CommonUtil.getObjFromReqBody(WhWarningConfig.class); |
| | | WhWarningConfig param2 = new WhWarningConfig(); |
| | | CommonUtil.copyProperties(param, param2); |
| | | param = param2; |
| | | if (param.getId() == null) { |
| | | return ResponseValue.error("id为空"); |
| | | } |
| | |
| | | @GetMapping("/getList") |
| | | public ResponseValue getConfigList() { |
| | | WhWarningConfigQry param = CommonUtil.getObjFromReq(WhWarningConfigQry.class); |
| | | WhWarningConfigQry param2 = new WhWarningConfigQry(); |
| | | CommonUtil.copyProperties(param, param2); |
| | | param = param2; |
| | | /*å½åç»å½äººåªè½çå°èªå·±æºæä¸çå表*/ |
| | | FinSysTenantUser sysInfo = this.getSysInfo(); |
| | | String tenantId = sysInfo.getTenantId(); |
| | |
| | | @GetMapping("/getById") |
| | | public ResponseValue getById() { |
| | | WhWarningConfig param = CommonUtil.getObjFromReq(WhWarningConfig.class); |
| | | WhWarningConfig param2 = new WhWarningConfig(); |
| | | CommonUtil.copyProperties(param, param2); |
| | | param = param2; |
| | | WhWarningConfig whWarningConfig = lWhWarningConfigService.get(param); |
| | | return ResponseValue.success(whWarningConfig); |
| | | } |
| | | |
| | | @GetMapping("/getConfigList") |
| | | public ResponseValue getConfigList(WhWarningConfig param) { |
| | | public ResponseValue getWarnConfigList() { |
| | | WhWarningConfig param = CommonUtil.getObjFromReq(WhWarningConfig.class); |
| | | WhWarningConfig param2 = new WhWarningConfig(); |
| | | CommonUtil.copyProperties(param, param2); |
| | | param = param2; |
| | | |
| | | if (param.getBaseWarehouseId() == null || param.getWarehouseType() == null || (param.getBaseGoodsModelsId() == null || param.getBaseGoodsTemplateId() == null)) { |
| | | return ResponseValue.error("缺å°å¿
è¦åæ°"); |
| | | } |
| | |
| | | @GetMapping("/getList") |
| | | public ResponseValue getList() { |
| | | WhWarningQry param = CommonUtil.getObjFromReq(WhWarningQry.class); |
| | | WhWarningQry param2 = new WhWarningQry(); |
| | | CommonUtil.copyProperties(param, param2); |
| | | param = param2; |
| | | /*å½åç»å½äººåªè½çå°èªå·±æºæä¸çå表*/ |
| | | FinSysTenantUser sysInfo = this.getSysInfo(); |
| | | String tenantId = sysInfo.getTenantId(); |
| | |
| | | @GetMapping("/handerChenKuCun") |
| | | public ResponseValue handerChenKuCun() { |
| | | WhWarningQry param = CommonUtil.getObjFromReq(WhWarningQry.class); |
| | | WhWarningQry param2 = new WhWarningQry(); |
| | | CommonUtil.copyProperties(param, param2); |
| | | param = param2; |
| | | FinSysTenantUser sysInfo = this.getSysInfo(); |
| | | long dealTime = DateUtils.getDateTimeNumber(System.currentTimeMillis()); |
| | | |
| | |
| | | package com.consum.base.core; |
| | | |
| | | import com.consum.base.core.param.BaseWarehouseParam; |
| | | import com.consum.base.core.utils.SqlParameter; |
| | | import com.consum.base.core.utils.DateUtil; |
| | | import com.consum.base.core.utils.SqlParameter; |
| | | import com.consum.model.po.*; |
| | | import com.walker.infrastructure.utils.NumberGenerator; |
| | | import com.walker.jdbc.service.BaseServiceImpl; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Propagation; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.Assert; |
| | | |
| | | import java.util.ArrayList; |
| | |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED) |
| | | public class WarehouseCoreService extends BaseServiceImpl { |
| | | |
| | | public static void main(String[] args) { |
| | |
| | | import com.walker.infrastructure.utils.NumberGenerator; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Propagation; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | |
| | | * @Version 1.0 |
| | | **/ |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED) |
| | | public class LWhWarningCoreServiceImpl { |
| | | |
| | | @Resource |
| | |
| | | |
| | | StringBuilder sql = new StringBuilder(KU_CUN_NORMAL_MODEL); |
| | | if (!org.springframework.util.CollectionUtils.isEmpty(normalBaseModelIdList)) { |
| | | sql.append(" and BASE_GOODS_MODELS_ID in(?)"); |
| | | params.add(org.apache.commons.lang3.StringUtils.join(normalBaseModelIdList, ",")); |
| | | sql.append(" and BASE_GOODS_MODELS_ID in(").append( org.apache.commons.lang3.StringUtils.join(normalBaseModelIdList, ",")).append(")"); |
| | | } |
| | | return lWhWarningService.update(sql.toString(), params.toArray()); |
| | | } |
| | |
| | | package com.consum.base.core.utils; |
| | | |
| | | import cn.hutool.core.util.ReflectUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import java.lang.reflect.Field; |
| | | import java.util.HashMap; |
| | | import java.util.Iterator; |
| | | import java.util.Map; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | @Slf4j |
| | | public class MapUtils { |
| | |
| | | T obj = clazz.newInstance(); |
| | | for (Map.Entry<String, Object> entry : map.entrySet()) { |
| | | Field field = clazz.getDeclaredField(entry.getKey()); |
| | | field.setAccessible(true); |
| | | field.set(obj, entry.getValue()); |
| | | // field.setAccessible(true); |
| | | // field.set(obj, entry.getValue()); |
| | | ReflectUtil.setFieldValue(obj, field, entry.getValue()); |
| | | } |
| | | return obj; |
| | | } catch (InstantiationException | IllegalAccessException | NoSuchFieldException e) { |
| | |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import java.util.List; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel(value = "æ°å¢æ¥åºåä¿¡æ¯") |
| | |
| | | */ |
| | | @ApiModelProperty(value = "æºæid") |
| | | private Long agencyId; |
| | | |
| | | @ApiModelProperty(value = "é¨é¨id") |
| | | private Long departmentId; |
| | | |
| | | /** |
| | | * ä»åºç¼å· |
| | | */ |
| | |
| | | package com.consum.base.pojo.query; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | @ApiModelProperty(value = "ç©å模çåç§°") |
| | | private String goodsName; |
| | | /** |
| | | * ç©å模çåç§° |
| | | */ |
| | | @ApiModelProperty(value = "ç©å模çid") |
| | | private String baseGoodsId; |
| | | /** |
| | | * æºæ |
| | | */ |
| | | @ApiModelProperty(value = "æºæ") |
| | |
| | | * éè¿å
¥åº map.put("4" + "1", "6") |
| | | * ç³é¢åºåº map.put("4" + "2", "7") |
| | | */ |
| | | @ApiModelProperty(value = "1=éè´å
¥åº,2=è°æ¨å
¥åº,") |
| | | @ApiModelProperty(value = "1éè´å
¥åº 2éè¿å
¥åº 3è°æ¨å
¥åº 4ççå
¥åº 5ç³é¢åºåº 6è°æ¨åºåº 7çäºåºåº 8æ¥åºåºåº 9å
¶ä»åºåº") |
| | | private Integer states; |
| | | |
| | | /** |
| | | * å
¥åºæ¶é´ å¼å§ |
| | | */ |
| | | @ApiModelProperty(value = "å¼å§æ¶é´") |
| | | @JsonFormat(pattern = "yyyyMMdd", timezone = "GMT+8") |
| | | private Long startTime; |
| | | /** |
| | | * å
¥åºæ¶é´ ç»æ |
| | | */ |
| | | @ApiModelProperty(value = "ç»ææ¶é´") |
| | | @JsonFormat(pattern = "yyyyMMdd", timezone = "GMT+8") |
| | | private Long endTime; |
| | | /** |
| | | * è§æ ¼åå·id |
| | |
| | | private Long agencyId; |
| | | |
| | | @ApiModelProperty("ä»åºç±»å") |
| | | private Long warehouseType; |
| | | private Short warehouseType; |
| | | |
| | | @ApiModelProperty("ä»åºid") |
| | | private Long warehouseId; |
| | |
| | | @ApiModelProperty("ç¶æï¼1=æªæ¥çï¼2=å·²æ¥çï¼") |
| | | private Integer states; |
| | | |
| | | @ApiModelProperty("é¢è¦ç±»åï¼1=è¶
ä¸éï¼2=è¶
ä¸éï¼") |
| | | private Short warningType; |
| | | |
| | | @ApiModelProperty(value = "æ¯é¡µæ¾ç¤ºæ¡æ°") |
| | | private Integer pageSize = 10; |
| | | |
| | |
| | | @Service |
| | | public class FinWarehouseLedgerServiceImpl extends BaseServiceImpl { |
| | | |
| | | private static String LEDGER_LIST_QUERY_PREFIX = "SELECT ware.AGENCY_NAME ,ware.WAREHOUSE_NAME ,goodsTemp.CATEGORY_NAME ,CASE goods.COST_TYPE WHEN 1 THEN 'Aç±»' WHEN 2 THEN 'Bç±»' WHEN 3 THEN 'Cç±»' END AS cost_Type,goods.GOODS_TEMPLATE_NAME ,goods.BASE_GOODS_MODELS_NAME ,goods.UNIT unit,COUNt(goods.id) kucun FROM L_WH_GOODS goods LEFT JOIN BASE_GOODS_TEMPLATE goodsTemp ON goods.BASE_GOODS_TEMPLATE_ID=goodsTemp.id LEFT JOIN BASE_WAREHOUSE ware ON ware.id=goods.WAREHOUSE_ID where 1=1 "; |
| | | private String LEDGER_LIST_QUERY_PREFIX = "SELECT ware.AGENCY_NAME ,ware.WAREHOUSE_NAME ,goodsTemp.CATEGORY_NAME ,CASE goods.COST_TYPE WHEN 1 THEN 'Aç±»' WHEN 2 THEN 'Bç±»' WHEN 3 THEN 'Cç±»' END AS cost_Type,goods.GOODS_TEMPLATE_NAME ,goods.BASE_GOODS_MODELS_NAME ,goods.UNIT unit,COUNt(goods.id) kucun FROM L_WH_GOODS goods LEFT JOIN BASE_GOODS_TEMPLATE goodsTemp ON goods.BASE_GOODS_TEMPLATE_ID=goodsTemp.id LEFT JOIN BASE_WAREHOUSE ware ON ware.id=goods.WAREHOUSE_ID where 1=1 "; |
| | | private String LEDGER_LIST_QUERY_GROUP = " GROUP BY ware.AGENCY_NAME,ware.WAREHOUSE_NAME,goodsTemp.CATEGORY_NAME,goods.COST_TYPE,goods.GOODS_TEMPLATE_NAME,goods.BASE_GOODS_MODELS_NAME,goods.UNIT"; |
| | | |
| | | public GenericPager<Map<String, Object>> ledgerList(LWhLedgerQry param) { |
| | | StringBuilder sql = new StringBuilder(LEDGER_LIST_QUERY_PREFIX); |
| | |
| | | sql.append(" AND goods.COST_TYPE=:costType"); |
| | | paramts.put("costType", param.getCostType()); |
| | | } |
| | | sql.append(" GROUP BY ware.AGENCY_NAME,ware.WAREHOUSE_NAME,goodsTemp.CATEGORY_NAME,goods.COST_TYPE,goods.GOODS_TEMPLATE_NAME,goods.BASE_GOODS_MODELS_NAME,goods.UNIT"); |
| | | sql.append(LEDGER_LIST_QUERY_GROUP); |
| | | return selectSplit(sql.toString(), paramts, param.getPageNum(), param.getPageSize(), new MapperUtil()); |
| | | } |
| | | |
| | | private String DEPART_LEDGER_LIST_QUERY_PREFIX = "SELECT tenant.id tenantId,tenant.NAME AS AGENCY_NAME,ware.NAME AS depart_name,goodsTemp.CATEGORY_NAME,CASE goods.COST_TYPE WHEN 1 THEN 'Aç±»' WHEN 2 THEN 'Bç±»' WHEN 3 THEN 'Cç±»' END AS cost_Type,goods.GOODS_TEMPLATE_NAME,goods.BASE_GOODS_MODELS_NAME,goods.UNIT unit,COUNt(goods.id) kucun FROM L_WH_GOODS goods LEFT JOIN BASE_GOODS_TEMPLATE goodsTemp ON goods.BASE_GOODS_TEMPLATE_ID=goodsTemp.id LEFT JOIN fin_sys_tenant_department ware ON ware.id=goods.WAREHOUSE_ID AND goods.WAREHOUSE_TYPE=1 LEFT JOIN fin_sys_tenant tenant ON tenant.id=ware.TENANT_ID WHERE 1=1 "; |
| | | private String DEPART_LEDGER_LIST_QUERY_GROUP = " GROUP BY tenant.id,tenant.NAME,ware.NAME,goodsTemp.CATEGORY_NAME,goods.COST_TYPE,goods.GOODS_TEMPLATE_NAME,goods.BASE_GOODS_MODELS_NAME,goods.UNIT"; |
| | | |
| | | public GenericPager<Map<String, Object>> departLedgerList(LWhLedgerQry param) { |
| | | StringBuilder sql = new StringBuilder(DEPART_LEDGER_LIST_QUERY_PREFIX); |
| | | Map<String, Object> paramts = new HashMap<>(); |
| | | //ç¶æï¼0=å¨éè°æ¨ï¼1=å
¥åºæªååï¼2=å·²ä¸åï¼3=æ¥åº 4 é¶æåºåºï¼ |
| | | if (param.getStates() != null) { |
| | | sql.append(" and goods.states = :states"); |
| | | paramts.put("states", param.getStates()); |
| | | } |
| | | //æºæ |
| | | if (param.getAgencyId() != null) { |
| | | sql.append(" and left(ware.AGENCY_ID, length(:lengthAgencyId)) = :agencyId"); |
| | | paramts.put("lengthAgencyId", param.getAgencyId()); |
| | | paramts.put("agencyId", param.getAgencyId()); |
| | | } |
| | | //ä»åºç±»å |
| | | if (param.getWarehouseType() != null) { |
| | | sql.append(" AND goods.WAREHOUSE_TYPE = :warehouseType"); |
| | | paramts.put("warehouseType", param.getWarehouseType()); |
| | | } |
| | | if (param.getWarehouseId() != null) { |
| | | sql.append(" AND goods.WAREHOUSE_ID = :warehouseId"); |
| | | paramts.put("warehouseId", param.getWarehouseId()); |
| | | } |
| | | //ç©ååç§° |
| | | if (StringUtils.isNotEmpty(param.getGoodsTemplateName())) { |
| | | sql.append(" AND goods.GOODS_TEMPLATE_NAME like :goodsTemplateName"); |
| | | paramts.put("goodsTemplateName", StringUtils.CHAR_PERCENT + param.getGoodsTemplateName() + StringUtils.CHAR_PERCENT); |
| | | } |
| | | if (param.getGoodsTemplateId() != null) { |
| | | sql.append(" AND goods.BASE_GOODS_TEMPLATE_ID=:goodsTemplateId"); |
| | | paramts.put("goodsTemplateId", param.getGoodsTemplateId()); |
| | | } |
| | | //åç±» |
| | | if (param.getCategoryId() != null) { |
| | | sql.append(" AND goodsTemp.CATEGORY_ID=:categoryId"); |
| | | paramts.put("categoryId", param.getCategoryId()); |
| | | } |
| | | //ä»·å¼ç±»å |
| | | if (param.getCostType() != null) { |
| | | sql.append(" AND goods.COST_TYPE=:costType"); |
| | | paramts.put("costType", param.getCostType()); |
| | | } |
| | | sql.append(DEPART_LEDGER_LIST_QUERY_GROUP); |
| | | return selectSplit(sql.toString(), paramts, param.getPageNum(), param.getPageSize(), new MapperUtil()); |
| | | } |
| | | } |
| | |
| | | import org.springframework.jdbc.core.namedparam.SqlParameterSource; |
| | | import org.springframework.jdbc.core.simple.SimpleJdbcCall; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Propagation; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.PostConstruct; |
| | | import java.util.List; |
| | |
| | | **/ |
| | | @Service |
| | | @Slf4j |
| | | @Transactional(propagation = Propagation.REQUIRED) |
| | | public class LWarehouseFlowCoreService { |
| | | |
| | | private final JdbcTemplate jdbcTemplate; |
| | |
| | | //éè´æ¹å¼ï¼1ï¼ééï¼2=èªéï¼ |
| | | short buyType = lWhFormProcure.getBuyType().shortValue(); |
| | | //éè´æ¶é´ |
| | | Long procureTime = lWhFormProcure.getProcureTime(); |
| | | |
| | | Long procureTime2 = lWhFormProcure.getProcureTime(); |
| | | Long procureTime = procureTime2 == null ? dealTime : procureTime2; |
| | | // æå
¥æµæ°´æ»è¡¨ |
| | | int flowInsertFlag = lWarehouseFlowService.insert(warehouseFlow); |
| | | if (flowInsertFlag == 0) { |
| | |
| | | import com.walker.db.page.GenericPager; |
| | | import com.walker.infrastructure.utils.StringUtils; |
| | | import com.walker.jdbc.service.BaseServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * @ClassName LWarehouseFlowService |
| | |
| | | } |
| | | if (StringUtils.isNotEmpty(param.getBusinessFormCode())) { |
| | | sql.append(" AND CASE WHEN flow.BUSINESS_TYPE = 1 THEN tCaiGou.BUSINESS_FORM_CODE=:businessFormCode" |
| | | + " WHEN flow.BUSINESS_TYPE = 3 THEN tFormOut.BUSINESS_FORM_CODE=:businessFormCode END"); |
| | | + " WHEN flow.BUSINESS_TYPE = 3 THEN tFormOut.BUSINESS_FORM_CODE=:businessFormCode END"); |
| | | paramts.put("businessFormCode", param.getBusinessFormCode()); |
| | | // sql.append(" AND CASE WHEN flow.BUSINESS_TYPE = 1 THEN flow.BUSINESS_FORM_CODE=?"); |
| | | // params.add(param.getBusinessFormCode()); |
| | |
| | | } |
| | | if (param.getCreatedName() != null) { |
| | | sql.append(" AND CASE" + " WHEN flow.BUSINESS_TYPE = 1 THEN tCaiGou.BUYER_NAME LIKE :createdName" |
| | | + " WHEN flow.BUSINESS_TYPE = 3 THEN tFormOut.OPERATOR_NAME LIKE :createdName END"); |
| | | + " WHEN flow.BUSINESS_TYPE = 3 THEN tFormOut.OPERATOR_NAME LIKE :createdName END"); |
| | | paramts.put("createdName", StringUtils.CHAR_PERCENT + param.getCreatedName() + StringUtils.CHAR_PERCENT); |
| | | } |
| | | if (param.getDealTimeStart() != null) { |
| | |
| | | Map<String, Object> paramts = new HashMap<>(); |
| | | if (StringUtils.isNotEmpty(param.getBusinessFormCode())) { |
| | | sql.append("AND CASE WHEN flow.BUSINESS_TYPE = 1 THEN tCaiGou.BUSINESS_FORM_CODE=:businessFormCode" |
| | | + " WHEN flow.BUSINESS_TYPE = 3 THEN tFormOut.BUSINESS_FORM_CODE=:businessFormCode END "); |
| | | + " WHEN flow.BUSINESS_TYPE = 3 THEN tFormOut.BUSINESS_FORM_CODE=:businessFormCode END "); |
| | | paramts.put("businessFormCode", param.getBusinessFormCode()); |
| | | } |
| | | if (StringUtils.isNotEmpty(param.getGoodsName())) { |
| | |
| | | |
| | | if (StringUtils.isNotEmpty(param.getCreateName())) { |
| | | sql.append("AND CASE WHEN flow.BUSINESS_TYPE = 1 THEN tCaiGou.BUYER_NAME = :createdName" |
| | | + " WHEN flow.BUSINESS_TYPE = 3 THEN tFormOut.OPERATOR_NAME = :createdName END "); |
| | | + " WHEN flow.BUSINESS_TYPE = 3 THEN tFormOut.OPERATOR_NAME = :createdName END "); |
| | | paramts.put("createdName", param.getCreateName()); |
| | | } |
| | | if (param.getStartTime() != null) { |
| | |
| | | paramts.put("panDianBusinessFormCode", businessFormCode); |
| | | |
| | | sqlEnd.append(" and case when flow.BUSINESS_TYPE = 1 THEN tCaiGou.BUSINESS_FORM_CODE" + |
| | | " WHEN ( flow.BUSINESS_TYPE = 2 OR flow.BUSINESS_TYPE = 4 OR flow.BUSINESS_TYPE = 6 ) THEN tTrans.BUSINESS_FORM_CODE" + |
| | | " WHEN flow.BUSINESS_TYPE = 3 THEN tFormOut.BUSINESS_FORM_CODE" + |
| | | " WHEN flow.BUSINESS_TYPE = 5 THEN tScrapped.BUSINESS_FORM_CODE" + |
| | | " WHEN flow.BUSINESS_TYPE = 7 THEN tInventory.BUSINESS_FORM_CODE end =:whereBusinessFormCode"); |
| | | " WHEN ( flow.BUSINESS_TYPE = 2 OR flow.BUSINESS_TYPE = 4 OR flow.BUSINESS_TYPE = 6 ) THEN tTrans.BUSINESS_FORM_CODE" + |
| | | " WHEN flow.BUSINESS_TYPE = 3 THEN tFormOut.BUSINESS_FORM_CODE" + |
| | | " WHEN flow.BUSINESS_TYPE = 5 THEN tScrapped.BUSINESS_FORM_CODE" + |
| | | " WHEN flow.BUSINESS_TYPE = 7 THEN tInventory.BUSINESS_FORM_CODE end =:whereBusinessFormCode"); |
| | | paramts.put("whereBusinessFormCode", businessFormCode); |
| | | |
| | | |
| | |
| | | |
| | | StringBuilder sql = new StringBuilder(); |
| | | sql.append(sqlQuery) |
| | | .append(sqlEndRecord) |
| | | .append(sqlCaiGou) |
| | | .append(sqlDiaoBo) |
| | | .append(sqlChuKu) |
| | | .append(sqlBaoFei) |
| | | .append(sqlPanDian) |
| | | .append(sqlEndRecord) |
| | | .append(sqlCaiGou) |
| | | .append(sqlDiaoBo) |
| | | .append(sqlChuKu) |
| | | .append(sqlBaoFei) |
| | | .append(sqlPanDian) |
| | | |
| | | .append(sqlEnd); |
| | | .append(sqlEnd); |
| | | |
| | | return selectSplit(sql.toString(), paramts, param.getPageNum(), param.getPageSize(), new MapperUtil()); |
| | | } |
| | | |
| | | |
| | | public GenericPager<Map<String, Object>> queryAllBusinessFlow(LWhFormOutputQry param) { |
| | | StringBuilder sql = new StringBuilder("SELECT\n" |
| | | + "CASE WHEN flow.BUSINESS_TYPE=1 THEN tCaiGou.id \n" |
| | | + "WHEN (flow.BUSINESS_TYPE=2 OR flow.BUSINESS_TYPE=4 OR flow.BUSINESS_TYPE=6) THEN tTrans.id \n" |
| | | + "WHEN flow.BUSINESS_TYPE=3 THEN tFormOut.id \n" |
| | | + "WHEN flow.BUSINESS_TYPE=5 THEN tScrapped.id \n" |
| | | + "WHEN flow.BUSINESS_TYPE=7 THEN tInventory.id END id,\n" |
| | | + "\n" |
| | | + "CASE WHEN flow.BUSINESS_TYPE=1 THEN tCaiGou.BUSINESS_FORM_CODE \n" |
| | | + "WHEN (flow.BUSINESS_TYPE=2 OR flow.BUSINESS_TYPE=4 OR flow.BUSINESS_TYPE=6) THEN tTrans.BUSINESS_FORM_CODE \n" |
| | | + "WHEN flow.BUSINESS_TYPE=3 THEN tFormOut.BUSINESS_FORM_CODE \n" |
| | | + "WHEN flow.BUSINESS_TYPE=5 THEN tScrapped.BUSINESS_FORM_CODE \n" |
| | | + "WHEN flow.BUSINESS_TYPE=7 THEN tInventory.BUSINESS_FORM_CODE END BUSINESS_FORM_CODE,\n" |
| | | + "\n" |
| | | + "CASE WHEN flow.BUSINESS_TYPE=1 THEN tCaiGou.AGENCY_NAME \n" |
| | | + "WHEN (flow.BUSINESS_TYPE=2 OR flow.BUSINESS_TYPE=4 OR flow.BUSINESS_TYPE=6) THEN tTrans.OPERATOR_NAME \n" |
| | | + "WHEN flow.BUSINESS_TYPE=3 THEN tFormOut.AGENCY_NAME \n" |
| | | + "WHEN flow.BUSINESS_TYPE=5 THEN tScrapped.AGENCY_NAME \n" |
| | | + "WHEN flow.BUSINESS_TYPE=7 THEN tInventory.AGENCY_NAME END AGENCY_NAME,\n" |
| | | + "\n" |
| | | + "record.GOODS_TEMPLATE_NAME,\n" |
| | | + "record.BASE_GOODS_MODELS_NAME,\n" |
| | | + "record.THIS_TYPE,\n" |
| | | + "flow.BUSINESS_TYPE,\n" |
| | | + "record.THIS_COUNT,\n" |
| | | + "flow.DEAL_TIME,\n" |
| | | + "flow.OPERATOR_NAME,\n" |
| | | + "record.TOTAL_PRICE\n" |
| | | + "FROM L_WAREHOUSE_FLOW flow\n" |
| | | + "LEFT JOIN L_WH_GOODS_RECORD record ON flow.id=record.WAREHOUSE_FLOW_ID\n" |
| | | + "LEFT JOIN L_WH_FORM_PROCURE tCaiGou ON flow.BUSINESS_TYPE=1 AND tCaiGou.id=flow.BUSINESS_FORM_ID\n" |
| | | + "LEFT JOIN L_WH_FORM_TRANSFER tTrans ON (flow.BUSINESS_TYPE=2 or flow.BUSINESS_TYPE=4 or flow.BUSINESS_TYPE=6) AND tTrans.id=flow.BUSINESS_FORM_ID\n" |
| | | + "LEFT JOIN L_WH_FORM_OUTPUT tFormOut ON flow.BUSINESS_TYPE=3 AND tFormOut.id=flow.BUSINESS_FORM_ID\n" |
| | | + "LEFT JOIN L_WH_FORM_INVENTORY tInventory ON flow.BUSINESS_TYPE=7 AND tInventory.id=flow.BUSINESS_FORM_ID\n" |
| | | + "LEFT JOIN L_WH_FORM_SCRAPPED tScrapped ON flow.BUSINESS_TYPE=5 AND tScrapped.id=flow.BUSINESS_FORM_ID\n" |
| | | + "LEFT JOIN base_warehouse bw ON flow.WAREHOUSE_ID = bw.id\n" |
| | | + "LEFT JOIN fin_sys_tenant fst ON fst.id = bw.AGENCY_ID\n" |
| | | + "WHERE record.id IS NOT NULL "); |
| | | |
| | | HashMap<String, Object> paramts = new HashMap<>(); |
| | | //æºæ |
| | | if (param.getAgencyId() != null) { |
| | | sql.append("AND fst.id like :agencyId "); |
| | | paramts.put("agencyId", param.getAgencyId() + StringUtils.CHAR_PERCENT); |
| | | } |
| | | |
| | | //ç©ååç§° |
| | | if (StringUtils.isNotEmpty(param.getGoodsName())) { |
| | | sql.append(" AND record.GOODS_TEMPLATE_NAME like :goodsTemplateName"); |
| | | paramts.put("goodsTemplateName", StringUtils.CHAR_PERCENT + param.getGoodsName() + StringUtils.CHAR_PERCENT); |
| | | } |
| | | if (param.getBaseGoodsId() != null) { |
| | | sql.append(" AND record.BASE_GOODS_TEMPLATE_ID=:goodsTemplateId"); |
| | | paramts.put("goodsTemplateId", param.getBaseGoodsId()); |
| | | } |
| | | //è§æ ¼åå· |
| | | if (param.getBaseGoodsModelsId() != null) { |
| | | sql.append(" AND record.BASE_GOODS_MODELS_ID=:baseGoodsModelsId"); |
| | | paramts.put("baseGoodsModelsId", param.getBaseGoodsModelsId()); |
| | | } |
| | | // åç 表ï¼1éè´å
¥åº 2éè¿å
¥åº 3è°æ¨å
¥åº 4ççå
¥åº 5ç³é¢åºåº 6è°æ¨åºåº 7çäºåºåº 8æ¥åºåºåº 9å
¶ä»åºåº |
| | | Integer flowType = param.getStates(); |
| | | if (flowType != null) { |
| | | Map<String, Short> typeByFlowType = WhBusinessEnum.getTypeByFlowType(flowType.shortValue()); |
| | | //æ¬æ¬¡è°æ´ç±»åï¼1=è°å¢ï¼2=è°åï¼ |
| | | Short flowThisType = typeByFlowType.get("flowThisType"); |
| | | //åæ®ç±»å 1 éè´2 è°æ¨ 3åºåº4é¨é¨åå5æ¥åº6é¨é¨ç©ååéä»åº7ç©åçç¹ |
| | | Short flowBusinessType = typeByFlowType.get("flowBusinessType"); |
| | | if (flowThisType != null) { |
| | | sql.append(" AND flow.THIS_TYPE=:flowThisType"); |
| | | paramts.put("flowThisType", flowThisType); |
| | | } |
| | | if (flowBusinessType != null) { |
| | | sql.append(" AND flow.BUSINESS_TYPE=:flowBusinessType"); |
| | | paramts.put("flowBusinessType", flowBusinessType); |
| | | } |
| | | } |
| | | // åå· |
| | | String businessFormCode = param.getBusinessFormCode(); |
| | | if (StringUtils.isNotEmpty(businessFormCode)) { |
| | | sql.append(" and case when flow.BUSINESS_TYPE = 1 THEN tCaiGou.BUSINESS_FORM_CODE =:whereBusinessFormCode" + |
| | | " WHEN ( flow.BUSINESS_TYPE = 2 OR flow.BUSINESS_TYPE = 4 OR flow.BUSINESS_TYPE = 6 ) THEN tTrans.BUSINESS_FORM_CODE =:whereBusinessFormCode" + |
| | | " WHEN flow.BUSINESS_TYPE = 3 THEN tFormOut.BUSINESS_FORM_CODE=:whereBusinessFormCode" + |
| | | " WHEN flow.BUSINESS_TYPE = 5 THEN tScrapped.BUSINESS_FORM_CODE =:whereBusinessFormCode" + |
| | | " WHEN flow.BUSINESS_TYPE = 7 THEN tInventory.BUSINESS_FORM_CODE =:whereBusinessFormCode end"); |
| | | paramts.put("whereBusinessFormCode", businessFormCode); |
| | | |
| | | } |
| | | // æä½æ¶é´ |
| | | if (param.getStartTime() != null) { |
| | | sql.append(" and flow.DEAL_TIME >=:dealTimeStart "); |
| | | paramts.put("dealTimeStart", param.getStartTime() * 1000000); |
| | | } |
| | | if (param.getEndTime() != null) { |
| | | sql.append(" and flow.DEAL_TIME <:dealTimeEnd "); |
| | | paramts.put("dealTimeEnd", param.getEndTime() * 1000000 + 240000); |
| | | } |
| | | sql.append(" ORDER BY record.DEAL_TIME desc,record.id DESC "); |
| | | return selectSplit(sql.toString(), paramts, param.getPageNum(), param.getPageSize(), new MapperUtil()); |
| | | } |
| | | } |
| | |
| | | import com.consum.base.core.CodeGeneratorService; |
| | | import com.consum.base.core.WhBusinessEnum; |
| | | import com.consum.base.core.utils.IdUtil; |
| | | import com.consum.model.po.BaseWarehouse; |
| | | import com.consum.model.po.FinSysTenantUser; |
| | | import com.consum.model.po.LWhFormInventory; |
| | | import com.consum.model.po.LWhFormInventoryGoods; |
| | | import com.consum.model.po.LWhFormOutput; |
| | | import com.consum.model.po.LWhFormProcure; |
| | | import com.consum.model.po.LWhFormProcureGoods; |
| | | import com.consum.model.po.LWhProcureModel; |
| | | import com.consum.model.po.*; |
| | | import com.iplatform.model.po.S_user_core; |
| | | import com.walker.infrastructure.utils.NumberGenerator; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Propagation; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.transaction.interceptor.TransactionAspectSupport; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.transaction.interceptor.TransactionAspectSupport; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | /** |
| | | * @ClassName LWhFormInventoryCoreService |
| | |
| | | **/ |
| | | @Slf4j |
| | | @Service |
| | | @Transactional(propagation = Propagation.REQUIRED) |
| | | public class LWhFormInventoryCoreService { |
| | | |
| | | private LWhFormInventoryGoodsServiceImpl lWhFormInventoryGoods; |
| | |
| | | |
| | | @Autowired |
| | | public LWhFormInventoryCoreService(LWhFormInventoryGoodsServiceImpl lWhFormInventoryGoods, |
| | | LWhFormOutputCoreService lWhFormOutputCoreService, |
| | | CodeGeneratorService codeGeneratorService, |
| | | LWhFormProcureService lWhFormProcureService, |
| | | BaseWarehouseServiceImpl baseWarehouseService, |
| | | LWhFormProcureGoodsService lWhFormProcureGoodsService, |
| | | LWhProcureModelService lWhProcureModelService, |
| | | BaseGoodsTemplateServiceImpl baseGoodsTemplateService, |
| | | LWhGoodsService lWhGoodsService, |
| | | LWhFormInventoryServiceImpl lWhFormInventoryService, |
| | | LWhFormProcureCoreService lWhFormProcureCoreService, |
| | | LWhFormOutputServiceImpl lWhFormOutputService |
| | | LWhFormOutputCoreService lWhFormOutputCoreService, |
| | | CodeGeneratorService codeGeneratorService, |
| | | LWhFormProcureService lWhFormProcureService, |
| | | BaseWarehouseServiceImpl baseWarehouseService, |
| | | LWhFormProcureGoodsService lWhFormProcureGoodsService, |
| | | LWhProcureModelService lWhProcureModelService, |
| | | BaseGoodsTemplateServiceImpl baseGoodsTemplateService, |
| | | LWhGoodsService lWhGoodsService, |
| | | LWhFormInventoryServiceImpl lWhFormInventoryService, |
| | | LWhFormProcureCoreService lWhFormProcureCoreService, |
| | | LWhFormOutputServiceImpl lWhFormOutputService |
| | | |
| | | ) { |
| | | this.lWhFormInventoryGoods = lWhFormInventoryGoods; |
| | |
| | | return "æ²¡ææ¾å°çç¹åç»æç©å"; |
| | | } |
| | | Map<Integer, List<LWhFormInventoryGoods>> inventoryGoodsMap = lWhFormInventoryGoods.stream() |
| | | .filter(goods -> goods.getInventoryResult() == 2 || goods.getInventoryResult() == 3) |
| | | .collect(Collectors.groupingBy(LWhFormInventoryGoods::getInventoryResult)); |
| | | .filter(goods -> goods.getInventoryResult() == 2 || goods.getInventoryResult() == 3) |
| | | .collect(Collectors.groupingBy(LWhFormInventoryGoods::getInventoryResult)); |
| | | if (CollectionUtils.isEmpty(lWhFormInventoryGoods)) { |
| | | // rtnMap.put("status", true); |
| | | return null; |
| | |
| | | // rtnMap.put("errMsg", "å建å
¥åºå失败"); |
| | | return "å建å
¥åºå失败"; |
| | | } |
| | | Long inFormByInventoryId = (Long) inOutMap.get("inId"); |
| | | inOutMap.putAll(rkMap); |
| | | Long inFormByInventoryId = (Long) inOutMap.get("inId"); |
| | | String errMsg = lWhFormProcureCoreService.doProcure(inFormByInventoryId, currentUser); |
| | | if (errMsg != null) { |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | |
| | | inOutMap.putAll(ckMap); |
| | | Long lWhFormOutputId = (Long) inOutMap.get("outId"); |
| | | //2.æ ¹æ®åºåºååºåº |
| | | Long lWarehouseFlowId = lWhFormOutputCoreService.outFormByTransId(lWhFormOutputId, WhBusinessEnum.CAIGOU, currentUser, stopTime); |
| | | Long lWarehouseFlowId = lWhFormOutputCoreService.outFormByTransId(lWhFormOutputId, WhBusinessEnum.PANDIAN, currentUser, stopTime); |
| | | if (lWarehouseFlowId == null) { |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | // throw new RuntimeException("å建åºåºå失败"); |
| | |
| | | * @param currentUser |
| | | */ |
| | | private Map<String, Object> createInFormByInventoryId(Long warehouseId, Long procureTime, List<LWhFormInventoryGoods> inventoryGoodsList, |
| | | S_user_core currentUser) { |
| | | S_user_core currentUser) { |
| | | if (CollectionUtils.isEmpty(inventoryGoodsList)) { |
| | | return null; |
| | | } |
| | |
| | | * @param currentUser |
| | | */ |
| | | private Map<String, Object> createOutFormByInventoryId(Long warehouseId, Long procureTime, List<LWhFormInventoryGoods> inventoryGoodsList, |
| | | S_user_core currentUser, FinSysTenantUser sysInfo) { |
| | | S_user_core currentUser, FinSysTenantUser sysInfo) { |
| | | if (CollectionUtils.isEmpty(inventoryGoodsList)) { |
| | | return null; |
| | | } |
| | |
| | | //åºå
¥åºid |
| | | long lWhFormOutputId = IdUtil.generateId(); |
| | | lWhFormOutput.setId(lWhFormOutputId); |
| | | lWhFormOutput.setOutWarehouseType(0); |
| | | lWhFormOutput.setWarehouseId(warehouseId); |
| | | //æ ¹æ®ä»åºidæ¥è¯¢ä»åº |
| | | BaseWarehouse warehouse = this.baseWarehouseService.getById(warehouseId); |
| | |
| | | if (flag1 != 1) { |
| | | return null; |
| | | } |
| | | ArrayList<LWhProcureModel> lWhProcureModels = new ArrayList<>(); |
| | | for (LWhFormInventoryGoods inventoryGoods : inventoryGoodsList) { |
| | | Long baseGoodsModelsId = inventoryGoods.getBaseGoodsModelsId(); |
| | | Integer counts = inventoryGoods.getErrorCounts(); |
| | |
| | | //æ°å¢L_WH_PROCURE_MODELè®°å½ |
| | | LWhProcureModel lWhProcureModel = new LWhProcureModel(); |
| | | lWhProcureModel.setId(IdUtil.generateId()); |
| | | lWhProcureModel.setBusinessType(3); |
| | | lWhProcureModel.setBusinessType(WhBusinessEnum.CHUKU.getValue() + 0); |
| | | lWhProcureModel.setBusinessId(lWhFormOutputId); |
| | | lWhProcureModel.setBaseGoodsModelsId(baseGoodsModelsId); |
| | | lWhProcureModel.setCounts(counts); |
| | | lWhProcureModel.setWorehouseCount(goodsNum); |
| | | lWhProcureModelService.insert(lWhProcureModel); |
| | | // lWhProcureModelService.insert(lWhProcureModel); |
| | | lWhProcureModels.add(lWhProcureModel); |
| | | } |
| | | if (!CollectionUtils.isEmpty(lWhProcureModels)) { |
| | | lWhProcureModelService.insertBatch(lWhProcureModels); |
| | | } |
| | | HashMap<String, Object> rtnMap = new HashMap<>(); |
| | | rtnMap.put("outId", lWhFormOutputId); |
| | |
| | | import java.util.List; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Propagation; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | /** |
| | | * @Description çç¹åç©å |
| | |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | @Transactional(propagation = Propagation.REQUIRED) |
| | | public class LWhFormInventoryGoodsServiceImpl extends BaseServiceImpl { |
| | | |
| | | /** |
| | |
| | | Integer inventoryCount = inventoryGoods.getInventoryCount(); |
| | | Integer realNum = inventoryGoods.getRealNum(); |
| | | if (realNum != null) { |
| | | int errorCount = inventoryCount - realNum; |
| | | int errorCount = realNum - inventoryCount; |
| | | lWhFormInventoryGoods.setInventoryCounts(realNum); |
| | | lWhFormInventoryGoods.setErrorCounts(errorCount); |
| | | lWhFormInventoryGoods.setErrorCounts(Math.abs(errorCount)); |
| | | //çç¹ç»æï¼1=æ£å¸¸ï¼2=ççï¼3=çäºï¼ |
| | | lWhFormInventoryGoods.setInventoryResult((errorCount > 0) ? 2 : (errorCount < 0) ? 3 : 1); |
| | | goodsList.add(lWhFormInventoryGoods); |
| | | // TODO æ¹éæ´æ° |
| | | this.update(lWhFormInventoryGoods); |
| | | // goodsList.add(lWhFormInventoryGoods); |
| | | } |
| | | // this.update(lWhFormInventoryGoods); |
| | | |
| | | } |
| | | return this.updateBatch(goodsList); |
| | | // return 1; |
| | | return 1; |
| | | } |
| | | |
| | | /** |
| | |
| | | import com.consum.model.po.FinSysTenant; |
| | | import com.consum.model.po.FinSysTenantUser; |
| | | import com.consum.model.po.LWhFormInventory; |
| | | import com.iplatform.model.po.S_user_core; |
| | | import com.walker.db.page.GenericPager; |
| | | import com.walker.infrastructure.utils.DateUtils; |
| | | import com.walker.infrastructure.utils.StringUtils; |
| | |
| | | import org.apache.commons.compress.utils.Lists; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.annotation.Lazy; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | |
| | | @Autowired |
| | | private BaseWarehouseServiceImpl baseWarehouseService; |
| | | @Autowired |
| | | private FinSysTenantUserServiceImpl finSysTenantUserService; |
| | | @Autowired |
| | | private LWhFormInventoryGoodsServiceImpl inventoryGoodsService; |
| | | @Autowired |
| | | private BaseGoodsTemplateServiceImpl baseGoodsTemplateService; |
| | | @Autowired |
| | | private LWhGoodsService lWhGoodsService; |
| | | @Autowired |
| | | private FinSysTenantServiceImpl finSysTenantService; |
| | | @Autowired |
| | | @Lazy |
| | | private LWhFormInventoryCoreService lWhFormInventoryCoreService; |
| | | |
| | | |
| | | private static final String QUERY_LIST = "select * from l_wh_form_inventory where 1=1 "; |
| | |
| | | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * ä¿åçç¹ä¿¡æ¯ |
| | | * |
| | | * @author å¢åºé³ |
| | | * @date 2023/10/31 |
| | | */ |
| | | public int updateInventoryInfo(LWhFormInventoryParam dto, Integer state) { |
| | | public int updateInventoryInfo(LWhFormInventoryParam dto, Integer state, S_user_core currentUser, FinSysTenantUser sysInfo) { |
| | | //1.æ ¹æ®çç¹åidæ¥è¯¢çç¹å |
| | | LWhFormInventory lWhFormInventory = this.get(new LWhFormInventory(dto.getId())); |
| | | if (lWhFormInventory == null) { |
| | | log.error("æ ¹æ®çç¹åidæ¥è¯¢çç¹å失败"); |
| | | return 0; |
| | | } |
| | | //2.ä¿®æ¹çç¹å |
| | | //æ·»å çç¹åç©å |
| | | List<FormInventoryGoodsVO> inventoryGoodsList = dto.getInventoryGoodsList(); |
| | | if (CollectionUtils.isEmpty(inventoryGoodsList)) { |
| | | log.error("çç¹åç©å为空"); |
| | | return 0; |
| | | } |
| | | this.inventoryGoodsService.updateInventoryGoods(inventoryGoodsList); |
| | | //ä¿®æ¹çç¹å |
| | | if (state == 2) { |
| | | //宿çç¹æ¶è®¾ç½®å®æçç¹æ¶é´ |
| | | lWhFormInventory.setStopTime(DateUtils.getDateTimeNumber(System.currentTimeMillis())); |
| | | |
| | | //宿çç¹æ¶è®¾ç½®å®æçç¹æ¶é´ |
| | | String inOutFormByInventoryId = lWhFormInventoryCoreService.createInOutFormByInventoryId(dto.getId(), currentUser, sysInfo); |
| | | if (!StringUtils.isEmpty(inOutFormByInventoryId)) { |
| | | log.error(inOutFormByInventoryId); |
| | | return 0; |
| | | } |
| | | } |
| | | lWhFormInventory.setStates(state); |
| | | lWhFormInventory.setInventoryDate(DateUtils.getDateTimeNumber(System.currentTimeMillis())); |
| | | int flag1 = this.update(lWhFormInventory); |
| | |
| | | log.error("ä¿®æ¹çç¹å失败"); |
| | | return 0; |
| | | } |
| | | //3.æ·»å çç¹åç©å |
| | | List<FormInventoryGoodsVO> inventoryGoodsList = dto.getInventoryGoodsList(); |
| | | if (CollectionUtils.isEmpty(inventoryGoodsList)) { |
| | | log.error("çç¹åç©å为空"); |
| | | return 0; |
| | | } |
| | | this.inventoryGoodsService.updateInventoryGoods(inventoryGoodsList); |
| | | |
| | | return 1; |
| | | } |
| | | |
| | |
| | | formInventoryDetailVO.getInventoryResult() == null ? null : (formInventoryDetailVO.getInventoryResult() == 2 ? "çç" : "çäº")); |
| | | formInventoryDetailVO.setInventoryType( |
| | | formInventoryDetailVO.getInventoryResult() == null ? null : (formInventoryDetailVO.getInventoryResult() == 2 ? "ççå
¥åº" : "çäºåºåº")); |
| | | formInventoryDetailVO.setWarehouseFormCode(formInventoryDetailVO.getWarehouseFormCode()); |
| | | result.add(formInventoryDetailVO); |
| | | }); |
| | | pageUtil.setDatas(result); |
| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Propagation; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.transaction.interceptor.TransactionAspectSupport; |
| | | |
| | |
| | | **/ |
| | | @Slf4j |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED) |
| | | public class LWhFormOutputCoreService { |
| | | |
| | | private BaseGoodsTemplateServiceImpl baseGoodsTemplateService; |
| | |
| | | //éè´æ¹å¼ï¼1ï¼ééï¼2=èªéï¼ |
| | | Integer buyTypeT = null; |
| | | Integer modGoodsTransferingStatusT = null; |
| | | String outputCode = lWhFormOutput.getOutputCode(); |
| | | if ((BaseWarehouseParam1.In_OutPutTypeEnum.Transfer_Output.getValue() + "").equals(outputCode)) { |
| | | short businessTypeValue = businessType.getValue(); |
| | | if (BaseWarehouseParam1.In_OutPutTypeEnum.Transfer_Output.getValue() == businessTypeValue) { |
| | | //è°æ¨åºåº |
| | | queryModelStatusT = 1; |
| | | buyTypeT = 1; |
| | | lWarehouseFlowBusinessId = lWhFormOutput.getTransBusinessId(); |
| | | modGoodsTransferingStatusT = 0; |
| | | } else if ((BaseWarehouseParam1.In_OutPutTypeEnum.Dept_Lending_Out.getValue() + "").equals(outputCode)) { |
| | | } else if (BaseWarehouseParam1.In_OutPutTypeEnum.Dept_Lending_Out.getValue() == businessTypeValue) { |
| | | // é¨é¨ä»åº åååºåº |
| | | // queryModelStatusT = 2; |
| | | } else if ((BaseWarehouseParam1.In_OutPutTypeEnum.Fragmentary_Output.getValue() + "").equals(outputCode)) { |
| | | } else if (BaseWarehouseParam1.In_OutPutTypeEnum.Fragmentary_Output.getValue() == businessTypeValue) { |
| | | // é¶æåºåº |
| | | queryModelStatusT = 1; |
| | | buyTypeT = null; |
| | | modGoodsTransferingStatusT = 4; |
| | | }else if (BaseWarehouseParam1.In_OutPutTypeEnum.Inventory_Output.getValue() == businessTypeValue) { |
| | | // çç¹åºåº |
| | | queryModelStatusT = 1; |
| | | buyTypeT = null; |
| | | modGoodsTransferingStatusT = 4; |
| | | } |
| | | Integer queryModelStatus = queryModelStatusT; |
| | | Integer buyType = buyTypeT; |
| | |
| | | import com.walker.infrastructure.utils.NumberGenerator; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Propagation; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | **/ |
| | | @Service |
| | | @Slf4j |
| | | @Transactional(propagation= Propagation.REQUIRED) |
| | | public class LWhFormProcureCoreService { |
| | | @Resource |
| | | private LWhProcureModelService lWhProcureModelService; |
| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Propagation; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.transaction.interceptor.TransactionAspectSupport; |
| | | |
| | |
| | | **/ |
| | | @Service |
| | | @Slf4j |
| | | @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED) |
| | | public class LWhFormScrappedCoreService { |
| | | |
| | | private GoodsBaseServiceImpl goodsBaseService; |
| | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Optional; |
| | | import java.util.stream.Collectors; |
| | | import org.apache.commons.compress.utils.Lists; |
| | | import org.springframework.beans.BeanUtils; |
| | |
| | | @Autowired |
| | | private LWhFormScrappedCoreService lWhFormScrappedCoreService; |
| | | |
| | | private static String QUERY_LIST = "SELECT fs.* FROM l_wh_form_scrapped fs left join l_wh_form_scrapped_goods fsg on fs.id = fsg.FORM_SCRAPPED_ID WHERE 1 = 1 "; |
| | | private static String QUERY_LIST = "SELECT DISTINCT fs.* FROM l_wh_form_scrapped fs left join l_wh_form_scrapped_goods fsg on fs.id = fsg.FORM_SCRAPPED_ID WHERE 1 = 1 "; |
| | | |
| | | private static final String QUERY_BF_DETAIL_LIST = "select fs.id,fs.BUSINESS_FORM_CODE,fsg.GOODS_TEMPLATE_NAME,fsg.BASE_GOODS_MODELS_NAME,fsg.COUNTS," |
| | | + "fs.AGENCY_NAME,OPERATOR_NAME,DEAL_TIME from l_wh_form_scrapped fs " |
| | |
| | | * @return 1.æ°å¢æ¥åºå 2.æ°å¢æ¥åºåç©å |
| | | */ |
| | | |
| | | public int add(LWhFormScrappedParam param, S_user_core currentUser, FinSysTenantUser sysInfo) { |
| | | public int add(LWhFormScrappedParam param, int warehouseType, S_user_core currentUser, FinSysTenantUser sysInfo) { |
| | | //1.æ°å¢æ¥åºåè®°å½ |
| | | LWhFormScrapped lWhFormScrapped = new LWhFormScrapped(); |
| | | //æ¥åºåid |
| | | long lWhFormScrappedId = IdUtil.generateId(); |
| | | lWhFormScrapped.setId(lWhFormScrappedId); |
| | | lWhFormScrapped.setBusinessFormCode(codeGeneratorService.createBusinessFormCode(CodeGeneratorEnum.Scrapped)); |
| | | lWhFormScrapped.setWarehouseType(0); |
| | | Long warehouseId = param.getWarehouseId(); |
| | | lWhFormScrapped.setWarehouseId(warehouseId); |
| | | //æ ¹æ®ä»åºidæ¥è¯¢ä»åº |
| | | BaseWarehouse warehouse = this.baseWarehouseService.getById(warehouseId); |
| | | if (warehouse == null) { |
| | | log.error("ä»åºä¸åå¨"); |
| | | return 0; |
| | | lWhFormScrapped.setWarehouseType(warehouseType); |
| | | |
| | | // å
¬ç¨ |
| | | Long warehouseId = null; |
| | | //ä»åºåç§° |
| | | String wareHouseName = null; |
| | | if (warehouseType == 0) { |
| | | warehouseId = param.getWarehouseId(); |
| | | //æ ¹æ®ä»åºidæ¥è¯¢ä»åº |
| | | BaseWarehouse warehouse = this.baseWarehouseService.getById(warehouseId); |
| | | if (warehouse == null) { |
| | | log.error("ä»åºä¸åå¨"); |
| | | return 0; |
| | | } |
| | | wareHouseName = warehouse.getWarehouseName(); |
| | | } else { |
| | | // æ¥è¯¢é¨é¨åç§° |
| | | warehouseId = param.getDepartmentId(); |
| | | FinSysTenantDepartment sysTenantDepartment = departmentService.getById(warehouseId); |
| | | if (sysTenantDepartment == null) { |
| | | log.error("é¨é¨ä¸åå¨"); |
| | | return 0; |
| | | } |
| | | wareHouseName = sysTenantDepartment.getName(); |
| | | } |
| | | lWhFormScrapped.setWarehouseName(warehouse.getWarehouseName()); |
| | | lWhFormScrapped.setWarehouseId(warehouseId); |
| | | lWhFormScrapped.setWarehouseName(wareHouseName); |
| | | lWhFormScrapped.setAgencyId(Long.valueOf(sysInfo.getTenantId())); |
| | | lWhFormScrapped.setAgencyName(sysInfo.getTenantName()); |
| | | lWhFormScrapped.setOperatorId(sysInfo.getSysUserId()); |
| | | lWhFormScrapped.setOperatorName(sysInfo.getUserName()); |
| | | lWhFormScrapped.setDealTime(param.getDealTime()); |
| | | lWhFormScrapped.setStates(0); |
| | | lWhFormScrapped.setUploadFiles(param.getUploadFiles()); |
| | | //æ ¹æ®é¨é¨idæ¥è¯¢é¨é¨ |
| | | FinSysTenantDepartment department = this.departmentService.getById(sysInfo.getSysDeptId()); |
| | | if (department != null) { |
| | |
| | | LWhFormScrappedGoods scrappedGoods = new LWhFormScrappedGoods(); |
| | | scrappedGoods.setId(IdUtil.generateId()); |
| | | //æ ¹æ®ç©ååå·æ¥è¯¢ç©ååºå |
| | | int goodsNum = this.lWhGoodsService.queryGoodsModelNum(0, warehouseId, scrappedGoods.getBaseGoodsModelsId(), 1, null); |
| | | int goodsNum = this.lWhGoodsService.queryGoodsModelNum(warehouseType, warehouseId, scrappedGoods.getBaseGoodsModelsId(), 1, null); |
| | | if (params.getCounts() > goodsNum) { |
| | | log.error("æ¥åºæ°é大äºåºåæ°é"); |
| | | return 0; |
| | |
| | | formScrappedGoodsVO.setBaseGoodsTemplateId(baseGoodsTemplateId); |
| | | formScrappedGoodsVO.setGoodsName(lWhFormScrappedGoods.getGoodsTemplateName()); |
| | | |
| | | String sql = "select CATEGORY_NAME from base_goods_template where id = :id"; |
| | | Map<String, Object> param = new HashMap<>(); |
| | | param.put("id", baseGoodsTemplateId); |
| | | List<Map<String, Object>> goodTemplate = this.select(sql, param, new MapperUtil()); |
| | | if (!CollectionUtils.isEmpty(goodTemplate)) { |
| | | Optional<Map<String, Object>> first = goodTemplate.stream().findFirst(); |
| | | Map<String, Object> objectMap = first.get(); |
| | | formScrappedGoodsVO.setCategoryName(objectMap.get("categoryName").toString()); |
| | | } |
| | | |
| | | List<GoodsModelVO> goodsModelList = Lists.newArrayList(); |
| | | goodsList.forEach(item -> { |
| | | GoodsModelVO goodsModelVO = new GoodsModelVO(); |
| | |
| | | import com.walker.infrastructure.utils.NumberGenerator; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Propagation; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.transaction.interceptor.TransactionAspectSupport; |
| | | |
| | |
| | | **/ |
| | | @Service |
| | | @Slf4j |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED) |
| | | public class LWhFormTransferCoreService { |
| | | |
| | | @Resource |
| | |
| | | package com.consum.base.service; |
| | | |
| | | import com.consum.base.core.utils.MapperUtil; |
| | | import com.walker.infrastructure.utils.CollectionUtils; |
| | | import com.walker.jdbc.service.BaseServiceImpl; |
| | | import org.apache.commons.lang3.StringUtils; |
| | |
| | | public int modGoodsTransfering(List<Long> whGoods, Integer warehouseType, Long toWarehouseId, String toWarehouseName, Integer states) { |
| | | StringBuilder sql = new StringBuilder(MOD_GOODS_TRANSFERING_PREFIX); |
| | | ArrayList<Object> params = new ArrayList<>(); |
| | | if (toWarehouseId != null) { |
| | | if (warehouseType != null) { |
| | | sql.append(", WAREHOUSE_TYPE=?"); |
| | | params.add(warehouseType); |
| | | } |
| | |
| | | return update(sql.toString(), params.toArray()); |
| | | } |
| | | |
| | | private static String GOODS_NUM_PRICE = "SELECT t.tenantId,count(id) total_Num,count(CASE WHEN STATES=2 THEN 1 END) xia_fa_num,IFNULL(round(sum(PRICE)/1000000,2),0) total_price,IFNULL(ROUND(count(CASE WHEN STATES=2 THEN 1 END)/count(id),4),0)*100 AS zhan_you_percent,count(CASE COST_TYPE WHEN 1 THEN 1 END) a_total_Num,count(CASE COST_TYPE WHEN 2 THEN 1 END) b_total_Num,count(CASE COST_TYPE WHEN 3 THEN 1 END) c_total_Num FROM (SELECT tCangKu.tenantId,tKuCun.id,tKuCun.STATES,tKuCun.COST_TYPE,tKuCun.price FROM (SELECT tenant.id tenantId,tenant.NAME AS org_name,ware.*FROM fin_sys_tenant tenant RIGHT JOIN ( SELECT 0 WAREHOUSE_TYPE,id,AGENCY_ID,WAREHOUSE_NAME FROM BASE_WAREHOUSE UNION ALL SELECT 1 WAREHOUSE_TYPE,id,TENANT_ID AGENCY_ID,`NAME` WAREHOUSE_NAME FROM fin_sys_tenant_department) ware ON tenant.id=ware.AGENCY_ID WHERE 1=1 "; |
| | | private static String GOODS_NUM_PRICE_END = ") tCangKu LEFT JOIN L_WH_GOODS tKuCun ON tCangKu.WAREHOUSE_TYPE=tKuCun.WAREHOUSE_TYPE AND tCangKu.id=tKuCun.WAREHOUSE_ID AND tKuCun.STATES BETWEEN 1 AND 2) t GROUP BY t.tenantId"; |
| | | |
| | | //æºæ |
| | | public List<Map<String, Object>> getGoodsNumPrice(Long agencyId) { |
| | | StringBuilder sql = new StringBuilder(GOODS_NUM_PRICE); |
| | | Map<String, Object> paramts = new HashMap<>(); |
| | | sql.append(" and tenant.id=:agencyId"); |
| | | paramts.put("agencyId", agencyId); |
| | | return select(sql.append(GOODS_NUM_PRICE_END).toString(), paramts, new MapperUtil()); |
| | | } |
| | | |
| | | } |
| | |
| | | } |
| | | //æºæ |
| | | if (param.getAgencyId() != null) { |
| | | sql.append(" and left(ware.AGENCY_ID, length(:lengthAgencyId)) = :agencyId"); |
| | | paramts.put("lengthAgencyId", param.getAgencyId()); |
| | | sql.append(" and ware.AGENCY_ID=:agencyId"); |
| | | // paramts.put("lengthAgencyId", param.getAgencyId()); |
| | | paramts.put("agencyId", param.getAgencyId()); |
| | | } |
| | | //ä»åºç±»å |
| | |
| | | sql.append(" AND cate.CLASSIFICATION=':costType'"); |
| | | paramts.put("costType", costType); |
| | | } |
| | | if (param.getWarningType() != null) { |
| | | sql.append(" AND wareWarn.WARNING_TYPE=:warningType"); |
| | | paramts.put("warningType", param.getWarningType()); |
| | | } |
| | | |
| | | sql.append(" ORDER BY wareWarn.DEAL_TIME DESC "); |
| | | |
| | |
| | | public static final String AgentJid = "agent_jid"; |
| | | public static final String WorkgroupJid = "workgroup_jid"; |
| | | public static final String ClientNumber = "client_number"; |
| | | public static final String ClientPwd = "client_pwd"; |
| | | public static final String ClientPd = "client_pwd"; |
| | | public static final String TenantName = "tenant_name"; |
| | | public static final String Lv = "lv"; |
| | | public static final String SupplierId = "supplier_Id"; |
| | |
| | | ib.set(AgentJid, this.getAgentJid(), this.isset_agentJid); |
| | | ib.set(WorkgroupJid, this.getWorkgroupJid(), this.isset_workgroupJid); |
| | | ib.set(ClientNumber, this.getClientNumber(), this.isset_clientNumber); |
| | | ib.set(ClientPwd, this.getClientPwd(), this.isset_clientPwd); |
| | | ib.set(ClientPd, this.getClientPwd(), this.isset_clientPwd); |
| | | return ib.genMapSql(); |
| | | } |
| | | |
| | |
| | | ub.set(AgentJid, this.getAgentJid(), this.isset_agentJid); |
| | | ub.set(WorkgroupJid, this.getWorkgroupJid(), this.isset_workgroupJid); |
| | | ub.set(ClientNumber, this.getClientNumber(), this.isset_clientNumber); |
| | | ub.set(ClientPwd, this.getClientPwd(), this.isset_clientPwd); |
| | | ub.set(ClientPd, this.getClientPwd(), this.isset_clientPwd); |
| | | ub.where(this.getPkName_(), this.getPkValue_()); |
| | | return ub.genMapSql(); |
| | | } |
| | |
| | | ub.set(AgentJid, this.getAgentJid(), this.isset_agentJid); |
| | | ub.set(WorkgroupJid, this.getWorkgroupJid(), this.isset_workgroupJid); |
| | | ub.set(ClientNumber, this.getClientNumber(), this.isset_clientNumber); |
| | | ub.set(ClientPwd, this.getClientPwd(), this.isset_clientPwd); |
| | | ub.set(ClientPd, this.getClientPwd(), this.isset_clientPwd); |
| | | return ub.genMapSql(where, parameters); |
| | | } |
| | | |
| | |
| | | ub.set(AgentJid, this.getAgentJid(), this.isset_agentJid); |
| | | ub.set(WorkgroupJid, this.getWorkgroupJid(), this.isset_workgroupJid); |
| | | ub.set(ClientNumber, this.getClientNumber(), this.isset_clientNumber); |
| | | ub.set(ClientPwd, this.getClientPwd(), this.isset_clientPwd); |
| | | ub.set(ClientPd, this.getClientPwd(), this.isset_clientPwd); |
| | | return ub.genArraySql(where, parameters); |
| | | } |
| | | |
| | |
| | | if (columnIndex > 0) { |
| | | fin_sys_tenant_user.setClientNumber(rs.getString(columnIndex)); |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, FinSysTenantUser_mapper.ClientPwd); |
| | | columnIndex = resultSetUtils.findColumn(rs, FinSysTenantUser_mapper.ClientPd); |
| | | if (columnIndex > 0) { |
| | | fin_sys_tenant_user.setClientPwd(rs.getString(columnIndex)); |
| | | } |
| | |
| | | <!-- <groupId>com.iplatform</groupId>--> |
| | | <!-- <artifactId>iplatform-report</artifactId>--> |
| | | <!-- </dependency>--> |
| | | |
| | | <!-- é
ç½®æä»¶å å¯ --> |
| | | <dependency> |
| | | <groupId>com.github.ulisesbocchio</groupId> |
| | | <artifactId>jasypt-spring-boot-starter</artifactId> |
| | | <version>2.1.0</version> |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | <build> |
| | |
| | | package com.consum.test; |
| | | |
| | | import com.consum.ConsumApplication; |
| | | import com.consum.base.core.CodeGeneratorEnum; |
| | | import com.consum.base.core.CodeGeneratorService; |
| | | import org.junit.Test; |
| | | import org.junit.runner.RunWith; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.boot.test.context.SpringBootTest; |
| | | import org.springframework.test.context.junit4.SpringRunner; |
| | | |
| | | |
| | | @RunWith(SpringRunner.class) |
| | | @SpringBootTest(classes = {ConsumApplication.class}) |
| | | public class CodeGeneratorServiceTest { |
| | | |
| | | @Autowired |
| | | private CodeGeneratorService service; |
| | | |
| | | @Test |
| | | public void createWarehouseCode(){ |
| | | for (int i=0;i<5;i++){ |
| | | String code =service.createWarehouseCode(); |
| | | System.out.println(code); |
| | | } |
| | | } |
| | | |
| | | //package com.consum.test; |
| | | // |
| | | //import com.consum.ConsumApplication; |
| | | //import com.consum.base.core.CodeGeneratorEnum; |
| | | //import com.consum.base.core.CodeGeneratorService; |
| | | //import org.junit.Test; |
| | | //import org.junit.runner.RunWith; |
| | | //import org.springframework.beans.factory.annotation.Autowired; |
| | | //import org.springframework.boot.test.context.SpringBootTest; |
| | | //import org.springframework.test.context.junit4.SpringRunner; |
| | | // |
| | | // |
| | | //@RunWith(SpringRunner.class) |
| | | //@SpringBootTest(classes = {ConsumApplication.class}) |
| | | //public class CodeGeneratorServiceTest { |
| | | // |
| | | // @Autowired |
| | | // private CodeGeneratorService service; |
| | | // |
| | | // @Test |
| | | // public void createGoodsTemplateCode(){ |
| | | // String[] prefixs = new String[] {"A","B","C","A","B"}; |
| | | // int[] leis = new int[]{1,2,2,1,2}; |
| | | // public void createWarehouseCode(){ |
| | | // for (int i=0;i<5;i++){ |
| | | // String code =service.createWarehouseCode(); |
| | | // System.out.println(code); |
| | | // } |
| | | // } |
| | | // |
| | | //// @Test |
| | | //// public void createGoodsTemplateCode(){ |
| | | //// String[] prefixs = new String[] {"A","B","C","A","B"}; |
| | | //// int[] leis = new int[]{1,2,2,1,2}; |
| | | //// for (int i=0;i<5;i++){ |
| | | //// String code =service.createGoodsTemplateCode(prefixs[i],leis[i]); |
| | | //// System.out.println(code); |
| | | //// } |
| | | //// } |
| | | // |
| | | // @Test |
| | | // public void createBusinessFormCode(){ |
| | | // for (int i=0;i<5;i++){ |
| | | // String code =service.createGoodsTemplateCode(prefixs[i],leis[i]); |
| | | // String code =service.createBusinessFormCode(CodeGeneratorEnum.Transfer); |
| | | // System.out.println(code); |
| | | // } |
| | | // } |
| | | |
| | | @Test |
| | | public void createBusinessFormCode(){ |
| | | for (int i=0;i<5;i++){ |
| | | String code =service.createBusinessFormCode(CodeGeneratorEnum.Transfer); |
| | | System.out.println(code); |
| | | } |
| | | } |
| | | |
| | | } |
| | | // |
| | | //} |
| | |
| | | package com.consum.test.base; |
| | | |
| | | import com.consum.ConsumApplication; |
| | | import com.consum.base.core.data.Base_CategoryService; |
| | | import com.consum.model.po.BaseCategory; |
| | | import com.walker.infrastructure.utils.NumberGenerator; |
| | | import com.walker.jdbc.BaseDao; |
| | | import org.junit.Test; |
| | | import org.junit.runner.RunWith; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.boot.test.context.SpringBootTest; |
| | | import org.springframework.test.context.junit4.SpringRunner; |
| | | |
| | | @RunWith(SpringRunner.class) |
| | | @SpringBootTest(classes = {ConsumApplication.class}) |
| | | public class Base_Category { |
| | | @Autowired |
| | | private Base_CategoryService service; |
| | | |
| | | @Test |
| | | public void addFirstCategory(){ |
| | | for (int ii =0;ii <10;ii++){ |
| | | Long id = NumberGenerator.getLongSequenceNumber(); |
| | | for (int i=0;i<1000;i++){ |
| | | service.addFirstCategory(id); |
| | | } |
| | | } |
| | | } |
| | | @Test |
| | | public void addSecondCategory(){ |
| | | service.addSecondCategory(12624043866144l); |
| | | } |
| | | @Test |
| | | public void addThirdCategory(){ |
| | | service.addThirdCategory(12838134761035l); |
| | | } |
| | | } |
| | | //package com.consum.test.base; |
| | | // |
| | | //import com.consum.ConsumApplication; |
| | | //import com.consum.base.core.data.Base_CategoryService; |
| | | //import com.consum.model.po.BaseCategory; |
| | | //import com.walker.infrastructure.utils.NumberGenerator; |
| | | //import com.walker.jdbc.BaseDao; |
| | | //import org.junit.Test; |
| | | //import org.junit.runner.RunWith; |
| | | //import org.springframework.beans.factory.annotation.Autowired; |
| | | //import org.springframework.boot.test.context.SpringBootTest; |
| | | //import org.springframework.test.context.junit4.SpringRunner; |
| | | // |
| | | //@RunWith(SpringRunner.class) |
| | | //@SpringBootTest(classes = {ConsumApplication.class}) |
| | | //public class Base_Category { |
| | | // @Autowired |
| | | // private Base_CategoryService service; |
| | | // |
| | | // @Test |
| | | // public void addFirstCategory(){ |
| | | // for (int ii =0;ii <10;ii++){ |
| | | // Long id = NumberGenerator.getLongSequenceNumber(); |
| | | // for (int i=0;i<1000;i++){ |
| | | // service.addFirstCategory(id); |
| | | // } |
| | | // } |
| | | // } |
| | | // @Test |
| | | // public void addSecondCategory(){ |
| | | // service.addSecondCategory(12624043866144l); |
| | | // } |
| | | // @Test |
| | | // public void addThirdCategory(){ |
| | | // service.addThirdCategory(12838134761035l); |
| | | // } |
| | | //} |
| | |
| | | package com.consum.test; |
| | | |
| | | /** |
| | | * æµè¯å¤çº¿ç¨å¹¶å |
| | | */ |
| | | public class synchronizedCode implements Runnable { |
| | | |
| | | static synchronizedCode instance = new synchronizedCode(); |
| | | static int i = 0; |
| | | |
| | | static String key = "1"; |
| | | |
| | | public static void main(String[] args) throws InterruptedException { |
| | | for (int j=0;j<5;j++){ |
| | | Thread t1 = new Thread(instance); |
| | | t1.start(); |
| | | } |
| | | |
| | | System.out.println("çº¿ç¨æ§è¡ç»æ"); |
| | | } |
| | | |
| | | @Override |
| | | public void run() { |
| | | |
| | | String myKey; |
| | | if (key == "1"){ |
| | | myKey = "def"; |
| | | key = "2"; |
| | | } else { |
| | | myKey = "abc"; |
| | | key="1"; |
| | | } |
| | | |
| | | System.out.println(Thread.currentThread().getName() + ":" + myKey); |
| | | |
| | | synchronized (myKey){ |
| | | System.out.println(Thread.currentThread().getName() + "å¼å§è¿è¡"); |
| | | try { |
| | | Thread.sleep(3000); |
| | | } catch (InterruptedException e) { |
| | | // TODO Auto-generated catch block |
| | | e.printStackTrace(); |
| | | } |
| | | System.out.println("æå«"+ Thread.currentThread().getName()+"è¿è¡ç»æ"); |
| | | } |
| | | } |
| | | } |
| | | //package com.consum.test; |
| | | // |
| | | ///** |
| | | // * æµè¯å¤çº¿ç¨å¹¶å |
| | | // */ |
| | | //public class synchronizedCode implements Runnable { |
| | | // |
| | | // static synchronizedCode instance = new synchronizedCode(); |
| | | // static int i = 0; |
| | | // |
| | | // static String key = "1"; |
| | | // |
| | | // public static void main(String[] args) throws InterruptedException { |
| | | // for (int j=0;j<5;j++){ |
| | | // Thread t1 = new Thread(instance); |
| | | // t1.start(); |
| | | // } |
| | | // |
| | | // System.out.println("çº¿ç¨æ§è¡ç»æ"); |
| | | // } |
| | | // |
| | | // @Override |
| | | // public void run() { |
| | | // |
| | | // String myKey; |
| | | // if (key == "1"){ |
| | | // myKey = "def"; |
| | | // key = "2"; |
| | | // } else { |
| | | // myKey = "abc"; |
| | | // key="1"; |
| | | // } |
| | | // |
| | | // System.out.println(Thread.currentThread().getName() + ":" + myKey); |
| | | // |
| | | // synchronized (myKey){ |
| | | // System.out.println(Thread.currentThread().getName() + "å¼å§è¿è¡"); |
| | | // try { |
| | | // Thread.sleep(3000); |
| | | // } catch (InterruptedException e) { |
| | | // // TODO Auto-generated catch block |
| | | // e.printStackTrace(); |
| | | // } |
| | | // System.out.println("æå«"+ Thread.currentThread().getName()+"è¿è¡ç»æ"); |
| | | // } |
| | | // } |
| | | //} |
| | |
| | | # æ°æ®åºé¾æ¥ |
| | | dataBaseName: low_consum_manage_dev |
| | | username: root |
| | | password: Bjjmy_2020 |
| | | # Bjjmy_2020 |
| | | password: ENC(V7lFKlYcHfEzTbXsbBQhSUswgxLsbS5z) |
| | | url: jdbc:mysql://116.198.40.76:3306/${spring.datasource.dataBaseName}?useUnicode=true&characterEncoding=UTF-8&useSSL=false |
| | | # Druidè¿æ¥æ± |
| | | type: com.walker.jdbc.ds.MyDruidDataSource |
| | |
| | | host: 116.198.40.76 |
| | | port: 6379 |
| | | database: 11 |
| | | password: Jmy2019. |
| | | password: ENC(C40h1dp9Q1oLqdU+JUGSBOWUfOmj/ZO4) #Jmy2019. |
| | | |
| | | mvc: |
| | | pathmatch: |
| | |
| | | # - /api/** |
| | | |
| | | # è¶
级管çåå¯ç ï¼å å¯åçç§æ |
| | | supervisor-password: $2a$10$9lSwwUFMULR6/KhPsUbTj.0PTZfTnq0fB3OtS6PWoKAibpa8hL1cy |
| | | |
| | | supervisor-password: ENC(cDkgI4dm/vDXFDsDm5KJW23i5zAAUxIUW448ReA27tmgQ83ZLgO3k/YMK5+wIiuGDKPDIXUH9/irgKTLMKl7n7mP6XRgBnOf) |
| | | # supervisor-password: $2a$10$9lSwwUFMULR6/KhPsUbTj.0PTZfTnq0fB3OtS6PWoKAibpa8hL1cy |
| | | # æ¯å¦å
许é
置跨åååºå¤´, true å¯ç¨ï¼ false ä¸å¯ç¨ã2022-12-28 |
| | | # å¨Gateway模å¼ä¸ï¼éè¦å
³éè·¨åé
ç½®ï¼å 为ç½å
³ä¹ä¼é
ç½®ã |
| | | cors-enabled: true |
| | |
| | | ip: 116.198.40.76 |
| | | port: 22 |
| | | user-name: mysftp |
| | | password: Bjjmy_2020 |
| | | password: ENC(kEQ43JzZv6yOOmbmKNLWmsU/wQKTwA9x) |
| | | private-key: |
| | | # ftpæå¡ä¸é¢çå卿 ¹è·¯å¾ï¼åªè½æ¯linuxè·¯å¾ |
| | | file-root: /progress/ |
| | |
| | | # é®ä»¶éç¥åéä¿¡æ¯é
ç½®ï¼2023-04-26 |
| | | mail-server: smtp.126.com |
| | | mail-from: hnzzzhsl@126.com |
| | | mail-password: test |
| | | mail-password: ENC(hjRDRcQmmhpUICkAaJnXUQ==) |
| | |
| | | show-sql: true |
| | | # æ°æ®åºé¾æ¥ |
| | | username: root |
| | | password: Bjjmy_2020 |
| | | dataBaseName: low_consum_manage_dev |
| | | password: ENC(Zw99rAYSpDE2VCWJjC+C8hFAOItlbiSZ) |
| | | dataBaseName: low_consum_manage |
| | | url: jdbc:mysql://192.200.0.49:3306/${spring.datasource.dataBaseName}?useUnicode=true&characterEncoding=UTF-8&useSSL=false |
| | | # Druidè¿æ¥æ± |
| | | type: com.walker.jdbc.ds.MyDruidDataSource |
| | |
| | | host: 192.200.0.49 |
| | | port: 6379 |
| | | database: 11 |
| | | password: Jmy2019. |
| | | password: ENC(1IxlpqZ3ykMIWVknDjVydrCpK/6nccv/) #Jmy2019. |
| | | |
| | | mvc: |
| | | pathmatch: |
| | |
| | | # - /api/** |
| | | |
| | | # è¶
级管çåå¯ç ï¼å å¯åçç§æ |
| | | supervisor-password: $2a$10$9lSwwUFMULR6/KhPsUbTj.0PTZfTnq0fB3OtS6PWoKAibpa8hL1cy |
| | | supervisor-password: ENC(cDkgI4dm/vDXFDsDm5KJW23i5zAAUxIUW448ReA27tmgQ83ZLgO3k/YMK5+wIiuGDKPDIXUH9/irgKTLMKl7n7mP6XRgBnOf) |
| | | # supervisor-password: $2a$10$9lSwwUFMULR6/KhPsUbTj.0PTZfTnq0fB3OtS6PWoKAibpa8hL1cy |
| | | |
| | | # æ¯å¦å
许é
置跨åååºå¤´, true å¯ç¨ï¼ false ä¸å¯ç¨ã2022-12-28 |
| | | # å¨Gateway模å¼ä¸ï¼éè¦å
³éè·¨åé
ç½®ï¼å 为ç½å
³ä¹ä¼é
ç½®ã |
| | |
| | | ip: 192.200.0.28 |
| | | port: 22 |
| | | user-name: mysftp |
| | | password: Jmy@2023 |
| | | password: ENC(3o6p8lx7FWgH1Zi6gZ7ruZnt2geVGiC/) |
| | | private-key: |
| | | # ftpæå¡ä¸é¢çå卿 ¹è·¯å¾ï¼åªè½æ¯linuxè·¯å¾ |
| | | file-root: /lowconsum/ |
| | |
| | | # é®ä»¶éç¥åéä¿¡æ¯é
ç½®ï¼2023-04-26 |
| | | mail-server: smtp.126.com |
| | | mail-from: hnzzzhsl@126.com |
| | | mail-password: test |
| | | mail-password: ENC(hjRDRcQmmhpUICkAaJnXUQ==) |