李永德
12 months ago
22 changed files with 634 additions and 36 deletions
@ -0,0 +1,17 @@ |
|||
package org.nl.wms.cockpit.service.dao; |
|||
|
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @Author: lyd |
|||
* @Description: |
|||
* @Date: 2023/11/30 |
|||
*/ |
|||
@Data |
|||
public class MonthlyWorkOrderVo { |
|||
private String name; |
|||
private Long order_num; |
|||
private Long guada_num; |
|||
private Long residue_num; // 剩余
|
|||
|
|||
} |
@ -0,0 +1,48 @@ |
|||
package org.nl.wms.ext.mes.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.database.classification.service.dao.MdBaseClassstandard; |
|||
import org.nl.wms.ext.mes.service.WmsToMesService; |
|||
import org.nl.wms.ext.mes.service.dto.ScrapDto; |
|||
import org.nl.wms.ext.mes.service.dto.ScrapQuery; |
|||
import org.nl.wms.pdm.workorder.service.dto.PdmBdWorkorderQuery; |
|||
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.*; |
|||
|
|||
/** |
|||
* @Author: lyd |
|||
* @Description: 直接与mes交互的功能 - 工序判废 |
|||
* @Date: 2023/11/29 |
|||
*/ |
|||
@RestController |
|||
@Api(tags = "mes请求lms") |
|||
@RequestMapping("/api/mes") |
|||
@Slf4j |
|||
public class WmsToMesController { |
|||
@Autowired |
|||
private WmsToMesService wmsToMesService; |
|||
@GetMapping("/mesScrapInfo") |
|||
@Log("查询工序报废信息") |
|||
@ApiOperation("查询工序报废信息") |
|||
public ResponseEntity<Object> queryMesScrapInfo(ScrapQuery query, PageQuery page){ |
|||
return new ResponseEntity<>(TableDataInfo.build(wmsToMesService.queryMesScrapInfo(query,page)), HttpStatus.OK); |
|||
} |
|||
|
|||
@PostMapping("/addScrap") |
|||
@Log("新增工序报废") |
|||
@ApiOperation("新增工序报废") |
|||
//@SaCheckPermission("@el.check('mdBaseClassstandard:add')")
|
|||
public ResponseEntity<Object> addScrap(@Validated @RequestBody ScrapDto entity){ |
|||
wmsToMesService.addScrap(entity); |
|||
return new ResponseEntity<>(HttpStatus.CREATED); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,23 @@ |
|||
package org.nl.wms.ext.mes.service.dto; |
|||
|
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @Author: lyd |
|||
* @Description: |
|||
* @Date: 2023/11/29 |
|||
*/ |
|||
@Data |
|||
public class ScrapDto { |
|||
private String process; |
|||
private String region_code; |
|||
private String point_code; |
|||
private String fp_weight; |
|||
private String fp_number; |
|||
private String vehicle_code; |
|||
private String fp_remark; |
|||
private String pf_name; |
|||
private String jj_material; |
|||
private String fp_big_type; |
|||
private String is_jj; |
|||
} |
@ -0,0 +1,14 @@ |
|||
package org.nl.wms.ext.mes.service.dto; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author: lyd |
|||
* @Description: |
|||
* @Date: 2023/11/29 |
|||
*/ |
|||
@Data |
|||
public class ScrapQuery implements Serializable { |
|||
} |
@ -0,0 +1,53 @@ |
|||
package org.nl.wms.ext.mes.service.dto; |
|||
|
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @Author: lyd |
|||
* @Description: |
|||
* @Date: 2023/11/29 |
|||
* 唯一标识 |
|||
* 订单号 |
|||
* 半成品批次号 |
|||
* 设备 |
|||
* 工序(H01:RH砖原料仓储;H02:RH砖配料;H03:RH砖成型;H04:RH砖热处理;H05:RH砖包装;H06:RH砖入库) |
|||
* 班组(大夜班、小夜班、白班) |
|||
* 废品重量 |
|||
* 重量单位 |
|||
* 废品数量 |
|||
* 数量单位 |
|||
* 废品大类 |
|||
* 废品备注 |
|||
* 是否降级,是1,否0 |
|||
* 降级后物料编码 |
|||
* 判废人 |
|||
* 判废日期 |
|||
* 生产日期 |
|||
* 写入时间 |
|||
* 读取标志,0未读取,1已读取 |
|||
* 读取时间 |
|||
*/ |
|||
@Data |
|||
public class SemiProductGXPFDo { |
|||
private String MSGID; |
|||
private String FORDER_NO; |
|||
private String BATCHNO; |
|||
private String DEVICE; |
|||
private String WORKUNIT; |
|||
private String FTEAM; |
|||
private String FP_NUM; |
|||
private String FP_UNIT; |
|||
private String FP_SUBNUM; |
|||
private String FP_SUBUNIT; |
|||
private String FP_REASON; |
|||
private String FP_REMARK; |
|||
private String IFJJ; |
|||
private String EDTPFJJ_PROMATNO; |
|||
private String CHECKERIN; |
|||
private String CHECKERIN_TIM; |
|||
private String PRODATE; |
|||
private String CREATE_TM; |
|||
private String OP_FLAG; |
|||
private String OP_TM; |
|||
|
|||
} |
@ -0,0 +1,271 @@ |
|||
<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="820px" |
|||
> |
|||
<el-form |
|||
ref="form" |
|||
style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;" |
|||
:inline="true" |
|||
:model="form" |
|||
:rules="rules" |
|||
size="mini" |
|||
label-width="135px" |
|||
label-suffix=":" |
|||
> |
|||
<el-form-item label="所属工序" prop="region_code"> |
|||
<el-select |
|||
v-model="form.process" |
|||
filterable |
|||
placeholder="请选择" |
|||
style="width: 240px;" |
|||
> |
|||
<el-option |
|||
v-for="item in dict.rh_production" |
|||
:key="item.label" |
|||
:label="item.label" |
|||
:value="item.value" |
|||
> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item label="载具编码" prop="vehicle_code"> |
|||
<el-input v-model="form.vehicle_code" style="width: 240px;"/> |
|||
</el-form-item> |
|||
<el-form-item label="选择区域" prop="region_code"> |
|||
<el-select |
|||
v-model="form.region_code" |
|||
filterable |
|||
placeholder="请选择" |
|||
style="width: 240px;" |
|||
@change="setRegionName" |
|||
> |
|||
<el-option |
|||
v-for="item in regionList" |
|||
:key="item.region_code" |
|||
:label="item.region_code" |
|||
:value="item.region_code" |
|||
> |
|||
<span style="float: left">{{ item.region_name }}</span> |
|||
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.region_code }}</span> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item label="选择设备" prop="point_code"> |
|||
<el-select |
|||
v-model="form.point_code" |
|||
filterable |
|||
placeholder="请选择" |
|||
style="width: 240px;" |
|||
> |
|||
<el-option |
|||
v-for="item in pointList" |
|||
:key="item.point_code" |
|||
:label="item.point_code" |
|||
:value="item.point_code" |
|||
> |
|||
<span style="float: left">{{ item.point_name }}</span> |
|||
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.point_code }}</span> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item label="废品重量" prop="fp_weight"> |
|||
<el-input-number |
|||
v-model.number="form.fp_weight" |
|||
:min="0" |
|||
:max="999" |
|||
style="width: 240px;" |
|||
/> |
|||
</el-form-item> |
|||
<el-form-item label="废品数量" prop="fp_number"> |
|||
<el-input-number |
|||
v-model.number="form.fp_number" |
|||
:min="0" |
|||
:max="999" |
|||
style="width: 240px;" |
|||
/> |
|||
</el-form-item> |
|||
<el-form-item label="是否降级" prop="is_jj"> |
|||
<el-radio-group v-model="form.is_jj" style="width: 240px"> |
|||
<el-radio label="1">是</el-radio> |
|||
<el-radio label="0">否</el-radio> |
|||
</el-radio-group> |
|||
</el-form-item> |
|||
<el-form-item v-if="form.is_jj === '1'" label="降级物料" prop="jj_material"> |
|||
<el-input v-model="form.jj_material" style="width: 240px;"/> |
|||
</el-form-item> |
|||
<el-form-item label="判废人" prop="pf_name"> |
|||
<el-input v-model="form.pf_name" style="width: 240px;"/> |
|||
</el-form-item> |
|||
<el-form-item label="废品大类" prop="region_code"> |
|||
<el-select |
|||
v-model="form.fp_big_type" |
|||
filterable |
|||
placeholder="请选择" |
|||
style="width: 240px;" |
|||
@change="setFpTypeList" |
|||
> |
|||
<el-option |
|||
v-for="item in dict.fp_big_type" |
|||
:key="item.label" |
|||
:label="item.label" |
|||
:value="item.label" |
|||
> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item v-show="fpTypeList.length > 0" label="废品描述" prop="region_code"> |
|||
<el-radio-group v-model="form.fp_remark" style="width: 630px;"> |
|||
<el-radio |
|||
v-for="item in fpTypeList" |
|||
:key="item.class_name" |
|||
style="margin: 8px 10px" |
|||
:label="item.class_name" |
|||
> |
|||
{{ item.class_name }} |
|||
</el-radio> |
|||
</el-radio-group> |
|||
</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="forder_NO" label="订单号" :min-width="flexWidth('forder_NO',crud.data,'订单号')" /> |
|||
<el-table-column prop="batchno" label="半成品批次" :min-width="flexWidth('batchno',crud.data,'半成品批次')" /> |
|||
<el-table-column prop="device" label="设备" :min-width="flexWidth('device',crud.data,'设备')" /> |
|||
<el-table-column prop="workunit" label="工序" :min-width="flexWidth('workunit',crud.data,'拆垛工位')" /> |
|||
<el-table-column prop="fteam" label="班组" :min-width="flexWidth('fteam',crud.data,'分拣工单')" /> |
|||
<el-table-column prop="fp_NUM" label="废品重量" :min-width="flexWidth('fp_NUM',crud.data,'分拣工单')" /> |
|||
<el-table-column prop="fp_UNIT" label="重量单位" :min-width="flexWidth('fp_UNIT',crud.data,'分拣工单')" /> |
|||
<el-table-column prop="fp_SUBNUM" label="废品数量" :min-width="flexWidth('fp_SUBNUM',crud.data,'分拣工单')" /> |
|||
<el-table-column prop="fp_SUBUNIT" label="数量单位" :min-width="flexWidth('fp_SUBUNIT',crud.data,'分拣工单')" /> |
|||
<el-table-column prop="fp_REASON" label="废品大类" :min-width="flexWidth('fp_REASON',crud.data,'分拣工单')" /> |
|||
<el-table-column prop="fp_REMARK" label="废品描述" :min-width="flexWidth('fp_REMARK',crud.data,'分拣工单')" /> |
|||
<el-table-column prop="ifjj" label="降级" :min-width="flexWidth('ifjj',crud.data,'降级')" /> |
|||
<el-table-column prop="edtpfjj_PROMATNO" label="降级后物料编码" :min-width="flexWidth('edtpfjj_PROMATNO',crud.data,'降级后物料编码')" /> |
|||
<el-table-column prop="checkerin" label="判废人" :min-width="flexWidth('checkerin',crud.data,'判废人')" /> |
|||
<el-table-column prop="checkerin_TIM" label="判废时间" :min-width="flexWidth('checkerin_TIM',crud.data,'分拣工单')" /> |
|||
<el-table-column prop="prodate" label="生产日期" :min-width="flexWidth('prodate',crud.data,'分拣工单')" /> |
|||
</el-table> |
|||
<!--分页组件--> |
|||
<pagination /> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import CRUD, { crud, header, form, 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' |
|||
import crudSchBasePoint from '@/views/wms/sch/point/schBasePoint' |
|||
import crudSchBaseRegion from '@/views/wms/sch/region/schBaseRegion' |
|||
import crudParamBaseClassstandard from '@/views/wms/basedata/classification/mdBaseClassstandard' |
|||
import crudScrap from './scrap' |
|||
|
|||
const defaultForm = { |
|||
process: null, |
|||
region_code: null, |
|||
point_code: null, |
|||
fp_weight: null, |
|||
fp_number: null, |
|||
vehicle_code: null, |
|||
fp_remark: null, |
|||
pf_name: null, |
|||
jj_material: null, |
|||
fp_big_type: null, |
|||
is_jj: '0' |
|||
} |
|||
|
|||
export default { |
|||
name: 'Scrap', |
|||
dicts: ['rh_production', 'fp_big_type'], |
|||
components: { pagination, crudOperation, rrOperation, udOperation }, |
|||
mixins: [presenter(), header(), form(defaultForm), crud()], |
|||
cruds() { |
|||
return CRUD({ |
|||
title: '工序报废', |
|||
url: 'api/mes/mesScrapInfo', |
|||
optShow: { |
|||
add: true, |
|||
edit: false, |
|||
del: false, |
|||
download: false |
|||
}, |
|||
crudMethod: { ...crudScrap } |
|||
}) |
|||
}, |
|||
data() { |
|||
return { |
|||
permission: { |
|||
}, |
|||
rules: { |
|||
}, |
|||
regionList: [], |
|||
fpTypeList: [], |
|||
regionCodeParam: null, |
|||
pointList: [] |
|||
} |
|||
}, |
|||
created() { |
|||
this.getRegionList() |
|||
}, |
|||
methods: { |
|||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据 |
|||
[CRUD.HOOK.beforeRefresh]() { |
|||
return true |
|||
}, |
|||
setFpTypeList(data) { |
|||
const res = this.dict.fp_big_type.filter(item => item.label === data).map(item => item.value) |
|||
crudParamBaseClassstandard.getClassByCode(res[0]).then(res => { |
|||
this.fpTypeList = res |
|||
}) |
|||
}, |
|||
setRegionName(data) { |
|||
// 清空 |
|||
this.form.point_code = null |
|||
this.regionCodeParam = data |
|||
this.getPointList() |
|||
}, |
|||
getRegionList() { // 获取区域列表 |
|||
const param = { |
|||
is_has_workder: true |
|||
} |
|||
crudSchBaseRegion.getRegionList(param).then(res => { |
|||
this.regionList = res |
|||
}) |
|||
}, |
|||
getPointList() { // 获取点位列表 |
|||
if (this.regionCodeParam) { |
|||
const param = { |
|||
region_code: this.regionCodeParam |
|||
} |
|||
crudSchBasePoint.getPointList(param).then(res => { |
|||
this.pointList = res |
|||
this.regionCodeParam = null |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
|
|||
</style> |
@ -0,0 +1,10 @@ |
|||
import request from '@/utils/request' |
|||
|
|||
export function add(data) { |
|||
return request({ |
|||
url: 'api/mes/addScrap', |
|||
method: 'post', |
|||
data |
|||
}) |
|||
} |
|||
export default { add } |
Loading…
Reference in new issue