liuguocan
2023-11-28 3f69b4dfc585c4dfbc3c07a6acf5cdd838033636
Merge remote-tracking branch 'origin/master'

# Conflicts:
# admin-web/src/views/stock/procure/purchaseOrder/index.vue
5个文件已添加
27个文件已删除
80个文件已修改
6196 ■■■■ 已修改文件
admin-web/public/index.html 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/public/static/config.js 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/public/static/js/capturewrapper.js 226 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/public/static/js/niuniucapture.js 643 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/components/mySearch/SearchItem.vue 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/components/upload/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/utils/base.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/utils/settingIplatform.js 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/utils/stockType.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/components/myImport.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/departmentitem/itemdis/distribution/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/departmentitem/itemret/returnNote/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/departmentitem/itemscr/scrapping/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/error-log/index.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/error-page/401.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/projectConfig/buildPlan/detail.vue 142 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/projectConfig/buildPlan/edit.vue 143 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/projectConfig/buildPlan/index.vue 210 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/projectConfig/buildPlan/items.js 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/projectConfig/buildPlan/nodeChoose/edit.vue 117 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/projectConfig/buildPlan/nodeChoose/index.vue 106 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/projectConfig/buildPlan/nodeChoose/items.js 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/projectConfig/buildPlan/nodeChoose/nodeCycle.vue 215 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/projectConfig/buildPlan/nodeChoose/preview.vue 205 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/projectConfig/buildPlan/nodeChoose/stageNode.vue 85 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/projectConfig/kanbanConfig/edit.vue 115 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/projectConfig/kanbanConfig/index.vue 166 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/projectConfig/kanbanConfig/items.js 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/projectConfig/kanbanConfig/nodeChoose.vue 129 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/projectConfig/stageConfig/edit.vue 116 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/projectConfig/stageConfig/index.vue 191 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/projectConfig/stageConfig/items.js 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/projectConfig/stageConfig/node/edit.vue 118 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/projectConfig/stageConfig/node/items.js 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/projectConfig/stageConfig/node/node.vue 192 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/projectConfig/warningConfig/chooseItems.js 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/projectConfig/warningConfig/chooseUser.vue 206 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/projectConfig/warningConfig/edit.vue 330 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/projectConfig/warningConfig/index.vue 209 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/projectConfig/warningConfig/items.js 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/stock/accessStock/outbound/index.vue 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/stock/accessStock/outboundDetails/index.vue 80 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/stock/inventorycount/exceptionDetails/index.vue 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/stock/inventorycount/inventorytask/detail.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/stock/inventorycount/inventorytask/edit.vue 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/stock/inventorycount/inventorytask/index.vue 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/stock/inventorycount/inventorytask/inventory.vue 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/stock/ledger/alertQuery/index.vue 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/stock/ledger/inventoryAlert/index.vue 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/stock/ledger/inventoryQuery/index.vue 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/stock/ledger/ledgerQuery/index.vue 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/stock/procure/purchaseOrder/edit.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/stock/procure/purchaseOrder/index.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/stock/procure/receiptDetails/index.vue 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/stock/scrap/itemScrapping/detail.vue 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/stock/scrap/itemScrapping/edit.vue 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/stock/scrap/itemScrapping/index.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/stock/scrap/scrapDetails/index.vue 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/stock/transfer/transferApplication/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/stock/transfer/transferdetails/index.vue 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/stock/transfer/transferissue/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-base/src/main/java/com/consum/base/controller/BaseCategoryController.java 49 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-base/src/main/java/com/consum/base/controller/BaseGoodsModelsController.java 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-base/src/main/java/com/consum/base/controller/BaseGoodsTemplateController.java 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-base/src/main/java/com/consum/base/controller/BaseWarehouseController.java 47 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-base/src/main/java/com/consum/base/controller/BaseWarehouseManagerController.java 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-base/src/main/java/com/consum/base/controller/FinDepartLedgerController.java 108 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-base/src/main/java/com/consum/base/controller/FinSysServerController.java 68 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-base/src/main/java/com/consum/base/controller/FinSysTenantController.java 41 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-base/src/main/java/com/consum/base/controller/FinSysTenantDepartmentController.java 44 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-base/src/main/java/com/consum/base/controller/FinSysTenantUserController.java 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-base/src/main/java/com/consum/base/controller/FinWarehouseLedgerController.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-base/src/main/java/com/consum/base/controller/LWarehouseFlowController.java 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-base/src/main/java/com/consum/base/controller/LWhFormInventoryController.java 74 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-base/src/main/java/com/consum/base/controller/LWhFormOutputController.java 87 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-base/src/main/java/com/consum/base/controller/LWhFormProcureController.java 93 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-base/src/main/java/com/consum/base/controller/LWhFormScrappedController.java 63 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-base/src/main/java/com/consum/base/controller/LWhFormTransferController.java 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-base/src/main/java/com/consum/base/controller/LWhHomeStatisticsController.java 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-base/src/main/java/com/consum/base/controller/LWhWarningConfigController.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-base/src/main/java/com/consum/base/controller/LWhWarningController.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-base/src/main/java/com/consum/base/core/WarehouseCoreService.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-base/src/main/java/com/consum/base/core/service/LWhWarningCoreServiceImpl.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-base/src/main/java/com/consum/base/core/utils/MapUtils.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-base/src/main/java/com/consum/base/pojo/LWhFormScrappedParam.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-base/src/main/java/com/consum/base/pojo/excel/专项支出用款申请书_map.xls 补丁 | 查看 | 原始文档 | blame | 历史
consum-base/src/main/java/com/consum/base/pojo/query/LWhFormOutputQry.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-base/src/main/java/com/consum/base/pojo/query/LWhLedgerQry.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-base/src/main/java/com/consum/base/pojo/query/WhWarningQry.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-base/src/main/java/com/consum/base/service/FinWarehouseLedgerServiceImpl.java 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-base/src/main/java/com/consum/base/service/LWarehouseFlowCoreService.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-base/src/main/java/com/consum/base/service/LWarehouseFlowService.java 105 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-base/src/main/java/com/consum/base/service/LWhFormInventoryCoreService.java 39 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-base/src/main/java/com/consum/base/service/LWhFormInventoryGoodsServiceImpl.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-base/src/main/java/com/consum/base/service/LWhFormInventoryServiceImpl.java 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-base/src/main/java/com/consum/base/service/LWhFormOutputCoreService.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-base/src/main/java/com/consum/base/service/LWhFormProcureCoreService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-base/src/main/java/com/consum/base/service/LWhFormScrappedCoreService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-base/src/main/java/com/consum/base/service/LWhFormScrappedServiceImpl.java 43 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-base/src/main/java/com/consum/base/service/LWhFormTransferCoreService.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-base/src/main/java/com/consum/base/service/LWhGoodsService.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-base/src/main/java/com/consum/base/service/LWhWarningServiceImpl.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-model-pojo/src/main/java/com/consum/model/po/FinSysTenantUser_mapper.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
deploy-jar-single/pom.xml 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
deploy-jar-single/src/main/java/com/consum/test/CodeGeneratorServiceTest.java 82 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
deploy-jar-single/src/main/java/com/consum/test/base/Base_Category.java 74 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
deploy-jar-single/src/main/java/com/consum/test/synchronizedCode.java 94 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
deploy-jar-single/src/main/resources/application-dev.yml 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
deploy-jar-single/src/main/resources/application-prod.yml 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
deploy-jar-single/src/main/resources/import/depTaiZhangExpTemp.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
deploy-jar-single/src/main/resources/import/taiZhangExpTemp.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
deploy-jar-single/src/main/resources/import/采购退货单.xls 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/public/index.html
@@ -11,11 +11,10 @@
    <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 -->
admin-web/public/static/config.js
@@ -1,25 +1,12 @@
// è¯·æ±‚接口地址 å¦‚果没有配置自动获取当前网址路径
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;
admin-web/public/static/js/capturewrapper.js
File was deleted
admin-web/public/static/js/niuniucapture.js
File was deleted
admin-web/src/components/mySearch/SearchItem.vue
@@ -4,7 +4,7 @@
    <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"
@@ -15,6 +15,7 @@
    <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"
@@ -26,7 +27,7 @@
    <!-- ä¸‹æ‹‰-->
    <el-select
      v-if="item.type === 'select'"
      :placeholder="item.placeholder || ''"
      :placeholder="item.placeholder || '请选择'"
      v-model="val"
      filterable
      :multiple="item.multiple || false"
@@ -54,7 +55,7 @@
    <!--时间-->
    <el-time-select
      v-if="item.type === 'time-picker'"
      :placeholder="item.placeholder || ''"
      :placeholder="item.placeholder || '请选择'"
      v-model="val"
      :clearable="true"
      style="width: 150px"
@@ -66,7 +67,9 @@
      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')"
    />
    <!--月选择器-->
@@ -75,7 +78,9 @@
      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')"
    />
    <!--日选择器-->
@@ -84,7 +89,9 @@
      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')"
    />
    <!--日期带时间选择器-->
@@ -93,6 +100,7 @@
      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"
@@ -103,7 +111,7 @@
      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"
@@ -243,14 +251,7 @@
      }
    },
    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;
admin-web/src/components/upload/index.vue
@@ -85,7 +85,7 @@
        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, // æ˜¯å¦æ”¯æŒæ‰¹é‡ä¸Šä¼ 
admin-web/src/utils/base.js
@@ -34,7 +34,8 @@
      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('文件格式不支持预览!')
    }
admin-web/src/utils/settingIplatform.js
@@ -1,24 +1,10 @@
// è¯·æ±‚接口地址 å¦‚果没有配置自动获取当前网址路径
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',// æµ‹è¯•,
  ftpUrl: config.ftpUrl,
// æŽ¥å£è¯·æ±‚地址
// 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,
  apiBaseURL: config.apiBaseURL,
};
export default SettingIplatform;
admin-web/src/utils/stockType.js
@@ -1,6 +1,6 @@
function stockType(row) {
  let result = '';
  let arr = ['采购入库', '调拨', '其他出库', '部门分发', '报废出库', '部门物品回退仓库', '物品盘点'];
  let arr = ['采购入库', '调拨', '其他出库', '部门分发', '报废出库', '物品退回', '物品盘点'];
  if (row.businessType == 7) {
    if (row.thisType == 1) {
      result = '盘盈入库';
admin-web/src/views/components/myImport.vue
@@ -14,7 +14,7 @@
      <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
admin-web/src/views/departmentitem/itemdis/distribution/index.vue
@@ -12,7 +12,7 @@
            <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">
admin-web/src/views/departmentitem/itemret/returnNote/index.vue
@@ -12,7 +12,7 @@
            <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">
admin-web/src/views/departmentitem/itemscr/scrapping/index.vue
@@ -12,7 +12,7 @@
            <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">
admin-web/src/views/error-log/index.vue
@@ -8,6 +8,7 @@
      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"
admin-web/src/views/error-page/401.vue
@@ -4,7 +4,7 @@
    <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">
admin-web/src/views/projectConfig/buildPlan/detail.vue
File was deleted
admin-web/src/views/projectConfig/buildPlan/edit.vue
File was deleted
admin-web/src/views/projectConfig/buildPlan/index.vue
File was deleted
admin-web/src/views/projectConfig/buildPlan/items.js
File was deleted
admin-web/src/views/projectConfig/buildPlan/nodeChoose/edit.vue
File was deleted
admin-web/src/views/projectConfig/buildPlan/nodeChoose/index.vue
File was deleted
admin-web/src/views/projectConfig/buildPlan/nodeChoose/items.js
File was deleted
admin-web/src/views/projectConfig/buildPlan/nodeChoose/nodeCycle.vue
File was deleted
admin-web/src/views/projectConfig/buildPlan/nodeChoose/preview.vue
File was deleted
admin-web/src/views/projectConfig/buildPlan/nodeChoose/stageNode.vue
File was deleted
admin-web/src/views/projectConfig/kanbanConfig/edit.vue
File was deleted
admin-web/src/views/projectConfig/kanbanConfig/index.vue
File was deleted
admin-web/src/views/projectConfig/kanbanConfig/items.js
File was deleted
admin-web/src/views/projectConfig/kanbanConfig/nodeChoose.vue
File was deleted
admin-web/src/views/projectConfig/stageConfig/edit.vue
File was deleted
admin-web/src/views/projectConfig/stageConfig/index.vue
File was deleted
admin-web/src/views/projectConfig/stageConfig/items.js
File was deleted
admin-web/src/views/projectConfig/stageConfig/node/edit.vue
File was deleted
admin-web/src/views/projectConfig/stageConfig/node/items.js
File was deleted
admin-web/src/views/projectConfig/stageConfig/node/node.vue
File was deleted
admin-web/src/views/projectConfig/warningConfig/chooseItems.js
File was deleted
admin-web/src/views/projectConfig/warningConfig/chooseUser.vue
File was deleted
admin-web/src/views/projectConfig/warningConfig/edit.vue
File was deleted
admin-web/src/views/projectConfig/warningConfig/index.vue
File was deleted
admin-web/src/views/projectConfig/warningConfig/items.js
File was deleted
admin-web/src/views/stock/accessStock/outbound/index.vue
@@ -12,7 +12,8 @@
            <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>
              <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">
@@ -56,6 +57,8 @@
              </el-row>
              <div class="no-data" v-else>暂无数据</div>
            </div>
            </div>
            <el-pagination
              :small="false"
              :current-page="pageNum"
admin-web/src/views/stock/accessStock/outboundDetails/index.vue
@@ -14,7 +14,9 @@
            </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>
@@ -25,23 +27,41 @@
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: '',
@@ -97,20 +117,20 @@
        },
        {
          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: '',
        },
@@ -155,28 +175,34 @@
        },
        // åˆ—信息
        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: '详情',
@@ -197,12 +223,24 @@
          },
        },
      },
      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 = '详情';
@@ -211,7 +249,7 @@
    // æŸ¥è¯¢table列表
    search(pageNum) {
      if (pageNum != undefined) {
        this.$refs.myTable.search(pageNum);
        this.$refs.myTable.search({pageNum});
      } else {
        this.$refs.myTable.search();
      }
admin-web/src/views/stock/inventorycount/exceptionDetails/index.vue
@@ -23,11 +23,7 @@
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 * as DateFormatter from '@/utils/DateFormatter';
export default {
@@ -158,8 +154,7 @@
      // æ ‘数据
      treeDataList: [],
      // æœç´¢æ¡ä»¶
      filterFrom: {
      },
      filterFrom: {},
      // è¡¨æ ¼æ•°æ®
      table: {
        showIndex: true, // æ˜¯å¦æ˜¾ç¤ºåºå·
@@ -180,9 +175,9 @@
        },
        // åˆ—信息
        columns: [
          { title: '仓库', field: 'warehouseName', align: 'left' },
          { title: '物品名称', field: 'goodsTemplateName', align: 'center' },
          { title: '规格型号', field: 'baseGoodsModelsName', align: 'center' },
          {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' },
@@ -190,18 +185,23 @@
          {
            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) : '-' };
            },
@@ -230,7 +230,8 @@
  computed: {
    ...mapGetters(['userInfo']),
  },
  created() {},
  created() {
  },
  methods: {
    showAudit(row) {
      this.editSetting.id = row.id;
admin-web/src/views/stock/inventorycount/inventorytask/detail.vue
@@ -10,7 +10,11 @@
      <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>
admin-web/src/views/stock/inventorycount/inventorytask/edit.vue
@@ -1,6 +1,6 @@
<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"
@@ -62,13 +62,20 @@
  },
  data() {
    return {
      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' }],
@@ -97,19 +104,31 @@
    // èŽ·å–ä»“åº“åˆ—è¡¨
    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) {},
@@ -120,18 +139,25 @@
      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 {
admin-web/src/views/stock/inventorycount/inventorytask/index.vue
@@ -162,11 +162,11 @@
        },
        // åˆ—信息
        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',
@@ -188,7 +188,8 @@
          {
            title: '状态',
            field: 'states',
            align: 'left',
            align: 'center',
            width: 90,
            type: 'primary',
            formatter: (row) => {
              return {
@@ -263,7 +264,7 @@
              },
            },
            {
              title: '生产盘点表',
              title: '生成盘点表',
              type: 'primary',
              hidden: (row) => {
                if (row.states != 2) {
admin-web/src/views/stock/inventorycount/inventorytask/inventory.vue
@@ -1,6 +1,6 @@
<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>
@@ -10,7 +10,6 @@
        </el-col>
      </el-row>
      <el-table
        v-loading="loading"
        :data="formData.formInventoryGoodsList"
        :rules="rules"
        height="500"
@@ -25,6 +24,7 @@
        <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"
@@ -57,7 +57,7 @@
  },
  data() {
    return {
      loading: false,
      loading: true,
      btnLoading: false,
      formData: {
        businessFormCode: '',
@@ -75,17 +75,22 @@
  },
  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
      });
    }
  },
@@ -98,10 +103,14 @@
        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() {
@@ -111,10 +120,13 @@
            ...this.formData,
            inventoryGoodsList: this.formData.formInventoryGoodsList,
          };
          this.loading = true
          inventoryFinish(params).then(() => {
            this.$message.success('暂存成功!');
            this.close();
            this.$emit('search');
          }).catch(()=>{
            this.loading = false
          });
        }
      });
admin-web/src/views/stock/ledger/alertQuery/index.vue
@@ -130,16 +130,17 @@
        },
        // åˆ—信息
        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',
@@ -150,7 +151,7 @@
          {
            title: '预警时间',
            field: 'warningTime',
            align: 'left',
            align: 'center',
            width: 160,
            formatter: (row) => {
              return { value: DateFormatter.LongToDateTime(row.warningTime) };
@@ -177,13 +178,15 @@
      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) {
admin-web/src/views/stock/ledger/inventoryAlert/index.vue
@@ -178,14 +178,14 @@
        },
        // åˆ—信息
        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: {
admin-web/src/views/stock/ledger/inventoryQuery/index.vue
@@ -140,14 +140,14 @@
        },
        // åˆ—信息
        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, // æ˜¾ç¤ºåˆ†é¡µ
admin-web/src/views/stock/ledger/ledgerQuery/index.vue
@@ -182,28 +182,29 @@
        },
        // åˆ—信息
        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) };
            },
admin-web/src/views/stock/procure/purchaseOrder/edit.vue
@@ -229,7 +229,6 @@
    };
    // é‡‘额校验
    var checkPrice = (rule, value, callback) => {
      console.log(value);
      if (!value) {
        return callback(new Error('请输入'));
      }
@@ -241,7 +240,6 @@
    };
    // æ•°é‡æ ¡éªŒ
    var checkCounts = (rule, value, callback) => {
      console.log(value);
      if (!value) {
        return callback(new Error('请输入'));
      }
@@ -314,7 +312,6 @@
        title: '上传',
        max: 20, // æœ€å¤§å¤§å°ï¼Œå•位M
        num: 10, // æ”¯æŒä¸Šä¼ å›¾ç‰‡ä¸ªæ•°
        accept: '.jpg,.png', // é™åˆ¶æ ¼å¼
        tip: '', // æç¤º é»˜è®¤ï¼š`只能上传${this.defaultSettings.num}个${this.defaultSettings.accept}文件,且不超过${this.defaultSettings.max}kb`
        uploadUrl: getUploadUrl(), // ä¸Šä¼ è·¯å¾„
        multiple: true, // æ˜¯å¦æ”¯æŒæ‰¹é‡ä¸Šä¼ 
@@ -504,7 +501,6 @@
      this.$refs['ruleForm'].validate((valid) => {
        if (valid) {
          this.loading = true;
          console.log('formData', this.formData);
          if (!this.setting.id) {
            procureAdd(this.formData)
              .then((res) => {
@@ -513,7 +509,6 @@
                this.$emit('search');
              })
              .catch((err) => {
                console.log('create err', err);
                this.loading = false;
                this.$message.error('保存失败');
              });
@@ -525,7 +520,6 @@
                this.$emit('search');
              })
              .catch((err) => {
                console.log('edit err', err);
                this.loading = false;
                this.$message.error('保存失败');
              });
admin-web/src/views/stock/procure/purchaseOrder/index.vue
@@ -13,7 +13,8 @@
              <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">
            <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">
@@ -76,6 +77,8 @@
              </el-row>
              <div class="no-data" v-else>暂无数据</div>
            </div>
            </div>
            <el-pagination
              :small="false"
              :current-page="pageNum"
@@ -246,7 +249,6 @@
        this.list = res.datas;
        this.total = res.totalRows;
        this.loading = false;
        console.log(this.list);
      });
    },
admin-web/src/views/stock/procure/receiptDetails/index.vue
@@ -159,9 +159,9 @@
        },
        // åˆ—信息
        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',
@@ -179,8 +179,8 @@
              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',
@@ -194,7 +194,7 @@
        // æ“ä½œä¿¡æ¯
        operation: {
          show: true, // æ˜¾ç¤ºæ“ä½œåˆ—
          width: '150', // åˆ—宽
          width: 100, // åˆ—宽
          attr: [
            {
              title: '详情',
admin-web/src/views/stock/scrap/itemScrapping/detail.vue
@@ -36,34 +36,18 @@
      <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">
@@ -113,7 +97,7 @@
        states: '',
        createName: '',
        time: '',
        scrappedGoodsInfo: [],
        scrappedGoods: [],
      },
    };
  },
admin-web/src/views/stock/scrap/itemScrapping/edit.vue
@@ -139,9 +139,9 @@
                <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>
@@ -241,7 +241,6 @@
        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'] }],
@@ -252,7 +251,6 @@
        title: '上传',
        max: 20, // æœ€å¤§å¤§å°ï¼Œå•位M
        num: 10, // æ”¯æŒä¸Šä¼ å›¾ç‰‡ä¸ªæ•°
        accept: '.jpg,.png', // é™åˆ¶æ ¼å¼
        tip: '', // æç¤º é»˜è®¤ï¼š`只能上传${this.defaultSettings.num}个${this.defaultSettings.accept}文件,且不超过${this.defaultSettings.max}kb`
        uploadUrl: getUploadUrl(), // ä¸Šä¼ è·¯å¾„
        multiple: true, // æ˜¯å¦æ”¯æŒæ‰¹é‡ä¸Šä¼ 
@@ -272,7 +270,7 @@
      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;
@@ -291,7 +289,7 @@
    // èŽ·å–æŠ¥åºŸä»“åº“åˆ—è¡¨
    getWarehouseList() {
      selectTenantWarehouse()
      selectTenantWarehouse({ agencyId: this.userInfo.tenantId })
        .then((res) => {
          this.warehouses = res;
          if (this.warehouses.length && !this.formData.warehouseId) {
@@ -427,7 +425,6 @@
    handleSubmit() {
      this.$refs['ruleForm'].validate((valid) => {
        if (valid) {
          console.log('this.formData', this.formData);
          scrappedAdd(this.formData)
            .then((res) => {
              this.$message.success('保存成功!');
admin-web/src/views/stock/scrap/itemScrapping/index.vue
@@ -12,7 +12,7 @@
            <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">
@@ -138,13 +138,13 @@
        },
        {
          type: 'date-picker',
          dataIndex: 'incomeTimeStart',
          dataIndex: 'startTime',
          label: '报废时间',
          defaultValue: '',
        },
        {
          type: 'date-picker',
          dataIndex: 'incomeTimeEnd',
          dataIndex: 'endTime',
          label: '至',
          defaultValue: '',
        },
@@ -199,7 +199,6 @@
        this.list = res.datas;
        this.total = res.totalRows;
        this.loading = false;
        console.log(this.list);
      });
    },
admin-web/src/views/stock/scrap/scrapDetails/index.vue
@@ -164,16 +164,17 @@
        },
        // åˆ—信息
        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) };
            },
@@ -182,7 +183,7 @@
        // æ“ä½œä¿¡æ¯
        operation: {
          show: true, // æ˜¾ç¤ºæ“ä½œåˆ—
          width: '150', // åˆ—宽
          width: 100, // åˆ—宽
          attr: [
            {
              title: '详情',
admin-web/src/views/stock/transfer/transferApplication/index.vue
@@ -12,7 +12,7 @@
            <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">
admin-web/src/views/stock/transfer/transferdetails/index.vue
@@ -160,12 +160,12 @@
        },
        // åˆ—信息
        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',
@@ -184,11 +184,12 @@
              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 || '-' };
            },
@@ -206,7 +207,7 @@
        // æ“ä½œä¿¡æ¯
        operation: {
          show: true, // æ˜¾ç¤ºæ“ä½œåˆ—
          width: '150', // åˆ—宽
          width: 100, // åˆ—宽
          attr: [
            {
              title: '详情',
admin-web/src/views/stock/transfer/transferissue/index.vue
@@ -9,7 +9,7 @@
        <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">
consum-base/src/main/java/com/consum/base/controller/BaseCategoryController.java
@@ -1,6 +1,7 @@
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;
@@ -11,17 +12,13 @@
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 ç‰©å“åˆ†ç±»
@@ -50,7 +47,7 @@
     * @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);
    }
@@ -61,7 +58,11 @@
     * @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("分类名称为空");
        }
@@ -87,7 +88,12 @@
     * @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("登录用户信息不存在");
@@ -103,7 +109,12 @@
     * @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("编辑的物品分类不存在");
@@ -131,7 +142,12 @@
     */
    //分类下有正常状态的物品时,不允许禁用
    @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("参数错误");
        }
@@ -151,7 +167,12 @@
     * @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为空");
        }
consum-base/src/main/java/com/consum/base/controller/BaseGoodsModelsController.java
@@ -1,6 +1,7 @@
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;
@@ -48,7 +49,12 @@
     * @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("参数错误");
        }
@@ -69,7 +75,12 @@
     * @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("参数错误");
        }
@@ -84,7 +95,12 @@
     * @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为空");
        }
consum-base/src/main/java/com/consum/base/controller/BaseGoodsTemplateController.java
@@ -1,6 +1,7 @@
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;
@@ -8,11 +9,7 @@
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;
@@ -20,18 +17,14 @@
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 ç‰©å“æ¨¡æ¿
@@ -57,7 +50,12 @@
     * @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("登录用户信息不存在");
@@ -87,7 +85,12 @@
     * @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("登录用户信息不存在");
@@ -121,7 +124,12 @@
     * @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("物品名称为空");
        }
@@ -142,7 +150,12 @@
     */
    //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("参数错误");
        }
@@ -158,7 +171,12 @@
     */
    //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为空");
        }
consum-base/src/main/java/com/consum/base/controller/BaseWarehouseController.java
@@ -1,6 +1,7 @@
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;
@@ -13,15 +14,10 @@
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 ä»“库管理
@@ -44,7 +40,12 @@
     * @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("仓库名称为空");
        }
@@ -63,7 +64,12 @@
     * @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("登录用户信息不存在");
@@ -79,7 +85,12 @@
     * @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("编辑的仓库不存在");
@@ -116,7 +127,12 @@
     * @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为空");
        }
@@ -162,7 +178,12 @@
        @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();
consum-base/src/main/java/com/consum/base/controller/BaseWarehouseManagerController.java
@@ -1,6 +1,7 @@
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;
@@ -13,7 +14,6 @@
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;
@@ -39,12 +39,17 @@
    @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();
    }
consum-base/src/main/java/com/consum/base/controller/FinDepartLedgerController.java
New file
@@ -0,0 +1,108 @@
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();
        }
    }
}
consum-base/src/main/java/com/consum/base/controller/FinSysServerController.java
@@ -1,26 +1,29 @@
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;
@@ -38,6 +41,7 @@
    /**
     * æŸ¥è¯¢å·¦ä¾§æ ‘
     *
     * @return
     */
    @GetMapping("/select/tree")
@@ -54,18 +58,23 @@
    @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("查询失败!");
        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);
@@ -73,30 +82,47 @@
    /**
     * æ·»åŠ 
     * @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);
        int num = this.finSysServerImpl.save(param);
        return num>0 ? ResponseValue.success(1):ResponseValue.error("编辑失败!");
    }
}
consum-base/src/main/java/com/consum/base/controller/FinSysTenantController.java
@@ -5,6 +5,7 @@
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;
@@ -41,7 +42,6 @@
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;
@@ -133,7 +133,12 @@
     * @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("登录用户信息不存在");
@@ -308,7 +313,12 @@
     * @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("")) {
@@ -332,7 +342,12 @@
     * @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为空");
        }
@@ -347,7 +362,12 @@
     * @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("参数为空");
        }
@@ -493,8 +513,13 @@
     * @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("编辑的机构不存在");
        }
@@ -506,7 +531,7 @@
//        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("编辑失败!");
    }
consum-base/src/main/java/com/consum/base/controller/FinSysTenantDepartmentController.java
@@ -1,6 +1,7 @@
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;
@@ -17,7 +18,6 @@
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;
@@ -44,7 +44,12 @@
        @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("部门名称为空");
        }
@@ -75,7 +80,12 @@
     */
    //如果不传机构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("登录用户信息不存在");
@@ -107,26 +117,31 @@
     * @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("编辑失败!");
    }
@@ -154,15 +169,20 @@
     * @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("删除失败!");
    }
consum-base/src/main/java/com/consum/base/controller/FinSysTenantUserController.java
@@ -1,5 +1,6 @@
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;
@@ -30,38 +31,22 @@
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 ç³»ç»Ÿç”¨æˆ·
@@ -174,8 +159,10 @@
        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();
        }
@@ -227,11 +214,11 @@
        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);
@@ -245,7 +232,7 @@
        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();
@@ -427,8 +414,8 @@
                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);
                //怎么获取左侧机构树数据
@@ -551,11 +538,11 @@
            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
@@ -786,10 +773,10 @@
        // åŠ å¯†æ‰‹æœºå·
        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);
@@ -883,12 +870,12 @@
        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
consum-base/src/main/java/com/consum/base/controller/FinWarehouseLedgerController.java
@@ -46,6 +46,9 @@
    @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("登录用户信息不存在");
@@ -65,6 +68,9 @@
    @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;
consum-base/src/main/java/com/consum/base/controller/LWarehouseFlowController.java
@@ -1,5 +1,6 @@
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;
@@ -34,7 +35,12 @@
    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("登录用户信息不存在");
@@ -47,8 +53,9 @@
        });
        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);
        }
@@ -58,7 +65,11 @@
    @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("登录用户信息不存在");
@@ -74,6 +85,9 @@
            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();
consum-base/src/main/java/com/consum/base/controller/LWhFormInventoryController.java
@@ -1,6 +1,7 @@
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;
@@ -9,10 +10,10 @@
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;
@@ -27,7 +28,6 @@
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;
@@ -45,8 +45,7 @@
    private LWhFormInventoryServiceImpl lWhFormInventoryService;
    @Autowired
    private FinSysTenantUserServiceImpl finSysTenantUserService;
    @Autowired
    private LWhFormInventoryGoodsServiceImpl inventoryGoodsService;
    /**
     * @Description æ–°å¢ž
@@ -58,7 +57,13 @@
        @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("登录用户信息不存在");
@@ -88,7 +93,12 @@
        @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("登录用户信息不存在");
@@ -127,7 +137,12 @@
        @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("编辑失败!");
@@ -139,8 +154,18 @@
        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();
        }
@@ -186,12 +211,17 @@
        @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("暂存失败!");
    }
@@ -206,12 +236,19 @@
        @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("盘点失败!");
    }
@@ -225,7 +262,12 @@
        @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("登录用户信息不存在");
consum-base/src/main/java/com/consum/base/controller/LWhFormOutputController.java
@@ -1,5 +1,8 @@
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;
@@ -20,17 +23,25 @@
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;
@@ -129,8 +140,9 @@
        }
        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();
        }
@@ -191,8 +203,75 @@
        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();
        }
    }
}
consum-base/src/main/java/com/consum/base/controller/LWhFormProcureController.java
@@ -1,5 +1,6 @@
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;
@@ -12,27 +13,9 @@
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;
@@ -42,22 +25,13 @@
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
@@ -95,7 +69,15 @@
     * @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不能为空");
@@ -225,7 +207,11 @@
        @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("登录用户信息不存在");
@@ -264,8 +250,9 @@
        }
        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();
        }
@@ -277,7 +264,11 @@
     * @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);
@@ -342,13 +333,13 @@
        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();
@@ -371,7 +362,9 @@
                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);
@@ -384,6 +377,10 @@
    @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("登录用户信息不存在");
consum-base/src/main/java/com/consum/base/controller/LWhFormScrappedController.java
@@ -3,6 +3,7 @@
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;
@@ -21,23 +22,20 @@
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 æŠ¥åºŸå•
@@ -63,9 +61,32 @@
        @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);
        }
@@ -82,7 +103,12 @@
        @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("登录用户信息不存在");
@@ -135,7 +161,7 @@
    /**
     * æŠ¥åºŸæ˜Žç»†
     *
     * @param param
     * @param
     * @return
     */
    @ApiOperation(value = "报废明细", notes = "报废明细")
@@ -143,7 +169,12 @@
        @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("登录用户信息不存在");
consum-base/src/main/java/com/consum/base/controller/LWhFormTransferController.java
@@ -1,33 +1,24 @@
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;
@@ -38,21 +29,14 @@
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 è°ƒæ‹¨ç®¡ç†
@@ -152,8 +136,10 @@
        }
        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();
        }
consum-base/src/main/java/com/consum/base/controller/LWhHomeStatisticsController.java
New file
@@ -0,0 +1,45 @@
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));
    }
}
consum-base/src/main/java/com/consum/base/controller/LWhWarningConfigController.java
@@ -68,6 +68,10 @@
    @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();
@@ -144,6 +148,10 @@
    @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("库存上限、下限不能全为空!");
        }
@@ -160,6 +168,9 @@
    @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为空");
        }
@@ -170,6 +181,9 @@
    @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();
@@ -184,12 +198,20 @@
    @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("缺少必要参数");
        }
consum-base/src/main/java/com/consum/base/controller/LWhWarningController.java
@@ -35,6 +35,9 @@
    @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();
@@ -60,6 +63,9 @@
    @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());
consum-base/src/main/java/com/consum/base/core/WarehouseCoreService.java
@@ -1,14 +1,16 @@
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;
@@ -20,6 +22,7 @@
 */
@Service
@Slf4j
@Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
public class WarehouseCoreService extends BaseServiceImpl {
    public static void main(String[] args) {
consum-base/src/main/java/com/consum/base/core/service/LWhWarningCoreServiceImpl.java
@@ -10,6 +10,8 @@
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;
@@ -26,6 +28,7 @@
 * @Version 1.0
 **/
@Service
@Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
public class LWhWarningCoreServiceImpl {
    @Resource
@@ -129,8 +132,7 @@
        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());
    }
consum-base/src/main/java/com/consum/base/core/utils/MapUtils.java
@@ -1,10 +1,12 @@
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 {
@@ -24,8 +26,9 @@
            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) {
consum-base/src/main/java/com/consum/base/pojo/LWhFormScrappedParam.java
@@ -2,8 +2,9 @@
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.List;
import lombok.Data;
import java.util.List;
@Data
@ApiModel(value = "新增报废单信息")
@@ -14,6 +15,10 @@
     */
    @ApiModelProperty(value = "机构id")
    private Long agencyId;
    @ApiModelProperty(value = "部门id")
    private Long departmentId;
    /**
     * ä»“库编号
     */
consum-base/src/main/java/com/consum/base/pojo/excel/רÏîÖ§³öÓÿîÉêÇëÊé_map.xls
Binary files differ
consum-base/src/main/java/com/consum/base/pojo/query/LWhFormOutputQry.java
@@ -1,6 +1,5 @@
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;
@@ -32,6 +31,11 @@
    @ApiModelProperty(value = "物品模版名称")
    private String goodsName;
    /**
     * ç‰©å“æ¨¡ç‰ˆåç§°
     */
    @ApiModelProperty(value = "物品模版id")
    private String baseGoodsId;
    /**
     * æœºæž„
     */
    @ApiModelProperty(value = "机构")
@@ -50,20 +54,18 @@
     * é€€è¿˜å…¥åº“ 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
consum-base/src/main/java/com/consum/base/pojo/query/LWhLedgerQry.java
@@ -19,7 +19,7 @@
    private Long agencyId;
    @ApiModelProperty("仓库类型")
    private Long warehouseType;
    private Short warehouseType;
    @ApiModelProperty("仓库id")
    private Long warehouseId;
consum-base/src/main/java/com/consum/base/pojo/query/WhWarningQry.java
@@ -40,6 +40,9 @@
    @ApiModelProperty("状态(1=未查看;2=已查看)")
    private Integer states;
    @ApiModelProperty("预警类型(1=超上限;2=超下限)")
    private Short warningType;
    @ApiModelProperty(value = "每页显示条数")
    private Integer pageSize = 10;
consum-base/src/main/java/com/consum/base/service/FinWarehouseLedgerServiceImpl.java
@@ -20,7 +20,8 @@
@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);
@@ -64,7 +65,56 @@
            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());
    }
}
consum-base/src/main/java/com/consum/base/service/LWarehouseFlowCoreService.java
@@ -12,6 +12,8 @@
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;
@@ -26,6 +28,7 @@
 **/
@Service
@Slf4j
@Transactional(propagation = Propagation.REQUIRED)
public class LWarehouseFlowCoreService {
    private final JdbcTemplate jdbcTemplate;
@@ -78,8 +81,8 @@
        //采购方式(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) {
consum-base/src/main/java/com/consum/base/service/LWarehouseFlowService.java
@@ -8,10 +8,9 @@
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
@@ -254,4 +253,106 @@
        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());
    }
}
consum-base/src/main/java/com/consum/base/service/LWhFormInventoryCoreService.java
@@ -4,27 +4,22 @@
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
@@ -34,6 +29,7 @@
 **/
@Slf4j
@Service
@Transactional(propagation = Propagation.REQUIRED)
public class LWhFormInventoryCoreService {
    private LWhFormInventoryGoodsServiceImpl lWhFormInventoryGoods;
@@ -131,8 +127,8 @@
//                    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();
@@ -156,7 +152,7 @@
                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("创建出库单失败");
@@ -277,6 +273,7 @@
        //出入库id
        long lWhFormOutputId = IdUtil.generateId();
        lWhFormOutput.setId(lWhFormOutputId);
        lWhFormOutput.setOutWarehouseType(0);
        lWhFormOutput.setWarehouseId(warehouseId);
        //根据仓库id查询仓库
        BaseWarehouse warehouse = this.baseWarehouseService.getById(warehouseId);
@@ -301,6 +298,7 @@
        if (flag1 != 1) {
            return null;
        }
        ArrayList<LWhProcureModel> lWhProcureModels = new ArrayList<>();
        for (LWhFormInventoryGoods inventoryGoods : inventoryGoodsList) {
            Long baseGoodsModelsId = inventoryGoods.getBaseGoodsModelsId();
            Integer counts = inventoryGoods.getErrorCounts();
@@ -312,11 +310,16 @@
            //新增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);
consum-base/src/main/java/com/consum/base/service/LWhFormInventoryGoodsServiceImpl.java
@@ -8,6 +8,8 @@
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 ç›˜ç‚¹å•物品
@@ -16,6 +18,7 @@
 */
@Slf4j
@Service
@Transactional(propagation = Propagation.REQUIRED)
public class LWhFormInventoryGoodsServiceImpl extends BaseServiceImpl {
    /**
@@ -56,18 +59,18 @@
            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;
    }
    /**
consum-base/src/main/java/com/consum/base/service/LWhFormInventoryServiceImpl.java
@@ -16,6 +16,7 @@
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;
@@ -27,6 +28,7 @@
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;
@@ -44,15 +46,14 @@
    @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 ";
@@ -180,20 +181,39 @@
    }
    /**
     * ä¿å­˜ç›˜ç‚¹ä¿¡æ¯
     *
     * @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);
@@ -201,13 +221,7 @@
            log.error("修改盘点单失败");
            return 0;
        }
        //3.添加盘点单物品
        List<FormInventoryGoodsVO> inventoryGoodsList = dto.getInventoryGoodsList();
        if (CollectionUtils.isEmpty(inventoryGoodsList)) {
            log.error("盘点单物品为空");
            return 0;
        }
        this.inventoryGoodsService.updateInventoryGoods(inventoryGoodsList);
        return 1;
    }
@@ -326,6 +340,7 @@
                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);
consum-base/src/main/java/com/consum/base/service/LWhFormOutputCoreService.java
@@ -14,6 +14,7 @@
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;
@@ -29,7 +30,7 @@
 **/
@Slf4j
@Service
@Transactional(rollbackFor = Exception.class)
@Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
public class LWhFormOutputCoreService {
    private BaseGoodsTemplateServiceImpl baseGoodsTemplateService;
@@ -189,21 +190,26 @@
        //采购方式(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;
consum-base/src/main/java/com/consum/base/service/LWhFormProcureCoreService.java
@@ -10,6 +10,7 @@
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;
@@ -24,6 +25,7 @@
 **/
@Service
@Slf4j
@Transactional(propagation= Propagation.REQUIRED)
public class LWhFormProcureCoreService {
    @Resource
    private LWhProcureModelService lWhProcureModelService;
consum-base/src/main/java/com/consum/base/service/LWhFormScrappedCoreService.java
@@ -14,6 +14,7 @@
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;
@@ -30,6 +31,7 @@
 **/
@Service
@Slf4j
@Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
public class LWhFormScrappedCoreService {
    private GoodsBaseServiceImpl goodsBaseService;
consum-base/src/main/java/com/consum/base/service/LWhFormScrappedServiceImpl.java
@@ -30,6 +30,7 @@
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;
@@ -65,7 +66,7 @@
    @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 "
@@ -80,29 +81,47 @@
     * @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);
        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;
        }
        lWhFormScrapped.setWarehouseName(warehouse.getWarehouseName());
            wareHouseName = warehouse.getWarehouseName();
        } else {
            // æŸ¥è¯¢éƒ¨é—¨åç§°
            warehouseId = param.getDepartmentId();
            FinSysTenantDepartment sysTenantDepartment = departmentService.getById(warehouseId);
            if (sysTenantDepartment == null) {
                log.error("部门不存在");
                return 0;
            }
            wareHouseName = sysTenantDepartment.getName();
        }
        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) {
@@ -147,7 +166,7 @@
                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;
@@ -255,6 +274,16 @@
            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();
consum-base/src/main/java/com/consum/base/service/LWhFormTransferCoreService.java
@@ -11,6 +11,7 @@
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;
@@ -29,7 +30,7 @@
 **/
@Service
@Slf4j
@Transactional(rollbackFor = Exception.class)
@Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
public class LWhFormTransferCoreService {
    @Resource
consum-base/src/main/java/com/consum/base/service/LWhGoodsService.java
@@ -1,5 +1,6 @@
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;
@@ -239,7 +240,7 @@
    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);
        }
@@ -260,4 +261,16 @@
        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());
    }
}
consum-base/src/main/java/com/consum/base/service/LWhWarningServiceImpl.java
@@ -33,8 +33,8 @@
        }
        //机构
        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());
        }
        //仓库类型
@@ -67,6 +67,10 @@
            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 ");
consum-model-pojo/src/main/java/com/consum/model/po/FinSysTenantUser_mapper.java
@@ -49,7 +49,7 @@
    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";
@@ -225,7 +225,7 @@
        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();
    }
@@ -258,7 +258,7 @@
        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();
    }
@@ -292,7 +292,7 @@
        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);
    }
@@ -325,7 +325,7 @@
        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);
    }
@@ -573,7 +573,7 @@
        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));
        }
deploy-jar-single/pom.xml
@@ -95,7 +95,12 @@
<!--            <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>
deploy-jar-single/src/main/java/com/consum/test/CodeGeneratorServiceTest.java
@@ -1,46 +1,46 @@
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.createGoodsTemplateCode(prefixs[i],leis[i]);
//           String code =service.createWarehouseCode();
//            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);
        }
    }
}
//
////    @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.createBusinessFormCode(CodeGeneratorEnum.Transfer);
//            System.out.println(code);
//        }
//    }
//
//}
deploy-jar-single/src/main/java/com/consum/test/base/Base_Category.java
@@ -1,37 +1,37 @@
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);
//    }
//}
deploy-jar-single/src/main/java/com/consum/test/synchronizedCode.java
@@ -1,47 +1,47 @@
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()+"运行结束");
//        }
//    }
//}
deploy-jar-single/src/main/resources/application-dev.yml
@@ -7,7 +7,8 @@
# æ•°æ®åº“链接
    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
@@ -35,7 +36,7 @@
    host: 116.198.40.76
    port: 6379
    database: 11
    password: Jmy2019.
    password: ENC(C40h1dp9Q1oLqdU+JUGSBOWUfOmj/ZO4)   #Jmy2019.
  mvc:
    pathmatch:
@@ -151,8 +152,8 @@
#      - /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
@@ -218,7 +219,7 @@
      ip: 116.198.40.76
      port: 22
      user-name: mysftp
      password: Bjjmy_2020
      password: ENC(kEQ43JzZv6yOOmbmKNLWmsU/wQKTwA9x)
      private-key:
      # ftp服务上面的存储根路径,只能是linux路径
      file-root: /progress/
@@ -248,4 +249,4 @@
    # é‚®ä»¶é€šçŸ¥å‘送信息配置,2023-04-26
    mail-server: smtp.126.com
    mail-from: hnzzzhsl@126.com
    mail-password: test
    mail-password: ENC(hjRDRcQmmhpUICkAaJnXUQ==)
deploy-jar-single/src/main/resources/application-prod.yml
@@ -6,8 +6,8 @@
    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
@@ -35,7 +35,7 @@
    host: 192.200.0.49
    port: 6379
    database: 11
    password: Jmy2019.
    password: ENC(1IxlpqZ3ykMIWVknDjVydrCpK/6nccv/)   #Jmy2019.
  mvc:
    pathmatch:
@@ -151,7 +151,8 @@
    #      - /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模式中,需要关闭跨域配置,因为网关也会配置。
@@ -218,7 +219,7 @@
      ip: 192.200.0.28
      port: 22
      user-name: mysftp
      password: Jmy@2023
      password: ENC(3o6p8lx7FWgH1Zi6gZ7ruZnt2geVGiC/)
      private-key:
      # ftp服务上面的存储根路径,只能是linux路径
      file-root: /lowconsum/
@@ -248,4 +249,4 @@
    # é‚®ä»¶é€šçŸ¥å‘送信息配置,2023-04-26
    mail-server: smtp.126.com
    mail-from: hnzzzhsl@126.com
    mail-password: test
    mail-password: ENC(hjRDRcQmmhpUICkAaJnXUQ==)
deploy-jar-single/src/main/resources/import/depTaiZhangExpTemp.xlsx
Binary files differ
deploy-jar-single/src/main/resources/import/taiZhangExpTemp.xlsx
Binary files differ
deploy-jar-single/src/main/resources/import/²É¹ºÍË»õµ¥.xls
Binary files differ