Merge branch 'master' of http://121.40.234.130:8899/root/hl_one
This commit is contained in:
@@ -167,6 +167,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
if (ObjectUtil.isNotEmpty(status_json)) {
|
if (ObjectUtil.isNotEmpty(status_json)) {
|
||||||
status_json.put("end_time", start_time);
|
status_json.put("end_time", start_time);
|
||||||
wo_status.update(status_json);
|
wo_status.update(status_json);
|
||||||
|
log.warn("上一次设备状态结束时间修改成功:{}",device_code);
|
||||||
}
|
}
|
||||||
JSONObject map = new JSONObject();
|
JSONObject map = new JSONObject();
|
||||||
map.put("record_id", IdUtil.getSnowflake(1, 1).nextId());
|
map.put("record_id", IdUtil.getSnowflake(1, 1).nextId());
|
||||||
@@ -179,6 +180,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
map.put("err_status_id", null);
|
map.put("err_status_id", null);
|
||||||
}
|
}
|
||||||
wo_status.insert(map);
|
wo_status.insert(map);
|
||||||
|
log.warn("设备状态新增成功{}",device_code);
|
||||||
}
|
}
|
||||||
JSONObject result = new JSONObject();
|
JSONObject result = new JSONObject();
|
||||||
result.put("status", HttpStatus.OK.value());
|
result.put("status", HttpStatus.OK.value());
|
||||||
|
|||||||
@@ -102,4 +102,6 @@ public class ProduceshiftorderDto implements Serializable {
|
|||||||
|
|
||||||
private Long device_id;
|
private Long device_id;
|
||||||
private Long sale_id;
|
private Long sale_id;
|
||||||
|
|
||||||
|
private Integer orderNum;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ import lombok.RequiredArgsConstructor;
|
|||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.nl.exception.BadRequestException;
|
import org.nl.exception.BadRequestException;
|
||||||
import org.nl.modules.security.service.dto.JwtUserDto;
|
import org.nl.modules.security.service.dto.JwtUserDto;
|
||||||
|
import org.nl.modules.system.service.UserService;
|
||||||
|
import org.nl.modules.system.service.dto.UserDto;
|
||||||
import org.nl.modules.system.util.CodeUtil;
|
import org.nl.modules.system.util.CodeUtil;
|
||||||
import org.nl.utils.SecurityUtils;
|
import org.nl.utils.SecurityUtils;
|
||||||
import org.nl.wms.basedata.master.service.ClassstandardService;
|
import org.nl.wms.basedata.master.service.ClassstandardService;
|
||||||
@@ -22,6 +24,7 @@ import org.nl.wms.mps.service.dto.ProduceshiftorderDto;
|
|||||||
import org.nl.wql.WQL;
|
import org.nl.wql.WQL;
|
||||||
import org.nl.wql.core.bean.WQLObject;
|
import org.nl.wql.core.bean.WQLObject;
|
||||||
import org.nl.wql.util.WqlUtil;
|
import org.nl.wql.util.WqlUtil;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.data.domain.Pageable;
|
import org.springframework.data.domain.Pageable;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
@@ -42,6 +45,9 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService {
|
|||||||
private final ClassstandardService classstandardService;
|
private final ClassstandardService classstandardService;
|
||||||
private final WmsToAcsService wmsToAcsService;
|
private final WmsToAcsService wmsToAcsService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
UserService userService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object> queryAll(Map whereJson, Pageable page) {
|
public Map<String, Object> queryAll(Map whereJson, Pageable page) {
|
||||||
String produceorder_code = MapUtil.getStr(whereJson, "produceorder_code");
|
String produceorder_code = MapUtil.getStr(whereJson, "produceorder_code");
|
||||||
@@ -83,7 +89,24 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService {
|
|||||||
if (StrUtil.isNotEmpty(sale_id)) {
|
if (StrUtil.isNotEmpty(sale_id)) {
|
||||||
map.put("sale_id", "%" + sale_id + "%");
|
map.put("sale_id", "%" + sale_id + "%");
|
||||||
}
|
}
|
||||||
|
WQLObject wo = WQLObject.getWQLObject("mps_bd_macoperaterecord");
|
||||||
JSONObject jsonObject = WQL.getWO("MPS_PRODUCEDURE001").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "ShiftOrder.update_time desc");
|
JSONObject jsonObject = WQL.getWO("MPS_PRODUCEDURE001").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "ShiftOrder.update_time desc");
|
||||||
|
JSONArray jsonArray = jsonObject.getJSONArray("content");
|
||||||
|
for (int i = 0; i < jsonArray.size(); i++) {
|
||||||
|
JSONObject arrayJSONObject = jsonArray.getJSONObject(i);
|
||||||
|
String produceorder_id = arrayJSONObject.getString("produceorder_id");
|
||||||
|
JSONArray resultJSONArray = wo.query("produceorder_id = '" + produceorder_id + "'", "operatetime_start desc").getResultJSONArray(0);
|
||||||
|
if (ObjectUtil.isNotEmpty(resultJSONArray)){
|
||||||
|
JSONObject resultJSONArrayJSONObject = resultJSONArray.getJSONObject(0);
|
||||||
|
String jockey_id = resultJSONArrayJSONObject.getString("jockey_id");
|
||||||
|
UserDto user = userService.findById(Long.valueOf(jockey_id));
|
||||||
|
String nick_name = "";
|
||||||
|
if (ObjectUtil.isNotEmpty(user)){
|
||||||
|
nick_name = user.getNickName();
|
||||||
|
}
|
||||||
|
arrayJSONObject.put("jockey_name",nick_name);
|
||||||
|
}
|
||||||
|
}
|
||||||
return jsonObject;
|
return jsonObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -118,6 +141,8 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService {
|
|||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void create(ProduceshiftorderDto dto) {
|
public void create(ProduceshiftorderDto dto) {
|
||||||
|
Integer orderNum = dto.getOrderNum();
|
||||||
|
for (Integer i = 0; i < orderNum; i++) {
|
||||||
Long currentUserId = SecurityUtils.getCurrentUserId();
|
Long currentUserId = SecurityUtils.getCurrentUserId();
|
||||||
String nickName = SecurityUtils.getNickName();
|
String nickName = SecurityUtils.getNickName();
|
||||||
String now = DateUtil.now();
|
String now = DateUtil.now();
|
||||||
@@ -141,6 +166,7 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService {
|
|||||||
json.put("syscompanyid", deptId);
|
json.put("syscompanyid", deptId);
|
||||||
wo.insert(json);
|
wo.insert(json);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
|||||||
@@ -63,9 +63,12 @@
|
|||||||
WorkProcedure.workprocedure_code,
|
WorkProcedure.workprocedure_code,
|
||||||
WorkProcedure.workprocedure_name,
|
WorkProcedure.workprocedure_name,
|
||||||
classstandard.class_id,
|
classstandard.class_id,
|
||||||
classstandard.class_name
|
classstandard.class_name,
|
||||||
|
device.device_code,
|
||||||
|
device.device_name
|
||||||
FROM
|
FROM
|
||||||
MPS_BD_ProduceShiftOrder ShiftOrder
|
MPS_BD_ProduceShiftOrder ShiftOrder
|
||||||
|
left join pdm_bi_device device on ShiftOrder.device_id = device.device_id
|
||||||
LEFT JOIN md_me_materialbase material ON material.material_id = ShiftOrder.material_id
|
LEFT JOIN md_me_materialbase material ON material.material_id = ShiftOrder.material_id
|
||||||
LEFT JOIN PDM_BI_WorkProcedure WorkProcedure ON WorkProcedure.workprocedure_id = ShiftOrder.workprocedure_id
|
LEFT JOIN PDM_BI_WorkProcedure WorkProcedure ON WorkProcedure.workprocedure_id = ShiftOrder.workprocedure_id
|
||||||
LEFT JOIN md_pb_classstandard classstandard ON classstandard.class_id = material.product_series
|
LEFT JOIN md_pb_classstandard classstandard ON classstandard.class_id = material.product_series
|
||||||
|
|||||||
@@ -119,6 +119,16 @@
|
|||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column prop="planproduceend_date" label="计划结束时间" align="center" width="250px">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="scope.row.planproduceend_date"
|
||||||
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
|
type="datetime"
|
||||||
|
style="width: 200px;"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column prop="sale_id" label="销售单标识" align="center" width="150px">
|
<el-table-column prop="sale_id" label="销售单标识" align="center" width="150px">
|
||||||
<template scope="scope">
|
<template scope="scope">
|
||||||
<el-input v-model="scope.row.sale_id"/>
|
<el-input v-model="scope.row.sale_id"/>
|
||||||
@@ -146,9 +156,14 @@
|
|||||||
</el-radio>
|
</el-radio>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column prop="orderNum" label="订单数量" align="center" width="150px">
|
||||||
|
<template scope="scope">
|
||||||
|
<el-input v-model="scope.row.orderNum" type="number" :min="1" oninput="value = value.replace(/[^\d]/g, '')" style="width: 200px;"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
<el-button type="text" @click="cancle">取消</el-button>
|
||||||
<el-button :loading="crud.cu === 2" type="primary" @click="submit">确认</el-button>
|
<el-button :loading="crud.cu === 2" type="primary" @click="submit">确认</el-button>
|
||||||
</div>
|
</div>
|
||||||
<MaterDtl
|
<MaterDtl
|
||||||
@@ -197,8 +212,12 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
cancle() {
|
||||||
|
this.$emit('update:dialogShow', false)
|
||||||
|
},
|
||||||
insertDtl() {
|
insertDtl() {
|
||||||
const date = this.dateFormatter(new Date())
|
const date = this.dateFormatter(new Date())
|
||||||
|
const formatter1 = this.dateFormatter1(new Date())
|
||||||
this.tableData.push({
|
this.tableData.push({
|
||||||
produceorder_id: '',
|
produceorder_id: '',
|
||||||
produceorder_code: '',
|
produceorder_code: '',
|
||||||
@@ -213,7 +232,7 @@ export default {
|
|||||||
material_code: '',
|
material_code: '',
|
||||||
material_weight: '',
|
material_weight: '',
|
||||||
planproducestart_date: date,
|
planproducestart_date: date,
|
||||||
planproduceend_date: '',
|
planproduceend_date: formatter1,
|
||||||
realproducestart_date: '',
|
realproducestart_date: '',
|
||||||
realproduceend_date: '',
|
realproduceend_date: '',
|
||||||
order_status: '00',
|
order_status: '00',
|
||||||
@@ -223,7 +242,8 @@ export default {
|
|||||||
device_id: '',
|
device_id: '',
|
||||||
is_canupdate_update: '1',
|
is_canupdate_update: '1',
|
||||||
material_spec: '',
|
material_spec: '',
|
||||||
sale_id: ''
|
sale_id: '',
|
||||||
|
orderNum: 1
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
open() {
|
open() {
|
||||||
@@ -256,12 +276,14 @@ export default {
|
|||||||
const year = d.getFullYear()
|
const year = d.getFullYear()
|
||||||
const month = (d.getMonth() + 1) < 10 ? '0' + (d.getMonth() + 1) : (d.getMonth() + 1)
|
const month = (d.getMonth() + 1) < 10 ? '0' + (d.getMonth() + 1) : (d.getMonth() + 1)
|
||||||
const day = d.getDate() < 10 ? '0' + d.getDate() : d.getDate()
|
const day = d.getDate() < 10 ? '0' + d.getDate() : d.getDate()
|
||||||
debugger
|
|
||||||
if (val === '02') {
|
if (val === '02') {
|
||||||
row.planproducestart_date = [year, month, day].join('-') + ' ' + ['18', '30', '00'].join(':')
|
row.planproducestart_date = [year, month, day].join('-') + ' ' + ['18', '30', '00'].join(':')
|
||||||
|
const day1 = d.getDate() < 10 ? '0' + (d.getDate() + 1) : d.getDate() + 1
|
||||||
|
row.planproduceend_date = [year, month, day1].join('-') + ' ' + ['07', '30', '00'].join(':')
|
||||||
}
|
}
|
||||||
if (val === '01') {
|
if (val === '01') {
|
||||||
row.planproducestart_date = [year, month, day].join('-') + ' ' + ['07', '30', '00'].join(':')
|
row.planproducestart_date = [year, month, day].join('-') + ' ' + ['07', '30', '00'].join(':')
|
||||||
|
row.planproduceend_date = [year, month, day].join('-') + ' ' + ['18', '30', '00'].join(':')
|
||||||
}
|
}
|
||||||
this.tableData.splice(index, 1, row)
|
this.tableData.splice(index, 1, row)
|
||||||
},
|
},
|
||||||
@@ -283,6 +305,13 @@ export default {
|
|||||||
const day = d.getDate() < 10 ? '0' + d.getDate() : d.getDate()
|
const day = d.getDate() < 10 ? '0' + d.getDate() : d.getDate()
|
||||||
return [year, month, day].join('-') + ' ' + ['07', '30', '00'].join(':')
|
return [year, month, day].join('-') + ' ' + ['07', '30', '00'].join(':')
|
||||||
},
|
},
|
||||||
|
dateFormatter1(str) {
|
||||||
|
const d = new Date(str)
|
||||||
|
const year = d.getFullYear()
|
||||||
|
const month = (d.getMonth() + 1) < 10 ? '0' + (d.getMonth() + 1) : (d.getMonth() + 1)
|
||||||
|
const day = d.getDate() < 10 ? '0' + d.getDate() : d.getDate()
|
||||||
|
return [year, month, day].join('-') + ' ' + ['18', '30', '00'].join(':')
|
||||||
|
},
|
||||||
deleteRow(index, rows) {
|
deleteRow(index, rows) {
|
||||||
rows.splice(index, 1)
|
rows.splice(index, 1)
|
||||||
},
|
},
|
||||||
@@ -312,6 +341,7 @@ export default {
|
|||||||
}
|
}
|
||||||
crudProduceshiftorder.addRows(this.tableData)
|
crudProduceshiftorder.addRows(this.tableData)
|
||||||
this.$emit('update:dialogShow', false)
|
this.$emit('update:dialogShow', false)
|
||||||
|
this.$emit('AddChanged')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -150,8 +150,8 @@
|
|||||||
type="success"
|
type="success"
|
||||||
icon="el-icon-position"
|
icon="el-icon-position"
|
||||||
size="mini"
|
size="mini"
|
||||||
:disabled="is_disabled(crud.selections.length,crud.selections[0])"
|
:disabled="is_disabled(crud.selections)"
|
||||||
@click="submits(crud.selections[0])"
|
@click="submits(crud.selections)"
|
||||||
>
|
>
|
||||||
下发
|
下发
|
||||||
</el-button>
|
</el-button>
|
||||||
@@ -265,6 +265,7 @@
|
|||||||
style="width: 200px"
|
style="width: 200px"
|
||||||
clearable
|
clearable
|
||||||
filterable
|
filterable
|
||||||
|
@change="change"
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
@@ -297,6 +298,10 @@
|
|||||||
>{{ item.label }}
|
>{{ item.label }}
|
||||||
</el-radio>
|
</el-radio>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="工单数量" prop="orderNum">
|
||||||
|
<el-input v-model="form.orderNum" type="number" :min="1" oninput="value = value.replace(/[^\d]/g, '')" style="width: 200px;" />
|
||||||
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
||||||
@@ -332,6 +337,9 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column v-if="false" prop="workprocedure_id" label="工序标识" />
|
<el-table-column v-if="false" prop="workprocedure_id" label="工序标识" />
|
||||||
<el-table-column prop="produce_date" label="生产日期" width="100px" />
|
<el-table-column prop="produce_date" label="生产日期" width="100px" />
|
||||||
|
<el-table-column prop="device_code" label="设备编码" />
|
||||||
|
<el-table-column prop="device_name" label="设备名称" />
|
||||||
|
<el-table-column prop="jockey_name" label="操作工" />
|
||||||
<el-table-column prop="plan_qty" label="计划数量" />
|
<el-table-column prop="plan_qty" label="计划数量" />
|
||||||
<el-table-column prop="real_qty" label="实际数量" />
|
<el-table-column prop="real_qty" label="实际数量" />
|
||||||
<el-table-column prop="report_qty" label="报工数量" />
|
<el-table-column prop="report_qty" label="报工数量" />
|
||||||
@@ -431,7 +439,8 @@ const defaultForm = {
|
|||||||
device_id: null,
|
device_id: null,
|
||||||
is_canupdate_update: '1',
|
is_canupdate_update: '1',
|
||||||
material_spec: null,
|
material_spec: null,
|
||||||
sale_id: null
|
sale_id: null,
|
||||||
|
orderNum: 1
|
||||||
}
|
}
|
||||||
export default {
|
export default {
|
||||||
name: 'Produceshiftorder',
|
name: 'Produceshiftorder',
|
||||||
@@ -485,9 +494,6 @@ export default {
|
|||||||
material_code: [
|
material_code: [
|
||||||
{ required: true, message: '物料编码不能为空', trigger: 'change' }
|
{ required: true, message: '物料编码不能为空', trigger: 'change' }
|
||||||
],
|
],
|
||||||
planproducestart_date: [
|
|
||||||
{required: true, message: '计划生产开始时间不能为空', trigger: 'blur'}
|
|
||||||
],
|
|
||||||
order_status: [
|
order_status: [
|
||||||
{ required: true, message: '工单状态不能为空', trigger: 'blur' }
|
{ required: true, message: '工单状态不能为空', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
@@ -497,6 +503,9 @@ export default {
|
|||||||
order_type_scode: [
|
order_type_scode: [
|
||||||
{ required: true, message: '工单类型不能为空', trigger: 'blur' }
|
{ required: true, message: '工单类型不能为空', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
|
orderNum: [
|
||||||
|
{ required: true, message: '生成工单数量不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
is_canupdate_update: [
|
is_canupdate_update: [
|
||||||
{ required: true, message: '不能为空', trigger: 'blur' }
|
{ required: true, message: '不能为空', trigger: 'blur' }
|
||||||
]
|
]
|
||||||
@@ -508,6 +517,42 @@ export default {
|
|||||||
this.initClass3()
|
this.initClass3()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
initDataPlan() {
|
||||||
|
const date = this.dateFormatter(new Date())
|
||||||
|
const formatter1 = this.dateFormatter1(new Date())
|
||||||
|
this.form.planproducestart_date = date
|
||||||
|
this.form.planproduceend_date = formatter1
|
||||||
|
this.form.produce_date = date
|
||||||
|
},
|
||||||
|
change(val) {
|
||||||
|
const d = new Date()
|
||||||
|
const year = d.getFullYear()
|
||||||
|
const month = (d.getMonth() + 1) < 10 ? '0' + (d.getMonth() + 1) : (d.getMonth() + 1)
|
||||||
|
const day = d.getDate() < 10 ? '0' + d.getDate() : d.getDate()
|
||||||
|
if (val === '02') {
|
||||||
|
this.form.planproducestart_date = [year, month, day].join('-') + ' ' + ['18', '30', '00'].join(':')
|
||||||
|
const day1 = d.getDate() < 10 ? '0' + (d.getDate() + 1) : d.getDate() + 1
|
||||||
|
this.form.planproduceend_date = [year, month, day1].join('-') + ' ' + ['07', '30', '00'].join(':')
|
||||||
|
}
|
||||||
|
if (val === '01') {
|
||||||
|
this.form.planproducestart_date = [year, month, day].join('-') + ' ' + ['07', '30', '00'].join(':')
|
||||||
|
this.form.planproduceend_date = [year, month, day].join('-') + ' ' + ['18', '30', '00'].join(':')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
dateFormatter(str) {
|
||||||
|
const d = new Date(str)
|
||||||
|
const year = d.getFullYear()
|
||||||
|
const month = (d.getMonth() + 1) < 10 ? '0' + (d.getMonth() + 1) : (d.getMonth() + 1)
|
||||||
|
const day = d.getDate() < 10 ? '0' + d.getDate() : d.getDate()
|
||||||
|
return [year, month, day].join('-') + ' ' + ['07', '30', '00'].join(':')
|
||||||
|
},
|
||||||
|
dateFormatter1(str) {
|
||||||
|
const d = new Date(str)
|
||||||
|
const year = d.getFullYear()
|
||||||
|
const month = (d.getMonth() + 1) < 10 ? '0' + (d.getMonth() + 1) : (d.getMonth() + 1)
|
||||||
|
const day = d.getDate() < 10 ? '0' + d.getDate() : d.getDate()
|
||||||
|
return [year, month, day].join('-') + ' ' + ['18', '30', '00'].join(':')
|
||||||
|
},
|
||||||
queryClassId() {
|
queryClassId() {
|
||||||
const param = {
|
const param = {
|
||||||
'class_idStr': this.class_idStr
|
'class_idStr': this.class_idStr
|
||||||
@@ -588,8 +633,18 @@ export default {
|
|||||||
return parseFloat(row[column.property]).toFixed(2)
|
return parseFloat(row[column.property]).toFixed(2)
|
||||||
},
|
},
|
||||||
// 下发按钮禁用条件
|
// 下发按钮禁用条件
|
||||||
is_disabled(len, row) {
|
is_disabled(rows) {
|
||||||
if (len === 1 && row.order_status === '00') {
|
var length = rows.length
|
||||||
|
if (length > 1) {
|
||||||
|
var flag = false
|
||||||
|
for (let i = 0; i < rows.length; i++) {
|
||||||
|
if (rows[i].order_status !== '00') {
|
||||||
|
flag = true
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return flag
|
||||||
|
} else if (length === 1 && rows[0].order_status === '00') {
|
||||||
return false
|
return false
|
||||||
} else {
|
} else {
|
||||||
return true
|
return true
|
||||||
@@ -609,17 +664,23 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 下发
|
// 下发
|
||||||
submits(row) {
|
submits(rows) {
|
||||||
crudProduceshiftorder.submits({produceorder_id: row.produceorder_id}).then(res => {
|
rows.forEach((item) => {
|
||||||
|
var produceorder_id = item.produceorder_id
|
||||||
|
crudProduceshiftorder.submits({ produceorder_id: produceorder_id }).then(res => {
|
||||||
|
})
|
||||||
|
})
|
||||||
this.crud.notify('下发成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
this.crud.notify('下发成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
this.crud.toQuery()
|
this.crud.toQuery()
|
||||||
})
|
|
||||||
},
|
},
|
||||||
add() {
|
add() {
|
||||||
this.addShow = true
|
this.addShow = true
|
||||||
},
|
},
|
||||||
copyAdd(data) {
|
copyAdd(data) {
|
||||||
this.crud.toCopy(data)
|
this.crud.toCopy(data)
|
||||||
|
},
|
||||||
|
[CRUD.HOOK.beforeToAdd]() {
|
||||||
|
this.initDataPlan()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -542,7 +542,7 @@ public class ItemProtocol {
|
|||||||
|
|
||||||
public static List<ItemDto> getReadableItemDtos() {
|
public static List<ItemDto> getReadableItemDtos() {
|
||||||
ArrayList list = new ArrayList();
|
ArrayList list = new ArrayList();
|
||||||
list.add(new ItemDto(item_heartbeat, "心跳", "DB1.D82"));
|
list.add(new ItemDto(item_heartbeat, "心跳", "DB1.W82"));
|
||||||
list.add(new ItemDto(item_mode, "手自动状态", "DB1.B0.0", Boolean.valueOf(true)));
|
list.add(new ItemDto(item_mode, "手自动状态", "DB1.B0.0", Boolean.valueOf(true)));
|
||||||
list.add(new ItemDto(item_matching_barcode, "开始条码匹配", "DB1.B1.0"));
|
list.add(new ItemDto(item_matching_barcode, "开始条码匹配", "DB1.B1.0"));
|
||||||
list.add(new ItemDto(item_move, "对接位有货", "DB1.B1.2"));
|
list.add(new ItemDto(item_move, "对接位有货", "DB1.B1.2"));
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ public class ItemProtocol {
|
|||||||
|
|
||||||
public static List<ItemDto> getReadableItemDtos() {
|
public static List<ItemDto> getReadableItemDtos() {
|
||||||
ArrayList list = new ArrayList();
|
ArrayList list = new ArrayList();
|
||||||
list.add(new ItemDto(item_heartbeat, "心跳", "DB1.D82"));
|
list.add(new ItemDto(item_heartbeat, "心跳", "DB1.W82"));
|
||||||
list.add(new ItemDto(item_move, "光电信号", "DB1.W22"));
|
list.add(new ItemDto(item_move, "光电信号", "DB1.W22"));
|
||||||
list.add(new ItemDto(item_mode, "模式", "DB1.B0.6"));
|
list.add(new ItemDto(item_mode, "模式", "DB1.B0.6"));
|
||||||
return list;
|
return list;
|
||||||
|
|||||||
@@ -319,7 +319,7 @@ public class HailiangEngravingMachineDeviceDriver extends AbstractOpcDeviceDrive
|
|||||||
|
|
||||||
synchronized (this){
|
synchronized (this){
|
||||||
long now_feedTime = System.currentTimeMillis();
|
long now_feedTime = System.currentTimeMillis();
|
||||||
if (now_feedTime - last_feedDeviceStatusTime >= 5000){
|
if (now_feedTime - last_feedDeviceStatusTime >= 3000){
|
||||||
heartbeat = this.itemProtocol.getItem_heartbeat();
|
heartbeat = this.itemProtocol.getItem_heartbeat();
|
||||||
if (heartbeat == last_heartbeat){
|
if (heartbeat == last_heartbeat){
|
||||||
status_type = 01;
|
status_type = 01;
|
||||||
|
|||||||
@@ -181,7 +181,7 @@ public class ItemProtocol {
|
|||||||
|
|
||||||
public static List<ItemDto> getReadableItemDtos() {
|
public static List<ItemDto> getReadableItemDtos() {
|
||||||
ArrayList list = new ArrayList();
|
ArrayList list = new ArrayList();
|
||||||
list.add(new ItemDto(item_heartbeat, "心跳", "DB1.D82"));
|
list.add(new ItemDto(item_heartbeat, "心跳", "DB1.W82"));
|
||||||
list.add(new ItemDto(item_status, "线体状态", "DB1.B0.0"));
|
list.add(new ItemDto(item_status, "线体状态", "DB1.B0.0"));
|
||||||
list.add(new ItemDto(item_is_open, "线体开机状态", "DB1.B0.1"));
|
list.add(new ItemDto(item_is_open, "线体开机状态", "DB1.B0.1"));
|
||||||
list.add(new ItemDto(item_is_running, "刻字机运行状态", "DB1.B0.3"));
|
list.add(new ItemDto(item_is_running, "刻字机运行状态", "DB1.B0.3"));
|
||||||
|
|||||||
@@ -263,7 +263,7 @@ public class HailiangPackerStationDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
|
|
||||||
synchronized (this){
|
synchronized (this){
|
||||||
long now_feedTime = System.currentTimeMillis();
|
long now_feedTime = System.currentTimeMillis();
|
||||||
if (now_feedTime - last_feedDeviceStatusTime >= 5000){
|
if (now_feedTime - last_feedDeviceStatusTime >= 3000){
|
||||||
heartbeat = this.itemProtocol.getItem_heartbeat();
|
heartbeat = this.itemProtocol.getItem_heartbeat();
|
||||||
if (heartbeat == last_heartbeat){
|
if (heartbeat == last_heartbeat){
|
||||||
status_type = 01;
|
status_type = 01;
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ public class ItemProtocol {
|
|||||||
|
|
||||||
public static List<ItemDto> getReadableItemDtos() {
|
public static List<ItemDto> getReadableItemDtos() {
|
||||||
ArrayList list = new ArrayList();
|
ArrayList list = new ArrayList();
|
||||||
list.add(new ItemDto(item_heartbeat, "心跳", "DB1.D82"));
|
list.add(new ItemDto(item_heartbeat, "心跳", "DB1.W82"));
|
||||||
list.add(new ItemDto(item_packer_ready, "包装机就绪", "DB1.B0.5"));
|
list.add(new ItemDto(item_packer_ready, "包装机就绪", "DB1.B0.5"));
|
||||||
list.add(new ItemDto(item_mode, "模式", "DB1.B0.6"));
|
list.add(new ItemDto(item_mode, "模式", "DB1.B0.6"));
|
||||||
list.add(new ItemDto(item_move, "光电信号", "DB1.B1.0"));
|
list.add(new ItemDto(item_move, "光电信号", "DB1.B1.0"));
|
||||||
|
|||||||
@@ -353,7 +353,7 @@ public class HailiangSpecialDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
}
|
}
|
||||||
synchronized (this){
|
synchronized (this){
|
||||||
long now_feedTime = System.currentTimeMillis();
|
long now_feedTime = System.currentTimeMillis();
|
||||||
if (now_feedTime - last_feedDeviceStatusTime >= 5000){
|
if (now_feedTime - last_feedDeviceStatusTime >= 3000){
|
||||||
heartbeat = this.itemProtocol.getHeartbeat();
|
heartbeat = this.itemProtocol.getHeartbeat();
|
||||||
if (heartbeat == last_heartbeat){
|
if (heartbeat == last_heartbeat){
|
||||||
status_type = 01;
|
status_type = 01;
|
||||||
|
|||||||
@@ -212,7 +212,7 @@ public class ItemProtocol {
|
|||||||
|
|
||||||
public static List<ItemDto> getReadableItemDtos() {
|
public static List<ItemDto> getReadableItemDtos() {
|
||||||
ArrayList list = new ArrayList();
|
ArrayList list = new ArrayList();
|
||||||
list.add(new ItemDto(item_heartbeat, "心跳", "DB1.D82"));
|
list.add(new ItemDto(item_heartbeat, "心跳", "DB1.W82"));
|
||||||
list.add(new ItemDto(item_mode, "手自动状态", "DB1.B1.7", Boolean.valueOf(true)));
|
list.add(new ItemDto(item_mode, "手自动状态", "DB1.B1.7", Boolean.valueOf(true)));
|
||||||
list.add(new ItemDto(item_is_open, "线体是否启动", "DB1.B0.1"));
|
list.add(new ItemDto(item_is_open, "线体是否启动", "DB1.B0.1"));
|
||||||
list.add(new ItemDto(item_running, "是否运行", "DB1.B0.6"));
|
list.add(new ItemDto(item_running, "是否运行", "DB1.B0.6"));
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ public class ItemProtocol {
|
|||||||
|
|
||||||
public static List<ItemDto> getReadableItemDtos() {
|
public static List<ItemDto> getReadableItemDtos() {
|
||||||
ArrayList list = new ArrayList();
|
ArrayList list = new ArrayList();
|
||||||
list.add(new ItemDto(item_heartbeat, "心跳", "DB1.D82"));
|
list.add(new ItemDto(item_heartbeat, "心跳", "DB1.W82"));
|
||||||
list.add(new ItemDto(item_mode, "是否启动", "DB1.B0.1"));
|
list.add(new ItemDto(item_mode, "是否启动", "DB1.B0.1"));
|
||||||
list.add(new ItemDto(item_status, "手自动状态", "DB1.B0.0", Boolean.valueOf(true)));
|
list.add(new ItemDto(item_status, "手自动状态", "DB1.B0.0", Boolean.valueOf(true)));
|
||||||
list.add(new ItemDto(item_move, "光电开关信号(取反)", "DB1.B0.5"));
|
list.add(new ItemDto(item_move, "光电开关信号(取反)", "DB1.B0.5"));
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ public class ItemProtocol {
|
|||||||
|
|
||||||
public static List<ItemDto> getReadableItemDtos() {
|
public static List<ItemDto> getReadableItemDtos() {
|
||||||
ArrayList list = new ArrayList();
|
ArrayList list = new ArrayList();
|
||||||
list.add(new ItemDto(item_heartbeat, "心跳", "DB1.D82"));
|
list.add(new ItemDto(item_heartbeat, "心跳", "DB1.W82"));
|
||||||
list.add(new ItemDto(item_mode, "是否启动", "DB1.B0.1"));
|
list.add(new ItemDto(item_mode, "是否启动", "DB1.B0.1"));
|
||||||
list.add(new ItemDto(item_move, "光电开关信号", "DB1.B1.0"));
|
list.add(new ItemDto(item_move, "光电开关信号", "DB1.B1.0"));
|
||||||
list.add(new ItemDto(item_status, "手自动状态", "DB1.B0.0", Boolean.valueOf(true)));
|
list.add(new ItemDto(item_status, "手自动状态", "DB1.B0.0", Boolean.valueOf(true)));
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ public class ItemProtocol {
|
|||||||
|
|
||||||
public static List<ItemDto> getReadableItemDtos() {
|
public static List<ItemDto> getReadableItemDtos() {
|
||||||
ArrayList list = new ArrayList();
|
ArrayList list = new ArrayList();
|
||||||
list.add(new ItemDto(item_heartbeat, "心跳", "DB1.D82"));
|
list.add(new ItemDto(item_heartbeat, "心跳", "DB1.W82"));
|
||||||
list.add(new ItemDto(item_mode, "是否启动", "DB1.B0.1"));
|
list.add(new ItemDto(item_mode, "是否启动", "DB1.B0.1"));
|
||||||
list.add(new ItemDto(item_status, "手自动状态", "DB1.B0.0", Boolean.valueOf(true)));
|
list.add(new ItemDto(item_status, "手自动状态", "DB1.B0.0", Boolean.valueOf(true)));
|
||||||
list.add(new ItemDto(item_finish, "是否完成", "DB1.B0.7"));
|
list.add(new ItemDto(item_finish, "是否完成", "DB1.B0.7"));
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ public class ItemProtocol {
|
|||||||
|
|
||||||
public static List<ItemDto> getReadableItemDtos() {
|
public static List<ItemDto> getReadableItemDtos() {
|
||||||
ArrayList list = new ArrayList();
|
ArrayList list = new ArrayList();
|
||||||
list.add(new ItemDto(item_heartbeat, "心跳", "DB1.D82"));
|
list.add(new ItemDto(item_heartbeat, "心跳", "DB1.W82"));
|
||||||
list.add(new ItemDto(item_mode, "是否启动", "DB1.B0.1"));
|
list.add(new ItemDto(item_mode, "是否启动", "DB1.B0.1"));
|
||||||
list.add(new ItemDto(item_status, "手自动状态", "DB1.B0.0", Boolean.valueOf(true)));
|
list.add(new ItemDto(item_status, "手自动状态", "DB1.B0.0", Boolean.valueOf(true)));
|
||||||
list.add(new ItemDto(item_running, "是否运行", "DB1.B0.6"));
|
list.add(new ItemDto(item_running, "是否运行", "DB1.B0.6"));
|
||||||
|
|||||||
Reference in New Issue
Block a user