Commit c680acbfcc2afb0aa19afdd05a7f4fbf47c4f5a5

Authored by 肖超群
2 parents b69533bf f8f52b05

Merge branch 'develop4' of http://www.huahengrobot.com:90/wms/wms4 into develop4

Showing 39 changed files with 1446 additions and 169 deletions
ant-design-vue-jeecg/src/api/api.js
... ... @@ -139,6 +139,8 @@ export const createShipmentTask = (params) => postAction('/shipment/shipmentComb
139 139 export const selectSortingPort = (params) => postAction('/shipment/shipmentCombination/selectSortingPort', params);
140 140 //选择入库分拣口
141 141 export const selectSupplePort = (params) => postAction('/receipt/receiptContainerHeader/selectSupplePort', params);
  142 +//选择盘点分拣口
  143 +export const inventoryPort = (params) => postAction('/cycleCountDetail/cycleCountDetail/inventoryPort', params);
142 144 //创建空托盘入库任务
143 145 export const createEmptyIn = (params) => postAction('/task/taskHeader/createEmptyIn', params);
144 146 //创建空托盘出库任务
... ... @@ -157,8 +159,10 @@ export const selectPort = (params) => postAction('/task/taskHeader/selectPort',
157 159 export const createOverStationTask = (params) => postAction('/task/taskHeader/createOverStationTask', params);
158 160 //盘点任务创建
159 161 export const stockTakeTask = (params,headerId,code) => postAction('/cycleCountDetail/cycleCountDetail/stockTakeTask?ids='+params+'&headerId='+headerId+'&code='+code, code);
  162 +//盘盈添加
  163 +export const increaseInInventoryGain = (params) => postAction('/cycleCountDetail/cycleCountDetail/increaseInInventoryGain', params);
160 164 //盘点任务生成
161   -export const createCycleCoutTaskByDetailId = (params) => postAction('/cycleCountDetail/cycleCountDetail/createCycleCoutTaskByDetailId?cycleId='+params, params);
  165 +export const createCycleCoutTaskByDetailId = (params,toPort) => postAction('/cycleCountDetail/cycleCountDetail/createCycleCoutTaskByDetailId?cycleId='+params+'&toPort='+toPort, params);
162 166 //盘点确定实盘数量
163 167 export const confirmGapQty = (params) => postAction('/cycleCountDetail/cycleCountDetail/confirmGapQty', params);
164 168 //创建空托盘组入库任务
... ...
ant-design-vue-jeecg/src/views/jeecg/JeecgDemoList.vue
... ... @@ -94,10 +94,9 @@
94 94 <template slot="content">
95 95 <a-checkbox-group @change="onColSettingsChange" v-model="settingColumns" :defaultValue="settingColumns">
96 96 <a-row style="width: 400px">
97   - <template v-for="(item,index) in defColumns">
  97 + <template v-for="(item) in defColumns">
98 98 <template v-if="item.key!='rowIndex'&& item.dataIndex!='action'">
99   - <a-col :span="12"><a-checkbox :value="item.dataIndex"><j-ellipsis :value="item.title"
100   - :length="10"></j-ellipsis></a-checkbox></a-col>
  99 + <a-col :span="12"><a-checkbox :value="item.dataIndex"><j-ellipsis :value="item.title" :length="10"></j-ellipsis></a-checkbox></a-col>
101 100 </template>
102 101 </template>
103 102 </a-row>
... ... @@ -124,7 +123,7 @@
124 123 <a-card>
125 124 <a-checkbox-group @change="onColSettingsChange" v-model="settingColumns" :defaultValue="settingColumns">
126 125 <a-row style="width: 400px">
127   - <template v-for="(item,index) in defColumns">
  126 + <template v-for="(item) in defColumns">
128 127 <template v-if="item.key!='rowIndex'&& item.dataIndex!='action'">
129 128 <a-col :span="12">
130 129 <a-checkbox :value="item.dataIndex">
... ...
ant-design-vue-jeecg/src/views/system/inventory/InventoryDetailSelectList.vue
... ... @@ -28,7 +28,7 @@
28 28 :dataSource="dataSource"
29 29 :pagination="ipagination"
30 30 :loading="loading"
31   - :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
  31 +
32 32 @change="handleTableChange">
33 33  
34 34 <span slot="companyCode" slot-scope="companyCode">
... ... @@ -157,14 +157,8 @@ export default {
157 157 ],
158 158 url: {
159 159 list: "/inventory/inventoryHeader/listInventoryDetailByMainId",
160   - delete: "/inventory/inventoryHeader/deleteInventoryDetail",
161   - deleteBatch: "/inventory/inventoryHeader/deleteBatchInventoryDetail",
162   - exportXlsUrl: "/inventory/inventoryHeader/exportInventoryDetail",
163   - importUrl: "/inventory/inventoryHeader/importInventoryDetail",
164 160 },
165   - dictOptions: {
166   - containerStatus: [],
167   - }
  161 +
168 162 }
169 163 },
170 164 created() {
... ... @@ -175,18 +169,8 @@ export default {
175 169 Utils.$on('methodA',(data)=> {
176 170 _this.methodA(data);
177 171 })
178   - // var _this = this;
179   - // setInterval(function () {
180   - // if(_this.isLoad) {
181   - // _this.loadDataList();
182   - // }
183   - // },1000)
184   - },
185   - computed: {
186   - importExcelUrl() {
187   - return `${window._CONFIG['domianURL']}/${this.url.importUrl}/${this.mainId}`;
188   - }
189 172 },
  173 +
190 174 methods: {
191 175  
192 176 methodA(data) {
... ...
ant-design-vue-jeecg/src/views/system/monitor/OperationLog.vue 0 → 100644
  1 +<template>
  2 + <a-card :bordered="false">
  3 + <!-- 查询区域 -->
  4 + <div class="table-page-search-wrapper">
  5 + <a-form layout="inline" @keyup.enter.native="searchQuery">
  6 + <a-row :gutter="24">
  7 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  8 + <a-form-item label="业务ID">
  9 + <a-input placeholder="请输入业务ID" v-model="queryParam.bizId"></a-input>
  10 + </a-form-item>
  11 + </a-col>
  12 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  13 + <a-form-item label="业务类型">
  14 + <a-input placeholder="请输入业务类型" v-model="queryParam.bizType"></a-input>
  15 + </a-form-item>
  16 + </a-col>
  17 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  18 + <a-form-item label="操作内容">
  19 + <j-input placeholder="请输入操作内容" v-model="queryParam.operationMsg"></j-input>
  20 + </a-form-item>
  21 + </a-col>
  22 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  23 + <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
  24 + <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
  25 + <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
  26 + </span>
  27 + </a-col>
  28 + </a-row>
  29 + </a-form>
  30 + </div>
  31 + <!-- 查询区域-END -->
  32 +
  33 + <!-- 操作按钮区域 -->
  34 + <div class="table-operator">
  35 + <a-button type="primary" icon="download" @click="handleExportXls('操作记录表')">导出</a-button>
  36 + <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
  37 + <a-button type="primary" icon="import">导入</a-button>
  38 + </a-upload>
  39 + </div>
  40 +
  41 + <!-- table区域-begin -->
  42 + <div>
  43 + <a-table
  44 + ref="table"
  45 + size="middle"
  46 + :scroll="{x:true}"
  47 + bordered
  48 + rowKey="id"
  49 + :columns="columns"
  50 + :dataSource="dataSource"
  51 + :pagination="ipagination"
  52 + :loading="loading"
  53 + class="j-table-force-nowrap"
  54 + @change="handleTableChange">
  55 +
  56 + <template slot="htmlSlot" slot-scope="text">
  57 + <div v-html="text"></div>
  58 + </template>
  59 + <template slot="imgSlot" slot-scope="text">
  60 + <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
  61 + <img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
  62 + </template>
  63 + <template slot="fileSlot" slot-scope="text">
  64 + <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
  65 + <a-button
  66 + v-else
  67 + :ghost="true"
  68 + type="primary"
  69 + icon="download"
  70 + size="small"
  71 + @click="downloadFile(text)">
  72 + 下载
  73 + </a-button>
  74 + </template>
  75 +
  76 + <span slot="action" slot-scope="text, record">
  77 + <a v-has="'operationLog:edit'" @click="handleEdit(record)">编辑</a>
  78 + <a @click="handleDetail(record)">详情</a>
  79 + </span>
  80 + </a-table>
  81 + </div>
  82 +
  83 + <operation-log-modal ref="modalForm" @ok="modalFormOk"></operation-log-modal>
  84 + </a-card>
  85 +</template>
  86 +
  87 +<script>
  88 + import {filterObj} from '@/utils/util';
  89 + import '@/assets/less/TableExpand.less'
  90 + import { mixinDevice } from '@/utils/mixin'
  91 + import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  92 + import OperationLogModal from './modules/OperationLogModal'
  93 +
  94 + export default {
  95 + name: 'OperationLogList',
  96 + mixins:[JeecgListMixin, mixinDevice],
  97 + components: {
  98 + OperationLogModal
  99 + },
  100 + data () {
  101 + return {
  102 + description: '操作记录表管理页面',
  103 + // 表头
  104 + columns: [
  105 + {
  106 + title:'业务ID',
  107 + align:"center",
  108 + dataIndex: 'bizId'
  109 + },
  110 + {
  111 + title:'业务类型',
  112 + align:"center",
  113 + dataIndex: 'bizType'
  114 + },
  115 + {
  116 + title:'操作内容',
  117 + align:"center",
  118 + dataIndex: 'operationMsg'
  119 + },
  120 + {
  121 + title:'操作时间',
  122 + align:"center",
  123 + dataIndex: 'operationTime'
  124 + },
  125 + {
  126 + title:'操作结果状态',
  127 + align:"center",
  128 + dataIndex: 'operationStatus'
  129 + },
  130 + {
  131 + title:'操作耗时',
  132 + align:"center",
  133 + dataIndex: 'operationCostTime'
  134 + },
  135 + {
  136 + title:'方法返回内容',
  137 + align:"center",
  138 + dataIndex: 'contentReturn'
  139 + },
  140 + {
  141 + title:'方法异常内容',
  142 + align:"center",
  143 + dataIndex: 'contentException'
  144 + },
  145 + {
  146 + title:'操作人ID',
  147 + align:"center",
  148 + dataIndex: 'operatorId'
  149 + },
  150 + {
  151 + title:'操作人姓名',
  152 + align:"center",
  153 + dataIndex: 'operatorName'
  154 + },
  155 + {
  156 + title: '操作',
  157 + dataIndex: 'action',
  158 + align: "center",
  159 + fixed: "right",
  160 + width: 147,
  161 + scopedSlots: {customRender: 'action'}
  162 + }
  163 + ],
  164 + url: {
  165 + list: "/config/operationLog/list",
  166 + delete: "/config/operationLog/delete",
  167 + deleteBatch: "/config/operationLog/deleteBatch",
  168 + exportXlsUrl: "/config/operationLog/exportXls",
  169 + importExcelUrl: "config/operationLog/importExcel",
  170 +
  171 + },
  172 + dictOptions:{},
  173 + superFieldList:[],
  174 + }
  175 + },
  176 + created() {
  177 + this.getSuperFieldList();
  178 + },
  179 + computed: {
  180 + importExcelUrl: function(){
  181 + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
  182 + },
  183 + },
  184 + methods: {
  185 + getQueryParams() {
  186 + // 重写查询条件
  187 + let sqp = {}
  188 + if (this.superQueryParams) {
  189 + sqp['superQueryParams'] = encodeURI(this.superQueryParams)
  190 + sqp['superQueryMatchType'] = this.superQueryMatchType
  191 + }
  192 + var param = Object.assign(sqp, this.queryParam, {}, this.filters)
  193 + param.field = this.getQueryField()
  194 + param.pageNo = this.ipagination.current
  195 + param.pageSize = this.ipagination.pageSize
  196 + return filterObj(param)
  197 + },
  198 + initDictConfig(){
  199 + },
  200 + getSuperFieldList(){
  201 + let fieldList=[];
  202 + fieldList.push({type:'string',value:'bizId',text:'业务ID',dictCode:''})
  203 + fieldList.push({type:'string',value:'bizType',text:'业务类型',dictCode:''})
  204 + fieldList.push({type:'string',value:'operationMsg',text:'操作内容',dictCode:''})
  205 + fieldList.push({type:'datetime',value:'operationTime',text:'操作时间'})
  206 + fieldList.push({type:'int',value:'operationStatus',text:'操作结果状态',dictCode:''})
  207 + fieldList.push({type:'int',value:'operationCostTime',text:'操作耗时',dictCode:''})
  208 + fieldList.push({type:'string',value:'contentReturn',text:'方法返回内容',dictCode:''})
  209 + fieldList.push({type:'string',value:'contentException',text:'方法异常内容',dictCode:''})
  210 + fieldList.push({type:'string',value:'operatorId',text:'操作人ID',dictCode:''})
  211 + fieldList.push({type:'string',value:'operatorName',text:'操作人姓名',dictCode:''})
  212 + this.superFieldList = fieldList
  213 + }
  214 + }
  215 + }
  216 +</script>
  217 +<style scoped>
  218 + @import '~@assets/less/common.less';
  219 +</style>
0 220 \ No newline at end of file
... ...
ant-design-vue-jeecg/src/views/system/monitor/modules/OperationLogForm.vue 0 → 100644
  1 +<template>
  2 + <a-spin :spinning="confirmLoading">
  3 + <j-form-container :disabled="formDisabled">
  4 + <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
  5 + <a-row>
  6 + <a-col :span="24">
  7 + <a-form-model-item label="业务ID" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bizId">
  8 + <a-input v-model="model.bizId" placeholder="请输入业务ID" ></a-input>
  9 + </a-form-model-item>
  10 + </a-col>
  11 + <a-col :span="24">
  12 + <a-form-model-item label="业务类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bizType">
  13 + <a-input v-model="model.bizType" placeholder="请输入业务类型" ></a-input>
  14 + </a-form-model-item>
  15 + </a-col>
  16 + <a-col :span="24">
  17 + <a-form-model-item label="操作内容" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="operationMsg">
  18 + <a-input v-model="model.operationMsg" placeholder="请输入操作内容" ></a-input>
  19 + </a-form-model-item>
  20 + </a-col>
  21 + <a-col :span="24">
  22 + <a-form-model-item label="操作时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="operationTime">
  23 + <j-date placeholder="请选择操作时间" v-model="model.operationTime" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />
  24 + </a-form-model-item>
  25 + </a-col>
  26 + <a-col :span="24">
  27 + <a-form-model-item label="操作结果状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="operationStatus">
  28 + <a-input-number v-model="model.operationStatus" placeholder="请输入操作结果状态" style="width: 100%" />
  29 + </a-form-model-item>
  30 + </a-col>
  31 + <a-col :span="24">
  32 + <a-form-model-item label="操作耗时" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="operationCostTime">
  33 + <a-input-number v-model="model.operationCostTime" placeholder="请输入操作耗时" style="width: 100%" />
  34 + </a-form-model-item>
  35 + </a-col>
  36 + <a-col :span="24">
  37 + <a-form-model-item label="方法返回内容" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="contentReturn">
  38 + <a-input v-model="model.contentReturn" placeholder="请输入方法返回内容" ></a-input>
  39 + </a-form-model-item>
  40 + </a-col>
  41 + <a-col :span="24">
  42 + <a-form-model-item label="方法异常内容" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="contentException">
  43 + <a-input v-model="model.contentException" placeholder="请输入方法异常内容" ></a-input>
  44 + </a-form-model-item>
  45 + </a-col>
  46 + <a-col :span="24">
  47 + <a-form-model-item label="操作人ID" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="operatorId">
  48 + <a-input v-model="model.operatorId" placeholder="请输入操作人ID" ></a-input>
  49 + </a-form-model-item>
  50 + </a-col>
  51 + <a-col :span="24">
  52 + <a-form-model-item label="操作人姓名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="operatorName">
  53 + <a-input v-model="model.operatorName" placeholder="请输入操作人姓名" ></a-input>
  54 + </a-form-model-item>
  55 + </a-col>
  56 + </a-row>
  57 + </a-form-model>
  58 + </j-form-container>
  59 + </a-spin>
  60 +</template>
  61 +
  62 +<script>
  63 +
  64 + import { httpAction, getAction } from '@/api/manage'
  65 + import { validateDuplicateValue } from '@/utils/util'
  66 +
  67 + export default {
  68 + name: 'OperationLogForm',
  69 + components: {
  70 + },
  71 + props: {
  72 + //表单禁用
  73 + disabled: {
  74 + type: Boolean,
  75 + default: false,
  76 + required: false
  77 + }
  78 + },
  79 + data () {
  80 + return {
  81 + model:{
  82 + },
  83 + labelCol: {
  84 + xs: { span: 24 },
  85 + sm: { span: 5 },
  86 + },
  87 + wrapperCol: {
  88 + xs: { span: 24 },
  89 + sm: { span: 16 },
  90 + },
  91 + confirmLoading: false,
  92 +validatorRules: {
  93 +},
  94 + url: {
  95 + add: "/config/operationLog/add",
  96 + edit: "/config/operationLog/edit",
  97 + queryById: "/config/operationLog/queryById"
  98 + }
  99 + }
  100 + },
  101 + computed: {
  102 + formDisabled(){
  103 + return this.disabled
  104 + },
  105 + },
  106 + created () {
  107 + //备份model原始值
  108 + this.modelDefault = JSON.parse(JSON.stringify(this.model));
  109 + },
  110 + methods: {
  111 + add () {
  112 + this.edit(this.modelDefault);
  113 + },
  114 + edit (record) {
  115 + this.model = Object.assign({}, record);
  116 + this.visible = true;
  117 + },
  118 + submitForm () {
  119 + const that = this;
  120 + // 触发表单验证
  121 + this.$refs.form.validate(valid => {
  122 + if (valid) {
  123 + that.confirmLoading = true;
  124 + let httpurl = '';
  125 + let method = '';
  126 + if(!this.model.id){
  127 + httpurl+=this.url.add;
  128 + method = 'post';
  129 + }else{
  130 + httpurl+=this.url.edit;
  131 + method = 'put';
  132 + }
  133 + httpAction(httpurl,this.model,method).then((res)=>{
  134 + if(res.success){
  135 + that.$message.success(res.message);
  136 + that.$emit('ok');
  137 + }else{
  138 + that.$message.warning(res.message);
  139 + }
  140 + }).finally(() => {
  141 + that.confirmLoading = false;
  142 + })
  143 + }
  144 +
  145 + })
  146 + },
  147 + }
  148 + }
  149 +</script>
0 150 \ No newline at end of file
... ...
ant-design-vue-jeecg/src/views/system/monitor/modules/OperationLogModal.Style#Drawer.vue 0 → 100644
  1 +<template>
  2 + <a-drawer
  3 + :title="title"
  4 + :width="width"
  5 + placement="right"
  6 + :closable="false"
  7 + @close="close"
  8 + destroyOnClose
  9 + :visible="visible">
  10 + <operationLog-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></operationLog-form>
  11 + <div class="drawer-footer">
  12 + <a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
  13 + <a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
  14 + </div>
  15 + </a-drawer>
  16 +</template>
  17 +
  18 +<script>
  19 +
  20 + import OperationLogForm from './OperationLogForm'
  21 +
  22 + export default {
  23 + name: 'OperationLogModal',
  24 + components: {
  25 + OperationLogForm
  26 + },
  27 + data () {
  28 + return {
  29 + title:"操作",
  30 + width:800,
  31 + visible: false,
  32 + disableSubmit: false
  33 + }
  34 + },
  35 + methods: {
  36 + add () {
  37 + this.visible=true
  38 + this.$nextTick(()=>{
  39 + this.$refs.realForm.add();
  40 + })
  41 + },
  42 + edit (record) {
  43 + this.visible=true
  44 + this.$nextTick(()=>{
  45 + this.$refs.realForm.edit(record);
  46 + });
  47 + },
  48 + close () {
  49 + this.$emit('close');
  50 + this.visible = false;
  51 + },
  52 + submitCallback(){
  53 + this.$emit('ok');
  54 + this.visible = false;
  55 + },
  56 + handleOk () {
  57 + this.$refs.realForm.submitForm();
  58 + },
  59 + handleCancel () {
  60 + this.close()
  61 + }
  62 + }
  63 + }
  64 +</script>
  65 +
  66 +<style lang="less" scoped>
  67 +/** Button按钮间距 */
  68 + .ant-btn {
  69 + margin-left: 30px;
  70 + margin-bottom: 30px;
  71 + float: right;
  72 + }
  73 + .drawer-footer{
  74 + position: absolute;
  75 + bottom: -8px;
  76 + width: 100%;
  77 + border-top: 1px solid #e8e8e8;
  78 + padding: 10px 16px;
  79 + text-align: right;
  80 + left: 0;
  81 + background: #fff;
  82 + border-radius: 0 0 2px 2px;
  83 + }
  84 +</style>
0 85 \ No newline at end of file
... ...
ant-design-vue-jeecg/src/views/system/monitor/modules/OperationLogModal.vue 0 → 100644
  1 +<template>
  2 + <j-modal
  3 + :title="title"
  4 + :width="width"
  5 + :visible="visible"
  6 + switchFullscreen
  7 + @ok="handleOk"
  8 + :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
  9 + @cancel="handleCancel"
  10 + cancelText="关闭">
  11 + <operationLog-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></operationLog-form>
  12 + </j-modal>
  13 +</template>
  14 +
  15 +<script>
  16 +
  17 + import OperationLogForm from './OperationLogForm'
  18 + export default {
  19 + name: 'OperationLogModal',
  20 + components: {
  21 + OperationLogForm
  22 + },
  23 + data () {
  24 + return {
  25 + title:'',
  26 + width:800,
  27 + visible: false,
  28 + disableSubmit: false
  29 + }
  30 + },
  31 + methods: {
  32 + add () {
  33 + this.visible=true
  34 + this.$nextTick(()=>{
  35 + this.$refs.realForm.add();
  36 + })
  37 + },
  38 + edit (record) {
  39 + this.visible=true
  40 + this.$nextTick(()=>{
  41 + this.$refs.realForm.edit(record);
  42 + })
  43 + },
  44 + close () {
  45 + this.$emit('close');
  46 + this.visible = false;
  47 + },
  48 + handleOk () {
  49 + this.$refs.realForm.submitForm();
  50 + },
  51 + submitCallback(){
  52 + this.$emit('ok');
  53 + this.visible = false;
  54 + },
  55 + handleCancel () {
  56 + this.close()
  57 + }
  58 + }
  59 + }
  60 +</script>
0 61 \ No newline at end of file
... ...
ant-design-vue-jeecg/src/views/system/receipt/ReceiptHeaderList.vue
... ... @@ -16,7 +16,6 @@
16 16 show-search
17 17 placeholder="请选择货主"
18 18 option-filter-prop="children"
19   - :filter-option="filterOption"
20 19 v-model="queryParam.companyCode">
21 20 <a-select-option v-for="item in companyList" :key="item.name" :value="item.code">{{
22 21 item.name
... ... @@ -32,7 +31,6 @@
32 31 show-search
33 32 placeholder="请选择入库单类型"
34 33 option-filter-prop="children"
35   - :filter-option="filterOption"
36 34 v-model="queryParam.type">
37 35 <a-select-option v-for="item in receiptTypeList" :key="item.name" :value="item.code">{{
38 36 item.name
... ... @@ -65,7 +63,6 @@
65 63 show-search
66 64 placeholder="请选择供应商"
67 65 option-filter-prop="children"
68   - :filter-option="filterOption"
69 66 v-model="queryParam.supplierCode">
70 67 <a-select-option v-for="item in supplierList" :key="item.name" :value="item.code">{{
71 68 item.name
... ... @@ -116,12 +113,6 @@
116 113  
117 114 <!-- table区域-begin -->
118 115 <div>
119   - <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
120   - <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a
121   - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
122   - <a style="margin-left: 24px" @click="onClearSelected">清空</a>
123   - </div>
124   -
125 116 <a-table
126 117 ref="table"
127 118 size="middle"
... ...
ant-design-vue-jeecg/src/views/system/receipt/modules/ReceiptHeaderModal.vue
... ... @@ -17,7 +17,6 @@
17 17 show-search
18 18 placeholder="请选择货主"
19 19 option-filter-prop="children"
20   - :filter-option="filterOption"
21 20 v-model="model.companyCode">
22 21 <a-select-option v-for="item in companyList" :key="item.name" :value="item.code">{{
23 22 item.name
... ... @@ -33,7 +32,6 @@
33 32 show-search
34 33 placeholder="请选择入库单类型"
35 34 option-filter-prop="children"
36   - :filter-option="filterOption"
37 35 v-model="model.type">
38 36 <a-select-option v-for="item in receiptTypeList" :key="item.name" :value="item.code">{{
39 37 item.name
... ... @@ -49,7 +47,6 @@
49 47 show-search
50 48 placeholder="请选择供应商"
51 49 option-filter-prop="children"
52   - :filter-option="filterOption"
53 50 v-model="model.supplierCode">
54 51 <a-select-option v-for="item in supplierList" :key="item.name" :value="item.code">{{
55 52 item.name
... ...
ant-design-vue-jeecg/src/views/system/receipt/modules/ReceiveModal.vue
... ... @@ -25,7 +25,6 @@
25 25 rowKey="id"
26 26 size="middle"
27 27 :columns="columns"
28   - :loading="loading"
29 28 :dataSource="dataSource"
30 29 :pagination="false">
31 30 <span slot="action" slot-scope="text, record">
... ...
ant-design-vue-jeecg/src/views/system/stocktaking/CycleCountDetailList.vue
... ... @@ -27,7 +27,6 @@
27 27 bordered
28 28 rowKey="id"
29 29 class="j-table-force-nowrap"
30   - :scroll="{x:true}"
31 30 :loading="loading"
32 31 :columns="columns"
33 32 :dataSource="dataSource"
... ... @@ -73,9 +72,12 @@
73 72 <span>下载</span>
74 73 </a-button>
75 74 </template>
76   -
  75 + CycleCountDetailChiIdModal
77 76 <template slot="action" slot-scope="text, record">
78   - <a v-if="record.enableStatus === 1" @click="generateCount(record.id)">生成盘点任务</a>
  77 + <cycle-count-detail-chi-id-modal ref="adjustmentModal" @ok="modalFormOk" :id="record.id"/>
  78 + <a @click="createMany()"><a-icon/>新增</a>
  79 + <a-divider type="vertical"/>
  80 + <a v-if="record.enableStatus === 1" @click="selectPort(record)">生成盘点任务</a>
79 81 <a-divider v-if="record.enableStatus === 1" type="vertical"/>
80 82 <a @click="loadDatas(record.cycleCountHeadId)"><a-icon type="sync"/>刷新</a>
81 83 </template>
... ... @@ -85,6 +87,8 @@
85 87 <!-- table区域 end -->
86 88  
87 89 <!-- 表单区域 -->
  90 +
  91 + <cycle-count-select-modal ref="modalForm2"></cycle-count-select-modal>
88 92 <cycle-count-detail-modal ref="modalForm" @ok="modalFormOk"/>
89 93  
90 94 </a-card>
... ... @@ -95,10 +99,12 @@
95 99 import { JeecgListMixin } from '@/mixins/JeecgListMixin'
96 100 import { getAction } from '@api/manage'
97 101 import CycleCountDetailModal from './modules/CycleCountDetailModal'
  102 + import CycleCountSelectModal from './modules/CycleCountSelectModal'
98 103 import CycleCountDetailChildSubTable from './subTables/CycleCountDetailChildSubTable'
99 104 import '@/assets/less/TableExpand.less'
100 105 import {createCycleCoutTaskByDetailId, stockTakeTask} from "../../../api/api";
101 106 import Utils from "../../../components/jeecgbiz/JButtonBizComponent/util.js"
  107 + import CycleCountDetailChiIdModal from "./modules/CycleCountDetailChiIdModal";
102 108  
103 109 export default {
104 110 name: 'CycleCountDetailList',
... ... @@ -107,6 +113,8 @@
107 113 components: {
108 114 CycleCountDetailModal,
109 115 CycleCountDetailChildSubTable,
  116 + CycleCountSelectModal,
  117 + CycleCountDetailChiIdModal,
110 118 },
111 119 props: {
112 120 record: {
... ... @@ -247,12 +255,6 @@
247 255 Utils.$on('methodB',(data)=> {
248 256 _this.methodB(data);
249 257 })
250   - // var _this = this;
251   - // setInterval(function () {
252   - // if(_this.isLoad) {
253   - // _this.loadDataList();
254   - // }
255   - // },1000)
256 258 },
257 259 computed: {
258 260 importExcelUrl() {
... ... @@ -283,8 +285,12 @@
283 285 }).finally(() => {
284 286 this.loading = false
285 287 })
286   - },
287 288  
  289 + },
  290 + selectPort(record) {
  291 + this.$refs.modalForm2.edit(record);
  292 + this.$refs.modalForm2.title = "选择出库口";
  293 + },
288 294 loadDatas(record) {
289 295 this.loading = true
290 296 this.dataSource = []
... ... @@ -299,34 +305,13 @@
299 305 })
300 306 },
301 307  
302   - // testaa(){
303   - // alert("刷新了")
304   - // var _this = this;
305   - // _this.loadDataList();
306   - // },
307 308 methodB(data) {
308 309 var _this = this;
309 310 _this.loadDatas(data);
310 311 },
311 312 initDictConfig() {
312 313 },
313   - generateCount(id){
314   - createCycleCoutTaskByDetailId(id).then((res) => {
315   - // alert("请求成功")
316   - if (res.success) {
317   - this.$message.success(res.message)
318   - this.$emit('ok')
319   - var _this = this;
320   - _this.loadDatas(res.result);
321   - } else {
322   - this.$message.warning(res.message);
323   - }
324   - }).finally(() => {
325   - this.confirmLoading = false;
326   - this.close()
327   - })
328 314  
329   - },
330 315 handleExpand(expanded, record) {
331 316 this.expandedRowKeys = []
332 317 if (expanded === true) {
... ... @@ -353,7 +338,12 @@
353 338 fieldList.push({type:'string',value:'completedAt',text:'完成时间',dictCode:''})
354 339 fieldList.push({type:'string',value:'enableStatus',text:'盘点明细状态',dictCode:''})
355 340 this.superFieldList = fieldList
356   - }
  341 + },
  342 +
  343 + createMany() {
  344 + this.$refs.adjustmentModal.edit();
  345 + this.$refs.adjustmentModal.title = "实盘登记";
  346 + },
357 347 }
358 348 }
359 349 </script>
... ...
ant-design-vue-jeecg/src/views/system/stocktaking/CycleCountHeaderList.vue
... ... @@ -36,7 +36,6 @@
36 36 <a-table
37 37 ref="table"
38 38 size="middle"
39   - :scroll="{x:true}"
40 39 bordered
41 40 rowKey="id"
42 41 :columns="columns"
... ... @@ -230,7 +229,7 @@
230 229 title: '操作',
231 230 dataIndex: 'action',
232 231 align:"center",
233   - fixed:"right",
  232 + // fixed:"right",
234 233 width:147,
235 234 scopedSlots: { customRender: 'action' }
236 235 }
... ...
ant-design-vue-jeecg/src/views/system/stocktaking/modules/AdjustmentDocModal.vue
1   -<script src="../../../../components/jeecgbiz/JButtonBizComponent/util.js"></script>
2 1 <template>
3 2 <j-modal
4 3 :title="title"
... ... @@ -33,7 +32,7 @@ export default {
33 32 name: "AdjustmentDocModal",
34 33 components: {},
35 34 props: {
36   - id: "",
  35 + taskHeaderId:"",
37 36 },
38 37 data() {
39 38 return {
... ... @@ -41,8 +40,9 @@ export default {
41 40 width: 500,
42 41 visible: false,
43 42 model: {
44   - id:this.id,
  43 + id:'',
45 44 countedQty:'',
  45 + state:this.taskHeaderId,
46 46 },
47 47 labelCol: {
48 48 xs: {span: 24},
... ... @@ -77,7 +77,9 @@ export default {
77 77 add() {
78 78 this.edit(this.modelDefault);
79 79 },
80   - edit() {
  80 + edit(id) {
  81 + this.model.id=id;
  82 + alert(this.model.id)
81 83 this.visible = true;
82 84 },
83 85 close() {
... ...
ant-design-vue-jeecg/src/views/system/stocktaking/modules/CycleCountDetailChiIdModal.vue 0 → 100644
  1 +<template>
  2 + <j-modal
  3 + :title="title"
  4 + :width="width"
  5 + :visible="visible"
  6 + :confirmLoading="confirmLoading"
  7 + switchFullscreen
  8 + @ok="handleOk"
  9 + @cancel="handleCancel"
  10 + cancelText="关闭">
  11 + <a-spin :spinning="confirmLoading">
  12 + <a-form-model ref="form" :model="model" :rules="validatorRules">
  13 + <a-row>
  14 + <a-col :xs="24">
  15 + <a-form-model-item label="物料" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialCode">
  16 + <j-search-select-tag
  17 + v-model="model.materialCode"
  18 + :dictOptions="materialList"
  19 + :trigger-change="true"
  20 + placeholder="请选择物料编码"
  21 + @change="searchMaterial">
  22 + </j-search-select-tag>
  23 + </a-form-model-item>
  24 + </a-col>
  25 + <a-col :xs="24">
  26 + <a-form-model-item label="实盘数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="countedQty">
  27 + <a-input v-model="model.countedQty" placeholder="请输入实盘数量"></a-input>
  28 + </a-form-model-item>
  29 + </a-col>
  30 + <a-col :span="24">
  31 + <a-form-model-item label="库存状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="inventoryStatus">
  32 + <j-dict-select-tag type="list" v-model="model.inventoryStatus" dictCode="inventory_status"
  33 + placeholder="请选择库存状态"/>
  34 + </a-form-model-item>
  35 + </a-col>
  36 + <a-col :xs="24">
  37 + <a-form-model-item label="批次" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="batch">
  38 + <a-input v-model="model.batch" placeholder="请输入批次"></a-input>
  39 + </a-form-model-item>
  40 + </a-col>
  41 + </a-row>
  42 + </a-form-model>
  43 + </a-spin>
  44 + </j-modal>
  45 +</template>
  46 +
  47 +<script>
  48 +
  49 +import {createManyEmptyIn} from '@/api/api'
  50 +import {increaseInInventoryGain} from "../../../../api/api";
  51 +import {searchMaterialByCode} from '@/api/api';
  52 +import Utils from '../../../../components/jeecgbiz/JButtonBizComponent/util.js';
  53 +
  54 +export default {
  55 + name: "CycleCountDetailChiIdModal",
  56 + components: {},
  57 + props: {
  58 + id: "",
  59 + },
  60 + data() {
  61 + return {
  62 + title: "操作",
  63 + width: 500,
  64 + visible: false,
  65 + model: {
  66 + cycleCountDetailid:this.id,
  67 + materialCode:'',
  68 + batch:'',
  69 + countedQty:'',
  70 + },
  71 + materialList: {},
  72 + querySource: {},
  73 + labelCol: {
  74 + xs: {span: 24},
  75 + sm: {span: 5},
  76 + },
  77 + wrapperCol: {
  78 + xs: {span: 24},
  79 + sm: {span: 16},
  80 + },
  81 +
  82 + confirmLoading: false,
  83 + validatorRules: {
  84 + countedQty: [
  85 + {required: true, message: '请输入实盘数量!'},
  86 + ],
  87 + },
  88 + url: {
  89 + add: "/cycleCountDetail/cycleCountDetail/increaseInInventoryGain",
  90 + }
  91 +
  92 + }
  93 + },
  94 +
  95 +
  96 + created() {
  97 + //备份model原始值
  98 + this.modelDefault = JSON.parse(JSON.stringify(this.model));
  99 + this.searchMaterial();
  100 + // this.model.inventoryStatus = "good";
  101 + },
  102 +
  103 + methods: {
  104 + searchMaterial() {
  105 + const that = this;
  106 + that.querySource.materialCode = that.model.materialCode;
  107 + searchMaterialByCode(that.querySource).then((res) => {
  108 + that.materialList = res.result;
  109 + })
  110 + },
  111 + add() {
  112 + this.edit(this.modelDefault);
  113 + },
  114 + edit() {
  115 + this.visible = true;
  116 + },
  117 + close() {
  118 + this.$emit('close');
  119 + this.visible = false;
  120 + this.$refs.form.clearValidate();
  121 + },
  122 + handleOk() {
  123 + const that = this;
  124 + // 触发表单验证
  125 + this.$refs.form.validate(valid => {
  126 + if (valid) {
  127 + that.confirmLoading = true;
  128 + increaseInInventoryGain(this.model).then((res) => {
  129 + if (res.success) {
  130 + that.$message.success(res.message);
  131 + that.$emit('ok');
  132 + that.model.containerCode = '';
  133 + that.model.toLocationCode = '';
  134 + Utils.$emit('methodB',res.result);
  135 + } else {
  136 + that.$message.warning(res.message);
  137 + }
  138 + }).finally(() => {
  139 + that.confirmLoading = false;
  140 + that.close();
  141 + })
  142 + } else {
  143 + return false
  144 + }
  145 + })
  146 + },
  147 + handleCancel() {
  148 + this.close()
  149 + },
  150 +
  151 +
  152 + }
  153 +}
  154 +</script>
0 155 \ No newline at end of file
... ...
ant-design-vue-jeecg/src/views/system/stocktaking/modules/CycleCountSelectModal.vue 0 → 100644
  1 +<template>
  2 + <j-modal
  3 + :title="title"
  4 + :width="width"
  5 + :visible="visible"
  6 + :confirmLoading="confirmLoading"
  7 + switchFullscreen
  8 + @ok="handleOk"
  9 + @cancel="handleCancel"
  10 + cancelText="关闭">
  11 + <a-spin :spinning="confirmLoading">
  12 + <a-form-model ref="form" :model="model" :rules="validatorRules">
  13 + <a-row>
  14 + <a-col :span="24">
  15 + <a-form-model-item label="出库口" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="toPort">
  16 + <a-select
  17 + show-search
  18 + placeholder="请选择出库口"
  19 + option-filter-prop="children"
  20 + v-model="model.toPort">
  21 + <a-select-option v-for="item in portList" :key="item.name" :value="item.code">{{
  22 + item.name
  23 + }}
  24 + </a-select-option>
  25 + </a-select>
  26 + </a-form-model-item>
  27 + </a-col>
  28 + </a-row>
  29 + </a-form-model>
  30 + </a-spin>
  31 + </j-modal>
  32 +</template>
  33 +
  34 +<script>
  35 +
  36 +import {createCycleCoutTaskByDetailId} from '@/api/api'
  37 +import {inventoryPort} from '@/api/api'
  38 +import Utils from "../../../../components/jeecgbiz/JButtonBizComponent/util";
  39 +
  40 +export default {
  41 + name: "CycleCountSelectModal",
  42 + portList: [],
  43 + components: {},
  44 + props: {
  45 + mainId: {
  46 + type: String,
  47 + required: false,
  48 + default: ''
  49 + }
  50 + },
  51 + data() {
  52 + return {
  53 + title: "操作",
  54 + width: 500,
  55 + visible: false,
  56 + model: {
  57 + toPort:'',
  58 + },
  59 + portList: [],
  60 + labelCol: {
  61 + xs: {span: 24},
  62 + sm: {span: 5},
  63 + },
  64 + wrapperCol: {
  65 + xs: {span: 24},
  66 + sm: {span: 16},
  67 + },
  68 +
  69 + confirmLoading: false,
  70 + validatorRules: {},
  71 + modifyId:"",
  72 + url: {
  73 + createTask: "/shipment/shipmentContainerHeader/createShipmentTask",
  74 + }
  75 +
  76 + }
  77 + },
  78 + created() {
  79 + //备份model原始值
  80 + this.modelDefault = JSON.parse(JSON.stringify(this.model));
  81 + },
  82 + methods: {
  83 + add() {
  84 + this.edit(this.modelDefault);
  85 + },
  86 + edit(record) {
  87 + this.visible = true;
  88 + this.modifyId=record.id;
  89 + this.getPortList(record);
  90 + },
  91 + close() {
  92 + this.$emit('close');
  93 + this.visible = false;
  94 + this.$refs.form.clearValidate();
  95 + },
  96 + handleOk() {
  97 + const that = this;
  98 + // 触发表单验证
  99 + this.$refs.form.validate(valid => {
  100 +
  101 +
  102 + if (valid) {
  103 + that.confirmLoading = true;
  104 + createCycleCoutTaskByDetailId(this.modifyId,this.model.toPort).then((res) => {
  105 + // alert("请求成功")
  106 + if (res.success) {
  107 + this.$message.success(res.message)
  108 + this.$emit('ok')
  109 + var _this = this;
  110 + Utils.$emit('methodB',res.result);
  111 + // _this.loadDatas(res.result);
  112 + } else {
  113 + this.$message.warning(res.message);
  114 + }
  115 + }).finally(() => {
  116 + that.confirmLoading = false;
  117 + that.close();
  118 + });
  119 + } else {
  120 + return false
  121 + }
  122 + })
  123 + },
  124 + handleCancel() {
  125 + this.close()
  126 + },
  127 + getPortList(record) {
  128 + console.log("getPortList");
  129 + inventoryPort(record).then((res) => {
  130 + if (res.success) {
  131 + this.portList = res.result;
  132 + this.model = Object.assign({}, record);
  133 + this.visible = true;
  134 + }
  135 + });
  136 + }
  137 +
  138 + }
  139 +}
  140 +</script>
... ...
ant-design-vue-jeecg/src/views/system/stocktaking/subTables/CycleCountDetailChildSubTable.vue
... ... @@ -22,8 +22,8 @@
22 22 </template>
23 23  
24 24 <template slot="action" slot-scope="text, record">
25   - <adjustment-doc-modal ref="adjustmentModal" @ok="modalFormOk" :id="record.id"/>
26   - <a v-if="record.childStatus != 1" @click="createMany(record)"><a-icon />实盘登记</a>
  25 + <adjustment-doc-modal ref="adjustmentModal" @ok="modalFormOk"/>
  26 + <a v-if="record.childStatus != 1" @click="createMany(record.id)"><a-icon />实盘登记</a>
27 27 </template>
28 28  
29 29 <template slot="fileSlot" slot-scope="text">
... ... @@ -171,8 +171,8 @@
171 171 this.loading = false
172 172 })
173 173 },
174   - createMany() {
175   - this.$refs.adjustmentModal.edit();
  174 + createMany(id) {
  175 + this.$refs.adjustmentModal.edit(id);
176 176 this.$refs.adjustmentModal.title = "实盘登记";
177 177 },
178 178  
... ...
ant-design-vue-jeecg/src/views/system/task/TaskDetailList.vue
... ... @@ -69,6 +69,9 @@
69 69 </template>
70 70  
71 71 <span slot="action" slot-scope="text, record">
  72 + <adjustment-doc-modal ref="adjustmentModal" @ok="modalFormOk" :id="record.id" :taskHeaderId="record.taskHeaderId"/>
  73 + <a v-if="record.taskType==700" @click="createMany(record)">实盘登记</a>
  74 + <a-divider type="vertical" v-if="record.taskType==700" />
72 75 <a v-has="'taskDetail:edit'" @click="handleEdit(record)">编辑</a>
73 76 <a-divider type="vertical"/>
74 77 <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
... ... @@ -87,11 +90,12 @@
87 90  
88 91 import {JeecgListMixin} from '@/mixins/JeecgListMixin'
89 92 import TaskDetailModal from './modules/TaskDetailModal'
  93 +import AdjustmentDocModal from "../stocktaking/modules/AdjustmentDocModal";
90 94  
91 95 export default {
92 96 name: "TaskDetailList",
93 97 mixins: [JeecgListMixin],
94   - components: {TaskDetailModal},
  98 + components: {TaskDetailModal,AdjustmentDocModal},
95 99 props: {
96 100 mainId: {
97 101 type: String,
... ... @@ -219,7 +223,11 @@ export default {
219 223 this.dataSource = []
220 224 this.selectedRowKeys = []
221 225 this.ipagination.current = 1
222   - }
  226 + },
  227 + createMany() {
  228 + this.$refs.adjustmentModal.edit();
  229 + this.$refs.adjustmentModal.title = "实盘登记";
  230 + },
223 231  
224 232 }
225 233 }
... ...
huaheng-wms-core/pom.xml
... ... @@ -42,7 +42,11 @@
42 42 <groupId>org.redisson</groupId>
43 43 <artifactId>redisson</artifactId>
44 44 </dependency>
45   -
  45 + <dependency>
  46 + <groupId>cn.monitor4all</groupId>
  47 + <artifactId>log-record-starter</artifactId>
  48 + <version>1.4.1</version>
  49 + </dependency>
46 50 <dependency>
47 51 <groupId>com.github.abel533</groupId>
48 52 <artifactId>ECharts</artifactId>
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/erp/service/impl/ErpServiceImpl.java
... ... @@ -148,6 +148,7 @@ public class ErpServiceImpl implements IErpService {
148 148 ReceiptDetail receiptDetail = new ReceiptDetail();
149 149 receiptDetail.setWarehouseCode(warehouseCode);
150 150 receiptDetail.setCompanyCode(companyCode);
  151 + receiptDetail.setReferCode(referCode);
151 152 receiptDetail.setReceiptCode(receiptHeader.getCode());
152 153 receiptDetail.setReceiptId(receiptHeader.getId());
153 154 receiptDetail.setStatus(QuantityConstant.RECEIPT_HEADER_BUILD);
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/framework/aspectj/ApiAuthenticationAspect.java
... ... @@ -81,7 +81,7 @@ public class ApiAuthenticationAspect {
81 81 JWTVerifier verifier = JWT.require(algorithm).withIssuer(HuahengJwtUtil.HUAHENG_SYSTEM_ID).build();
82 82 DecodedJWT jwt = verifier.verify(token);
83 83 new ApiAuthentication.ApiAuthenticationBuild().operator(jwt.getClaim("operator").asString()).audience(jwt.getAudience().get(0)).issuer(jwt.getIssuer())
84   - .issuedAt(jwt.getIssuedAt()).expireDateTime(jwt.getExpiresAt()).bulid();;
  84 + .issuedAt(jwt.getIssuedAt()).expireDateTime(jwt.getExpiresAt()).bulid();
85 85 } catch (JWTVerificationException e) {
86 86 log.error(e.getMessage());
87 87 throw e;
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/framework/aspectj/dto/ApiAuthentication.java
... ... @@ -27,10 +27,10 @@ public class ApiAuthentication {
27 27 /** Token签发方(WMS) */
28 28 private String issuer = HuahengJwtUtil.HUAHENG_SYSTEM_ID;
29 29  
30   - /** 签发时间 */
  30 + /** Token签发时间 */
31 31 private Date issuedAt;
32 32  
33   - /** 失效时间 */
  33 + /** Token失效时间 */
34 34 private Date expireDateTime;
35 35  
36 36 public ApiAuthentication() {}
... ... @@ -67,10 +67,10 @@ public class ApiAuthentication {
67 67 /** Token签发方(WMS) */
68 68 private String issuer = HuahengJwtUtil.HUAHENG_SYSTEM_ID;
69 69  
70   - /** 签发时间 */
  70 + /** Token签发时间 */
71 71 private Date issuedAt;
72 72  
73   - /** 失效时间 */
  73 + /** Token失效时间 */
74 74 private Date expireDateTime;
75 75  
76 76 public ApiAuthenticationBuild operator(String operator) {
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/home/service/impl/HomePageViewServiceImpl.java
... ... @@ -206,7 +206,7 @@ public class HomePageViewServiceImpl implements HomePageViewService {
206 206 Pie pie = new Pie();
207 207 pie.setName("货位状态");
208 208 pie.setType(SeriesType.pie);
209   - pie.setRadius("55%");
  209 + pie.setRadius("70%");
210 210 pie.setCenter(new String[] {"40%", "50%"});
211 211 Normal normal = new Normal();
212 212 normal.setFormatter("{b} \n {c} ({d}%)");
... ... @@ -301,7 +301,7 @@ public class HomePageViewServiceImpl implements HomePageViewService {
301 301 Pie pie = new Pie();
302 302 pie.setName("库存");
303 303 pie.setType(SeriesType.pie);
304   - pie.setRadius("55%");
  304 + pie.setRadius("70%");
305 305 pie.setCenter(new String[] {"40%", "50%"});
306 306 pie.itemStyle().emphasis().setShadowBlur(10);
307 307 pie.itemStyle().emphasis().setShadowOffsetX(0);
... ... @@ -339,26 +339,30 @@ public class HomePageViewServiceImpl implements HomePageViewService {
339 339 String today = new SimpleDateFormat("yyyy-MM-dd").format(System.currentTimeMillis() - 1000 * 60 * 60 * 24).toString();
340 340 Map<String, Object> map = new HashMap<>();
341 341  
  342 +
  343 +
342 344 // 今天入库量
343   - LambdaQueryWrapper<TaskDetail> taskDetailLambdaQueryWrapper = Wrappers.lambdaQuery();
344   - taskDetailLambdaQueryWrapper.select(TaskDetail::getTaskType, TaskDetail::getQty).gt(TaskDetail::getCreateTime, today);
345   - List<TaskDetail> taskDetails = taskDetailServiceImpl.list(taskDetailLambdaQueryWrapper);
  345 + LambdaQueryWrapper<InventoryTransaction> inventoryTransactionLambdaQueryWrapper = Wrappers.lambdaQuery();
  346 + inventoryTransactionLambdaQueryWrapper.select(InventoryTransaction::getType,InventoryTransaction::getQty).gt(InventoryTransaction::getCreateTime, today);
  347 + List<InventoryTransaction> inventoryTransactions = inventoryTransactionServiceImpl.list(inventoryTransactionLambdaQueryWrapper);
346 348 BigDecimal receiptQty = BigDecimal.ZERO;
347 349 BigDecimal shipmentQty = BigDecimal.ZERO;
348 350  
349   - for (TaskDetail taskDetail : taskDetails) {
350   - if (taskDetail.getTaskType().equals(QuantityConstant.TASK_TYPE_WHOLERECEIPT)) {
351   - receiptQty = receiptQty.add(taskDetail.getQty());
352   - } else if (taskDetail.getTaskType().equals(QuantityConstant.TASK_TYPE_WHOLESHIPMENT)) {
353   - shipmentQty = shipmentQty.add(taskDetail.getQty());
  351 + for (InventoryTransaction inventoryTransaction : inventoryTransactions) {
  352 + if (inventoryTransaction.getType().equals(QuantityConstant.INVENTORY_TRANSACTION_RECEIPT)) {
  353 + receiptQty = receiptQty.add(inventoryTransaction.getQty());
  354 + } else if (inventoryTransaction.getType().equals(QuantityConstant.INVENTORY_TRANSACTION_SHIPMENT)) {
  355 + shipmentQty = shipmentQty.add(inventoryTransaction.getQty());
354 356 }
355   -
356 357 }
357 358 map.put("receiptTotal", receiptQty);
358 359 map.put("shipmentTotal", shipmentQty);
359 360 // 今日交易量
360 361 map.put("bllCount", receiptQty.add(shipmentQty));
361 362  
  363 +
  364 +
  365 +
362 366 // 库存总数
363 367 LambdaQueryWrapper<InventoryHeader> inventoryHeaderLambdaQueryWrapper = Wrappers.lambdaQuery();
364 368 inventoryHeaderLambdaQueryWrapper.select(InventoryHeader::getTotalQty);
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/monitor/operation/controller/OperationLogController.java 0 → 100644
  1 +package org.jeecg.modules.wms.monitor.operation.controller;
  2 +
  3 +import java.util.Arrays;
  4 +
  5 +import javax.servlet.http.HttpServletRequest;
  6 +import javax.servlet.http.HttpServletResponse;
  7 +
  8 +import org.jeecg.common.api.vo.Result;
  9 +import org.jeecg.common.aspect.annotation.AutoLog;
  10 +import org.jeecg.common.system.base.controller.JeecgController;
  11 +import org.jeecg.common.system.query.QueryGenerator;
  12 +import org.jeecg.modules.wms.monitor.operation.entity.OperationLog;
  13 +import org.jeecg.modules.wms.monitor.operation.service.IOperationLogService;
  14 +import org.springframework.beans.factory.annotation.Autowired;
  15 +import org.springframework.web.bind.annotation.DeleteMapping;
  16 +import org.springframework.web.bind.annotation.GetMapping;
  17 +import org.springframework.web.bind.annotation.PostMapping;
  18 +import org.springframework.web.bind.annotation.RequestBody;
  19 +import org.springframework.web.bind.annotation.RequestMapping;
  20 +import org.springframework.web.bind.annotation.RequestMethod;
  21 +import org.springframework.web.bind.annotation.RequestParam;
  22 +import org.springframework.web.bind.annotation.RestController;
  23 +import org.springframework.web.servlet.ModelAndView;
  24 +
  25 +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
  26 +import com.baomidou.mybatisplus.core.metadata.IPage;
  27 +import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
  28 +
  29 +import io.swagger.annotations.Api;
  30 +import io.swagger.annotations.ApiOperation;
  31 +import lombok.extern.slf4j.Slf4j;
  32 +
  33 +/**
  34 + * @Description: 操作记录表
  35 + * @Author: jeecg-boot
  36 + * @Date: 2023-02-20
  37 + * @Version: V1.0
  38 + */
  39 +@Api(tags = "操作记录表")
  40 +@RestController
  41 +@RequestMapping("/config/operationLog")
  42 +@Slf4j
  43 +public class OperationLogController extends JeecgController<OperationLog, IOperationLogService> {
  44 + @Autowired
  45 + private IOperationLogService operationLogService;
  46 +
  47 + /**
  48 + * 分页列表查询
  49 + * @param operationLog
  50 + * @param pageNo
  51 + * @param pageSize
  52 + * @param req
  53 + * @return
  54 + */
  55 + // @AutoLog(value = "操作记录表-分页列表查询")
  56 + @ApiOperation(value = "操作记录表-分页列表查询", notes = "操作记录表-分页列表查询")
  57 + @GetMapping(value = "/list")
  58 + public Result<IPage<OperationLog>> queryPageList(OperationLog operationLog, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
  59 + @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) {
  60 + QueryWrapper<OperationLog> queryWrapper = QueryGenerator.initQueryWrapper(operationLog, req.getParameterMap());
  61 + Page<OperationLog> page = new Page<OperationLog>(pageNo, pageSize);
  62 + IPage<OperationLog> pageList = operationLogService.page(page, queryWrapper);
  63 + return Result.OK(pageList);
  64 + }
  65 +
  66 + /**
  67 + * 添加
  68 + * @param operationLog
  69 + * @return
  70 + */
  71 + @AutoLog(value = "操作记录表-添加")
  72 + @ApiOperation(value = "操作记录表-添加", notes = "操作记录表-添加")
  73 + @PostMapping(value = "/add")
  74 + public Result<String> add(@RequestBody OperationLog operationLog) {
  75 + operationLogService.save(operationLog);
  76 + return Result.OK("添加成功!");
  77 + }
  78 +
  79 + /**
  80 + * 编辑
  81 + * @param operationLog
  82 + * @return
  83 + */
  84 + @AutoLog(value = "操作记录表-编辑")
  85 + @ApiOperation(value = "操作记录表-编辑", notes = "操作记录表-编辑")
  86 + @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
  87 + public Result<String> edit(@RequestBody OperationLog operationLog) {
  88 + operationLogService.updateById(operationLog);
  89 + return Result.OK("编辑成功!");
  90 + }
  91 +
  92 + /**
  93 + * 通过id删除
  94 + * @param id
  95 + * @return
  96 + */
  97 + @AutoLog(value = "操作记录表-通过id删除")
  98 + @ApiOperation(value = "操作记录表-通过id删除", notes = "操作记录表-通过id删除")
  99 + @DeleteMapping(value = "/delete")
  100 + public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
  101 + operationLogService.removeById(id);
  102 + return Result.OK("删除成功!");
  103 + }
  104 +
  105 + /**
  106 + * 批量删除
  107 + * @param ids
  108 + * @return
  109 + */
  110 + @AutoLog(value = "操作记录表-批量删除")
  111 + @ApiOperation(value = "操作记录表-批量删除", notes = "操作记录表-批量删除")
  112 + @DeleteMapping(value = "/deleteBatch")
  113 + public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
  114 + this.operationLogService.removeByIds(Arrays.asList(ids.split(",")));
  115 + return Result.OK("批量删除成功!");
  116 + }
  117 +
  118 + /**
  119 + * 通过id查询
  120 + * @param id
  121 + * @return
  122 + */
  123 + // @AutoLog(value = "操作记录表-通过id查询")
  124 + @ApiOperation(value = "操作记录表-通过id查询", notes = "操作记录表-通过id查询")
  125 + @GetMapping(value = "/queryById")
  126 + public Result<OperationLog> queryById(@RequestParam(name = "id", required = true) String id) {
  127 + OperationLog operationLog = operationLogService.getById(id);
  128 + if (operationLog == null) {
  129 + return Result.error("未找到对应数据");
  130 + }
  131 + return Result.OK(operationLog);
  132 + }
  133 +
  134 + /**
  135 + * 导出excel
  136 + * @param request
  137 + * @param operationLog
  138 + */
  139 + @RequestMapping(value = "/exportXls")
  140 + public ModelAndView exportXls(HttpServletRequest request, OperationLog operationLog) {
  141 + return super.exportXls(request, operationLog, OperationLog.class, "操作记录表");
  142 + }
  143 +
  144 + /**
  145 + * 通过excel导入数据
  146 + * @param request
  147 + * @param response
  148 + * @return
  149 + */
  150 + @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
  151 + public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
  152 + return super.importExcel(request, response, OperationLog.class);
  153 + }
  154 +
  155 +}
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/monitor/operation/entity/OperationLog.java 0 → 100644
  1 +package org.jeecg.modules.wms.monitor.operation.entity;
  2 +
  3 +import java.io.Serializable;
  4 +import java.io.UnsupportedEncodingException;
  5 +import java.util.Date;
  6 +import java.math.BigDecimal;
  7 +import com.baomidou.mybatisplus.annotation.IdType;
  8 +import com.baomidou.mybatisplus.annotation.TableId;
  9 +import com.baomidou.mybatisplus.annotation.TableName;
  10 +import lombok.Data;
  11 +import com.fasterxml.jackson.annotation.JsonFormat;
  12 +import org.springframework.format.annotation.DateTimeFormat;
  13 +import org.jeecgframework.poi.excel.annotation.Excel;
  14 +import org.jeecg.common.aspect.annotation.Dict;
  15 +import io.swagger.annotations.ApiModel;
  16 +import io.swagger.annotations.ApiModelProperty;
  17 +import lombok.EqualsAndHashCode;
  18 +import lombok.experimental.Accessors;
  19 +
  20 +/**
  21 + * @Description: 操作记录表
  22 + * @Author: jeecg-boot
  23 + * @Date: 2023-02-20
  24 + * @Version: V1.0
  25 + */
  26 +@Data
  27 +@TableName("operation_log")
  28 +@Accessors(chain = true)
  29 +@EqualsAndHashCode(callSuper = false)
  30 +@ApiModel(value="operation_log对象", description="操作记录表")
  31 +public class OperationLog implements Serializable {
  32 + private static final long serialVersionUID = 1L;
  33 +
  34 + /**主键*/
  35 + @TableId(type = IdType.AUTO)
  36 + @ApiModelProperty(value = "主键")
  37 + private java.lang.Integer id;
  38 + /**业务ID*/
  39 + @Excel(name = "业务ID", width = 15)
  40 + @ApiModelProperty(value = "业务ID")
  41 + private java.lang.String bizId;
  42 + /**业务类型*/
  43 + @Excel(name = "业务类型", width = 15)
  44 + @ApiModelProperty(value = "业务类型")
  45 + private java.lang.String bizType;
  46 + /**操作内容*/
  47 + @Excel(name = "操作内容", width = 15)
  48 + @ApiModelProperty(value = "操作内容")
  49 + private java.lang.String operationMsg;
  50 + /**操作时间*/
  51 + @Excel(name = "操作时间", width = 15)
  52 + @ApiModelProperty(value = "操作时间")
  53 + private java.util.Date operationTime;
  54 + /**操作结果状态*/
  55 + @Excel(name = "操作结果状态", width = 15)
  56 + @ApiModelProperty(value = "操作结果状态")
  57 + private java.lang.Integer operationStatus;
  58 + /**操作耗时*/
  59 + @Excel(name = "操作耗时", width = 15)
  60 + @ApiModelProperty(value = "操作耗时")
  61 + private java.lang.Long operationCostTime;
  62 + /**方法返回内容*/
  63 + @Excel(name = "方法返回内容", width = 15)
  64 + @ApiModelProperty(value = "方法返回内容")
  65 + private java.lang.String contentReturn;
  66 + /**方法异常内容*/
  67 + @Excel(name = "方法异常内容", width = 15)
  68 + @ApiModelProperty(value = "方法异常内容")
  69 + private java.lang.String contentException;
  70 + /**操作人ID*/
  71 + @Excel(name = "操作人ID", width = 15)
  72 + @ApiModelProperty(value = "操作人ID")
  73 + private java.lang.String operatorId;
  74 + /**操作人姓名*/
  75 + @Excel(name = "操作人姓名", width = 15)
  76 + @ApiModelProperty(value = "操作人姓名")
  77 + private java.lang.String operatorName;
  78 +}
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/monitor/operation/mapper/OperationLogMapper.java 0 → 100644
  1 +package org.jeecg.modules.wms.monitor.operation.mapper;
  2 +
  3 +import org.jeecg.modules.wms.monitor.operation.entity.OperationLog;
  4 +
  5 +import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  6 +
  7 +/**
  8 + * @Description: 操作记录表
  9 + * @Author: jeecg-boot
  10 + * @Date: 2023-02-20
  11 + * @Version: V1.0
  12 + */
  13 +public interface OperationLogMapper extends BaseMapper<OperationLog> {
  14 +
  15 +}
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/monitor/operation/mapper/xml/OperationLogMapper.xml 0 → 100644
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3 +<mapper namespace="org.jeecg.modules.wms.monitor.operation.mapper.OperationLogMapper">
  4 +
  5 +</mapper>
0 6 \ No newline at end of file
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/monitor/operation/service/IOperationLogService.java 0 → 100644
  1 +package org.jeecg.modules.wms.monitor.operation.service;
  2 +
  3 +import org.jeecg.modules.wms.monitor.operation.entity.OperationLog;
  4 +
  5 +import com.baomidou.mybatisplus.extension.service.IService;
  6 +
  7 +/**
  8 + * @Description: 操作记录表
  9 + * @Author: jeecg-boot
  10 + * @Date: 2023-02-20
  11 + * @Version: V1.0
  12 + */
  13 +public interface IOperationLogService extends IService<OperationLog> {
  14 +
  15 +}
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/monitor/operation/service/impl/OperationLogServiceImpl.java 0 → 100644
  1 +package org.jeecg.modules.wms.monitor.operation.service.impl;
  2 +
  3 +import org.jeecg.modules.wms.monitor.operation.entity.OperationLog;
  4 +import org.jeecg.modules.wms.monitor.operation.mapper.OperationLogMapper;
  5 +import org.jeecg.modules.wms.monitor.operation.service.IOperationLogService;
  6 +import org.springframework.stereotype.Service;
  7 +
  8 +import com.alibaba.fastjson.JSON;
  9 +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
  10 +
  11 +import cn.monitor4all.logRecord.bean.LogDTO;
  12 +import cn.monitor4all.logRecord.service.IOperationLogGetService;
  13 +import lombok.extern.slf4j.Slf4j;
  14 +
  15 +/**
  16 + * @Description: 操作记录表
  17 + * @Author: jeecg-boot
  18 + * @Date: 2023-02-20
  19 + * @Version: V1.0
  20 + */
  21 +@Slf4j
  22 +@Service
  23 +public class OperationLogServiceImpl extends ServiceImpl<OperationLogMapper, OperationLog> implements IOperationLogService, IOperationLogGetService {
  24 +
  25 + @Override
  26 + public boolean createLog(LogDTO logDTO) throws Exception {
  27 + try {
  28 + log.debug(">>>>>> create OperationLog: [{}]", JSON.toJSONString(logDTO));
  29 + if (null == logDTO.getBizId()) {
  30 + log.error(">>>>>> create OperationLog bizId is null");
  31 + return false;
  32 + }
  33 + OperationLog operationLog = new OperationLog();
  34 + operationLog.setBizId(logDTO.getBizId());
  35 + operationLog.setBizType(logDTO.getBizType());
  36 + operationLog.setContentException(logDTO.getException());
  37 + operationLog.setContentReturn(logDTO.getReturnStr());
  38 + operationLog.setOperationCostTime(logDTO.getExecutionTime());
  39 + operationLog.setOperationMsg(logDTO.getMsg());
  40 + operationLog.setOperationStatus(logDTO.getSuccess().equals(true) ? 1 : 0);
  41 + operationLog.setOperationTime(logDTO.getOperateDate());
  42 + operationLog.setOperatorId(logDTO.getOperatorId());
  43 + operationLog.setOperatorName(logDTO.getOperatorId());
  44 + this.save(operationLog);
  45 + return true;
  46 + } catch (Exception e) {
  47 + log.error(">>>>>> create OperationLog error:{}", e.getMessage(), e);
  48 + return false;
  49 + }
  50 + }
  51 +}
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiptHeader/entity/ReceiptHeader.java
... ... @@ -9,6 +9,10 @@ import com.baomidou.mybatisplus.annotation.TableName;
9 9 import org.jeecgframework.poi.excel.annotation.Excel;
10 10 import lombok.Data;
11 11 import com.fasterxml.jackson.annotation.JsonFormat;
  12 +
  13 +import cn.monitor4all.logRecord.annotation.LogRecordDiffField;
  14 +import cn.monitor4all.logRecord.annotation.LogRecordDiffObject;
  15 +
12 16 import org.springframework.format.annotation.DateTimeFormat;
13 17 import org.jeecg.common.aspect.annotation.Dict;
14 18 import io.swagger.annotations.ApiModel;
... ... @@ -23,6 +27,7 @@ import io.swagger.annotations.ApiModelProperty;
23 27 @Data
24 28 @TableName("receipt_header")
25 29 @ApiModel(value = "receipt_header对象", description = "入库表主表")
  30 +@LogRecordDiffObject
26 31 public class ReceiptHeader implements Serializable {
27 32 private static final long serialVersionUID = 1L;
28 33  
... ... @@ -33,6 +38,7 @@ public class ReceiptHeader implements Serializable {
33 38 /** 编码 */
34 39 @Excel(name = "编码", width = 15)
35 40 @ApiModelProperty(value = "编码")
  41 + @LogRecordDiffField(alias = "入库单编码")
36 42 private String code;
37 43 /** 仓库编码 */
38 44 @Excel(name = "仓库编码", width = 15)
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/stocktaking/cycleCountDetail/controller/CycleCountDetailController.java
... ... @@ -15,6 +15,12 @@ import javax.servlet.http.HttpServletRequest;
15 15  
16 16 import org.apache.shiro.authz.annotation.RequiresPermissions;
17 17 import org.jeecg.modules.system.entity.SysAnnouncementSend;
  18 +import org.jeecg.modules.wms.config.location.entity.Location;
  19 +import org.jeecg.modules.wms.config.location.service.impl.LocationServiceImpl;
  20 +import org.jeecg.modules.wms.config.port.entity.Port;
  21 +import org.jeecg.modules.wms.config.port.service.impl.PortServiceImpl;
  22 +import org.jeecg.modules.wms.config.zone.entity.Zone;
  23 +import org.jeecg.modules.wms.config.zone.service.impl.ZoneServiceImpl;
18 24 import org.jeecg.modules.wms.framework.controller.HuahengBaseController;
19 25 import javax.servlet.http.HttpServletResponse;
20 26  
... ... @@ -24,9 +30,11 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
24 30 import org.jeecg.modules.wms.framework.controller.HuahengBaseController;
25 31 import org.jeecg.modules.wms.inventory.inventoryHeader.entity.InventoryDetail;
26 32 import org.jeecg.modules.wms.inventory.inventoryHeader.service.IInventoryDetailService;
  33 +import org.jeecg.modules.wms.shipment.shipmentContainerHeader.entity.ShipmentContainerHeader;
27 34 import org.jeecg.utils.ConvertUtils;
28 35 import org.jeecg.utils.HuahengJwtUtil;
29 36 import org.jeecg.utils.StringUtils;
  37 +import org.jeecg.utils.constant.QuantityConstant;
30 38 import org.jeecgframework.poi.excel.ExcelImportUtil;
31 39 import org.jeecgframework.poi.excel.def.NormalExcelConstants;
32 40 import org.jeecgframework.poi.excel.entity.ExportParams;
... ... @@ -74,6 +82,13 @@ public class CycleCountDetailController extends HuahengBaseController {
74 82 private ICycleCountDetailChildService cycleCountDetailChildService;
75 83 @Autowired
76 84 private IInventoryDetailService inventoryDetailService;
  85 + @Resource
  86 + private LocationServiceImpl locationService;
  87 + @Resource
  88 + private ZoneServiceImpl zoneService;
  89 + @Resource
  90 + private PortServiceImpl portService;
  91 +
77 92 /**
78 93 * 分页列表查询
79 94 *
... ... @@ -116,23 +131,16 @@ public class CycleCountDetailController extends HuahengBaseController {
116 131 }
117 132  
118 133 /**
119   - * 编辑
  134 + * 盘盈增加明细
120 135 *
121   - * @param cycleCountDetailPage
  136 + * @param
122 137 * @return
123 138 */
124   - @AutoLog(value = "盘点明细表-编辑")
125   - @ApiOperation(value="盘点明细表-编辑", notes="盘点明细表-编辑")
126   - @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
127   - public Result<String> edit(@RequestBody CycleCountDetailPage cycleCountDetailPage) {
128   - CycleCountDetail cycleCountDetail = new CycleCountDetail();
129   - BeanUtils.copyProperties(cycleCountDetailPage, cycleCountDetail);
130   - CycleCountDetail cycleCountDetailEntity = cycleCountDetailService.getById(cycleCountDetail.getId());
131   - if(cycleCountDetailEntity==null) {
132   - return Result.error("未找到对应数据");
133   - }
134   - cycleCountDetailService.updateMain(cycleCountDetail, cycleCountDetailPage.getCycleCountDetailChildList());
135   - return Result.OK("编辑成功!");
  139 + @AutoLog(value = "盘点盘盈-增加明细")
  140 + @ApiOperation(value="盘点盘盈-增加明细", notes="盘点盘盈-增加明细")
  141 + @RequestMapping(value = "/increaseInInventoryGain", method = {RequestMethod.PUT,RequestMethod.POST})
  142 + public Result<String> increaseInInventoryGain(@RequestBody CycleCountDetailChild cycleCountDetailChild) {
  143 + return cycleCountDetailService.increaseInInventoryGain(cycleCountDetailChild);
136 144 }
137 145  
138 146 /**
... ... @@ -189,12 +197,47 @@ public class CycleCountDetailController extends HuahengBaseController {
189 197 @AutoLog(value = "生成单条盘点任务")
190 198 @ApiOperation(value="生成单条盘点任务", notes="生成单条盘点任务")
191 199 @PostMapping(value = "/createCycleCoutTaskByDetailId")
192   - public Result createCycleCoutTaskByDetailId(@RequestParam(name = "cycleId") Integer cycleId, HttpServletRequest req){
  200 + public Result createCycleCoutTaskByDetailId(@RequestParam(name = "cycleId") Integer cycleId,@RequestParam(name = "toPort") String toPort, HttpServletRequest req){
193 201 if(cycleId ==null){
194 202 return Result.error("生成盘点任务时盘点明细ID不能为空!");
195 203 }
196 204 String warehouseCode = HuahengJwtUtil.getWarehouseCodeByToken(req);
197   - return cycleCountDetailService.createCycleCoutTaskByDetailId(cycleId,warehouseCode);
  205 + return cycleCountDetailService.createCycleCoutTaskByDetailId(cycleId,toPort,warehouseCode);
  206 + }
  207 +
  208 +
  209 + /**
  210 + * 选择分拣口
  211 + * @return
  212 + */
  213 + @ApiOperation(value = "盘点-选择分拣口", notes = "盘点-选择分拣口")
  214 + @PostMapping("/inventoryPort")
  215 + @ResponseBody
  216 + public Result inventoryPort(@RequestBody CycleCountDetail cycleCountDetail, HttpServletRequest req) {
  217 + String warehouseCode = HuahengJwtUtil.getWarehouseCodeByToken(req);
  218 + String fromLocationCode = cycleCountDetail.getLocationCode();
  219 + if (StringUtils.isEmpty(fromLocationCode)) {
  220 + return Result.error("选择分拣口时, 起始库位号为空");
  221 + }
  222 + Location fromLocation = locationService.getLocationByCode(fromLocationCode, warehouseCode);
  223 + if (fromLocation == null) {
  224 + return Result.error("选择分拣口时, 根据库位号" + fromLocationCode + " 没有找到库位");
  225 + }
  226 + String zoneCode = fromLocation.getZoneCode();
  227 + if (StringUtils.isEmpty(zoneCode)) {
  228 + return Result.error("选择分拣口时, 库区编码为空");
  229 + }
  230 + Zone zone = zoneService.getZoneByCode(zoneCode, warehouseCode);
  231 + if (zone == null) {
  232 + return Result.error("选择分拣口时, 库区为空");
  233 + }
  234 + int type = QuantityConstant.PORT_TYPE_PICK;
  235 +
  236 + List<Port> portList = portService.getPortListByType(type, zoneCode, warehouseCode);
  237 + if (portList.size() == 0) {
  238 + return Result.error("选择分拣口时, 没有找到合适的分拣口");
  239 + }
  240 + return Result.OK(portList);
198 241 }
199 242  
200 243  
... ... @@ -235,7 +278,8 @@ public class CycleCountDetailController extends HuahengBaseController {
235 278 public Result confirmGapQty(@RequestBody Map<String,String> map){
236 279 String id = map.get("id");
237 280 String countedQty = map.get("countedQty");
238   - return cycleCountDetailChildService.confirmGapQty(id,countedQty);
  281 + String state = map.get("state");
  282 + return cycleCountDetailChildService.confirmGapQty(id,countedQty,state);
239 283 }
240 284  
241 285 /**
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/stocktaking/cycleCountDetail/entity/CycleCountDetail.java
... ... @@ -43,10 +43,6 @@ public class CycleCountDetail implements Serializable {
43 43 @Excel(name = "任务表头", width = 15)
44 44 @ApiModelProperty(value = "任务表头")
45 45 private Integer taskHeaderId;
46   - /**任务明细头*/
47   - @Excel(name = "任务明细头", width = 15)
48   - @ApiModelProperty(value = "任务明细头")
49   - private Integer taskDetailId;
50 46 /**仓库*/
51 47 @Excel(name = "仓库", width = 15)
52 48 @ApiModelProperty(value = "仓库")
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/stocktaking/cycleCountDetail/entity/CycleCountDetailChild.java
... ... @@ -68,6 +68,10 @@ public class CycleCountDetailChild implements Serializable {
68 68 @Excel(name = "物料单位", width = 15)
69 69 @ApiModelProperty(value = "物料单位")
70 70 private String materialUnit;
  71 + /**任务明细头*/
  72 + @Excel(name = "任务明细头", width = 15)
  73 + @ApiModelProperty(value = "任务明细头")
  74 + private Integer taskDetailId;
71 75 /**系统数量*/
72 76 @Excel(name = "系统数量", width = 15)
73 77 @ApiModelProperty(value = "系统数量")
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/stocktaking/cycleCountDetail/service/ICycleCountDetailChildService.java
... ... @@ -14,5 +14,5 @@ import java.util.List;
14 14 public interface ICycleCountDetailChildService extends IService<CycleCountDetailChild> {
15 15  
16 16  
17   - Result confirmGapQty(String id, String countedQty);
  17 + Result confirmGapQty(String id, String countedQty,String state);
18 18 }
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/stocktaking/cycleCountDetail/service/ICycleCountDetailService.java
... ... @@ -40,6 +40,7 @@ public interface ICycleCountDetailService extends IService&lt;CycleCountDetail&gt; {
40 40  
41 41 Result stockDetailAdd(int taskId,int headerId,String code);
42 42  
43   - Result createCycleCoutTaskByDetailId(Integer cycleCoutdetailId,String warehouseCode);
  43 + Result createCycleCoutTaskByDetailId(Integer cycleCoutdetailId,String toPort,String warehouseCode);
44 44  
  45 + Result increaseInInventoryGain(CycleCountDetailChild cycleCountDetailChild);
45 46 }
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/stocktaking/cycleCountDetail/service/impl/CycleCountDetailChildServiceImpl.java
... ... @@ -42,22 +42,35 @@ public class CycleCountDetailChildServiceImpl extends ServiceImpl&lt;CycleCountDeta
42 42  
43 43  
44 44 @Override
45   - public Result confirmGapQty(String id, String countedQty) {
  45 + public Result confirmGapQty(String id, String countedQty,String state) {
46 46 //接收子单ID和实盘数量
47 47 //任务未完成可多次登记。
  48 + CycleCountDetailChild detailChild=new CycleCountDetailChild();
  49 + if (StringUtils.isNotEmpty(state))
  50 + {
  51 + LambdaQueryWrapper<CycleCountDetailChild> queryWrapper = new LambdaQueryWrapper<>();
  52 + queryWrapper.eq(CycleCountDetailChild::getTaskDetailId,id);
  53 + detailChild = this.getOne(queryWrapper);
  54 + }else
  55 + {
  56 + //明细子单据
  57 + detailChild = this.getById(Integer.valueOf(id));
  58 + }
  59 +
  60 + if(StringUtils.isNull(detailChild)){
  61 + return Result.error("明细子单不存在!");
  62 + }
  63 +
  64 +
48 65 BigDecimal qty=new BigDecimal(countedQty);
49 66 if(qty.compareTo(BigDecimal.ZERO) == -1){
50 67 return Result.error("实盘登记数不能小于0");
51 68 }
52   - //明细子单据
53   - CycleCountDetailChild countDetailChild = this.getById(Integer.valueOf(id));
54   - if(StringUtils.isNull(countDetailChild)){
55   - return Result.error("明细子单不存在!");
56   - }
57 69  
58 70  
59 71  
60   - CycleCountDetail cycleCountDetail = cycleCountDetailService.getById(countDetailChild.getCycleCountDetailid());
  72 +
  73 + CycleCountDetail cycleCountDetail = cycleCountDetailService.getById(detailChild.getCycleCountDetailid());
61 74 if(StringUtils.isNull(cycleCountDetail)){
62 75 return Result.error("盘点明细不存在。");
63 76 }
... ... @@ -66,17 +79,17 @@ public class CycleCountDetailChildServiceImpl extends ServiceImpl&lt;CycleCountDeta
66 79 // return AjaxResult.error("盘点任务未执行不能登记数量!");
67 80 // }
68 81  
69   - if(countDetailChild.getChildStatus() >= QuantityConstant.CYCLECOUNT_STATUS_COMPLETED){
  82 + if(detailChild.getChildStatus() >= QuantityConstant.CYCLECOUNT_STATUS_COMPLETED){
70 83 return Result.error("盘点任务完成后不能再登记数量!");
71 84 }
72 85  
73 86  
74 87 //实盘登记后差异数量
75   - BigDecimal adjQty = qty.subtract(countDetailChild.getSystemQty());
76   - countDetailChild.setGapQty(adjQty);
77   - countDetailChild.setCountedQty(qty);
78   - countDetailChild.setChildStatus(QuantityConstant.CYCLECOUNT_STATUS_REGISTERED);
79   - this.updateById(countDetailChild);
  88 + BigDecimal adjQty = qty.subtract(detailChild.getSystemQty());
  89 + detailChild.setGapQty(adjQty);
  90 + detailChild.setCountedQty(qty);
  91 + detailChild.setChildStatus(QuantityConstant.CYCLECOUNT_STATUS_REGISTERED);
  92 + this.updateById(detailChild);
80 93  
81 94  
82 95  
... ... @@ -103,7 +116,7 @@ public class CycleCountDetailChildServiceImpl extends ServiceImpl&lt;CycleCountDeta
103 116 LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
104 117 //修改主单状态
105 118 CycleCountHeader tmp = new CycleCountHeader();
106   - tmp.setCode(countDetailChild.getCyclecountheadcode());
  119 + tmp.setCode(detailChild.getCyclecountheadcode());
107 120 tmp.setWarehouseCode(cycleCountDetail.getWarehouseCode());
108 121 LambdaQueryWrapper<CycleCountHeader> lambdaQueryWrapper = Wrappers.lambdaQuery(tmp);
109 122 CycleCountHeader cycleCountHeader = cycleCountHeaderService.getOne(lambdaQueryWrapper);
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/stocktaking/cycleCountDetail/service/impl/CycleCountDetailServiceImpl.java
... ... @@ -8,6 +8,9 @@ import org.jeecg.modules.wms.config.container.entity.Container;
8 8 import org.jeecg.modules.wms.config.container.service.impl.ContainerServiceImpl;
9 9 import org.jeecg.modules.wms.config.location.entity.Location;
10 10 import org.jeecg.modules.wms.config.location.service.impl.LocationServiceImpl;
  11 +import org.jeecg.modules.wms.config.material.entity.Material;
  12 +import org.jeecg.modules.wms.config.material.service.impl.MaterialServiceImpl;
  13 +import org.jeecg.modules.wms.config.materialType.entity.MaterialType;
11 14 import org.jeecg.modules.wms.inventory.inventoryHeader.entity.InventoryDetail;
12 15 import org.jeecg.modules.wms.inventory.inventoryHeader.service.IInventoryDetailService;
13 16 import org.jeecg.modules.wms.stocktaking.cycleCountDetail.entity.CycleCountDetail;
... ... @@ -57,6 +60,10 @@ public class CycleCountDetailServiceImpl extends ServiceImpl&lt;CycleCountDetailMap
57 60 private LocationServiceImpl locationService;
58 61 @Resource
59 62 private TaskHeaderServiceImpl taskHeaderService;
  63 + @Autowired
  64 + private ICycleCountDetailService cycleCountDetailService;
  65 + @Resource
  66 + private MaterialServiceImpl materialServiceImpl;
60 67 @Resource
61 68 private TaskDetailServiceImpl taskDetailService;
62 69 @Resource
... ... @@ -119,6 +126,7 @@ public class CycleCountDetailServiceImpl extends ServiceImpl&lt;CycleCountDetailMap
119 126 }
120 127  
121 128 @Override
  129 + @Transactional
122 130 public Result stockDetailAdd(int taskId,int headerId,String code) {
123 131 LambdaQueryWrapper<InventoryDetail> inventoryDetailLambdaQueryWrapper = Wrappers.lambdaQuery();
124 132 inventoryDetailLambdaQueryWrapper.eq(InventoryDetail::getInventoryHeaderId,taskId);
... ... @@ -134,10 +142,24 @@ public class CycleCountDetailServiceImpl extends ServiceImpl&lt;CycleCountDetailMap
134 142 return Result.error("当前容器已经在盘点队列还没有完成 盘点单号"+cycleCountDetails.get(0).getCycleCountHeadCode());
135 143 }
136 144  
  145 + String warehouseCode=inventoryDetails.get(0).getWarehouseCode();
  146 +
  147 +
  148 + Container containerByCode = containerServiceImpl.getContainerByCode(inventoryDetails.get(0).getContainerCode(),warehouseCode);
  149 + if (containerByCode.getStatus().equals(QuantityConstant.STATUS_CONTAINER_LOCK))
  150 + {
  151 + return Result.error("当前容器已锁定 请检查数据 库存里面不是锁定 实际上容器里面锁定了");
  152 + }
  153 +
  154 + Location locationByCode = locationService.getLocationByCode(inventoryDetails.get(0).getLocationCode(), warehouseCode);
  155 + if (locationByCode.getStatus().equals(QuantityConstant.STATUS_CONTAINER_LOCK))
  156 + {
  157 + return Result.error("当前库位已锁定 请检查数据 库存里面不是锁定 实际上库位里面锁定了");
  158 + }
  159 +
137 160 CycleCountDetail cycleCountDetail = new CycleCountDetail();
138 161 cycleCountDetail.setCycleCountHeadId(headerId);
139 162 cycleCountDetail.setContainerCode(inventoryDetails.get(0).getContainerCode());
140   -
141 163 cycleCountDetail.setCycleCountHeadCode(code);
142 164 cycleCountDetail.setCompanyCode(inventoryDetails.get(0).getCompanyCode());
143 165 cycleCountDetail.setWarehouseCode(inventoryDetails.get(0).getWarehouseCode());
... ... @@ -150,10 +172,9 @@ public class CycleCountDetailServiceImpl extends ServiceImpl&lt;CycleCountDetailMap
150 172 cycleCountDetail.setEnableStatus(QuantityConstant.CYCLECOUNT_STATUS_BUILD);
151 173 this.save(cycleCountDetail);
152 174  
153   - CycleCountDetailChild cycleCountDetailChild=new CycleCountDetailChild();
154 175 for(InventoryDetail inventoryDetail:inventoryDetails)
155 176 {
156   -// cycleCountDetailChild.setCyclecountheadcode();
  177 + CycleCountDetailChild cycleCountDetailChild=new CycleCountDetailChild();
157 178 cycleCountDetailChild.setCycleCountDetailid(cycleCountDetail.getId());
158 179 cycleCountDetailChild.setCyclecountheadcode(code);
159 180 cycleCountDetailChild.setChildStatus(QuantityConstant.CYCLECOUNT_STATUS_BUILD);
... ... @@ -184,7 +205,7 @@ public class CycleCountDetailServiceImpl extends ServiceImpl&lt;CycleCountDetailMap
184 205 * @return
185 206 */
186 207 @Override
187   - public Result createCycleCoutTaskByDetailId(Integer cycleCoutDetailId,String warehouseCode) {
  208 + public Result createCycleCoutTaskByDetailId(Integer cycleCoutDetailId,String toPort,String warehouseCode) {
188 209 /*任务主表中存在库位,在盘点明细中生成任务时,不同的容器生成不同的主任务*/
189 210 //校验有没有相同容器正在执行任务.
190 211 CycleCountDetail cycleCountDetail = this.getById(cycleCoutDetailId);
... ... @@ -208,7 +229,7 @@ public class CycleCountDetailServiceImpl extends ServiceImpl&lt;CycleCountDetailMap
208 229 if(StringUtils.isEmpty(location.getContainerCode())){
209 230 return Result.error(cycleCountDetail.getLocationCode() + "库位中没有容器,操作失败!");
210 231 }
211   -
  232 +
212 233 //生成任务同时锁定库位
213 234 locationService.updateStatus(location.getCode(), QuantityConstant.STATUS_LOCATION_LOCK,warehouseCode);
214 235  
... ... @@ -230,7 +251,7 @@ public class CycleCountDetailServiceImpl extends ServiceImpl&lt;CycleCountDetailMap
230 251 task.setContainerCode(cycleCountDetail.getContainerCode());
231 252 task.setStatus(QuantityConstant.TASK_STATUS_BUILD);
232 253 task.setFromLocationCode(cycleCountDetail.getLocationCode());
233   - task.setToPortCode("P10");
  254 + task.setToPortCode(toPort);
234 255 task.setSequenceNumber(1);
235 256 task.setShipmentContainerHeaderId(cycleCoutDetailId);
236 257 task.setSequence(1);
... ... @@ -270,6 +291,7 @@ public class CycleCountDetailServiceImpl extends ServiceImpl&lt;CycleCountDetailMap
270 291 }
271 292 // 修改子单状态
272 293 item.setChildStatus(QuantityConstant.CYCLECOUNT_STATUS_BUILDTASK);
  294 + item.setTaskDetailId(taskDetail.getId());
273 295 cycleCountDetailChildServiceImpl.updateById(item);
274 296 }
275 297  
... ... @@ -305,5 +327,57 @@ public class CycleCountDetailServiceImpl extends ServiceImpl&lt;CycleCountDetailMap
305 327 return result;
306 328 }
307 329  
  330 + @Override
  331 + public Result increaseInInventoryGain(CycleCountDetailChild cycleCountDetailChild) {
  332 + CycleCountDetail cycleCountDetail = cycleCountDetailService.getById(cycleCountDetailChild.getCycleCountDetailid());
  333 + if (cycleCountDetail==null)
  334 + {
  335 + return Result.error("盘点明细不存在");
  336 + }
  337 +
  338 +
  339 + if (cycleCountDetail.getEnableStatus().equals(QuantityConstant.CYCLECOUNT_STATUS_BUILD))
  340 + {
  341 + return Result.error("当前盘点明细是新建状态 不能调整");
  342 + }
  343 +
  344 + if (cycleCountDetailChild.getCountedQty().compareTo(BigDecimal.ZERO)==0)
  345 + {
  346 + return Result.error("别闹");
  347 + }
  348 +
  349 + cycleCountDetailChild.setCyclecountheadcode(cycleCountDetail.getCycleCountHeadCode());
  350 + cycleCountDetailChild.setLocationCode(cycleCountDetail.getLocationCode());
  351 + cycleCountDetailChild.setContainerCode(cycleCountDetail.getContainerCode());
  352 +
  353 + Material materialByCode = materialServiceImpl.getMaterialByCode(cycleCountDetailChild.getMaterialCode());
  354 + cycleCountDetailChild.setMaterialName(materialByCode.getName());
  355 + cycleCountDetailChild.setMaterialSpec(materialByCode.getSpec());
  356 + cycleCountDetailChild.setMaterialUnit(materialByCode.getUnit());
  357 + BigDecimal countedQty = cycleCountDetailChild.getCountedQty();
  358 + cycleCountDetailChild.setCountedQty(null);
  359 +
  360 +
  361 + LambdaQueryWrapper<CycleCountDetailChild> childLambdaQueryWrapper = Wrappers.lambdaQuery(cycleCountDetailChild);
  362 + CycleCountDetailChild serviceImplOne = cycleCountDetailChildServiceImpl.getOne(childLambdaQueryWrapper);
  363 + if (serviceImplOne!=null)
  364 + {
  365 + return Result.error("这个物料明细已存在");
  366 + }
  367 +
  368 + cycleCountDetailChild.setChildStatus(QuantityConstant.CYCLECOUNT_STATUS_REGISTERED);
  369 + cycleCountDetailChild.setSystemQty(BigDecimal.ZERO);
  370 + cycleCountDetailChild.setGapQty(countedQty);
  371 + cycleCountDetailChild.setCountedQty(countedQty);
  372 + cycleCountDetailChildServiceImpl.save(cycleCountDetailChild);
  373 +
  374 + Result result = new Result();
  375 + result.setCode(200);
  376 + result.setMessage("成功");
  377 + result.setResult(cycleCountDetail.getCycleCountHeadId());
  378 +
  379 + return result;
  380 + }
  381 +
308 382  
309 383 }
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/service/impl/TaskHeaderServiceImpl.java
... ... @@ -1540,6 +1540,11 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1540 1540 //1.先拿到盘点单主单据
1541 1541 CycleCountDetail cycleCountDetail = cycleCountDetailService.getById(taskHeader.getShipmentContainerHeaderId());
1542 1542  
  1543 + if ((cycleCountDetail.getCountedQty().add(cycleCountDetail.getGapQty())).compareTo(BigDecimal.ZERO)==0)
  1544 + {
  1545 + return Result.error("盘点单据系统实盘数量跟差异数量0,不能完成 单据号" +cycleCountDetail.getCycleCountHeadCode());
  1546 + }
  1547 +
1543 1548 //2.盘点单主单据查明细单据list
1544 1549 LambdaQueryWrapper<CycleCountDetailChild> childLambdaQueryWrapper = new LambdaQueryWrapper<CycleCountDetailChild>();
1545 1550 childLambdaQueryWrapper.eq(CycleCountDetailChild::getCycleCountDetailid,cycleCountDetail.getId());
... ... @@ -1558,16 +1563,43 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1558 1563  
1559 1564 for (CycleCountDetailChild child : children)
1560 1565 {
1561   - InventoryDetail inventoryDetail = inventoryDetailService.getById(child.getInventoryDetaiId());
1562   - if (inventoryDetail==null)
  1566 + if (!child.getChildStatus().equals(QuantityConstant.CYCLECOUNT_STATUS_REGISTERED))
1563 1567 {
1564   - return Result.error("盘点还没完成 库存明细单据就不存在了 可能出现了问题或者所容器没成功");
  1568 + throw new ServiceException("当前任务里面还有没有进行登记的数据,不能完成任务");
1565 1569 }
1566 1570  
1567   - inventoryHeader.setTotalQty(inventoryHeader.getTotalQty().add(child.getGapQty()));
1568 1571  
1569   - inventoryDetail.setQty(child.getCountedQty());
1570   - inventoryDetailService.updateById(inventoryDetail);
  1572 + if (child.getInventoryDetaiId()!=null)
  1573 + {
  1574 + InventoryDetail inventoryDetail = inventoryDetailService.getById(child.getInventoryDetaiId());
  1575 + if (inventoryDetail==null)
  1576 + {
  1577 + throw new ServiceException("盘点还没完成 库存明细单据就不存在了 可能出现了问题或者所容器没成功");
  1578 + }
  1579 + inventoryHeader.setTotalQty(inventoryHeader.getTotalQty().add(child.getGapQty()));
  1580 + inventoryDetail.setQty(child.getCountedQty());
  1581 + inventoryDetailService.updateById(inventoryDetail);
  1582 + }else
  1583 + {
  1584 + InventoryDetail inventoryDetail=new InventoryDetail();
  1585 + inventoryDetail.setInventoryHeaderId(inventoryHeader.getId());
  1586 + inventoryDetail.setWarehouseCode(inventoryHeader.getWarehouseCode());
  1587 + inventoryDetail.setCompanyCode(inventoryHeader.getCompanyCode());
  1588 + inventoryDetail.setZoneCode(inventoryHeader.getZoneCode());
  1589 + inventoryDetail.setContainerCode(inventoryHeader.getContainerCode());
  1590 + inventoryDetail.setLocationCode(inventoryHeader.getLocationCode());
  1591 + inventoryDetail.setMaterialCode(child.getMaterialCode());
  1592 + inventoryDetail.setMaterialName(child.getMaterialName());
  1593 + inventoryDetail.setMaterialSpec(child.getMaterialSpec());
  1594 + inventoryDetail.setMaterialUnit(child.getMaterialUnit());
  1595 + inventoryDetail.setQty(child.getCountedQty());
  1596 + inventoryDetail.setTaskQty(BigDecimal.ZERO);
  1597 + inventoryDetail.setInventoryStatus(child.getInventoryStatus());
  1598 + inventoryDetail.setBatch(child.getBatch());
  1599 + inventoryDetailService.save(inventoryDetail);
  1600 + child.setInventoryDetaiId(inventoryDetail.getId());
  1601 + }
  1602 +
1571 1603  
1572 1604 child.setChildStatus(QuantityConstant.CYCLECOUNT_STATUS_COMPLETED);
1573 1605 if (child.getGapQty().compareTo(BigDecimal.ZERO) == 1)
... ... @@ -1727,7 +1759,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1727 1759  
1728 1760  
1729 1761 //还原容器状态
1730   - containerService.restoreContainer(cycleCountDetail.getLocationCode(),taskHeader.getWarehouseCode());
  1762 + containerService.restoreContainer(cycleCountDetail.getContainerCode(),taskHeader.getWarehouseCode());
1731 1763  
1732 1764 return Result.OK("完成盘点任务成功");
1733 1765 }
... ...
huaheng-wms-core/src/main/java/org/jeecg/utils/constant/QuantityConstant.java
1 1 package org.jeecg.utils.constant;
2 2  
3 3 /**
4   - * 数字自定义常量
  4 + * 数字自定义常量
  5 + * 1、入库单状态
  6 + * 2、出库单状态
  7 + * 3、单据上传状态
  8 + * 4、入库组盘状态
  9 + * 5、出库组盘状态
  10 + * 6、任务类型
  11 + * 7、任务状态
  12 + * 8、波次状态
  13 + * 9、质检状态
  14 + * 10、盘点状态
  15 + * 11、INVENTORY_TRANSACTION_RECEIPT
  16 + * 12、调整单状态
  17 + * 13、任务内部类型
  18 + * 14、质检单类型
  19 + * 16、请求类型
5 20 * @author ricard
6 21 */
7 22 public class QuantityConstant {
8 23 /**
9   - * 1、入库单状态
10   - * 2、出库单状态
11   - * 3、单据上传状态
12   - * 4、入库组盘状态
13   - * 5、出库组盘状态
14   - * 6、任务类型
15   - * 7、任务状态
16   - * 8、波次状态
17   - * 9、质检状态
18   - * 10、盘点状态
19   - * 11、INVENTORY_TRANSACTION_RECEIPT
20   - * 12、调整单状态
21   - * 13、任务内部类型
22   - * 14、质检单类型
23   - * 16、请求类型
  24 +
24 25 */
25 26  
26 27 // 1、入库单状态
... ... @@ -708,9 +709,8 @@ public class QuantityConstant {
708 709 public static final String ERP_LCID = "2052";
709 710 public static final String ERP_ServerUrl = "http://erptest.gani.com.cn/K3Cloud/";
710 711  
711   - public static final String UPSTREAM_DELETE_RECEIPT="上游删除";
712   - public static final String BACK_DELETE_RECEIPT="回传删除";
713   - public static final String WMS_DELETE_RECEIPT="WMS删除";
714   -
  712 + public static final String UPSTREAM_DELETE_RECEIPT = "上游删除";
  713 + public static final String BACK_DELETE_RECEIPT = "回传删除";
  714 + public static final String WMS_DELETE_RECEIPT = "WMS删除";
715 715  
716 716 }
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/framework/config/HuahengBatisInterceptor.java renamed to huaheng-wms-core/src/main/java/org/jeecg/utils/interceptor/HuahengBatisInterceptor.java
1   -package org.jeecg.modules.wms.framework.config;
  1 +package org.jeecg.utils.interceptor;
2 2  
3 3 import java.lang.reflect.Field;
4 4 import java.util.Date;
... ...