李永德
1 year ago
20 changed files with 596 additions and 21 deletions
Binary file not shown.
@ -0,0 +1,48 @@ |
|||
package org.nl.wms.ext.acs.service.dto.to.wms; |
|||
|
|||
import lombok.Data; |
|||
import org.nl.wms.ext.acs.service.dto.to.BaseRequest; |
|||
|
|||
/** |
|||
* @Author: lyd |
|||
* @Description: 分拣反馈记录木托盘与钢托盘的绑定 |
|||
* @Date: 2023/7/31 |
|||
*/ |
|||
@Data |
|||
public class FeedBackSplitPalletStationRequest extends BaseRequest { |
|||
|
|||
/** |
|||
* 取货点位 |
|||
*/ |
|||
private String get_station; |
|||
|
|||
/** |
|||
* 放货点位 |
|||
*/ |
|||
private String put_station; |
|||
|
|||
|
|||
/** |
|||
* 取货点位载具号 |
|||
*/ |
|||
private String get_station_vehicle_code; |
|||
|
|||
|
|||
/** |
|||
* 放货点位载具号 |
|||
*/ |
|||
private String put_station_vehicle_code; |
|||
|
|||
/** |
|||
* 取货点当前数量 |
|||
*/ |
|||
private String get_station_qty; |
|||
|
|||
/** |
|||
* 放货点当前数量 |
|||
*/ |
|||
private String put_station_qty; |
|||
|
|||
|
|||
} |
|||
|
@ -0,0 +1,66 @@ |
|||
package org.nl.wms.pdm.vehiclebiding.controller; |
|||
|
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.nl.common.base.TableDataInfo; |
|||
import org.nl.common.domain.query.PageQuery; |
|||
import org.nl.common.logging.annotation.Log; |
|||
import org.nl.wms.pdm.vehiclebiding.service.IPdmBdVehicleBindingService; |
|||
import org.nl.wms.pdm.vehiclebiding.service.dao.PdmBdVehicleBinding; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.http.HttpStatus; |
|||
import org.springframework.http.ResponseEntity; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.Map; |
|||
import java.util.Set; |
|||
/** |
|||
* @author lyd |
|||
* @date 2023-07-31 |
|||
**/ |
|||
@Slf4j |
|||
@RestController |
|||
@Api(tags = "分拣载具关联记录管理") |
|||
@RequestMapping("/api/pdmBdVehicleBinding") |
|||
public class PdmBdVehicleBindingController { |
|||
|
|||
@Autowired |
|||
private IPdmBdVehicleBindingService pdmBdVehicleBindingService; |
|||
|
|||
@GetMapping |
|||
@Log("查询分拣载具关联记录") |
|||
@ApiOperation("查询分拣载具关联记录") |
|||
//@SaCheckPermission("@el.check('pdmBdVehicleBinding:list')")
|
|||
public ResponseEntity<Object> query(@RequestParam Map whereJson, PageQuery page){ |
|||
return new ResponseEntity<>(TableDataInfo.build(pdmBdVehicleBindingService.queryAll(whereJson,page)),HttpStatus.OK); |
|||
} |
|||
|
|||
@PostMapping |
|||
@Log("新增分拣载具关联记录") |
|||
@ApiOperation("新增分拣载具关联记录") |
|||
//@SaCheckPermission("@el.check('pdmBdVehicleBinding:add')")
|
|||
public ResponseEntity<Object> create(@Validated @RequestBody PdmBdVehicleBinding entity){ |
|||
pdmBdVehicleBindingService.create(entity); |
|||
return new ResponseEntity<>(HttpStatus.CREATED); |
|||
} |
|||
|
|||
@PutMapping |
|||
@Log("修改分拣载具关联记录") |
|||
@ApiOperation("修改分拣载具关联记录") |
|||
//@SaCheckPermission("@el.check('pdmBdVehicleBinding:edit')")
|
|||
public ResponseEntity<Object> update(@Validated @RequestBody PdmBdVehicleBinding entity){ |
|||
pdmBdVehicleBindingService.update(entity); |
|||
return new ResponseEntity<>(HttpStatus.NO_CONTENT); |
|||
} |
|||
|
|||
@Log("删除分拣载具关联记录") |
|||
@ApiOperation("删除分拣载具关联记录") |
|||
//@SaCheckPermission("@el.check('pdmBdVehicleBinding:del')")
|
|||
@DeleteMapping |
|||
public ResponseEntity<Object> delete(@RequestBody Set<String> ids) { |
|||
pdmBdVehicleBindingService.deleteAll(ids); |
|||
return new ResponseEntity<>(HttpStatus.OK); |
|||
} |
|||
} |
@ -0,0 +1,43 @@ |
|||
package org.nl.wms.pdm.vehiclebiding.service; |
|||
|
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import org.nl.common.domain.query.PageQuery; |
|||
import com.baomidou.mybatisplus.extension.service.IService; |
|||
import org.nl.wms.pdm.vehiclebiding.service.dao.PdmBdVehicleBinding; |
|||
|
|||
import java.util.Map; |
|||
import java.util.Set; |
|||
|
|||
/** |
|||
* @description 服务接口 |
|||
* @author lyd |
|||
* @date 2023-07-31 |
|||
**/ |
|||
public interface IPdmBdVehicleBindingService extends IService<PdmBdVehicleBinding> { |
|||
|
|||
/** |
|||
* 查询数据分页 |
|||
* @param whereJson 条件 |
|||
* @param pageable 分页参数 |
|||
* @return IPage<PdmBdVehicleBinding> |
|||
*/ |
|||
IPage<PdmBdVehicleBinding> queryAll(Map whereJson, PageQuery pageable); |
|||
|
|||
/** |
|||
* 创建 |
|||
* @param entity / |
|||
*/ |
|||
void create(PdmBdVehicleBinding entity); |
|||
|
|||
/** |
|||
* 编辑 |
|||
* @param entity / |
|||
*/ |
|||
void update(PdmBdVehicleBinding entity); |
|||
|
|||
/** |
|||
* 多选删除 |
|||
* @param ids / |
|||
*/ |
|||
void deleteAll(Set<String> ids); |
|||
} |
@ -0,0 +1,58 @@ |
|||
package org.nl.wms.pdm.vehiclebiding.service.dao; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.IdType; |
|||
import com.baomidou.mybatisplus.annotation.TableId; |
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @description / |
|||
* @author lyd |
|||
* @date 2023-07-31 |
|||
**/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = false) |
|||
@TableName("pdm_bd_vehicle_binding") |
|||
public class PdmBdVehicleBinding implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
@TableId(value = "associate_id", type = IdType.NONE) |
|||
@ApiModelProperty(value = "对应标识") |
|||
private String associate_id; |
|||
|
|||
@ApiModelProperty(value = "源载具编码") |
|||
private String origin_vehicle_code; |
|||
|
|||
@ApiModelProperty(value = "源载具类型") |
|||
private String origin_vehicle_type; |
|||
|
|||
@ApiModelProperty(value = "目标载具编码") |
|||
private String target_vehicle_code; |
|||
|
|||
@ApiModelProperty(value = "目标载具类型") |
|||
private String target_vehicle_type; |
|||
|
|||
@ApiModelProperty(value = "源当前物料数量") |
|||
private String origin_qty; |
|||
|
|||
@ApiModelProperty(value = "目标当前物料数量") |
|||
private String target_qty; |
|||
|
|||
@ApiModelProperty(value = "取货点") |
|||
private String get_station; |
|||
|
|||
@ApiModelProperty(value = "放货点") |
|||
private String put_station; |
|||
|
|||
@ApiModelProperty(value = "工单号") |
|||
private String order_code; |
|||
|
|||
@ApiModelProperty(value = "记录时间") |
|||
private String record_time; |
|||
|
|||
} |
@ -0,0 +1,12 @@ |
|||
package org.nl.wms.pdm.vehiclebiding.service.dao.mapper; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import org.nl.wms.pdm.vehiclebiding.service.dao.PdmBdVehicleBinding; |
|||
|
|||
/** |
|||
* @author lyd |
|||
* @date 2023-07-31 |
|||
**/ |
|||
public interface PdmBdVehicleBindingMapper extends BaseMapper<PdmBdVehicleBinding> { |
|||
|
|||
} |
@ -0,0 +1,5 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="org.nl.wms.pdm.vehiclebiding.service.dao.mapper.PdmBdVehicleBindingMapper"> |
|||
|
|||
</mapper> |
@ -0,0 +1,46 @@ |
|||
package org.nl.wms.pdm.vehiclebiding.service.dto; |
|||
|
|||
import lombok.Data; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @description / |
|||
* @author lyd |
|||
* @date 2023-07-31 |
|||
**/ |
|||
@Data |
|||
public class PdmBdVehicleBindingDto implements Serializable { |
|||
|
|||
/** 对应标识 */ |
|||
private String associate_id; |
|||
|
|||
/** 源载具编码 */ |
|||
private String origin_vehicle_code; |
|||
|
|||
/** 源载具类型 */ |
|||
private String origin_vehicle_type; |
|||
|
|||
/** 目标载具编码 */ |
|||
private String target_vehicle_code; |
|||
|
|||
/** 目标载具类型 */ |
|||
private String target_vehicle_type; |
|||
|
|||
/** 源当前物料数量 */ |
|||
private String origin_qty; |
|||
|
|||
/** 目标当前物料数量 */ |
|||
private String target_qty; |
|||
|
|||
/** 取货点 */ |
|||
private String get_station; |
|||
|
|||
/** 放货点 */ |
|||
private String put_station; |
|||
|
|||
/** 工单号 */ |
|||
private String order_code; |
|||
|
|||
/** 记录时间 */ |
|||
private String record_time; |
|||
} |
@ -0,0 +1,12 @@ |
|||
package org.nl.wms.pdm.vehiclebiding.service.dto; |
|||
|
|||
import org.nl.common.domain.query.BaseQuery; |
|||
import org.nl.wms.pdm.vehiclebiding.service.dao.PdmBdVehicleBinding; |
|||
|
|||
/** |
|||
* @author lyd |
|||
* @date 2023-07-31 |
|||
**/ |
|||
public class PdmBdVehicleBindingQuery extends BaseQuery<PdmBdVehicleBinding> { |
|||
|
|||
} |
@ -0,0 +1,67 @@ |
|||
package org.nl.wms.pdm.vehiclebiding.service.impl; |
|||
|
|||
import cn.hutool.core.date.DateUtil; |
|||
import cn.hutool.core.util.IdUtil; |
|||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|||
import lombok.RequiredArgsConstructor; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.nl.common.domain.query.PageQuery; |
|||
import org.nl.common.exception.BadRequestException; |
|||
import org.nl.common.utils.SecurityUtils; |
|||
import org.nl.wms.pdm.vehiclebiding.service.IPdmBdVehicleBindingService; |
|||
import org.nl.wms.pdm.vehiclebiding.service.dao.mapper.PdmBdVehicleBindingMapper; |
|||
import org.nl.wms.pdm.vehiclebiding.service.dao.PdmBdVehicleBinding; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.Map; |
|||
import java.util.Set; |
|||
|
|||
/** |
|||
* @description 服务实现 |
|||
* @author lyd |
|||
* @date 2023-07-31 |
|||
**/ |
|||
@Slf4j |
|||
@Service |
|||
public class PdmBdVehicleBindingServiceImpl extends ServiceImpl<PdmBdVehicleBindingMapper, PdmBdVehicleBinding> implements IPdmBdVehicleBindingService { |
|||
|
|||
@Autowired |
|||
private PdmBdVehicleBindingMapper pdmBdVehicleBindingMapper; |
|||
|
|||
@Override |
|||
public IPage<PdmBdVehicleBinding> queryAll(Map whereJson, PageQuery page){ |
|||
LambdaQueryWrapper<PdmBdVehicleBinding> lam = new LambdaQueryWrapper<>(); |
|||
IPage<PdmBdVehicleBinding> pages = new Page<>(page.getPage() + 1, page.getSize()); |
|||
pdmBdVehicleBindingMapper.selectPage(pages, lam); |
|||
return pages; |
|||
} |
|||
|
|||
@Override |
|||
public void create(PdmBdVehicleBinding entity) { |
|||
String now = DateUtil.now(); |
|||
entity.setAssociate_id(IdUtil.getSnowflake(1, 1).nextIdStr()); |
|||
entity.setRecord_time(now); |
|||
pdmBdVehicleBindingMapper.insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
public void update(PdmBdVehicleBinding entity) { |
|||
PdmBdVehicleBinding dto = pdmBdVehicleBindingMapper.selectById(entity.getAssociate_id()); |
|||
if (dto == null) throw new BadRequestException("被删除或无权限,操作失败!"); |
|||
String now = DateUtil.now(); |
|||
entity.setRecord_time(now); |
|||
|
|||
pdmBdVehicleBindingMapper.updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
public void deleteAll(Set<String> ids) { |
|||
// 真删除
|
|||
pdmBdVehicleBindingMapper.deleteBatchIds(ids); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,126 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<!--工具栏--> |
|||
<div class="head-container"> |
|||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'--> |
|||
<crudOperation :permission="permission" /> |
|||
<!--表单组件--> |
|||
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="500px"> |
|||
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="80px"> |
|||
<el-form-item label="源载具编码"> |
|||
<el-input v-model="form.origin_vehicle_code" style="width: 370px;" /> |
|||
</el-form-item> |
|||
<el-form-item label="源载具类型"> |
|||
<el-input v-model="form.origin_vehicle_type" style="width: 370px;" /> |
|||
</el-form-item> |
|||
<el-form-item label="目标载具编码"> |
|||
<el-input v-model="form.target_vehicle_code" style="width: 370px;" /> |
|||
</el-form-item> |
|||
<el-form-item label="目标载具类型"> |
|||
<el-input v-model="form.target_vehicle_type" style="width: 370px;" /> |
|||
</el-form-item> |
|||
<el-form-item label="源当前物料数量"> |
|||
<el-input v-model="form.origin_qty" style="width: 370px;" /> |
|||
</el-form-item> |
|||
<el-form-item label="目标当前物料数量"> |
|||
<el-input v-model="form.target_qty" style="width: 370px;" /> |
|||
</el-form-item> |
|||
<el-form-item label="取货点"> |
|||
<el-input v-model="form.get_station" style="width: 370px;" /> |
|||
</el-form-item> |
|||
<el-form-item label="放货点"> |
|||
<el-input v-model="form.put_station" style="width: 370px;" /> |
|||
</el-form-item> |
|||
<el-form-item label="工单号"> |
|||
<el-input v-model="form.order_code" style="width: 370px;" /> |
|||
</el-form-item> |
|||
<el-form-item label="记录时间"> |
|||
<el-input v-model="form.record_time" style="width: 370px;" /> |
|||
</el-form-item> |
|||
</el-form> |
|||
<div slot="footer" class="dialog-footer"> |
|||
<el-button type="text" @click="crud.cancelCU">取消</el-button> |
|||
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button> |
|||
</div> |
|||
</el-dialog> |
|||
<!--表格渲染--> |
|||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler"> |
|||
<el-table-column type="selection" width="55" /> |
|||
<el-table-column prop="origin_vehicle_code" label="源载具编码" :min-width="flexWidth('origin_vehicle_code',crud.data,'源载具编码')"/> |
|||
<el-table-column prop="origin_vehicle_type" label="源载具类型" :min-width="flexWidth('origin_vehicle_type',crud.data,'源载具类型')"/> |
|||
<el-table-column prop="target_vehicle_code" label="目标载具编码" :min-width="flexWidth('target_vehicle_code',crud.data,'目标载具编码')"/> |
|||
<el-table-column prop="target_vehicle_type" label="目标载具类型" :min-width="flexWidth('target_vehicle_type',crud.data,'目标载具类型')"/> |
|||
<el-table-column prop="origin_qty" label="源当前物料数量" :min-width="flexWidth('origin_qty',crud.data,'源当前物料数量')"/> |
|||
<el-table-column prop="target_qty" label="目标当前物料数量" :min-width="flexWidth('target_qty',crud.data,'目标当前物料数量')"/> |
|||
<el-table-column prop="get_station" label="取货点" :min-width="flexWidth('get_station',crud.data,'取货点')"/> |
|||
<el-table-column prop="put_station" label="放货点" :min-width="flexWidth('put_station',crud.data,'放货点')"/> |
|||
<el-table-column prop="order_code" label="工单号" :min-width="flexWidth('order_code',crud.data,'工单号')"/> |
|||
<el-table-column prop="record_time" label="记录时间" :min-width="flexWidth('record_time',crud.data,'记录时间')"/> |
|||
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right"> |
|||
<template slot-scope="scope"> |
|||
<udOperation |
|||
:data="scope.row" |
|||
:permission="permission" |
|||
/> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<!--分页组件--> |
|||
<pagination /> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import crudPdmBdVehicleBinding from './pdmBdVehicleBinding' |
|||
import CRUD, {crud, form, header, presenter} from '@crud/crud' |
|||
import rrOperation from '@crud/RR.operation' |
|||
import crudOperation from '@crud/CRUD.operation' |
|||
import udOperation from '@crud/UD.operation' |
|||
import pagination from '@crud/Pagination' |
|||
|
|||
const defaultForm = { |
|||
associate_id: null, |
|||
origin_vehicle_code: null, |
|||
origin_vehicle_type: null, |
|||
target_vehicle_code: null, |
|||
target_vehicle_type: null, |
|||
origin_qty: null, |
|||
target_qty: null, |
|||
get_station: null, |
|||
put_station: null, |
|||
order_code: null, |
|||
record_time: null |
|||
} |
|||
export default { |
|||
name: 'PdmBdVehicleBinding', |
|||
components: { pagination, crudOperation, rrOperation, udOperation }, |
|||
mixins: [presenter(), header(), form(defaultForm), crud()], |
|||
cruds() { |
|||
return CRUD({ |
|||
title: '分拣载具关联记录', |
|||
url: 'api/pdmBdVehicleBinding', |
|||
idField: 'associate_id', |
|||
sort: 'associate_id,desc', |
|||
crudMethod: { ...crudPdmBdVehicleBinding } |
|||
}) |
|||
}, |
|||
data() { |
|||
return { |
|||
permission: { |
|||
}, |
|||
rules: { |
|||
} } |
|||
}, |
|||
methods: { |
|||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据 |
|||
[CRUD.HOOK.beforeRefresh]() { |
|||
return true |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
|
|||
</style> |
@ -0,0 +1,27 @@ |
|||
import request from '@/utils/request' |
|||
|
|||
export function add(data) { |
|||
return request({ |
|||
url: 'api/pdmBdVehicleBinding', |
|||
method: 'post', |
|||
data |
|||
}) |
|||
} |
|||
|
|||
export function del(ids) { |
|||
return request({ |
|||
url: 'api/pdmBdVehicleBinding/', |
|||
method: 'delete', |
|||
data: ids |
|||
}) |
|||
} |
|||
|
|||
export function edit(data) { |
|||
return request({ |
|||
url: 'api/pdmBdVehicleBinding', |
|||
method: 'put', |
|||
data |
|||
}) |
|||
} |
|||
|
|||
export default { add, edit, del } |
Loading…
Reference in new issue