rev:刻字上料输送线任务顺序
This commit is contained in:
@@ -180,7 +180,7 @@ public class PdaWashController {
|
|||||||
LIMIT_WEIGHT = Double.valueOf(one.getValue());
|
LIMIT_WEIGHT = Double.valueOf(one.getValue());
|
||||||
}
|
}
|
||||||
if (sum>LIMIT_WEIGHT){
|
if (sum>LIMIT_WEIGHT){
|
||||||
throw new BadRequestException("选择的储料仓必物料总重量大于"+LIMIT_WEIGHT+"公斤");
|
throw new BadRequestException("选择的储料仓物料总重量大于"+LIMIT_WEIGHT+"公斤");
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,9 @@
|
|||||||
package org.nl.wms.product_manage.controller.workprocedure;
|
package org.nl.wms.product_manage.controller.workprocedure;
|
||||||
|
|
||||||
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.nl.common.TableDataInfo;
|
import org.nl.common.TableDataInfo;
|
||||||
@@ -21,7 +19,6 @@ import org.springframework.web.bind.annotation.*;
|
|||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@@ -76,8 +73,8 @@ public class PdmBiWorkprocedureController {
|
|||||||
@GetMapping("/downSelect")
|
@GetMapping("/downSelect")
|
||||||
@Log("查询工序下拉列表")
|
@Log("查询工序下拉列表")
|
||||||
//("查询工序下拉列表")
|
//("查询工序下拉列表")
|
||||||
public ResponseEntity<Object> downSelect() {
|
public ResponseEntity<Object> downSelect(String product_area) {
|
||||||
return new ResponseEntity<>(pdmBiWorkprocedureService.downSelect(), HttpStatus.OK);
|
return new ResponseEntity<>(pdmBiWorkprocedureService.downSelect(product_area), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
@GetMapping("/queryWorkprocedure")
|
@GetMapping("/queryWorkprocedure")
|
||||||
@Log("查询生产工序")//仓储/清洗
|
@Log("查询生产工序")//仓储/清洗
|
||||||
|
|||||||
@@ -17,8 +17,9 @@ public interface IPdmBiWorkprocedureService extends IService<PdmBiWorkprocedure>
|
|||||||
/**
|
/**
|
||||||
* 查询工序
|
* 查询工序
|
||||||
* @return
|
* @return
|
||||||
|
* @param product_area
|
||||||
*/
|
*/
|
||||||
JSONArray downSelect();
|
JSONArray downSelect(String product_area);
|
||||||
|
|
||||||
void create(JSONObject form);
|
void create(JSONObject form);
|
||||||
|
|
||||||
|
|||||||
@@ -2,13 +2,12 @@ package org.nl.wms.product_manage.service.workprocedure.impl;
|
|||||||
|
|
||||||
|
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.util.IdUtil;
|
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import com.alibaba.fastjson.JSON;
|
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.nl.common.utils.SecurityUtils;
|
import org.nl.common.utils.SecurityUtils;
|
||||||
import org.nl.modules.common.exception.BadRequestException;
|
import org.nl.modules.common.exception.BadRequestException;
|
||||||
import org.nl.wms.product_manage.service.workprocedure.IPdmBiWorkprocedureService;
|
import org.nl.wms.product_manage.service.workprocedure.IPdmBiWorkprocedureService;
|
||||||
@@ -30,8 +29,13 @@ import java.util.List;
|
|||||||
public class PdmBiWorkprocedureServiceImpl extends ServiceImpl<PdmBiWorkprocedureMapper, PdmBiWorkprocedure> implements IPdmBiWorkprocedureService {
|
public class PdmBiWorkprocedureServiceImpl extends ServiceImpl<PdmBiWorkprocedureMapper, PdmBiWorkprocedure> implements IPdmBiWorkprocedureService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JSONArray downSelect() {
|
public JSONArray downSelect(String product_area) {
|
||||||
List list = this.list(new QueryWrapper<PdmBiWorkprocedure>().eq("is_used", true).orderByDesc("workprocedure_code"));
|
QueryWrapper<PdmBiWorkprocedure> wrapper = new QueryWrapper<>();
|
||||||
|
if (!StringUtils.isEmpty(product_area)){
|
||||||
|
wrapper.eq("product_area",product_area);
|
||||||
|
}
|
||||||
|
wrapper.eq("is_used", true).orderByDesc("workprocedure_code");
|
||||||
|
List list = this.list(wrapper);
|
||||||
return new JSONArray(list);
|
return new JSONArray(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -95,11 +95,12 @@ public class EngraveTranSportTask extends AbstractAcsTask {
|
|||||||
String[] to_devices_array = {"0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"};
|
String[] to_devices_array = {"0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"};
|
||||||
String[] to_weight_array = {"0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"};
|
String[] to_weight_array = {"0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"};
|
||||||
int i=0;
|
int i=0;
|
||||||
for (Map.Entry<String, String> entry : qtyArr.entrySet()) {
|
List<String> sort = qtyArr.keySet().stream().sorted(Comparator.comparingInt(key -> Integer.valueOf(key.substring(key.lastIndexOf("_") + 1)))).collect(Collectors.toList());
|
||||||
to_sort_array[i] = String.valueOf(i+1);
|
for (int i1 = 0; i1 < sort.size(); i1++) {
|
||||||
to_devices_array[i] = String.valueOf(entry.getKey());
|
String key = sort.get(i1);
|
||||||
to_weight_array[i] = String.valueOf(new BigDecimal(entry.getValue()).intValue());
|
to_sort_array[i] = String.valueOf(i1+1);
|
||||||
i++;
|
to_devices_array[i] = String.valueOf(key);
|
||||||
|
to_weight_array[i] = String.valueOf(new BigDecimal(qtyArr.get(key)));
|
||||||
}
|
}
|
||||||
jo.put("to_sort_array", Arrays.stream(to_sort_array).collect(Collectors.joining(",")));
|
jo.put("to_sort_array", Arrays.stream(to_sort_array).collect(Collectors.joining(",")));
|
||||||
jo.put("to_devices_array",Arrays.stream(to_devices_array).collect(Collectors.joining(",")));
|
jo.put("to_devices_array",Arrays.stream(to_devices_array).collect(Collectors.joining(",")));
|
||||||
@@ -120,6 +121,14 @@ public class EngraveTranSportTask extends AbstractAcsTask {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
String a="{\"A1_KZ_14\":\"10000\",\"A1_KZ_07\":\"110000\",\"A1_KZ_11\":\"110000\",\"A1_KZ_03\":\"110000\"}";
|
||||||
|
Map<String,String> map = JSONObject.parseObject(a, Map.class);
|
||||||
|
Set<String> set = map.keySet();
|
||||||
|
List<String> collect = set.stream().sorted(Comparator.comparingInt(key -> Integer.valueOf(key.substring(key.lastIndexOf("_") + 1)))).collect(Collectors.toList());
|
||||||
|
System.out.println(collect.toString());
|
||||||
|
}
|
||||||
|
|
||||||
private SchBaseTask packageTask(Integer canuse_qty, MdMeMaterialbase material, Map<String,String> taskMap) {
|
private SchBaseTask packageTask(Integer canuse_qty, MdMeMaterialbase material, Map<String,String> taskMap) {
|
||||||
SchBaseTask baseTask = new SchBaseTask();
|
SchBaseTask baseTask = new SchBaseTask();
|
||||||
baseTask.setMaterial_id(material.getMaterial_id());
|
baseTask.setMaterial_id(material.getMaterial_id());
|
||||||
|
|||||||
@@ -24,9 +24,11 @@ export function edit(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function downSelect() {
|
export function downSelect(params) {
|
||||||
return request({
|
return request({
|
||||||
url: 'api/workProcedure/downSelect'
|
url: 'api/workProcedure/downSelect',
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -256,6 +256,7 @@
|
|||||||
v-model="form.product_area"
|
v-model="form.product_area"
|
||||||
placeholder=""
|
placeholder=""
|
||||||
style="width: 200px"
|
style="width: 200px"
|
||||||
|
@change="getworkprocedureByarea(form.product_area)"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in dict.product_area"
|
v-for="item in dict.product_area"
|
||||||
@@ -275,7 +276,7 @@
|
|||||||
@change="getNotWorkDeviceByWorkproceduceId(form.workprocedure_id)"
|
@change="getNotWorkDeviceByWorkproceduceId(form.workprocedure_id)"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in workprocedureList"
|
v-for="item in workprocedureListArea"
|
||||||
:key="item.workprocedure_id"
|
:key="item.workprocedure_id"
|
||||||
:label="item.workprocedure_name"
|
:label="item.workprocedure_name"
|
||||||
:value="item.workprocedure_id"
|
:value="item.workprocedure_id"
|
||||||
@@ -288,6 +289,7 @@
|
|||||||
clearable
|
clearable
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
style="width: 200px;"
|
style="width: 200px;"
|
||||||
|
@change="changeEvent1(form.device_code)"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in deviceList"
|
v-for="item in deviceList"
|
||||||
@@ -401,14 +403,6 @@
|
|||||||
<el-option v-for="item in cxj" :key="item.value" :label="item.label" :value="item.value" />
|
<el-option v-for="item in cxj" :key="item.value" :label="item.label" :value="item.value" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="form.workprocedure_id == '1535144822984282112'" label="装箱机" prop="ealing_device_code">
|
|
||||||
<el-select
|
|
||||||
v-model="form.package_ext.ealing_device_code"
|
|
||||||
style="width: 200px"
|
|
||||||
>
|
|
||||||
<el-option v-for="item in zxj" :key="item.value" :label="item.label" :value="item.value" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item v-if="form.workprocedure_id == '1535144822984282112'" label="拆箱输送正转" prop="is_foreward">
|
<el-form-item v-if="form.workprocedure_id == '1535144822984282112'" label="拆箱输送正转" prop="is_foreward">
|
||||||
<el-radio
|
<el-radio
|
||||||
v-for="item in dict.IS_OR_NOT"
|
v-for="item in dict.IS_OR_NOT"
|
||||||
@@ -418,7 +412,17 @@
|
|||||||
>{{ item.label }}
|
>{{ item.label }}
|
||||||
</el-radio>
|
</el-radio>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="form.workprocedure_id == '1535144822984282112'" label="封箱机自动确认" prop="auto_confirm">
|
|
||||||
|
<el-form-item v-if="form.workprocedure_id == '1535144822984282112'" disabled label="装箱机" prop="ealing_device_code">
|
||||||
|
<el-select
|
||||||
|
disabled
|
||||||
|
v-model="form.package_ext.ealing_device_code"
|
||||||
|
style="width: 200px"
|
||||||
|
>
|
||||||
|
<el-option v-for="item in zxj" :key="item.value" :label="item.label" :value="item.value" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="form.workprocedure_id == '1535144822984282112'" label="装箱机确认" prop="auto_confirm">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.package_ext.auto_confirm"
|
v-model="form.package_ext.auto_confirm"
|
||||||
style="width: 200px"
|
style="width: 200px"
|
||||||
@@ -426,7 +430,7 @@
|
|||||||
<el-option v-for="item in auto_confirm" :key="item.value" :label="item.label" :value="item.value" />
|
<el-option v-for="item in auto_confirm" :key="item.value" :label="item.label" :value="item.value" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="form.workprocedure_id == '1535144822984282112'" label="封箱机确认时间" prop="time">
|
<el-form-item v-if="form.workprocedure_id == '1535144822984282112'" label="装箱机确认时间" prop="time">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-model="form.package_ext.time"
|
v-model="form.package_ext.time"
|
||||||
style="width: 200px;"
|
style="width: 200px;"
|
||||||
@@ -690,9 +694,10 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
workprocedureList: [],
|
workprocedureList: [],
|
||||||
|
workprocedureListArea: [],
|
||||||
zxj: [{ value: 'A1_ZXJ_1', label: '一线1号装箱机' }, { value: 'A1_ZXJ_2', label: '一线2号装箱机' }],
|
zxj: [{ value: 'A1_ZXJ_1', label: '一线1号装箱机' }, { value: 'A1_ZXJ_2', label: '一线2号装箱机' }],
|
||||||
auto_confirm: [{ value: '1', label: '自动确认' }, { value: '2', label: '定时确认' }, { value: '3', label: '人工确认' }],
|
auto_confirm: [{ value: '1', label: '自动确认' }, { value: '2', label: '定时确认' }, { value: '3', label: '人工确认' }],
|
||||||
cxj: [{ value: 'A1_KXJ_1', label: '一线1号拆箱机' }, { value: 'A1_KXJ_1', label: '一线2号拆箱机' }],
|
cxj: [{ value: 'A1_KXJ_1', label: '一线1号拆箱机' }, { value: 'A1_KXJ_2', label: '一线2号拆箱机' }],
|
||||||
trueorfalse: [{ value: true, label: '是' }, { value: false, label: '否' }],
|
trueorfalse: [{ value: true, label: '是' }, { value: false, label: '否' }],
|
||||||
deviceList: [],
|
deviceList: [],
|
||||||
classes3: [],
|
classes3: [],
|
||||||
@@ -748,6 +753,23 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
databaseUploadApi() {
|
databaseUploadApi() {
|
||||||
|
|
||||||
|
},
|
||||||
|
changeEvent1(device){
|
||||||
|
if (device=='A1_BZJ_1'){
|
||||||
|
this.form.package_ext.ealing_device_code = 'A1_ZXJ_1'
|
||||||
|
}
|
||||||
|
if (device=='A1_BZJ_2'){
|
||||||
|
this.form.package_ext.ealing_device_code = 'A1_ZXJ_2'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
changeEvent2(form){
|
||||||
|
if ((form.device_code=='A1_BZJ_1') && (form.package_ext.unboxing_device_code == 'A1_KXJ_1')){
|
||||||
|
this.form.package_ext.is_foreward = '1'
|
||||||
|
}
|
||||||
|
if ((form.device_code=='A1_BZJ_2') && (form.package_ext.unboxing_device_code == 'A1_KXJ_2')){
|
||||||
|
this.form.package_ext.is_foreward = '1'
|
||||||
|
}
|
||||||
|
this.form.package_ext.is_foreward = '0'
|
||||||
},
|
},
|
||||||
formatBoolean: function(row, column) {
|
formatBoolean: function(row, column) {
|
||||||
var ret = ''
|
var ret = ''
|
||||||
@@ -960,10 +982,16 @@ export default {
|
|||||||
},
|
},
|
||||||
getworkprocedure() {
|
getworkprocedure() {
|
||||||
// 查询工序
|
// 查询工序
|
||||||
crudWorkProcedure.downSelect({}).then(res => {
|
crudWorkProcedure.downSelect().then(res => {
|
||||||
this.workprocedureList = res
|
this.workprocedureList = res
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
getworkprocedureByarea(area) {
|
||||||
|
const params = { product_area: area }
|
||||||
|
crudWorkProcedure.downSelect(params).then(res => {
|
||||||
|
this.workprocedureListArea = res
|
||||||
|
})
|
||||||
|
},
|
||||||
// 下发
|
// 下发
|
||||||
submits(rows) {
|
submits(rows) {
|
||||||
var orders = []
|
var orders = []
|
||||||
|
|||||||
Reference in New Issue
Block a user