Commit 1da142de00d584c80f140e0e36afabdfdcb2ca52

Authored by 谭毅彬
2 parents 3a328695 8cdc3875

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

Showing 24 changed files with 1392 additions and 71 deletions
ant-design-vue-jeecg/src/api/api.js
... ... @@ -135,7 +135,7 @@ export const createReceiptBatchTask = (params) => postAction('/receipt/receiptCo
135 135 export const completeTaskByWMS = (params) => postAction('/task/taskHeader/completeTaskByWMS', params);
136 136 //下发任务给WCS
137 137 export const execute = (params) => postAction('/task/taskHeader/execute', params);
138   -//取消任务///////////
  138 +//取消任务
139 139 export const cancelTask = (params) => postAction('/task/taskHeader/cancelTask?ids=' + params, params);
140 140  
141 141 //盘点任务创建
... ... @@ -266,10 +266,16 @@ export const receiveHeader = (params) => postAction('/receipt/receiveHeader/rece
266 266 export const crossDocking = (params) => postAction('/receipt/receiptHeader/crossDocking?id=' + params, params);
267 267 //收货详情转质检
268 268 export const receiveDetailToQuality = (params) => postAction('/receipt/receiveHeader/receiveDetailToQuality?id=' + params, params);
269   -//质检
  269 +//入库质检
270 270 export const qualityTesting = (params) => postAction('/receipt/qualityHeader/qualityTesting', params);
271 271 //全部转质检
272 272 export const receiveHeaderToQuality = (params) => postAction('/receipt/receiveHeader/receiveHeaderToQuality?id=' + params, params);
  273 +//生成库内质检任务
  274 +export const qualityInventoryDetail = (params) => postAction('/inventory/inventoryHeader/qualityInventoryDetail', params);
  275 +//质检登记
  276 +export const qualityRegister = (params) => postAction('/task/taskHeader/qualityRegister', params);
  277 +//创建出库任务,AGV去接
  278 +export const createShipmentTaskByAgv = (params) => postAction('/shipment/shipmentCombination/createShipmentTask', params);
273 279  
274 280 // 中转HTTP请求
275 281 export const transitRESTful = {
... ...
ant-design-vue-jeecg/src/views/system/inventory/QualityInventoryDetailModal.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 + >
  12 + <a-spin :spinning="confirmLoading">
  13 + <a-form-model ref="form" :model="model" :rules="validatorRules">
  14 + <a-row>
  15 + <a-col :span="24">
  16 + <a-form-model-item label="出库口" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="outPortCode">
  17 + <a-select show-search placeholder="请选择出库口" option-filter-prop="children" v-model="model.outPortCode">
  18 + <a-select-option v-for="item in portList" :key="item.name" :value="item.code">
  19 + {{ item.name }}
  20 + </a-select-option>
  21 + </a-select>
  22 + </a-form-model-item>
  23 + </a-col>
  24 + </a-row>
  25 + </a-form-model>
  26 + </a-spin>
  27 + </j-modal>
  28 +</template>
  29 +
  30 +<script>
  31 +import {getZoneList, selectPickPort, shipmentInventoryDetail, qualityInventoryDetail} from '@/api/api'
  32 +
  33 +export default {
  34 + name: 'QualityInventoryDetailModal',
  35 + components: { },
  36 + data() {
  37 + return {
  38 + title: '操作',
  39 + width: 400,
  40 + portList: [],
  41 + inventoryDetailList: [],
  42 + querySource: {},
  43 + visible: false,
  44 + model: {},
  45 + labelCol: {
  46 + xs: { span: 24 },
  47 + sm: { span: 5 }
  48 + },
  49 + wrapperCol: {
  50 + xs: { span: 24 },
  51 + sm: { span: 16 }
  52 + },
  53 + // 选择用户查询条件配置
  54 + selectUserQueryConfig: [],
  55 + confirmLoading: false,
  56 + validatorRules: {
  57 + outPortCode: [{ required: true, message: '请选择出库口!' }]
  58 + }
  59 + }
  60 + },
  61 + created() {
  62 + //备份model原始值
  63 + this.modelDefault = JSON.parse(JSON.stringify(this.model));
  64 + },
  65 + methods: {
  66 + add() {
  67 + this.edit(this.modelDefault)
  68 + },
  69 + edit(record) {
  70 + this.visible = true;
  71 + this.model.containerCode = record[0].containerCode;
  72 + this.inventoryDetailList = record;
  73 + this.getPortList();
  74 + },
  75 + close() {
  76 + this.$emit('close')
  77 + this.visible = false
  78 + this.$refs.form.clearValidate()
  79 + },
  80 + getPortList() {
  81 + this.querySource.containerCode = this.model.containerCode
  82 + selectPickPort(this.querySource).then(res => {
  83 + if (res.success) {
  84 + this.portList = res.result;
  85 + this.visible = true;
  86 + }
  87 + })
  88 + },
  89 + handleOk() {
  90 + if (this.model.outPortCode === ''){
  91 + this.$message.warning('请选择出库口');
  92 + }
  93 + this.inventoryDetailList.forEach(x=>{
  94 + x["toPortCode"]=this.model.outPortCode;
  95 + })
  96 + qualityInventoryDetail(this.inventoryDetailList).then((res) => {
  97 + if (res.success) {
  98 + this.$message.success(res.message);
  99 + } else {
  100 + this.$message.error(res.message);
  101 + }
  102 + });
  103 + this.$emit("ok", this.model.outPortCode);
  104 + this.close()
  105 + },
  106 + handleCancel() {
  107 + this.close()
  108 + }
  109 + }
  110 +}
  111 +</script>
0 112 \ No newline at end of file
... ...
ant-design-vue-jeecg/src/views/system/inventory/SimpleInventoryDetailList.vue
... ... @@ -125,12 +125,8 @@
125 125  
126 126 <!-- 操作按钮区域 -->
127 127 <div class="table-operator">
128   -
129 128 <a-button v-has="'inventoryDetail:add'" @click="handleAdd" type="primary" icon="plus">新增</a-button>
130   - <a-button v-has="'inventoryDetail:export'" type="primary" icon="download" @click="handleExportXls('库存详情')"
131   - >导出
132   - </a-button
133   - >
  129 + <a-button v-has="'inventoryDetail:export'" type="primary" icon="download" @click="handleExportXls('库存详情')">导出</a-button>
134 130 <a-upload
135 131 v-has="'inventoryDetail:import'"
136 132 name="file"
... ... @@ -138,25 +134,15 @@
138 134 :multiple="false"
139 135 :headers="tokenHeader"
140 136 :action="importExcelUrl"
141   - @change="handleImportExcel"
142   - >
143   - <a-button type="primary" icon="import">导入</a-button>
  137 + @change="handleImportExcel"><a-button type="primary" icon="import">导入</a-button>
144 138 </a-upload>
145 139 <a-button v-has="'inventoryDetail:controller'" @click='controller()' type='primary'>冻结</a-button>
146   - <a-button v-has="'inventoryDetail:releaseController'" @click='releaseController()' type='primary'>释放冻结
147   - </a-button>
148   - <a-button v-has="'inventoryHeader:quickShipmentInventoryHeader'" @click='quickShipment()' type='primary'>
149   - 快速出库
150   - </a-button>
  140 + <a-button v-has="'inventoryDetail:releaseController'" @click='releaseController()' type='primary'>释放冻结</a-button>
  141 + <a-button v-has="'inventoryHeader:quickShipmentInventoryHeader'" @click='quickShipment()' type='primary'>快速出库</a-button>
  142 + <a-button v-has="'inventoryHeader:qualityInventoryDetail'" @click='qualityInventoryDetail()' type='primary'>质检</a-button>
151 143 <!-- 高级查询区域 -->
152 144 <j-super-query :fieldList="superFieldList" v-has="'inventoryDetail:superQuery'"
153 145 @handleSuperQuery="handleSuperQuery"/>
154   - <!-- <a-dropdown v-if="selectedRowKeys.length > 0">-->
155   - <!-- <a-menu slot="overlay">-->
156   - <!-- <a-menu-item v-has="'inventoryDetail:delete'" key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>-->
157   - <!-- </a-menu>-->
158   - <!-- <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>-->
159   - <!-- </a-dropdown>-->
160 146 </div>
161 147  
162 148 <!-- table区域-begin -->
... ... @@ -239,7 +225,8 @@
239 225 </div>
240 226  
241 227 <simple-inventory-detail-modal ref="modalForm" @ok="modalFormOk"></simple-inventory-detail-modal>
242   - <quick-shipment-detail-model ref='quickShipmentModel'></quick-shipment-detail-model>
  228 + <quick-shipment-detail-model ref='quickShipmentModel' @ok="modalFormOk"></quick-shipment-detail-model>
  229 + <quality-inventory-detail-modal ref="qualityInventoryDetailModal" @ok="modalFormOk"></quality-inventory-detail-modal>
243 230 </a-card>
244 231 </template>
245 232  
... ... @@ -252,11 +239,13 @@ import {filterMultiDictText} from &#39;@/components/dict/JDictSelectUtil&#39;
252 239 import {getCompanyList, getZoneList,} from "@api/api";
253 240 import {postAction} from '@/api/manage'
254 241 import QuickShipmentDetailModel from "@views/system/shipment/modules/QuickShipmentDetailModal";
  242 +import QualityInventoryDetailModal from "@views/system/inventory/QualityInventoryDetailModal";
255 243  
256 244 export default {
257 245 name: 'SimpleInventoryDetailList',
258 246 mixins: [JeecgListMixin, mixinDevice],
259 247 components: {
  248 + QualityInventoryDetailModal,
260 249 QuickShipmentDetailModel,
261 250 SimpleInventoryDetailModal
262 251 },
... ... @@ -538,6 +527,34 @@ export default {
538 527 })
539 528 }
540 529 },
  530 + controller: function () {
  531 + if (this.selectedRowKeys.length <= 0) {
  532 + this.$message.warning('请选择一条记录!')
  533 + } else {
  534 + let that = this;
  535 + this.$confirm({
  536 + title: '确认冻结',
  537 + content: '是否冻结选中数据?',
  538 + onOk: function () {
  539 + that.loading = true;
  540 + postAction(that.url.controller, that.selectedRowKeys).then((res) => {
  541 + if (res.success) {
  542 + //重新计算分页问题
  543 + that.reCalculatePage(that.selectedRowKeys.length);
  544 + that.$message.success(res.message);
  545 + that.loadData();
  546 + that.onClearSelected();
  547 + } else {
  548 + that.$message.warning(res.message);
  549 + this.selectedRowKeys = [];
  550 + }
  551 + }).finally(() => {
  552 + that.loading = false;
  553 + })
  554 + }
  555 + })
  556 + }
  557 + },
541 558 onSelectChange(selectedRowKeys, selectionRows) {
542 559 if (selectedRowKeys != null && selectedRowKeys.length > 0) {
543 560 this.selectedMainId = selectedRowKeys[0].toString();
... ... @@ -558,6 +575,19 @@ export default {
558 575 this.$refs.quickShipmentModel.title = '选择出库口';
559 576 }
560 577 },
  578 + qualityInventoryDetail() {
  579 + if (this.selectedRowKeys.length <= 0) {
  580 + this.$message.warning('请选择一条记录!');
  581 + } else {
  582 + let zoneCodes = this.selectRecord.map(row => row.zoneCode);
  583 + if (new Set(zoneCodes).size !== 1) {
  584 + this.$message.warning('所选数据非同库区');
  585 + return;
  586 + }
  587 + this.$refs.qualityInventoryDetailModal.edit(this.selectRecord);
  588 + this.$refs.qualityInventoryDetailModal.title = '选择出库口';
  589 + }
  590 + },
561 591 solutionCompany(value) {
562 592 var actions = []
563 593 Object.keys(this.companyList).some(key => {
... ...
ant-design-vue-jeecg/src/views/system/receipt/QualityReportDetailList.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="库区">
  9 + <a-form-model-item prop="zoneOptions">
  10 + <j-multi-select-tag
  11 + v-model="queryParam.zoneCode"
  12 + :options="zoneOptions"
  13 + placeholder="请选择库区">
  14 + </j-multi-select-tag>
  15 + </a-form-model-item>
  16 + </a-form-item>
  17 + </a-col>
  18 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  19 + <a-form-item label="货主">
  20 + <a-select
  21 + show-search
  22 + placeholder="请选择货主"
  23 + option-filter-prop="children"
  24 + v-model="queryParam.companyCode">
  25 + <a-select-option v-for="item in companyList" :key="item.name" :value="item.code">{{
  26 + item.name
  27 + }}
  28 + </a-select-option>
  29 + </a-select>
  30 + </a-form-item>
  31 + </a-col>
  32 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  33 + <a-form-item label="库位编码">
  34 + <a-input placeholder="请输入库位编码" v-model="queryParam.locationCode"></a-input>
  35 + </a-form-item>
  36 + </a-col>
  37 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  38 + <a-form-item label="容器编码">
  39 + <a-input placeholder="请输入容器编码" v-model="queryParam.containerCode"></a-input>
  40 + </a-form-item>
  41 + </a-col>
  42 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  43 + <a-form-item label="库存状态">
  44 + <j-dict-select-tag
  45 + placeholder="请选择库存状态"
  46 + v-model="queryParam.inventoryStatus"
  47 + dictCode="inventory_status"
  48 + />
  49 + </a-form-item>
  50 + </a-col>
  51 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  52 + <a-form-item label="可用状态">
  53 + <j-dict-select-tag
  54 + placeholder="请选择可用状态"
  55 + v-model="queryParam.controller"
  56 + dictCode="inventory_enable"
  57 + />
  58 + </a-form-item>
  59 + </a-col>
  60 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  61 + <a-form-item label="物料编码">
  62 + <a-input placeholder="请输入物料编码" v-model="queryParam.materialCode"></a-input>
  63 + </a-form-item>
  64 + </a-col>
  65 + <template v-if="toggleSearchStatus">
  66 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  67 + <a-form-item label="物料名称">
  68 + <a-input placeholder="请输入物料名称" v-model="queryParam.materialName"></a-input>
  69 + </a-form-item>
  70 + </a-col>
  71 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  72 + <a-form-item label="物料规格">
  73 + <a-input placeholder="请输入物料规格" v-model="queryParam.materialSpec"></a-input>
  74 + </a-form-item>
  75 + </a-col>
  76 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  77 + <a-form-item label="物料单位">
  78 + <a-input placeholder="请输入物料单位" v-model="queryParam.materialUnit"></a-input>
  79 + </a-form-item>
  80 + </a-col>
  81 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  82 + <a-form-item label="批次">
  83 + <a-input placeholder="请输入批次" v-model="queryParam.batch"></a-input>
  84 + </a-form-item>
  85 + </a-col>
  86 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  87 + <a-form-item label="巷道">
  88 + <a-input placeholder="请输入巷道" v-model="queryParam.roadWay"></a-input>
  89 + </a-form-item>
  90 + </a-col>
  91 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  92 + <a-form-item label="序列号">
  93 + <a-input placeholder="请输入序列号" v-model="queryParam.sn"></a-input>
  94 + </a-form-item>
  95 + </a-col>
  96 + <a-col :xl="12" :lg="14" :md="16" :sm="24">
  97 + <a-form-item label="创建日期">
  98 + <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择开始时间"
  99 + class="query-group-cust" v-model="queryParam.createTime_begin"></j-date>
  100 + <span class="query-group-split-cust"></span>
  101 + <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择结束时间"
  102 + class="query-group-cust" v-model="queryParam.createTime_end"></j-date>
  103 + </a-form-item>
  104 + </a-col>
  105 + <a-col :xl='6' :lg='7' :md='8' :sm='24'>
  106 + <a-form-item label='库龄大于(天)'>
  107 + <a-input placeholder='请输入库龄大于(天)' v-model='queryParam.inventoryAge'></a-input>
  108 + </a-form-item>
  109 + </a-col>
  110 + </template>
  111 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  112 + <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
  113 + <a-button id="search" type="primary" @click="searchQuery" icon="search">查询</a-button>
  114 + <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
  115 + <a @click="handleToggleSearch" style="margin-left: 8px">
  116 + {{ toggleSearchStatus ? '收起' : '展开' }}
  117 + <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
  118 + </a>
  119 + </span>
  120 + </a-col>
  121 + </a-row>
  122 + </a-form>
  123 + </div>
  124 + <!-- 查询区域-END -->
  125 +
  126 + <!-- 操作按钮区域 -->
  127 + <div class="table-operator">
  128 + <a-button v-has="'inventoryDetail:add'" @click="handleAdd" type="primary" icon="plus">新增</a-button>
  129 + <a-button v-has="'inventoryDetail:export'" type="primary" icon="download" @click="handleExportXls('库存详情')">导出</a-button>
  130 + <a-upload
  131 + v-has="'inventoryDetail:import'"
  132 + name="file"
  133 + :showUploadList="false"
  134 + :multiple="false"
  135 + :headers="tokenHeader"
  136 + :action="importExcelUrl"
  137 + @change="handleImportExcel"><a-button type="primary" icon="import">导入</a-button>
  138 + </a-upload>
  139 + <!-- 高级查询区域 -->
  140 + <j-super-query :fieldList="superFieldList" v-has="'inventoryDetail:superQuery'"
  141 + @handleSuperQuery="handleSuperQuery"/>
  142 + </div>
  143 +
  144 + <!-- table区域-begin -->
  145 + <div>
  146 + <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
  147 + <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a
  148 + style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项
  149 + <a style="margin-left: 24px" @click="onClearSelected">清空</a>
  150 + </div>
  151 +
  152 + <a-table
  153 + ref="table"
  154 + size="middle"
  155 + :scroll="{ x: true }"
  156 + bordered
  157 + rowKey="id"
  158 + class="j-table-force-nowrap"
  159 + :columns="columns"
  160 + :dataSource="dataSource"
  161 + :pagination="ipagination"
  162 + :loading="loading"
  163 + :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
  164 + @change="handleTableChange"
  165 + >
  166 +
  167 + <span slot="inventoryStatus_dictText" slot-scope="inventoryStatus_dictText">
  168 + <a-tag :key="inventoryStatus_dictText" :color="getStatusColor(inventoryStatus_dictText)">
  169 + {{ inventoryStatus_dictText }}
  170 + </a-tag>
  171 + </span>
  172 +
  173 + <span slot="companyCode" slot-scope="companyCode">
  174 + <a-tag :key="companyCode" color="blue">
  175 + {{ solutionCompany(companyCode) }}
  176 + </a-tag>
  177 + </span>
  178 +
  179 + <span slot="zoneCode" slot-scope="zoneCode">
  180 + <a-tag :key="zoneCode" color=blue>
  181 + {{ solutionZoneCode(zoneCode) }}
  182 + </a-tag>
  183 + </span>
  184 +
  185 + <template slot="htmlSlot" slot-scope="text">
  186 + <div v-html="text"></div>
  187 + </template>
  188 + <template slot="imgSlot" slot-scope="text">
  189 + <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
  190 + <img
  191 + v-else
  192 + :src="getImgView(text)"
  193 + height="25px"
  194 + alt=""
  195 + style="max-width:80px;font-size: 12px;font-style: italic;"
  196 + />
  197 + </template>
  198 + <template slot="fileSlot" slot-scope="text">
  199 + <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
  200 + <a-button v-else :ghost="true" type="primary" icon="download" size="small" @click="downloadFile(text)">下载
  201 + </a-button>
  202 + </template>
  203 + <span slot="action" slot-scope="text, record">
  204 + <a v-has="'inventoryDetail:edit'" @click="handleEdit(record)">编辑<a-divider type="vertical"/></a>
  205 + <a-popconfirm v-has="'inventoryDetail:delete'" title="确定删除吗?" @confirm="() => handleDelete(record.id)">
  206 + <a>删除</a>
  207 + </a-popconfirm>
  208 + </span>
  209 + </a-table>
  210 + </div>
  211 +
  212 + <simple-inventory-detail-modal ref="modalForm" @ok="modalFormOk"></simple-inventory-detail-modal>
  213 + <quick-shipment-detail-model ref='quickShipmentModel' @ok="modalFormOk"></quick-shipment-detail-model>
  214 + <quality-inventory-detail-modal ref="qualityInventoryDetailModal" @ok="modalFormOk"></quality-inventory-detail-modal>
  215 + </a-card>
  216 +</template>
  217 +
  218 +<script>
  219 +import '@/assets/less/TableExpand.less'
  220 +import {mixinDevice} from '@/utils/mixin'
  221 +import {JeecgListMixin} from '@/mixins/JeecgListMixin'
  222 +import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
  223 +import {getCompanyList, getZoneList,} from "@api/api";
  224 +import {postAction} from '@/api/manage'
  225 +import QuickShipmentDetailModel from "@views/system/shipment/modules/QuickShipmentDetailModal";
  226 +import QualityInventoryDetailModal from "@views/system/inventory/QualityInventoryDetailModal";
  227 +
  228 +export default {
  229 + name: 'QualityReportDetailList',
  230 + mixins: [JeecgListMixin, mixinDevice],
  231 + components: {
  232 + QualityInventoryDetailModal,
  233 + QuickShipmentDetailModel,
  234 + },
  235 + data() {
  236 + return {
  237 + zoneList: [],
  238 + zoneOptions: [],
  239 + companyList: [],
  240 + firstLoad:0,
  241 + description: '库存详情管理页面',
  242 + // 表头
  243 + columns: [
  244 + {
  245 + title: '#',
  246 + dataIndex: '',
  247 + key:'rowIndex',
  248 + width:60,
  249 + align:"center",
  250 + customRender:function (t,r,index) {
  251 + return parseInt(index)+1;
  252 + }
  253 + },
  254 + {
  255 + title:'物料编码',
  256 + align:"center",
  257 + dataIndex: 'materialCode'
  258 + },
  259 + {
  260 + title:'物料名称',
  261 + align:"center",
  262 + dataIndex: 'materialName'
  263 + },
  264 + {
  265 + title:'物料规格',
  266 + align:"center",
  267 + dataIndex: 'materialSpec'
  268 + },
  269 + {
  270 + title:'物料单位',
  271 + align:"center",
  272 + dataIndex: 'materialUnit'
  273 + },
  274 + {
  275 + title:'单据数量',
  276 + align:"center",
  277 + dataIndex: 'qty'
  278 + },
  279 + {
  280 + title:'合格数量',
  281 + align:"center",
  282 + dataIndex: 'qualityfiedQty'
  283 + },
  284 + {
  285 + title:'不合格数量',
  286 + align:"center",
  287 + dataIndex: 'unqualityfiedQty'
  288 + },
  289 + {
  290 + title:'不合格原因',
  291 + align:"center",
  292 + dataIndex: 'remark'
  293 + },
  294 + // {
  295 + // title:'批次',
  296 + // align:"center",
  297 + // dataIndex: 'batch'
  298 + // },
  299 + // {
  300 + // title:'批号',
  301 + // align:"center",
  302 + // dataIndex: 'lot'
  303 + // },
  304 + // {
  305 + // title:'项目号',
  306 + // align:"center",
  307 + // dataIndex: 'project'
  308 + // },
  309 + // {
  310 + // title:'单据状态',
  311 + // align:"center",
  312 + // dataIndex: 'status_dictText'
  313 + // },
  314 + // {
  315 + // title:'上游单号',
  316 + // align:"center",
  317 + // dataIndex: 'referCode'
  318 + // },
  319 + // {
  320 + // title:'上游行号',
  321 + // align:"center",
  322 + // dataIndex: 'referLineNum'
  323 + // },
  324 + {
  325 + title:'创建人',
  326 + align:"center",
  327 + dataIndex: 'createBy'
  328 + },
  329 + {
  330 + title:'创建日期',
  331 + align:"center",
  332 + dataIndex: 'createTime'
  333 + },
  334 + {
  335 + title:'更新人',
  336 + align:"center",
  337 + dataIndex: 'updateBy'
  338 + },
  339 + {
  340 + title:'更新日期',
  341 + align:"center",
  342 + dataIndex: 'updateTime'
  343 + },
  344 + {
  345 + title: '操作',
  346 + dataIndex: 'action',
  347 + align:"center",
  348 + fixed:"right",
  349 + width:147,
  350 + scopedSlots: { customRender: 'action' },
  351 + }
  352 + ],
  353 + url: {
  354 + list: '/receipt/qualityDetail/list',
  355 + delete: '/receipt/qualityDetail/delete',
  356 + deleteBatch: '/receipt/qualityDetail/deleteBatch',
  357 + exportXlsUrl: '/receipt/qualityDetail/exportXls',
  358 + importExcelUrl: 'receipt/qualityDetail/importExcel',
  359 + },
  360 + dictOptions: {},
  361 + superFieldList: [],
  362 + selectRecord: [],
  363 + }
  364 + },
  365 + created() {
  366 + this.loadFrom()
  367 + this.getSuperFieldList()
  368 + },
  369 + mounted() {
  370 + if(this.firstLoad == 0) {
  371 + this.firstLoad = 1;
  372 + return;
  373 + }
  374 + //页面没加载完,此时methods里的方法找不到,使用定时器模拟点击
  375 + let timeSearch=setInterval(()=>{
  376 + let eleSearch= document.getElementById("search");
  377 + if (eleSearch!=null){
  378 + //调用成功,清除定时器
  379 + clearInterval(timeSearch)
  380 + eleSearch.click();
  381 + }
  382 + },200)
  383 + },
  384 + computed: {
  385 + importExcelUrl: function () {
  386 + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
  387 + }
  388 + },
  389 + methods: {
  390 + getStatusColor(status) {
  391 + const colors = {
  392 + '良品': 'green',
  393 + '报废品': 'purple',
  394 + '待确认 ': 'grey',
  395 + '次品': 'red',
  396 + '锁定': 'red',
  397 + '冻结': 'red',
  398 + default: 'blue'
  399 + };
  400 + return colors[status] || colors.default;
  401 + },
  402 + loadFrom() {
  403 + getZoneList().then((res) => {
  404 + if (res.success) {
  405 + this.zoneList = res.result
  406 + //延迟半秒执行,避免组件未加载完,数据已经加载完
  407 + setTimeout(() => {
  408 + //slice可以在数组的任何位置进行删除/添加操作
  409 + this.zoneOptions.splice(0, 1);
  410 + for (let i = 0; i < res.result.length; i++) {
  411 + this.zoneOptions.push({value: res.result[i].code, text: res.result[i].name})
  412 + }
  413 + }, 500)
  414 + }
  415 + });
  416 + getCompanyList().then(res => {
  417 + if (res.success) {
  418 + this.companyList = res.result
  419 + }
  420 + })
  421 + },
  422 + initDictConfig() {
  423 + },
  424 + getSuperFieldList() {
  425 + let fieldList = []
  426 + fieldList.push({type: 'string', value: 'companyCode', text: '货主', dictCode: ''})
  427 + fieldList.push({type: 'string', value: 'zoneCode', text: '库区', dictCode: ''})
  428 + fieldList.push({type: 'string', value: 'containerCode', text: '容器编码', dictCode: ''})
  429 + fieldList.push({type: 'string', value: 'locationCode', text: '库位编码', dictCode: ''})
  430 + fieldList.push({type: 'string', value: 'materialCode', text: '物料编码', dictCode: ''})
  431 + fieldList.push({type: 'string', value: 'materialName', text: '物料名称', dictCode: ''})
  432 + fieldList.push({type: 'string', value: 'materialSpec', text: '物料规格', dictCode: ''})
  433 + fieldList.push({type: 'string', value: 'materialUnit', text: '物料单位', dictCode: ''})
  434 + fieldList.push({type: 'BigDecimal', value: 'qty', text: '数量', dictCode: ''})
  435 + fieldList.push({type: 'BigDecimal', value: 'taskQty', text: '任务锁定数量', dictCode: ''})
  436 + fieldList.push({type: 'string', value: 'inventoryStatus', text: '库存状态', dictCode: 'inventory_status'})
  437 + fieldList.push({type: 'int', value: 'enable', text: '可用状态', dictCode: 'inventory_enable'})
  438 + fieldList.push({type: 'string', value: 'batch', text: '批次', dictCode: ''})
  439 + // fieldList.push({type:'string',value:'sn',text:'序列号',dictCode:''})
  440 + fieldList.push({type: 'datetime', value: 'receiptDate', text: '入库日期'})
  441 + fieldList.push({type: 'int', value: 'inventoryAge', text: '库龄(天)', dictCode: ''})
  442 + fieldList.push({type: 'string', value: 'createBy', text: '创建人', dictCode: ''})
  443 + fieldList.push({type: 'datetime', value: 'createTime', text: '创建日期'})
  444 + fieldList.push({type: 'string', value: 'updateBy', text: '更新人', dictCode: ''})
  445 + fieldList.push({type: 'datetime', value: 'updateTime', text: '更新日期'})
  446 + this.superFieldList = fieldList
  447 + }
  448 + }
  449 +}
  450 +</script>
  451 +<style scoped>
  452 +@import '~@assets/less/common.less';
  453 +</style>
0 454 \ No newline at end of file
... ...
ant-design-vue-jeecg/src/views/system/shipment/ShipmentContainerHeaderList.vue
... ... @@ -103,6 +103,13 @@
103 103 :customRow="clickThenSelect"
104 104 :rowClassName="rowClassName"
105 105 @change="handleTableChange">
  106 +
  107 + <span slot="zoneCode" slot-scope="zoneCode">
  108 + <a-tag :key="zoneCode" color=blue>
  109 + {{ solutionZoneCode(zoneCode) }}
  110 + </a-tag>
  111 + </span>
  112 +
106 113 <span slot="taskType_dictText" slot-scope="taskType_dictText">
107 114 <a-tag :key="taskType_dictText" :color="getStatusColor(taskType_dictText)">
108 115 {{ taskType_dictText }}
... ... @@ -115,7 +122,8 @@
115 122 </span>
116 123  
117 124 <span slot="action" slot-scope="text, record">
118   - <a v-if="record.status == 0" @click="selectPort(record)"><a-button type="primary">生成任务</a-button><a-divider type="vertical"/></a>
  125 + <a v-if="record.status == 0 && record.zoneType =='A'" @click="createShipmentTaskByAgv(record)"><a-button type="primary">生成任务</a-button><a-divider type="vertical"/></a>
  126 + <a v-if="record.status == 0 && record.zoneType !='A'" @click="selectPort(record)"><a-button type="primary">生成任务</a-button><a-divider type="vertical"/></a>
119 127 <a-popconfirm v-if="record.status == 0" v-has="'shipmentContainerHeader:delete'" title="确定取消配盘吗?" @confirm="() => handleDelete(record.id)">
120 128 <a><a-button type="danger">取消配盘</a-button> <a-divider type="vertical"/></a>
121 129 </a-popconfirm>
... ... @@ -143,8 +151,8 @@ import {deleteAction, getAction} from &#39;@/api/manage&#39;
143 151 import ShipmentContainerDetailList from './ShipmentContainerDetailList'
144 152 import {initDictOptions, filterMultiDictText} from '@/components/dict/JDictSelectUtil'
145 153 import '@/assets/less/TableExpand.less'
146   -import {createShipmentTask} from '@/api/api'
147   -import {selectSortingPort} from '@/api/api'
  154 +import {createShipmentTask, execute, getCompanyList, getCustomerList, getShipmentTypeList, getZoneList} from '@/api/api'
  155 +import {selectSortingPort, createShipmentTaskByAgv} from '@/api/api'
148 156 import ShipmentContainerSelectModal from "./modules/ShipmentContainerSelectModal";
149 157  
150 158 export default {
... ... @@ -161,6 +169,7 @@ export default {
161 169 description: '出库组盘管理页面',
162 170 querySource: {},
163 171 portList: [],
  172 + zoneList: [],
164 173 hh:'123',
165 174 firstLoad:0,
166 175 isorter: {
... ... @@ -187,6 +196,13 @@ export default {
187 196 scopedSlots: {customRender: 'status_dictText'}
188 197 },
189 198 {
  199 + title: '库区',
  200 + align: "center",
  201 + dataIndex: 'zoneCode',
  202 + key: 'zoneCode',
  203 + scopedSlots: {customRender: 'zoneCode'}
  204 + },
  205 + {
190 206 title: '起始库位',
191 207 align: "center",
192 208 dataIndex: 'fromLocationCode'
... ... @@ -259,6 +275,7 @@ export default {
259 275 },
260 276 created() {
261 277 this.getSuperFieldList();
  278 + this.loadFrom();
262 279 },
263 280 mounted() {
264 281 if(this.firstLoad == 0) {
... ... @@ -324,6 +341,18 @@ export default {
324 341 this.$refs.modalForm2.edit(record);
325 342 this.$refs.modalForm2.title = "选择出库口";
326 343 },
  344 + createShipmentTaskByAgv(record) {
  345 + this.loading = true;
  346 + createShipmentTaskByAgv(record).then((res) => {
  347 + this.loading = false;
  348 + if (res.success) {
  349 + this.$message.success(res.message);
  350 + } else {
  351 + this.$message.error(res.message);
  352 + }
  353 + this.searchQuery();
  354 + });
  355 + },
327 356 createBatchTask() {
328 357 if (this.selectedRowKeys.length <= 0) {
329 358 this.$message.warning('至少选择一条记录!')
... ... @@ -391,6 +420,24 @@ export default {
391 420 }
392 421 })
393 422 },
  423 + solutionZoneCode(value) {
  424 + var actions = []
  425 + console.log("solutionZoneCode " + this.zoneList);
  426 + Object.keys(this.zoneList).some((key) => {
  427 + if (this.zoneList[key].code == ('' + value)) {
  428 + actions.push(this.zoneList[key].name)
  429 + return true
  430 + }
  431 + })
  432 + return actions.join('')
  433 + },
  434 + loadFrom() {
  435 + getZoneList().then((res) => {
  436 + if (res.success) {
  437 + this.zoneList = res.result
  438 + }
  439 + });
  440 + },
394 441 loadData(arg) {
395 442 if (!this.url.list) {
396 443 this.$message.error("请设置url.list属性!")
... ...
ant-design-vue-jeecg/src/views/system/task/AllTaskHeaderList.vue
... ... @@ -82,13 +82,13 @@
82 82 <!-- 查询区域-END -->
83 83  
84 84 <!-- 操作按钮区域 -->
85   -<!-- <div class="table-operator">-->
  85 + <div class="table-operator">
86 86 <!-- <a-button @click="createEmptyIn()" v-has="'taskHeader:emptyIn'" type="primary">空托入库</a-button>-->
87 87 <!-- <a-button @click="createManyEmptyIn()" v-has="'taskHeader:manyEmptyIn'" type="primary">空托组入库</a-button>-->
88 88 <!-- <a-button @click="openDemo()" type="primary">弹出demo</a-button>-->
89   -<!-- </div>-->
90   - <j-super-query :fieldList="superFieldList" v-has="'taskHeader:superQuery'" @handleSuperQuery="handleSuperQuery"/>
91   - <a-button v-has="'taskHeader:export'" type="primary" icon="download" @click="handleExportXls('任务表')">导出</a-button>
  89 + <j-super-query :fieldList="superFieldList" v-has="'taskHeader:superQuery'" @handleSuperQuery="handleSuperQuery"/>
  90 + <a-button v-has="'taskHeader:export'" type="primary" icon="download" @click="handleExportXls('任务表')">导出</a-button>
  91 + </div>
92 92  
93 93 <!-- table区域-begin -->
94 94 <div>
... ...
ant-design-vue-jeecg/src/views/system/task/ReceiptTaskHeaderList.vue
... ... @@ -83,13 +83,13 @@
83 83  
84 84 <!-- 操作按钮区域 -->
85 85 <div class="table-operator">
86   - <a-button @click="createEmptyIn()" v-has="'taskHeader:emptyIn'" type="primary">空托入库</a-button>
87   - <a-button @click="createManyEmptyIn()" v-has="'taskHeader:manyEmptyIn'" type="primary">空托组入库</a-button>
  86 + <a-button v-has="'taskHeader:emptyIn'" @click="createEmptyIn()" type="primary">空托入库</a-button>
  87 + <a-button v-has="'taskHeader:manyEmptyIn'" @click="createManyEmptyIn()" type="primary">空托组入库</a-button>
88 88 <a-button v-has="'taskHeader:quickReceipt'" @click="quickReceipt()" type="primary">快速入库</a-button>
89 89 <a-button v-has="'taskHeader:callReceiptBox'" @click="callReceiptBox()" type="primary" >呼叫入库有货托盘</a-button>
90 90 <a-button v-has="'taskHeader:callReceiptBox'" @click="callReceiptEmptyBox()" type="primary" >呼叫入库空托盘</a-button>
91 91 <j-super-query :fieldList="superFieldList" v-has="'taskHeader:superQuery'" @handleSuperQuery="handleSuperQuery"/>
92   - <a-button v-has="'taskHeader:export'" type="primary" icon="download" @click="handleExportXls('任务表')">导出</a-button>
  92 + <a-button v-has="'taskHeader:export'" @click="handleExportXls('任务表')" type="primary" icon="download">导出</a-button>
93 93 </div>
94 94  
95 95 <!-- table区域-begin -->
... ...
ant-design-vue-jeecg/src/views/system/task/TaskDetailList.vue
... ... @@ -80,7 +80,9 @@
80 80  
81 81 <span slot="action" slot-scope="text, record">
82 82 <adjustment-doc-modal ref="adjustmentModal" @ok="modalFormOk" :id="record.id" :taskHeaderId="record.taskHeaderId"/>
83   - <a v-if="record.taskType==700" @click="createMany(record)">实盘登记<a-divider type="vertical" /></a>
  83 + <quality-register-detail-modal ref="qualityRegisterModal" @ok="modalFormOk" :id="record.id" :taskHeaderId="record.taskHeaderId"/>
  84 + <a v-if="record.taskType==700 && record.status!=100" @click="createMany(record)">实盘登记<a-divider type="vertical" /></a>
  85 + <a v-if="record.taskType==1400 && record.status!=100" @click="qualityRegister(record)">质检登记<a-divider type="vertical" /></a>
84 86 <a v-has="'taskDetail:edit'" @click="handleEdit(record)">编辑<a-divider type="vertical" /></a>
85 87 <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
86 88 <a v-has="'taskDetail:delete'">删除</a>
... ... @@ -100,11 +102,12 @@ import {JeecgListMixin} from &#39;@/mixins/JeecgListMixin&#39;
100 102 import TaskDetailModal from './modules/TaskDetailModal'
101 103 import AdjustmentDocModal from "../stocktaking/modules/AdjustmentDocModal";
102 104 import { getCompanyList } from '@api/api'
  105 +import QualityRegisterDetailModal from "@views/system/task/modules/QualityRegisterDetailModal";
103 106  
104 107 export default {
105 108 name: "TaskDetailList",
106 109 mixins: [JeecgListMixin],
107   - components: {TaskDetailModal,AdjustmentDocModal},
  110 + components: {QualityRegisterDetailModal, TaskDetailModal,AdjustmentDocModal},
108 111 props: {
109 112 mainId: {
110 113 type: String,
... ... @@ -269,7 +272,10 @@ export default {
269 272 this.$refs.adjustmentModal.edit(record);
270 273 this.$refs.adjustmentModal.title = "实盘登记";
271 274 },
272   -
  275 + qualityRegister(record) {
  276 + this.$refs.qualityRegisterModal.edit(record);
  277 + this.$refs.qualityRegisterModal.title = "质检登记";
  278 + },
273 279 }
274 280 }
275 281 </script>
... ...
ant-design-vue-jeecg/src/views/system/task/modules/QualityRegisterDetailModal.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="id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="id">
  16 + <a-input v-model="model.id" placeholder="请输入id" disabled="true"></a-input>
  17 + </a-form-model-item>
  18 + </a-col>
  19 + <a-col :xs="24">
  20 + <a-form-model-item label="物料编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialCode">
  21 + <a-input v-model="model.materialCode" placeholder="请输入物料编码" disabled="true"></a-input>
  22 + </a-form-model-item>
  23 + </a-col>
  24 + <a-col :xs="24">
  25 + <a-form-model-item label="物料数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="qty">
  26 + <a-input v-model="model.qty" placeholder="请输入物料数量" disabled="true"></a-input>
  27 + </a-form-model-item>
  28 + </a-col>
  29 + <a-col :xs="24">
  30 + <a-form-model-item label="合格数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="qualityfiedQty">
  31 + <a-input v-model="model.qualityfiedQty" placeholder="请输入合格数量"></a-input>
  32 + </a-form-model-item>
  33 + </a-col>
  34 + <a-col :xs="24">
  35 + <a-form-model-item label="不合格数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="unqualityfiedQty">
  36 + <a-input v-model="model.unqualityfiedQty" placeholder="请输入不合格数量"></a-input>
  37 + </a-form-model-item>
  38 + </a-col>
  39 + <a-col :xs="24">
  40 + <a-form-model-item label="不合格原因" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark">
  41 + <a-input v-model="model.remark" placeholder="请输入不合格原因"></a-input>
  42 + </a-form-model-item>
  43 + </a-col>
  44 + </a-row>
  45 + </a-form-model>
  46 + </a-spin>
  47 + </j-modal>
  48 +</template>
  49 +
  50 +<script>
  51 +
  52 +import {createManyEmptyIn, qualityRegister} from '@/api/api'
  53 +import {confirmGapQty} from "../../../../api/api";
  54 +import Utils from '../../../../components/jeecgbiz/JButtonBizComponent/util.js';
  55 +
  56 +export default {
  57 + name: "QualityRegisterDetailModal",
  58 + components: {},
  59 + props: {
  60 + taskHeaderId:"",
  61 + },
  62 + data() {
  63 + return {
  64 + title: "操作",
  65 + width: 500,
  66 + visible: false,
  67 + model: {},
  68 + labelCol: {
  69 + xs: {span: 24},
  70 + sm: {span: 5},
  71 + },
  72 + wrapperCol: {
  73 + xs: {span: 24},
  74 + sm: {span: 16},
  75 + },
  76 +
  77 + confirmLoading: false,
  78 + validatorRules: {
  79 + countedQty: [
  80 + {required: true, message: '请输入实盘数量!'},
  81 + ],
  82 + },
  83 + url: {
  84 + add: "/cycleCountDetail/cycleCountDetail/confirmGapQty",
  85 + }
  86 +
  87 + }
  88 + },
  89 +
  90 +
  91 + created() {
  92 + //备份model原始值
  93 + this.modelDefault = JSON.parse(JSON.stringify(this.model));
  94 + },
  95 +
  96 + methods: {
  97 + add() {
  98 + this.edit(this.modelDefault);
  99 + },
  100 + edit(record) {
  101 + this.visible = true;
  102 + this.model = Object.assign({}, record);
  103 + },
  104 + close() {
  105 + this.$emit('close');
  106 + this.visible = false;
  107 + this.$refs.form.clearValidate();
  108 + },
  109 + handleOk() {
  110 + const that = this;
  111 + // 触发表单验证
  112 + this.$refs.form.validate(valid => {
  113 + if (valid) {
  114 + that.confirmLoading = true;
  115 + qualityRegister(this.model).then((res) => {
  116 + if (res.success) {
  117 + that.$message.success(res.message);
  118 + } else {
  119 + that.$message.warning(res.message);
  120 + }
  121 + }).finally(() => {
  122 + that.confirmLoading = false;
  123 + that.close();
  124 + })
  125 + } else {
  126 + return false
  127 + }
  128 + })
  129 + },
  130 + handleCancel() {
  131 + this.close()
  132 + },
  133 +
  134 +
  135 + }
  136 +}
  137 +</script>
0 138 \ No newline at end of file
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryHeader/controller/InventoryHeaderController.java
... ... @@ -410,7 +410,6 @@ public class InventoryHeaderController extends JeecgController&lt;InventoryHeader,
410 410  
411 411 @AutoLog("批量出库存详情")
412 412 @ApiOperation(value = "批量出库存详情", notes = "批量出库存详情")
413   - @ApiLogger(apiName = "批量出库存详情")
414 413 @PostMapping("/decuceInventoryDetail")
415 414 @ResponseBody
416 415 public Result decuceInventoryDetail(@RequestBody List<InventoryDetail> inventoryDetailList, HttpServletRequest req) {
... ... @@ -420,4 +419,16 @@ public class InventoryHeaderController extends JeecgController&lt;InventoryHeader,
420 419 String warehouseCode = HuahengJwtUtil.getWarehouseCodeByToken(req);
421 420 return inventoryHeaderService.decuceInventoryDetail(inventoryDetailList, warehouseCode);
422 421 }
  422 +
  423 + @AutoLog("按照库存详情质检")
  424 + @ApiOperation(value = "按照库存详情质检", notes = "按照库存详情质检")
  425 + @PostMapping("/qualityInventoryDetail")
  426 + @ResponseBody
  427 + public Result qualityInventoryDetail(@RequestBody List<InventoryDetail> inventoryDetailList, HttpServletRequest req) {
  428 + if (StringUtils.isEmpty(inventoryDetailList)) {
  429 + return Result.error("库存明细为空");
  430 + }
  431 + String warehouseCode = HuahengJwtUtil.getWarehouseCodeByToken(req);
  432 + return inventoryHeaderService.qualityInventoryDetail(inventoryDetailList, warehouseCode);
  433 + }
423 434 }
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryHeader/service/IInventoryHeaderService.java
... ... @@ -51,4 +51,6 @@ public interface IInventoryHeaderService extends IService&lt;InventoryHeader&gt; {
51 51 Result decuceInventoryDetail(List<InventoryDetail> inventoryDetailList, String warehouseCode);
52 52  
53 53 boolean updateInventory(String containerCode, String locationCode, String warehouseCode);
  54 +
  55 + Result qualityInventoryDetail(List<InventoryDetail> inventoryDetailList, String warehouseCode);
54 56 }
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryHeader/service/impl/InventoryHeaderServiceImpl.java
... ... @@ -283,6 +283,12 @@ public class InventoryHeaderServiceImpl extends ServiceImpl&lt;InventoryHeaderMappe
283 283 return Result.OK("批量快速出库成功");
284 284 }
285 285  
  286 + /**
  287 + * 快速出库,按照库存详情
  288 + * @param inventoryDetailList
  289 + * @param warehouseCode
  290 + * @return
  291 + */
286 292 @Override
287 293 @Transactional(rollbackFor = JeecgBootException.class)
288 294 public Result shipmentInventoryDetail(List<InventoryDetail> inventoryDetailList, String warehouseCode) {
... ... @@ -369,6 +375,12 @@ public class InventoryHeaderServiceImpl extends ServiceImpl&lt;InventoryHeaderMappe
369 375 return Result.OK("批量快速出库成功");
370 376 }
371 377  
  378 + /**
  379 + * 批量出库存详情
  380 + * @param inventoryDetailList
  381 + * @param warehouseCode
  382 + * @return
  383 + */
372 384 @Override
373 385 @Transactional(rollbackFor = JeecgBootException.class)
374 386 public Result decuceInventoryDetail(List<InventoryDetail> inventoryDetailList, String warehouseCode) {
... ... @@ -483,4 +495,36 @@ public class InventoryHeaderServiceImpl extends ServiceImpl&lt;InventoryHeaderMappe
483 495 return success;
484 496 }
485 497  
  498 + /**
  499 + * 按照库存详情质检
  500 + * @param inventoryDetailList
  501 + * @param warehouseCode
  502 + * @return
  503 + */
  504 + @Override
  505 + @Transactional(rollbackFor = JeecgBootException.class)
  506 + public Result qualityInventoryDetail(List<InventoryDetail> inventoryDetailList, String warehouseCode) {
  507 + if (StringUtils.isEmpty(inventoryDetailList)) {
  508 + return Result.error("质检库存详情失败,所选库存详情为空");
  509 + }
  510 + String toPortCode = inventoryDetailList.get(0).getToPortCode();
  511 + if (StringUtils.isEmpty(toPortCode)) {
  512 + return Result.error("质检库存详情失败,出库站台编码为空");
  513 + }
  514 + inventoryDetailList =
  515 + inventoryDetailList.stream().filter((item) -> item.getContainerStatus().equals(QuantityConstant.STATUS_CONTAINER_EMPTY)).collect(Collectors.toList());
  516 + if (StringUtils.isEmpty(inventoryDetailList)) {
  517 + return Result.error("质检库存详情失败, 排除锁定库存后没有可出库存详情");
  518 + }
  519 +
  520 + List<String> containerCodeList = inventoryDetailList.stream().map(InventoryDetail::getContainerCode).collect(Collectors.toList());
  521 + for (String containerCode : containerCodeList) {
  522 + Result result = taskHeaderService.createQualityTask(containerCode, toPortCode, warehouseCode);
  523 + if (!result.isSuccess()) {
  524 + throw new JeecgBootException(result.getMessage());
  525 + }
  526 + }
  527 + return Result.ok("生成质检任务成功");
  528 + }
  529 +
486 530 }
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/qualityHeader/controller/QualityReportDetailController.java 0 → 100644
  1 +package org.jeecg.modules.wms.receipt.qualityHeader.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.receipt.qualityHeader.entity.QualityDetail;
  13 +import org.jeecg.modules.wms.receipt.qualityHeader.service.IQualityDetailService;
  14 +import org.jeecg.utils.constant.QuantityConstant;
  15 +import org.springframework.beans.factory.annotation.Autowired;
  16 +import org.springframework.web.bind.annotation.*;
  17 +import org.springframework.web.servlet.ModelAndView;
  18 +
  19 +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
  20 +import com.baomidou.mybatisplus.core.metadata.IPage;
  21 +import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
  22 +
  23 +import io.swagger.annotations.Api;
  24 +import io.swagger.annotations.ApiOperation;
  25 +import lombok.extern.slf4j.Slf4j;
  26 +
  27 +/**
  28 + * @Description: 质检报告
  29 + * @Author: jeecg-boot
  30 + * @Date: 2023-03-09
  31 + * @Version: V1.0
  32 + */
  33 +@Api(tags = "质检报告")
  34 +@RestController
  35 +@RequestMapping("/receipt/qualityDetail")
  36 +@Slf4j
  37 +public class QualityReportDetailController extends JeecgController<QualityDetail, IQualityDetailService> {
  38 + @Autowired
  39 + private IQualityDetailService qualityDetailService;
  40 +
  41 + /**
  42 + * 分页列表查询
  43 + */
  44 + // @AutoLog(value = "库存详情-分页列表查询")
  45 + @ApiOperation(value = "质检报告-分页列表查询", notes = "质检报告-分页列表查询")
  46 + @GetMapping(value = "/list")
  47 + public Result<IPage<QualityDetail>> queryPageList(QualityDetail qualityDetail, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
  48 + @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) {
  49 + QueryWrapper<QualityDetail> queryWrapper = QueryGenerator.initQueryWrapper(qualityDetail, req.getParameterMap());
  50 + queryWrapper.lambda().eq(QualityDetail::getStatus, QuantityConstant.QUALITY_HEADER_COMPLETE);
  51 + Page<QualityDetail> page = new Page<QualityDetail>(pageNo, pageSize);
  52 + IPage<QualityDetail> pageList = qualityDetailService.page(page, queryWrapper);
  53 + return Result.OK(pageList);
  54 + }
  55 +
  56 + /**
  57 + * 添加
  58 + * @param qualityDetail
  59 + * @return
  60 + */
  61 + @AutoLog(value = "质检报告-添加")
  62 + @ApiOperation(value = "质检报告-添加", notes = "质检报告-添加")
  63 + @PostMapping(value = "/add")
  64 + public Result<String> add(@RequestBody QualityDetail qualityDetail) {
  65 + qualityDetailService.save(qualityDetail);
  66 + return Result.OK("添加成功!");
  67 + }
  68 +
  69 + /**
  70 + * 编辑
  71 + * @param qualityDetail
  72 + * @return
  73 + */
  74 + @AutoLog(value = "质检报告-编辑")
  75 + @ApiOperation(value = "质检报告-编辑", notes = "质检报告-编辑")
  76 + @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
  77 + public Result<String> edit(@RequestBody QualityDetail qualityDetail) {
  78 + qualityDetailService.updateById(qualityDetail);
  79 + return Result.OK("编辑成功!");
  80 + }
  81 +
  82 + /**
  83 + * 通过id删除
  84 + * @param id
  85 + * @return
  86 + */
  87 + @AutoLog(value = "质检报告-通过id删除")
  88 + @ApiOperation(value = "质检报告-通过id删除", notes = "质检报告-通过id删除")
  89 + @DeleteMapping(value = "/delete")
  90 + public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
  91 + qualityDetailService.removeById(id);
  92 + return Result.OK("删除成功!");
  93 + }
  94 +
  95 + /**
  96 + * 批量删除
  97 + * @param ids
  98 + * @return
  99 + */
  100 + @AutoLog(value = "质检报告-批量删除")
  101 + @ApiOperation(value = "质检报告-批量删除", notes = "质检报告-批量删除")
  102 + @DeleteMapping(value = "/deleteBatch")
  103 + public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
  104 + this.qualityDetailService.removeByIds(Arrays.asList(ids.split(",")));
  105 + return Result.OK("批量删除成功!");
  106 + }
  107 +
  108 + /**
  109 + * 通过id查询
  110 + * @param id
  111 + * @return
  112 + */
  113 + // @AutoLog(value = "库存详情-通过id查询")
  114 + @ApiOperation(value = "库存详情-通过id查询", notes = "库存详情-通过id查询")
  115 + @GetMapping(value = "/queryById")
  116 + public Result<QualityDetail> queryById(@RequestParam(name = "id", required = true) String id) {
  117 + QualityDetail qualityDetail = qualityDetailService.getById(id);
  118 + if (qualityDetail == null) {
  119 + return Result.error("未找到对应数据");
  120 + }
  121 + return Result.OK(qualityDetail);
  122 + }
  123 +
  124 + /**
  125 + * 导出excel
  126 + * @param request
  127 + * @param qualityDetail
  128 + */
  129 + @RequestMapping(value = "/exportXls")
  130 + public ModelAndView exportXls(HttpServletRequest request, QualityDetail qualityDetail) {
  131 + return super.exportXls(request, qualityDetail, QualityDetail.class, "质检报告");
  132 + }
  133 +
  134 + /**
  135 + * 通过excel导入数据
  136 + * @param request
  137 + * @param response
  138 + * @return
  139 + */
  140 + @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
  141 + public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
  142 + return super.importExcel(request, response, QualityDetail.class);
  143 + }
  144 +
  145 +}
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/qualityHeader/entity/QualityDetail.java
... ... @@ -38,6 +38,10 @@ public class QualityDetail implements Serializable {
38 38 @Excel(name = "质检单号", width = 15)
39 39 @ApiModelProperty(value = "质检单号")
40 40 private java.lang.String qualityCode;
  41 + /** 质检类型 */
  42 + @Excel(name = "质检类型", width = 15)
  43 + @ApiModelProperty(value = "质检类型")
  44 + private java.lang.String type;
41 45 /** 仓库编码 */
42 46 @Excel(name = "仓库编码", width = 15)
43 47 @ApiModelProperty(value = "仓库编码")
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentCombination/service/impl/ShipmentCombinationServiceImpl.java
... ... @@ -149,13 +149,12 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi
149 149 inventoryDetailLambdaQueryWrapper.eq(InventoryDetail::getWarehouseCode, warehouseCode).eq(InventoryDetail::getCompanyCode, companyCode)
150 150 .eq(InventoryDetail::getMaterialCode, materialCode).eq(InventoryDetail::getInventoryStatus, inventoryStatus)
151 151 .eq(InventoryDetail::getEnable, QuantityConstant.INVENTORY_DETAIL_STATUS_ENABLE)
152   - .eq(StringUtils.isNotEmpty(zoneCode), InventoryDetail::getZoneCode, zoneCode)
153 152 .eq(InventoryDetail::getContainerStatus, QuantityConstant.STATUS_CONTAINER_EMPTY);
154 153 String value = parameterConfigurationService.getValueByCode(QuantityConstant.RULE_SHIPMENT_ZONE);
155 154 if (StringUtils.isNotEmpty(value)) {
156 155 int shipmentZoneRule = Integer.parseInt(value);
157 156 if (shipmentZoneRule == QuantityConstant.SHIPMENT_BY_ZONE) {
158   - inventoryDetailLambdaQueryWrapper.eq(InventoryDetail::getZoneCode, zoneCode);
  157 + inventoryDetailLambdaQueryWrapper.eq(StringUtils.isNotEmpty(zoneCode), InventoryDetail::getZoneCode, zoneCode);
159 158 }
160 159 }
161 160 List<InventoryDetail> inventoryDetailList = inventoryDetailService.list(inventoryDetailLambdaQueryWrapper);
... ... @@ -192,14 +191,13 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi
192 191 LambdaQueryWrapper<InventoryDetail> inventoryDetailLambdaQueryWrapper = Wrappers.lambdaQuery();
193 192 inventoryDetailLambdaQueryWrapper.eq(InventoryDetail::getWarehouseCode, warehouseCode).eq(InventoryDetail::getCompanyCode, companyCode)
194 193 .eq(InventoryDetail::getMaterialCode, materialCode).eq(InventoryDetail::getInventoryStatus, inventoryStatus)
195   - .eq(InventoryDetail::getEnable, QuantityConstant.INVENTORY_DETAIL_STATUS_ENABLE)
196   - .eq(StringUtils.isNotEmpty(zoneCode), InventoryDetail::getZoneCode, zoneCode).eq(InventoryDetail::getContainerCode, containerCode)
  194 + .eq(InventoryDetail::getEnable, QuantityConstant.INVENTORY_DETAIL_STATUS_ENABLE).eq(InventoryDetail::getContainerCode, containerCode)
197 195 .eq(InventoryDetail::getContainerStatus, QuantityConstant.STATUS_CONTAINER_EMPTY);
198 196 String value = parameterConfigurationService.getValueByCode(QuantityConstant.RULE_SHIPMENT_ZONE);
199 197 if (StringUtils.isNotEmpty(value)) {
200 198 int shipmentZoneRule = Integer.parseInt(value);
201 199 if (shipmentZoneRule == QuantityConstant.SHIPMENT_BY_ZONE) {
202   - inventoryDetailLambdaQueryWrapper.eq(InventoryDetail::getZoneCode, zoneCode);
  200 + inventoryDetailLambdaQueryWrapper.eq(StringUtils.isNotEmpty(zoneCode), InventoryDetail::getZoneCode, zoneCode);
203 201 }
204 202 }
205 203 List<InventoryDetail> inventoryDetailList = inventoryDetailService.list(inventoryDetailLambdaQueryWrapper);
... ... @@ -234,7 +232,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi
234 232 if (StringUtils.isNotEmpty(value)) {
235 233 int shipmentZoneRule = Integer.parseInt(value);
236 234 if (shipmentZoneRule == QuantityConstant.SHIPMENT_BY_ZONE) {
237   - inventoryDetailLambdaQueryWrapper.eq(InventoryDetail::getZoneCode, zoneCode);
  235 + inventoryDetailLambdaQueryWrapper.eq(StringUtils.isNotEmpty(zoneCode), InventoryDetail::getZoneCode, zoneCode);
238 236 }
239 237 }
240 238 List<InventoryDetail> inventoryDetailList = inventoryDetailService.list(inventoryDetailLambdaQueryWrapper);
... ... @@ -486,7 +484,19 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi
486 484 String containerCode = inventoryDetail.getContainerCode();
487 485 String warehouseCode = inventoryDetail.getWarehouseCode();
488 486 String locationCode = inventoryDetail.getLocationCode();
  487 + Location location = locationService.getLocationByCode(locationCode, warehouseCode);
  488 + if (location == null) {
  489 + throw new JeecgBootException("新增出库配盘头失败, 没有找到库位");
  490 + }
489 491 Container container = containerService.getContainerByCode(containerCode, warehouseCode);
  492 + if (container == null) {
  493 + throw new JeecgBootException("新增出库配盘头失败, 没有找到容器");
  494 + }
  495 + String zoneCode = location.getZoneCode();
  496 + Zone zone = zoneService.getZoneByCode(zoneCode, warehouseCode);
  497 + if (zone == null) {
  498 + throw new JeecgBootException("新增出库配盘头失败, 没有找到库区");
  499 + }
490 500 // 每次组盘都需判断是整盘出库还是分拣出库
491 501 LambdaQueryWrapper<ShipmentContainerHeader> shipmentContainerHeaderLambdaQueryWrapper = Wrappers.lambdaQuery();
492 502 shipmentContainerHeaderLambdaQueryWrapper.eq(ShipmentContainerHeader::getContainerCode, containerCode)
... ... @@ -513,11 +523,13 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi
513 523 } else {
514 524 String value = parameterConfigurationService.getValueByCode(QuantityConstant.RULE_TASK_LOCATION, container.getZoneCode());
515 525 if (StringUtils.isEmpty(value)) {
516   - throw new JeecgBootException("取消入库任务时, 没有获取到配置属性");
  526 + throw new JeecgBootException("新增出库配盘头失败, 没有获取到配置属性");
517 527 }
518 528 int taskLocationRule = Integer.parseInt(value);
519 529 shipmentContainerHeader = new ShipmentContainerHeader();
520 530 shipmentContainerHeader.setContainerCode(containerCode);
  531 + shipmentContainerHeader.setZoneCode(zone.getCode());
  532 + shipmentContainerHeader.setZoneType(zone.getType());
521 533 shipmentContainerHeader.setFromLocationCode(locationCode);
522 534 if (taskLocationRule == QuantityConstant.RULE_TASK_SET_LOCATION && taskType == QuantityConstant.TASK_TYPE_SORTINGSHIPMENT) {
523 535 shipmentContainerHeader.setToLocationCode(locationCode);
... ... @@ -530,7 +542,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi
530 542 shipmentContainerHeader.setTaskType(taskType);
531 543 boolean success = shipmentContainerHeaderService.save(shipmentContainerHeader);
532 544 if (!success) {
533   - throw new JeecgBootException("新增出库盘头失败");
  545 + throw new JeecgBootException("新增出库盘头失败");
534 546 }
535 547  
536 548 }
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentContainerHeader/entity/ShipmentContainerHeader.java
... ... @@ -57,6 +57,14 @@ public class ShipmentContainerHeader implements Serializable {
57 57 @Dict(dicCode = "shipment_container_status")
58 58 @ApiModelProperty(value = "状态")
59 59 private Integer status;
  60 + /** 库区编码 */
  61 + @Excel(name = "库区编码", width = 15)
  62 + @ApiModelProperty(value = "库区编码")
  63 + private String zoneCode;
  64 + /** 库区类型 */
  65 + @Excel(name = "库区类型", width = 15)
  66 + @ApiModelProperty(value = "库区类型")
  67 + private String zoneType;
60 68 /** 起始库位 */
61 69 @Excel(name = "起始库位", width = 15)
62 70 @ApiModelProperty(value = "起始库位")
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/controller/TaskHeaderController.java
1 1 package org.jeecg.modules.wms.task.taskHeader.controller;
2 2  
3 3 import java.io.IOException;
  4 +import java.math.BigDecimal;
4 5 import java.util.Arrays;
5 6 import java.util.List;
6 7 import java.util.Map;
... ... @@ -430,7 +431,7 @@ public class TaskHeaderController extends HuahengBaseController {
430 431 Result result = handleMultiProcess("createEmptyIn", new MultiProcessListener() {
431 432 @Override
432 433 public Result<?> doProcess() {
433   - Result result = taskHeaderService.createEmptyIn(contaienrCode, toLocationCode, warehouseCode,toPortCode);
  434 + Result result = taskHeaderService.createEmptyIn(contaienrCode, toLocationCode, warehouseCode, toPortCode);
434 435 return result;
435 436 }
436 437 });
... ... @@ -752,4 +753,27 @@ public class TaskHeaderController extends HuahengBaseController {
752 753 });
753 754 return result;
754 755 }
  756 +
  757 + /**
  758 + * 质检登记
  759 + * @return
  760 + */
  761 + @AutoLog(value = "质检登记")
  762 + @PostMapping("qualityRegister")
  763 + @ApiOperation("质检登记")
  764 + @ResponseBody
  765 + public Result qualityRegister(@RequestBody TaskDetail taskDetail, HttpServletRequest req) {
  766 + int id = taskDetail.getId();
  767 + BigDecimal qualityfiedQty = taskDetail.getQualityfiedQty();
  768 + BigDecimal unqualityfiedQty = taskDetail.getUnqualityfiedQty();
  769 + String remark = taskDetail.getRemark();
  770 + Result result = handleMultiProcess("qualityRegister", new MultiProcessListener() {
  771 + @Override
  772 + public Result<?> doProcess() {
  773 + Result result = taskHeaderService.qualityRegister(id, qualityfiedQty, unqualityfiedQty, remark);
  774 + return result;
  775 + }
  776 + });
  777 + return result;
  778 + }
755 779 }
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/entity/TaskDetail.java
... ... @@ -114,6 +114,21 @@ public class TaskDetail implements Serializable {
114 114 @ApiModelProperty(value = "数量")
115 115 private BigDecimal qty;
116 116  
  117 + /** 合格数量 */
  118 + @Excel(name = "合格数量", width = 15)
  119 + @ApiModelProperty(value = "合格数量")
  120 + private BigDecimal qualityfiedQty;
  121 +
  122 + /** 不合格数量 */
  123 + @Excel(name = "不合格数量", width = 15)
  124 + @ApiModelProperty(value = "不合格数量")
  125 + private BigDecimal unqualityfiedQty;
  126 +
  127 + /** 备注 */
  128 + @Excel(name = "备注", width = 15)
  129 + @ApiModelProperty(value = "备注")
  130 + private String remark;
  131 +
117 132 /** 批次 */
118 133 @Excel(name = "批次", width = 15)
119 134 @ApiModelProperty(value = "批次")
... ... @@ -129,6 +144,11 @@ public class TaskDetail implements Serializable {
129 144 @ApiModelProperty(value = "项目号")
130 145 private String project;
131 146  
  147 + /** 质检单据详情id */
  148 + @Excel(name = "质检单据详情id", width = 15)
  149 + @ApiModelProperty(value = "质检单据详情id")
  150 + private Integer qualityDetailId;
  151 +
132 152 /** 库存状态 */
133 153 @Excel(name = "库存状态", width = 15)
134 154 @Dict(dicCode = "inventory_status")
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/service/ITaskHeaderService.java
1 1 package org.jeecg.modules.wms.task.taskHeader.service;
2 2  
3 3 import java.io.Serializable;
  4 +import java.math.BigDecimal;
4 5 import java.util.Collection;
5 6 import java.util.List;
6 7  
... ... @@ -101,7 +102,7 @@ public interface ITaskHeaderService extends IService&lt;TaskHeader&gt; {
101 102 * @param taskHeader
102 103 * @return
103 104 */
104   - public Result cancelLocationAndContainerStatus(TaskHeader taskHeader);
  105 + Result cancelLocationAndContainerStatus(TaskHeader taskHeader);
105 106  
106 107 /**
107 108 * 取消WMS任务
... ... @@ -161,6 +162,15 @@ public interface ITaskHeaderService extends IService&lt;TaskHeader&gt; {
161 162 Result createCheckOutTask(String containerCode, String toPortCode, String warehouseCode);
162 163  
163 164 /**
  165 + * 创建质检任务
  166 + * @param containerCode
  167 + * @param toPortCode
  168 + * @param warehouseCode
  169 + * @return
  170 + */
  171 + Result createQualityTask(String containerCode, String toPortCode, String warehouseCode);
  172 +
  173 + /**
164 174 * 创建跨站任务任务
165 175 * @param containerCode
166 176 * @param fromPortCode
... ... @@ -305,6 +315,13 @@ public interface ITaskHeaderService extends IService&lt;TaskHeader&gt; {
305 315 Result completeManyEmptyOutTask(TaskHeader taskHeader);
306 316  
307 317 /**
  318 + * 完成质检任务
  319 + * @param taskHeader
  320 + * @return
  321 + */
  322 + Result completeQualityTask(TaskHeader taskHeader);
  323 +
  324 + /**
308 325 * 取消入库
309 326 * @param taskHeader
310 327 * @return
... ... @@ -415,4 +432,9 @@ public interface ITaskHeaderService extends IService&lt;TaskHeader&gt; {
415 432 */
416 433 Result switchTask(int id);
417 434  
  435 + /**
  436 + * 质检登记
  437 + */
  438 + Result qualityRegister(int id, BigDecimal qualityfiedQty, BigDecimal unqualityfiedQty, String remark);
  439 +
418 440 }
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/service/impl/TaskHeaderServiceImpl.java
... ... @@ -33,6 +33,8 @@ import org.jeecg.modules.wms.inventory.inventoryHeader.service.IInventoryHeaderS
33 33 import org.jeecg.modules.wms.inventory.inventoryTransaction.entity.InventoryTransaction;
34 34 import org.jeecg.modules.wms.inventory.inventoryTransaction.service.IInventoryTransactionService;
35 35 import org.jeecg.modules.wms.lockStation.service.ILockStationService;
  36 +import org.jeecg.modules.wms.receipt.qualityHeader.entity.QualityDetail;
  37 +import org.jeecg.modules.wms.receipt.qualityHeader.service.IQualityDetailService;
36 38 import org.jeecg.modules.wms.receipt.receiptContainerHeader.entity.ReceiptContainerHeader;
37 39 import org.jeecg.modules.wms.receipt.receiptContainerHeader.service.IReceiptContainerHeaderService;
38 40 import org.jeecg.modules.wms.receipt.receiptHeader.entity.ReceiptDetail;
... ... @@ -153,6 +155,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
153 155 private IShipmentCombinationService shipmentCombinationService;
154 156 @Resource
155 157 private ILockStationService lockStationService;
  158 + @Resource
  159 + private IQualityDetailService qualityDetailService;
156 160  
157 161 @Override
158 162 @Transactional
... ... @@ -324,11 +328,11 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
324 328 }
325 329 // 校验入库组盘
326 330 if (receiptContainerHeaderService.havaUnCompleteCombineByContainerCode(containerCode, warehouseCode)) {
327   - return Result.error("创建出库查看任务时,容器:" + containerCode + "存在入库组盘,不能移库");
  331 + return Result.error("创建出库查看任务时,容器:" + containerCode + "存在入库组盘,不能生成任务");
328 332 }
329 333 // 校验出库组盘
330 334 if (shipmentContainerHeaderService.havaUnCompleteCombineByContainerCode(containerCode, warehouseCode)) {
331   - return Result.error("创建出库查看任务时, 容器:" + containerCode + "存在出库组盘,不能移库");
  335 + return Result.error("创建出库查看任务时, 容器:" + containerCode + "存在出库组盘,不能生成任务");
332 336 }
333 337 String fromLocationCode = container.getLocationCode();
334 338 String toLocationCode = QuantityConstant.EMPTY_STRING;
... ... @@ -349,23 +353,6 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
349 353 throw new JeecgBootException("创建出库查看任务时,没有找到出库口:" + toPortCode);
350 354 }
351 355 boolean success = false;
352   - LambdaQueryWrapper<InventoryDetail> inventoryDetailLambdaQueryWrapper = Wrappers.lambdaQuery();
353   - inventoryDetailLambdaQueryWrapper.eq(InventoryDetail::getContainerCode, containerCode).eq(InventoryDetail::getWarehouseCode, warehouseCode)
354   - .eq(InventoryDetail::getLocationCode, fromLocationCode);
355   - List<InventoryDetail> inventoryDetailList = inventoryDetailService.list(inventoryDetailLambdaQueryWrapper);
356   - List<InventoryDetail> inventoryDetailList1 = new ArrayList<>();
357   - if (inventoryDetailList.size() != 0) {
358   - for (InventoryDetail inventoryDetail : inventoryDetailList) {
359   - InventoryDetail inventoryDetail1 = new InventoryDetail();
360   - inventoryDetail1.setId(inventoryDetail.getId());
361   - inventoryDetail1.setTaskQty(inventoryDetail.getQty());
362   - inventoryDetailList1.add(inventoryDetail1);
363   - }
364   - success = inventoryDetailService.updateBatchById(inventoryDetailList1);
365   - if (!success) {
366   - throw new JeecgBootException("创建出库查看任务时,更新库存详情失败");
367   - }
368   - }
369 356 TaskHeader taskHeader = new TaskHeader();
370 357 taskHeader.setWarehouseCode(warehouseCode);
371 358 taskHeader.setTaskType(QuantityConstant.TASK_TYPE_CHECK_OUT);
... ... @@ -386,6 +373,98 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
386 373  
387 374 @Override
388 375 @Transactional(rollbackFor = Exception.class)
  376 + public Result createQualityTask(String containerCode, String toPortCode, String warehouseCode) {
  377 + log.info("开始创建质检任务,容器编码" + containerCode + "目标站台号" + toPortCode);
  378 + if (StringUtils.isEmpty(containerCode)) {
  379 + return Result.error("创建质检任务失败,容器编码为空");
  380 + }
  381 + if (StringUtils.isEmpty(toPortCode)) {
  382 + return Result.error("创建质检任务失败,目标站台号为空");
  383 + }
  384 + if (StringUtils.isEmpty(warehouseCode)) {
  385 + return Result.error("创建质检任务失败,仓库编码为空");
  386 + }
  387 + Container container = containerService.getContainerByCode(containerCode, warehouseCode);
  388 + if (container == null) {
  389 + return Result.error("创建质检任务失败,容器为空");
  390 + }
  391 + // 校验入库组盘
  392 + if (receiptContainerHeaderService.havaUnCompleteCombineByContainerCode(containerCode, warehouseCode)) {
  393 + return Result.error("创建质检任务失败,容器:" + containerCode + "存在入库组盘,不能生成任务");
  394 + }
  395 + // 校验出库组盘
  396 + if (shipmentContainerHeaderService.havaUnCompleteCombineByContainerCode(containerCode, warehouseCode)) {
  397 + return Result.error("创建质检任务失败, 容器:" + containerCode + "存在出库组盘,不能生成任务");
  398 + }
  399 + String fromLocationCode = container.getLocationCode();
  400 + String toLocationCode = QuantityConstant.EMPTY_STRING;
  401 + String value = parameterConfigurationService.getValueByCode(QuantityConstant.RULE_TASK_LOCATION, container.getZoneCode());
  402 + int taskLocationRule = Integer.parseInt(value);
  403 + if (taskLocationRule == QuantityConstant.RULE_TASK_SET_LOCATION) {
  404 + toLocationCode = fromLocationCode;
  405 + }
  406 + Result result =
  407 + taskHeaderService.createTaskLockContainerAndLocation(QuantityConstant.TASK_TYPE_QUALITY, containerCode, fromLocationCode, toLocationCode, warehouseCode);
  408 + if (!result.isSuccess()) {
  409 + throw new JeecgBootException(result.getMessage());
  410 + }
  411 + TaskLockEntity taskLockEntity = (TaskLockEntity)result.getResult();
  412 + String zoneCode = taskLockEntity.getZoneCode();
  413 + Port port = portService.getPortByCode(toPortCode, zoneCode, warehouseCode);
  414 + if (port == null) {
  415 + throw new JeecgBootException("创建质检任务失败,没有找到出库口:" + toPortCode);
  416 + }
  417 + boolean success = false;
  418 + TaskHeader taskHeader = new TaskHeader();
  419 + taskHeader.setWarehouseCode(warehouseCode);
  420 + taskHeader.setTaskType(QuantityConstant.TASK_TYPE_QUALITY);
  421 + taskHeader.setInnernalTaskType(QuantityConstant.TASK_INTENERTYPE_CYCLECOUNT);
  422 + taskHeader.setContainerCode(containerCode);
  423 + taskHeader.setZoneCode(zoneCode);
  424 + taskHeader.setFromLocationCode(fromLocationCode);
  425 + taskHeader.setToPortCode(toPortCode);
  426 + taskHeader.setToLocationCode(toLocationCode);
  427 + taskHeader.setStatus(QuantityConstant.TASK_STATUS_BUILD);
  428 + success = taskHeaderService.save(taskHeader);
  429 + log.info("创建质检任务失败,容器编码" + containerCode + "目标站台号" + toPortCode);
  430 + if (!success) {
  431 + throw new JeecgBootException("创建质检任务失败, 创建任务失败");
  432 + }
  433 + LambdaQueryWrapper<InventoryDetail> inventoryDetailLambdaQueryWrapper = Wrappers.lambdaQuery();
  434 + inventoryDetailLambdaQueryWrapper.eq(InventoryDetail::getContainerCode, containerCode).eq(InventoryDetail::getWarehouseCode, warehouseCode)
  435 + .eq(InventoryDetail::getLocationCode, fromLocationCode);
  436 + List<InventoryDetail> inventoryDetailList = inventoryDetailService.list(inventoryDetailLambdaQueryWrapper);
  437 + List<TaskDetail> taskDetailList = new ArrayList<>();
  438 + if (inventoryDetailList.size() != 0) {
  439 + for (InventoryDetail inventoryDetail : inventoryDetailList) {
  440 + TaskDetail taskDetail = new TaskDetail();
  441 + taskDetail.setTaskHeaderId(taskHeader.getId());
  442 + taskDetail.setTaskType(QuantityConstant.TASK_TYPE_QUALITY);
  443 + taskDetail.setWarehouseCode(warehouseCode);
  444 + taskDetail.setCompanyCode(inventoryDetail.getCompanyCode());
  445 + taskDetail.setMaterialCode(inventoryDetail.getMaterialCode());
  446 + taskDetail.setMaterialName(inventoryDetail.getMaterialName());
  447 + taskDetail.setMaterialSpec(inventoryDetail.getMaterialSpec());
  448 + taskDetail.setMaterialUnit(inventoryDetail.getMaterialUnit());
  449 + taskDetail.setFromInventoryDetailId(inventoryDetail.getId());
  450 + taskDetail.setInventoryStatus(inventoryDetail.getInventoryStatus());
  451 + taskDetail.setQty(inventoryDetail.getQty());
  452 + taskDetail.setBatch(inventoryDetail.getBatch());
  453 + taskDetail.setLot(inventoryDetail.getLot());
  454 + taskDetail.setProject(inventoryDetail.getProject());
  455 + taskDetail.setReceiveTime(inventoryDetail.getReceiveTime());
  456 + taskDetailList.add(taskDetail);
  457 + }
  458 + success = taskDetailService.saveBatch(taskDetailList);
  459 + if (!success) {
  460 + throw new JeecgBootException("创建质检任务失败,增加任务详情失败");
  461 + }
  462 + }
  463 + return Result.OK("创建质检任务成功");
  464 + }
  465 +
  466 + @Override
  467 + @Transactional(rollbackFor = Exception.class)
389 468 public Result createOverStationTask(String containerCode, String fromPortCode, String toPortCode, String warehouseCode) {
390 469 log.info("开始创建跨站任务,容器编码" + containerCode + ",起始站台号" + fromPortCode + ",目标站台号" + toPortCode);
391 470 if (StringUtils.isEmpty(containerCode)) {
... ... @@ -869,6 +948,9 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
869 948 case QuantityConstant.TASK_TYPE_MANY_EMPTYSHIPMENT:
870 949 result = taskHeaderService.completeManyEmptyOutTask(taskHeader);
871 950 break;
  951 + case QuantityConstant.TASK_TYPE_QUALITY:
  952 + result = taskHeaderService.completeQualityTask(taskHeader);
  953 + break;
872 954 default:
873 955 throw new JeecgBootException("不支持的任务类型" + taskType);
874 956 }
... ... @@ -892,7 +974,6 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
892 974 }
893 975 // 保存历史任务表
894 976 taskHeaderHistoryService.saveById(taskHeader.getId());
895   -
896 977 if (!taskHeaderService.removeById(taskId)) {
897 978 throw new JeecgBootException("取消任务失败, 删除任务失败");
898 979 }
... ... @@ -1605,6 +1686,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1605 1686 case QuantityConstant.TASK_TYPE_CYCLECOUNT:
1606 1687 case QuantityConstant.TASK_TYPE_TRANSFER:
1607 1688 case QuantityConstant.TASK_TYPE_CHECK_OUT:
  1689 + case QuantityConstant.TASK_TYPE_QUALITY:
1608 1690 result = taskHeaderService.createSortTaskLockContainerAndLocation(containerCode, fromLocationCode, toLocationCode, warehouseCode);
1609 1691 break;
1610 1692 case QuantityConstant.TASK_TYPE_OVER_STATION:
... ... @@ -1826,6 +1908,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1826 1908 case QuantityConstant.TASK_TYPE_CYCLECOUNT:
1827 1909 case QuantityConstant.TASK_TYPE_TRANSFER:
1828 1910 case QuantityConstant.TASK_TYPE_CHECK_OUT:
  1911 + case QuantityConstant.TASK_TYPE_QUALITY:
1829 1912 if (StringUtils.isEmpty(fromLocationCode)) {
1830 1913 return Result.error("任务类型" + taskType + "完成任务时, 起始库位编码为空");
1831 1914 }
... ... @@ -2135,6 +2218,30 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
2135 2218 return Result.ok("切换任务成功");
2136 2219 }
2137 2220  
  2221 + @Override
  2222 + @Transactional(rollbackFor = Exception.class)
  2223 + public Result qualityRegister(int id, BigDecimal qualityfiedQty, BigDecimal unqualityfiedQty, String remark) {
  2224 + TaskDetail taskDetail = taskDetailService.getById(id);
  2225 + if (taskDetail == null) {
  2226 + return Result.error("质检登记失败,没有找到对应任务详情" + id);
  2227 + }
  2228 + BigDecimal qty = taskDetail.getQty();
  2229 + BigDecimal totalQty = qualityfiedQty.add(unqualityfiedQty);
  2230 + if (qty.compareTo(totalQty) != 0) {
  2231 + return Result.error("质检登记失败,质检数量必须等于任务数量");
  2232 + }
  2233 +
  2234 + TaskDetail taskDetail1 = new TaskDetail();
  2235 + taskDetail1.setId(id);
  2236 + taskDetail1.setQualityfiedQty(qualityfiedQty);
  2237 + taskDetail1.setUnqualityfiedQty(unqualityfiedQty);
  2238 + taskDetail1.setRemark(remark);
  2239 + if (!taskDetailService.updateById(taskDetail1)) {
  2240 + throw new JeecgBootException("质检登记失败, 保存质检记录失败");
  2241 + }
  2242 + return Result.ok("质检登记成功");
  2243 + }
  2244 +
2138 2245 /**
2139 2246 * 完成空托盘入库任务
2140 2247 * @param taskHeader 任务
... ... @@ -2627,8 +2734,6 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
2627 2734 if (inventoryDetailList.size() != 0) {
2628 2735 List<InventoryDetail> inventoryDetailList1 = new ArrayList<>();
2629 2736 for (InventoryDetail inventoryDetail : inventoryDetailList) {
2630   - inventoryDetail.setTaskQty(BigDecimal.ZERO);
2631   - inventoryDetail.setLocationCode(toLocationCode);
2632 2737 InventoryDetail inventoryDetail1 = new InventoryDetail();
2633 2738 inventoryDetail1.setId(inventoryDetail.getId());
2634 2739 inventoryDetail1.setLocationCode(toLocationCode);
... ... @@ -2809,6 +2914,134 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
2809 2914 return Result.ok("完成空托盘组出库任务成功");
2810 2915 }
2811 2916  
  2917 + @Override
  2918 + @Transactional(rollbackFor = Exception.class)
  2919 + public Result completeQualityTask(TaskHeader taskHeader) {
  2920 + log.info("开始完成质检任务" + taskHeader.getId());
  2921 + String warehouseCode = taskHeader.getWarehouseCode();
  2922 + String containerCode = taskHeader.getContainerCode();
  2923 + String fromLocationCode = taskHeader.getFromLocationCode();
  2924 + String toLocationCode = taskHeader.getToLocationCode();
  2925 + String toPortCode = taskHeader.getToPortCode();
  2926 +
  2927 + if (StringUtils.isEmpty(containerCode)) {
  2928 + return Result.error("完成质检任务时, 托盘号为空");
  2929 + }
  2930 + if (StringUtils.isEmpty(warehouseCode)) {
  2931 + return Result.error("完成质检任务时, 仓库编码为空");
  2932 + }
  2933 + if (StringUtils.isEmpty(fromLocationCode)) {
  2934 + return Result.error("完成质检任务时, 起始库位编码为空");
  2935 + }
  2936 + if (StringUtils.isEmpty(toPortCode)) {
  2937 + return Result.error("完成质检任务时, 目标出入口号为空");
  2938 + }
  2939 + if (StringUtils.isEmpty(toLocationCode)) {
  2940 + return Result.error("完成质检任务时, 目标库位编码为空");
  2941 + }
  2942 +
  2943 + List<TaskDetail> taskDetailList = taskDetailService.getTaskDetailListByTaskId(taskHeader.getId());
  2944 + if (CollectionUtils.isEmpty(taskDetailList)) {
  2945 + return Result.error("完成质检任务时, 没有对应任务详情");
  2946 + }
  2947 + boolean success = false;
  2948 + for (TaskDetail taskDetail : taskDetailList) {
  2949 + InventoryDetail inventoryDetail = inventoryDetailService.getById(taskDetail.getFromInventoryDetailId());
  2950 + if (inventoryDetail == null) {
  2951 + throw new JeecgBootException("完成质检任务时, 没有找到匹配的库存");
  2952 + }
  2953 + BigDecimal qualityfiedQty = taskDetail.getQualityfiedQty();
  2954 + BigDecimal unqualityfiedQty = taskDetail.getUnqualityfiedQty();
  2955 +
  2956 + QualityDetail qualityDetail = new QualityDetail();
  2957 + qualityDetail.setType(QuantityConstant.QUALITY_TYPE_INHOUSE_FULL);
  2958 + qualityDetail.setMaterialCode(taskDetail.getMaterialCode());
  2959 + qualityDetail.setMaterialName(taskDetail.getMaterialName());
  2960 + qualityDetail.setMaterialUnit(taskDetail.getMaterialUnit());
  2961 + qualityDetail.setMaterialSpec(taskDetail.getMaterialSpec());
  2962 + qualityDetail.setQty(taskDetail.getQty());
  2963 + qualityDetail.setQualityfiedQty(qualityfiedQty);
  2964 + qualityDetail.setUnqualityfiedQty(unqualityfiedQty);
  2965 + qualityDetail.setRemark(taskDetail.getRemark());
  2966 + qualityDetail.setCompanyCode(taskDetail.getCompanyCode());
  2967 + qualityDetail.setBatch(taskDetail.getBatch());
  2968 + qualityDetail.setLot(taskDetail.getLot());
  2969 + qualityDetail.setProject(taskDetail.getProject());
  2970 + qualityDetail.setStatus(QuantityConstant.QUALITY_HEADER_COMPLETE);
  2971 + if (!qualityDetailService.save(qualityDetail)) {
  2972 + throw new JeecgBootException("质检登记失败, 保存质检记录失败");
  2973 + }
  2974 +
  2975 + if (qualityfiedQty.compareTo(BigDecimal.ZERO) > 0) {
  2976 + if (!inventoryDetailService.updateQtyById(qualityfiedQty, inventoryDetail.getId())) {
  2977 + throw new JeecgBootException("完成质检任务时, 更新库存失败");
  2978 + }
  2979 + } else {
  2980 + if (!inventoryDetailService.removeById(inventoryDetail.getId())) {
  2981 + throw new JeecgBootException("完成质检任务时, 删除库存失败");
  2982 + }
  2983 + }
  2984 + if (qualityfiedQty.compareTo(BigDecimal.ZERO) == 0 && unqualityfiedQty.compareTo(BigDecimal.ZERO) == 0) {
  2985 + throw new JeecgBootException("完成质检任务时, 没有质检登记");
  2986 + }
  2987 + List<InventoryTransaction> inventoryTransactionList = new ArrayList<>();
  2988 + if (qualityfiedQty.compareTo(BigDecimal.ZERO) > 0) {
  2989 + InventoryTransaction inventoryTransaction = new InventoryTransaction();
  2990 + inventoryTransaction.setType(QuantityConstant.INVENTORY_TRANSACTION_QUALITY);
  2991 + inventoryTransaction.setWarehouseCode(taskDetail.getWarehouseCode());
  2992 + inventoryTransaction.setCompanyCode(taskDetail.getCompanyCode());
  2993 + inventoryTransaction.setContainerCode(containerCode);
  2994 + inventoryTransaction.setZoneCode(taskHeader.getZoneCode());
  2995 + inventoryTransaction.setFromLocationCode(fromLocationCode);
  2996 + inventoryTransaction.setToLocationCode(toLocationCode);
  2997 + inventoryTransaction.setMaterialCode(taskDetail.getMaterialCode());
  2998 + inventoryTransaction.setMaterialName(taskDetail.getMaterialName());
  2999 + inventoryTransaction.setMaterialSpec(taskDetail.getMaterialSpec());
  3000 + inventoryTransaction.setMaterialUnit(taskDetail.getMaterialUnit());
  3001 + inventoryTransaction.setBatch(taskDetail.getBatch());
  3002 + inventoryTransaction.setLot(taskDetail.getLot());
  3003 + inventoryTransaction.setProject(taskDetail.getProject());
  3004 + inventoryTransaction.setInventoryStatus(QuantityConstant.QUALITY_GOOD);
  3005 + inventoryTransaction.setQty(qualityfiedQty);
  3006 + inventoryTransactionList.add(inventoryTransaction);
  3007 + }
  3008 + if (unqualityfiedQty.compareTo(BigDecimal.ZERO) > 0) {
  3009 + InventoryTransaction inventoryTransaction = new InventoryTransaction();
  3010 + inventoryTransaction.setType(QuantityConstant.INVENTORY_TRANSACTION_QUALITY);
  3011 + inventoryTransaction.setWarehouseCode(taskDetail.getWarehouseCode());
  3012 + inventoryTransaction.setCompanyCode(taskDetail.getCompanyCode());
  3013 + inventoryTransaction.setContainerCode(containerCode);
  3014 + inventoryTransaction.setZoneCode(taskHeader.getZoneCode());
  3015 + inventoryTransaction.setFromLocationCode(fromLocationCode);
  3016 + inventoryTransaction.setToLocationCode(toLocationCode);
  3017 + inventoryTransaction.setMaterialCode(taskDetail.getMaterialCode());
  3018 + inventoryTransaction.setMaterialName(taskDetail.getMaterialName());
  3019 + inventoryTransaction.setMaterialSpec(taskDetail.getMaterialSpec());
  3020 + inventoryTransaction.setMaterialUnit(taskDetail.getMaterialUnit());
  3021 + inventoryTransaction.setBatch(taskDetail.getBatch());
  3022 + inventoryTransaction.setLot(taskDetail.getLot());
  3023 + inventoryTransaction.setProject(taskDetail.getProject());
  3024 + inventoryTransaction.setInventoryStatus(QuantityConstant.QUALITY_DEFECTIVE);
  3025 + inventoryTransaction.setQty(unqualityfiedQty);
  3026 + inventoryTransactionList.add(inventoryTransaction);
  3027 + }
  3028 + if (!inventoryTransactionService.saveBatch(inventoryTransactionList)) {
  3029 + throw new JeecgBootException("完成质检任务时,增加库存交易记录失败");
  3030 + }
  3031 + }
  3032 + Result result = taskHeaderService.completeTaskUnLockContainerAndLocation(taskHeader.getContainerFillStatus(), QuantityConstant.TASK_TYPE_QUALITY,
  3033 + containerCode, fromLocationCode, toLocationCode, warehouseCode);
  3034 + if (!result.isSuccess()) {
  3035 + throw new JeecgBootException(result.getMessage());
  3036 + }
  3037 + success = taskHeaderService.updateStatusById(QuantityConstant.TASK_STATUS_COMPLETED, taskHeader.getId());
  3038 + log.info("完成质检任务" + taskHeader.getId());
  3039 + if (!success) {
  3040 + throw new JeecgBootException("完成质检任务时,保存任务失败");
  3041 + }
  3042 + return Result.ok("完成质检任务");
  3043 + }
  3044 +
2812 3045 /**
2813 3046 * 取消入库任务
2814 3047 * @param taskHeader 任务
... ...
huaheng-wms-core/src/main/java/org/jeecg/utils/constant/QuantityConstant.java
... ... @@ -201,6 +201,12 @@ public class QuantityConstant {
201 201 /** 空托盘组出库 */
202 202 public static final int TASK_TYPE_MANY_EMPTYSHIPMENT = 1200;
203 203  
  204 + /** 空托盘组换站 */
  205 + public static final int TASK_TYPE_MANY_EMPTYSHIPMENT_OVER_STATION = 1300;
  206 +
  207 + /** 质检 */
  208 + public static final int TASK_TYPE_QUALITY = 1400;
  209 +
204 210 // 7、任务状态
205 211  
206 212 /** 生成任务 */
... ...
huaheng-wms-core/src/main/resources/application-dev.yml
... ... @@ -136,7 +136,7 @@ spring:
136 136 connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
137 137 datasource:
138 138 master:
139   - url: jdbc:log4jdbc:mysql://localhost:3306/wms4?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true&autoReconnect=true&maxReconnects=9999
  139 + url: jdbc:log4jdbc:mysql://localhost:3306/wms4?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true
140 140 username: root
141 141 password: 123456
142 142 driver-class-name: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
... ...
huaheng-wms-core/src/main/resources/application-prod.yml
... ... @@ -136,7 +136,7 @@ spring:
136 136 connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
137 137 datasource:
138 138 master:
139   - url: jdbc:mysql://172.16.29.45:3306/wms4?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true&autoReconnect=true&maxReconnects=9999
  139 + url: jdbc:mysql://172.16.29.45:3306/wms4?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true
140 140 username: root
141 141 password: hhsoftware
142 142 driver-class-name: com.mysql.cj.jdbc.Driver
... ...
huaheng-wms-core/src/main/resources/application-test.yml
... ... @@ -137,7 +137,7 @@ spring:
137 137 datasource:
138 138 master:
139 139 # mysql数据源配置
140   - url: jdbc:log4jdbc:mysql://172.16.29.45:3306/wms4?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true&autoReconnect=true&maxReconnects=9999
  140 + url: jdbc:log4jdbc:mysql://172.16.29.45:3306/wms4?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true
141 141 username: root
142 142 password: hhsoftware
143 143 driver-class-name: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
... ...