rev:任务类修改

This commit is contained in:
2025-09-02 14:30:53 +08:00
parent 21c7360381
commit ee523f576c
18 changed files with 114 additions and 29 deletions

View File

@@ -7,6 +7,7 @@ import org.nl.common.domain.query.PageQuery;
import org.nl.wms.sch_manage.service.dao.SchBaseTask;
import org.nl.wms.sch_manage.service.dto.SchBaseTaskQuery;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -68,4 +69,11 @@ public interface ISchBaseTaskService extends IService<SchBaseTask> {
* @return /
*/
SchBaseTask getByCode(String taskCode);
/**
* 根据配置编码货位未完成的任务
* @param config_code 配置编码
* @return List<SchBaseTask>
*/
List<SchBaseTask> getTaskConfigList(String config_code);
}

View File

@@ -160,4 +160,14 @@ public class SchBaseTaskServiceImpl extends ServiceImpl<SchBaseTaskMapper, SchBa
return this.getOne(lam);
}
@Override
public List<SchBaseTask> getTaskConfigList(String config_code) {
return this.list(
new QueryWrapper<SchBaseTask>().lambda()
.eq(SchBaseTask::getConfig_code, config_code)
.lt(SchBaseTask::getTask_status, TaskStatus.FINISHED.getCode())
.eq(SchBaseTask::getIs_delete, BaseDataEnum.IS_YES_NOT.code(""))
);
}
}

View File

@@ -158,8 +158,8 @@ public class BackInTask extends AbstractTask {
// 更新起点
iSchBasePointService.update(
new UpdateWrapper<SchBasePoint>().lambda()
.set(SchBasePoint::getVehicle_code, null)
.set(SchBasePoint::getIng_task_code, null)
.set(SchBasePoint::getVehicle_code, "")
.set(SchBasePoint::getIng_task_code, "")
.set(SchBasePoint::getPoint_status, IOSEnum.POINT_STATUS.code("空位"))
.eq(SchBasePoint::getPoint_code, taskObj.getPoint_code1())

View File

@@ -200,8 +200,8 @@ public class CheckBackMoveTask extends AbstractTask {
// 更新起点
iSchBasePointService.update(
new UpdateWrapper<SchBasePoint>().lambda()
.set(SchBasePoint::getVehicle_code, null)
.set(SchBasePoint::getIng_task_code, null)
.set(SchBasePoint::getVehicle_code, "")
.set(SchBasePoint::getIng_task_code, "")
.set(SchBasePoint::getPoint_status, IOSEnum.POINT_STATUS.code("空位"))
.eq(SchBasePoint::getPoint_code, taskObj.getPoint_code1())
);

View File

@@ -178,8 +178,8 @@ public class CombinedBoxInTask extends AbstractTask {
// 更新起点
iSchBasePointService.update(
new UpdateWrapper<SchBasePoint>().lambda()
.set(SchBasePoint::getVehicle_code, null)
.set(SchBasePoint::getIng_task_code, null)
.set(SchBasePoint::getVehicle_code, "")
.set(SchBasePoint::getIng_task_code, "")
.set(SchBasePoint::getPoint_status, IOSEnum.POINT_STATUS.code("空位"))
.eq(SchBasePoint::getPoint_code, taskObj.getPoint_code1())

View File

@@ -159,8 +159,8 @@ public class DetainInTask extends AbstractTask {
// 更新起点
iSchBasePointService.update(
new UpdateWrapper<SchBasePoint>().lambda()
.set(SchBasePoint::getVehicle_code, null)
.set(SchBasePoint::getIng_task_code, null)
.set(SchBasePoint::getVehicle_code, "")
.set(SchBasePoint::getIng_task_code, "")
.set(SchBasePoint::getPoint_status, IOSEnum.POINT_STATUS.code("空位"))
.eq(SchBasePoint::getPoint_code, taskObj.getPoint_code1())

View File

@@ -152,9 +152,9 @@ public class EmpVehicleInTask extends AbstractTask {
iSchBasePointService.update(
new UpdateWrapper<SchBasePoint>().lambda()
.eq(SchBasePoint::getPoint_code, taskObj.getPoint_code1())
.set(SchBasePoint::getVehicle_code, null)
.set(SchBasePoint::getIos_id, null)
.set(SchBasePoint::getIng_task_code, null)
.set(SchBasePoint::getVehicle_code, "")
.set(SchBasePoint::getIos_id, "")
.set(SchBasePoint::getIng_task_code, "")
.set(SchBasePoint::getPoint_status, IOSEnum.POINT_STATUS.code("空位"))
);
// 更新终点

View File

@@ -158,10 +158,10 @@ public class HandInTask extends AbstractTask {
// 更新起点
iSchBasePointService.update(
new UpdateWrapper<SchBasePoint>().lambda()
.set(SchBasePoint::getVehicle_code, null)
.set(SchBasePoint::getVehicle_code, "")
.set(SchBasePoint::getPoint_status, IOSEnum.POINT_STATUS.code("空位"))
.eq(SchBasePoint::getPoint_code, taskObj.getPoint_code1())
.set(SchBasePoint::getIng_task_code, null)
.set(SchBasePoint::getIng_task_code, "")
);
}

View File

@@ -155,14 +155,14 @@ public class PdaPointTask extends AbstractTask {
iSchBasePointService.update(
new UpdateWrapper<SchBasePoint>().lambda()
.eq(SchBasePoint::getPoint_code, taskObj.getPoint_code1())
.set(SchBasePoint::getVehicle_code, null)
.set(SchBasePoint::getVehicle_code, "")
.set(SchBasePoint::getPoint_status, IOSEnum.POINT_STATUS.code("空位"))
.set(SchBasePoint::getIng_task_code, null)
.set(SchBasePoint::getIng_task_code, "")
);
iStructattrService.update(
new UpdateWrapper<Structattr>().lambda()
.eq(Structattr::getStruct_code, taskObj.getPoint_code1())
.set(Structattr::getStoragevehicle_code, null)
.set(Structattr::getStoragevehicle_code, "")
.set(Structattr::getLock_type, IOSEnum.LOCK_TYPE.code("未锁定"))
);
// 更新终点

View File

@@ -185,8 +185,8 @@ public class PieceBoxInTask extends AbstractTask {
// 更新起点
iSchBasePointService.update(
new UpdateWrapper<SchBasePoint>().lambda()
.set(SchBasePoint::getVehicle_code, null)
.set(SchBasePoint::getIng_task_code, null)
.set(SchBasePoint::getVehicle_code, "")
.set(SchBasePoint::getIng_task_code, "")
.set(SchBasePoint::getPoint_status, IOSEnum.POINT_STATUS.code("空位"))
.eq(SchBasePoint::getPoint_code, taskObj.getPoint_code1())

View File

@@ -209,10 +209,10 @@ public class SelectBackInTask extends AbstractTask {
// 更新起点
iSchBasePointService.update(
new UpdateWrapper<SchBasePoint>().lambda()
.set(SchBasePoint::getVehicle_code, null)
.set(SchBasePoint::getVehicle_code, "")
.set(SchBasePoint::getPoint_status, IOSEnum.POINT_STATUS.code("空位"))
.eq(SchBasePoint::getPoint_code, taskObj.getPoint_code1())
.set(SchBasePoint::getIng_task_code, null)
.set(SchBasePoint::getIng_task_code, "")
);
}
}

View File

@@ -56,7 +56,7 @@ public class PieceBoxController {
}
@DeleteMapping
@Log("删除")
@Log("删除")
public ResponseEntity<Object> delete(@RequestBody Set<String> ids) {
iStIvtPieceBoxMstService.delete(ids);
return new ResponseEntity<>(HttpStatus.OK);

View File

@@ -52,7 +52,7 @@ public enum IOSEnum {
// 移库任务配置类编码
MOVE_CONFIG_CODE(MapOf.of("2001","InsideMoveTask", "2002", "CombinedBoxMoveTask",
"2003", "PieceBoxMoveTask", "CheckMoveTask", "2004"
"2003", "PieceBoxMoveTask", "2004", "CheckMoveTask"
)),
//入库分配明细状态

View File

@@ -1,5 +1,6 @@
package org.nl.wms.warehouse_management.service.dao;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@@ -94,4 +95,10 @@ public class StIvtPieceBoxMst implements Serializable {
*/
private String create_time;
/**
* 拼箱明细
*/
@TableField(exist = false)
private String piece_dtl_id;
}

View File

@@ -1,6 +1,7 @@
package org.nl.wms.warehouse_management.service.impl;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -211,12 +212,18 @@ public class StIvtPieceBoxMstServiceImpl extends ServiceImpl<StIvtPieceBoxMstMap
@Override
@Transactional
public void pieceMove(StIvtPieceBoxMst dao) {
// 判断当前是否有正在拼箱移库的任务
List<SchBaseTask> taskConfigList = iSchBaseTaskService.getTaskConfigList(IOSEnum.MOVE_CONFIG_CODE.code("2003"));
if (ObjectUtil.isNotEmpty(taskConfigList)) {
throw new BadRequestException("当前有正在执行的拼箱移库任务,不允许下发任务!");
}
StIvtPieceBoxMst mstDao = this.getById(dao.getId());
// 查询明细
List<StIvtPieceBoxDtl> dtlDaoList = iStIvtPieceBoxDtlService.list(
new QueryWrapper<StIvtPieceBoxDtl>().lambda()
.eq(StIvtPieceBoxDtl::getPiece_id, mstDao.getId())
.eq(ObjectUtil.isNotEmpty(dao.getPiece_dtl_id()), StIvtPieceBoxDtl::getId, dao.getPiece_dtl_id())
.eq(StIvtPieceBoxDtl::getBill_status, IOSEnum.PIECE_DTL_STATUS.code("生成"))
);

View File

@@ -70,6 +70,17 @@
>
复制新增
</el-button>
<el-button
slot="right"
class="filter-item"
type="success"
icon="el-icon-printer"
size="mini"
:disabled="crud.selections.length !== 1"
@click="printTable"
>
物料标签
</el-button>
</crudOperation>
<el-dialog
:close-on-click-modal="false"
@@ -270,7 +281,7 @@ import crudOperation from '@crud/CRUD.operation'
import udOperation from '@crud/UD.operation'
import pagination from '@crud/Pagination'
import rrOperation from '@crud/RR.operation'
import { format, subDays } from 'date-fns'
import { getLodop } from '@/assets/js/lodop/LodopFuncs'
const defaultForm = {
group_id: null,
@@ -385,6 +396,22 @@ export default {
openAddDtl() {
this.openAddDtlDialog = true
this.openParam = this.$refs.table.selection[0]
},
printTable() {
let row = this.$refs.table.selection[0]
const LODOP = getLodop()
LODOP.SET_SHOW_MODE('HIDE_DISBUTTIN_SETUP', 1)// 隐藏那些无效按钮
// 打印纸张大小设置https://www.it610.com/article/2094844.html
LODOP.PRINT_INIT('')
LODOP.SET_PRINT_PAGESIZE(1, '80mm', '60mm', '')
LODOP.ADD_PRINT_RECT('1mm', '3mm', '74mm', '54mm', 0, 1)
LODOP.SET_PRINT_STYLE('FontSize', 9)
LODOP.SET_PRINT_STYLE('Bold', 1)
LODOP.ADD_PRINT_BARCODE('10mm', '15mm', '60mm', '20mm', 'QRCode', row.material_name)
LODOP.ADD_PRINT_TEXT('35mm', '15mm', '80mm', '15mm', '备件名称:' + row.material_name + '')
LODOP.ADD_PRINT_TEXT('45mm', '15mm', '80mm', '15mm', '型号:' + row.material_spec + '')
// LODOP.PRINT()// 打印
LODOP.PREVIEW()// 预览
}
}
}

View File

@@ -112,12 +112,23 @@
</template>
</el-table-column>
<el-table-column prop="is_get" label="是否已取货" align="center" :min-width="flexWidth('is_get',crud.data,'是否已取货')" :formatter="isGetFormat" />
<el-table-column align="center" label="操作" width="190" fixed="right">
<el-table-column align="center" label="操作" width="260" fixed="right">
<template scope="scope">
<el-button
slot="right"
class="filter-item"
type="primary"
icon="el-icon-bottom-left"
size="mini"
:loading="loadingGetConfirm"
@click="pieceMove(scope.$index, scope.row)"
>
下发移库
</el-button>
<el-button
slot="right"
class="filter-item"
type="success"
icon="el-icon-check"
size="mini"
:loading="loadingGetConfirm"
@@ -212,6 +223,21 @@ export default {
isGetFormat(row) {
return this.dict.label.IS_OR_NOT[row.is_get]
},
pieceMove(index, row) {
if (row.bill_status !== '10') {
this.crud.notify('只能对生成状态进行操作!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
this.formMst.piece_dtl_id = row.id
this.loadingGetConfirm = true
crudPicecbox.pieceMove(this.formMst).then(res => {
this.crud.notify('操作成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.getDtl()
this.loadingGetConfirm = false
}).catch(() => {
this.loadingGetConfirm = false
})
},
getConfirm(index, row) {
if (row.bill_status !== '20') {
this.crud.notify('只能对拼箱中明细状态进行操作!', CRUD.NOTIFICATION_TYPE.INFO)

View File

@@ -51,7 +51,7 @@
<rrOperation />
<!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'-->
<crudOperation :permission="permission">
<el-button
<!-- <el-button
slot="right"
class="filter-item"
type="success"
@@ -61,7 +61,7 @@
@click="pieceMove"
>
拼箱移出
</el-button>
</el-button>-->
<el-button
slot="right"
class="filter-item"
@@ -71,7 +71,7 @@
:disabled="crud.selections.length !== 1"
@click="getConfirm"
>
取货确认
拼箱操作
</el-button>
</crudOperation>
<!--表格渲染-->
@@ -193,8 +193,8 @@ export default {
},
getConfirm() {
const data = this.$refs.table.selection[0]
if (data.bill_status !== '20') {
this.crud.notify('只能对拼箱中状态进行操作!', CRUD.NOTIFICATION_TYPE.INFO)
if (data.bill_status > '20') {
this.crud.notify('只能对生成或者拼箱中状态进行操作!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
this.openParam = data