汪菘
2 years ago
23 changed files with 550 additions and 149 deletions
@ -0,0 +1 @@ |
|||
,DESKTOP-BT6HP4E/zhang,DESKTOP-BT6HP4E,29.08.2022 16:51,file:///C:/Users/zhang/AppData/Roaming/LibreOffice/4; |
@ -0,0 +1,33 @@ |
|||
package org.nl.wms.common; |
|||
|
|||
import cn.hutool.core.util.StrUtil; |
|||
import com.alibaba.fastjson.JSONArray; |
|||
import com.alibaba.fastjson.JSONObject; |
|||
import org.nl.modules.system.service.impl.ParamServiceImpl; |
|||
import org.nl.utils.SpringContextHolder; |
|||
import org.nl.wms.ext.acs.service.impl.WmsToAcsServiceImpl; |
|||
import org.nl.wql.core.bean.WQLObject; |
|||
|
|||
public class PointUpdateUtil { |
|||
public static void updatePoint(JSONArray arr) { |
|||
WmsToAcsServiceImpl wmsToAcsServiceImpl = new WmsToAcsServiceImpl(); |
|||
String isConnect = SpringContextHolder.getBean(ParamServiceImpl.class).findByCode("IS_CONNECT_ACS").getValue(); |
|||
if (StrUtil.equals("0", isConnect)) { |
|||
return; |
|||
} |
|||
JSONObject joo = wmsToAcsServiceImpl.queryPointStatus(arr); |
|||
JSONArray pointarr = joo.getJSONArray("data"); |
|||
WQLObject pointTable = WQLObject.getWQLObject("sch_base_point"); |
|||
for (int i = 0; i < pointarr.size(); i++) { |
|||
JSONObject pointjo = pointarr.getJSONObject(i); |
|||
String point_status = "0" + pointjo.getString("move"); |
|||
String device_code = pointjo.getString("device_code"); |
|||
pointjo.put("point_status", point_status); |
|||
JSONObject pointObj = pointTable.query("point_code ='" + device_code + "'").uniqueResult(0); |
|||
pointObj.put("point_status", point_status); |
|||
pointTable.update(pointObj); |
|||
} |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,56 @@ |
|||
[交易说明] |
|||
交易名: ACS发送请求给mes |
|||
所属模块: |
|||
功能简述: |
|||
版权所有: |
|||
表引用: |
|||
版本经历: |
|||
|
|||
[数据库] |
|||
--指定数据库,为空采用默认值,默认为db.properties中列出的第一个库 |
|||
|
|||
[IO定义] |
|||
################################################# |
|||
## 表字段对应输入参数 |
|||
################################################# |
|||
输入.flag TYPEAS s_string |
|||
输入.workprocedure_id TYPEAS s_string |
|||
输入.point_code TYPEAS s_string |
|||
|
|||
[临时表] |
|||
--这边列出来的临时表就会在运行期动态创建 |
|||
|
|||
[临时变量] |
|||
--所有中间过程变量均可在此处定义 |
|||
|
|||
[业务过程] |
|||
|
|||
########################################## |
|||
# 1、输入输出检查 # |
|||
########################################## |
|||
|
|||
|
|||
########################################## |
|||
# 2、主过程前处理 # |
|||
########################################## |
|||
|
|||
|
|||
########################################## |
|||
# 3、业务主过程 # |
|||
########################################## |
|||
|
|||
IF 输入.flag = "1" |
|||
QUERY |
|||
SELECT |
|||
task.vehicle_type |
|||
FROM |
|||
pdm_mg_producetask task |
|||
right JOIN sch_base_point point ON task.device_id = point.device_id |
|||
WHERE |
|||
task.producetask_status IN ('03', '04') |
|||
OPTION 输入.point_code <> "" |
|||
point.point_code = 输入.point_code |
|||
ENDOPTION |
|||
ENDSELECT |
|||
ENDQUERY |
|||
ENDIF |
Binary file not shown.
@ -0,0 +1,155 @@ |
|||
<template> |
|||
<el-dialog |
|||
title="物料选择" |
|||
append-to-body |
|||
:visible.sync="dialogVisible" |
|||
destroy-on-close |
|||
width="1000px" |
|||
@close="close" |
|||
@open="open" |
|||
> |
|||
<el-form |
|||
:inline="true" |
|||
class="demo-form-inline" |
|||
label-position="right" |
|||
label-width="80px" |
|||
label-suffix=":" |
|||
> |
|||
<el-form-item label="模糊搜索"> |
|||
<el-input |
|||
v-model="query.search" |
|||
clearable |
|||
size="mini" |
|||
placeholder="编码、名称" |
|||
@keyup.enter.native="crud.toQuery" |
|||
/> |
|||
</el-form-item> |
|||
<rrOperation /> |
|||
</el-form> |
|||
|
|||
<!--表格渲染--> |
|||
<el-table |
|||
ref="table" |
|||
v-loading="crud.loading" |
|||
:data="crud.data" |
|||
style="width: 100%;" |
|||
size="mini" |
|||
border |
|||
:cell-style="{'text-align':'center'}" |
|||
:header-cell-style="{background:'#f5f7fa',color:'#606266','text-align':'center'}" |
|||
@select="handleSelectionChange" |
|||
@select-all="onSelectAll" |
|||
@current-change="clickChange" |
|||
> |
|||
<el-table-column v-if="!isSingle" type="selection" width="55" /> |
|||
<el-table-column v-if="isSingle" label="选择" width="55"> |
|||
<template slot-scope="scope"> |
|||
<el-radio v-model="tableRadio" :label="scope.row"><i /></el-radio> |
|||
</template> |
|||
</el-table-column> |
|||
|
|||
<el-table-column prop="material_code" label="物料编码" show-overflow-tooltip /> |
|||
<el-table-column prop="material_name" label="物料名称" show-overflow-tooltip /> |
|||
<el-table-column prop="material_spec" label="规格" show-overflow-tooltip /> |
|||
<el-table-column prop="material_model" label="型号" /> |
|||
<el-table-column prop="english_name" label="外文名称" /> |
|||
</el-table> |
|||
<!--分页组件--> |
|||
<pagination /> |
|||
<span slot="footer" class="dialog-footer"> |
|||
<el-button @click="dialogVisible = false">取 消</el-button> |
|||
<el-button type="primary" @click="submit">确 定</el-button> |
|||
</span> |
|||
</el-dialog> |
|||
</template> |
|||
|
|||
<script> |
|||
|
|||
import CRUD, { header, presenter } from '@crud/crud' |
|||
import rrOperation from '@crud/RR.operation' |
|||
import pagination from '@crud/Pagination' |
|||
import '@riophae/vue-treeselect/dist/vue-treeselect.css' |
|||
import crudWorkprocedureios from '@/api/wms/st/in/workprocedureios' |
|||
|
|||
export default { |
|||
name: 'MaterDialog', |
|||
components: { rrOperation, pagination }, |
|||
cruds() { |
|||
return CRUD({ title: '物料', url: 'api/workprocedureiosIn/getMaterial', crudMethod: { ...crudWorkprocedureios }, optShow: {}}) |
|||
}, |
|||
mixins: [presenter(), header()], |
|||
props: { |
|||
dialogShow: { |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
isSingle: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
materOptCode: { |
|||
type: String, |
|||
default: '00' |
|||
} |
|||
}, |
|||
data() { |
|||
return { |
|||
dialogVisible: false, |
|||
tableRadio: null, |
|||
tableData: [] |
|||
} |
|||
}, |
|||
watch: { |
|||
dialogShow: { |
|||
handler(newValue) { |
|||
this.dialogVisible = newValue |
|||
} |
|||
} |
|||
}, |
|||
methods: { |
|||
clickChange(item) { |
|||
this.tableRadio = item |
|||
}, |
|||
open() { |
|||
|
|||
}, |
|||
handleSelectionChange(val, row) { |
|||
if (val.length > 1) { |
|||
this.$refs.table.clearSelection() |
|||
this.$refs.table.toggleRowSelection(val.pop()) |
|||
} else { |
|||
this.checkrow = row |
|||
} |
|||
}, |
|||
onSelectAll() { |
|||
this.$refs.table.clearSelection() |
|||
}, |
|||
close() { |
|||
this.crud.resetQuery(false) |
|||
this.$emit('update:dialogShow', false) |
|||
}, |
|||
submit() { |
|||
// 处理单选 |
|||
if (this.isSingle && this.tableRadio) { |
|||
this.$emit('update:dialogShow', false) |
|||
this.$emit('tableChanged4', this.tableRadio) |
|||
return |
|||
} |
|||
this.rows = this.$refs.table.selection |
|||
if (this.rows.length <= 0) { |
|||
this.$message('请先勾选物料') |
|||
return |
|||
} |
|||
this.crud.resetQuery(false) |
|||
this.$emit('update:dialogShow', false) |
|||
this.$emit('tableChanged4', this.rows) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style rel="stylesheet/scss" lang="scss" scoped> |
|||
::v-deep .el-dialog__body { |
|||
padding-top: 0px; |
|||
} |
|||
</style> |
|||
|
Loading…
Reference in new issue