rev:刻字上料输送线任务顺序
This commit is contained in:
@@ -180,7 +180,7 @@ public class PdaWashController {
|
||||
LIMIT_WEIGHT = Double.valueOf(one.getValue());
|
||||
}
|
||||
if (sum>LIMIT_WEIGHT){
|
||||
throw new BadRequestException("选择的储料仓必物料总重量大于"+LIMIT_WEIGHT+"公斤");
|
||||
throw new BadRequestException("选择的储料仓物料总重量大于"+LIMIT_WEIGHT+"公斤");
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
package org.nl.wms.product_manage.controller.workprocedure;
|
||||
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.common.TableDataInfo;
|
||||
@@ -21,7 +19,6 @@ import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -76,8 +73,8 @@ public class PdmBiWorkprocedureController {
|
||||
@GetMapping("/downSelect")
|
||||
@Log("查询工序下拉列表")
|
||||
//("查询工序下拉列表")
|
||||
public ResponseEntity<Object> downSelect() {
|
||||
return new ResponseEntity<>(pdmBiWorkprocedureService.downSelect(), HttpStatus.OK);
|
||||
public ResponseEntity<Object> downSelect(String product_area) {
|
||||
return new ResponseEntity<>(pdmBiWorkprocedureService.downSelect(product_area), HttpStatus.OK);
|
||||
}
|
||||
@GetMapping("/queryWorkprocedure")
|
||||
@Log("查询生产工序")//仓储/清洗
|
||||
|
||||
@@ -17,8 +17,9 @@ public interface IPdmBiWorkprocedureService extends IService<PdmBiWorkprocedure>
|
||||
/**
|
||||
* 查询工序
|
||||
* @return
|
||||
* @param product_area
|
||||
*/
|
||||
JSONArray downSelect();
|
||||
JSONArray downSelect(String product_area);
|
||||
|
||||
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.util.IdUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
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 {
|
||||
|
||||
@Override
|
||||
public JSONArray downSelect() {
|
||||
List list = this.list(new QueryWrapper<PdmBiWorkprocedure>().eq("is_used", true).orderByDesc("workprocedure_code"));
|
||||
public JSONArray downSelect(String product_area) {
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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_weight_array = {"0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"};
|
||||
int i=0;
|
||||
for (Map.Entry<String, String> entry : qtyArr.entrySet()) {
|
||||
to_sort_array[i] = String.valueOf(i+1);
|
||||
to_devices_array[i] = String.valueOf(entry.getKey());
|
||||
to_weight_array[i] = String.valueOf(new BigDecimal(entry.getValue()).intValue());
|
||||
i++;
|
||||
List<String> sort = qtyArr.keySet().stream().sorted(Comparator.comparingInt(key -> Integer.valueOf(key.substring(key.lastIndexOf("_") + 1)))).collect(Collectors.toList());
|
||||
for (int i1 = 0; i1 < sort.size(); i1++) {
|
||||
String key = sort.get(i1);
|
||||
to_sort_array[i] = String.valueOf(i1+1);
|
||||
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_devices_array",Arrays.stream(to_devices_array).collect(Collectors.joining(",")));
|
||||
@@ -120,6 +121,14 @@ public class EngraveTranSportTask extends AbstractAcsTask {
|
||||
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) {
|
||||
SchBaseTask baseTask = new SchBaseTask();
|
||||
baseTask.setMaterial_id(material.getMaterial_id());
|
||||
|
||||
@@ -24,9 +24,11 @@ export function edit(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export function downSelect() {
|
||||
export function downSelect(params) {
|
||||
return request({
|
||||
url: 'api/workProcedure/downSelect'
|
||||
url: 'api/workProcedure/downSelect',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -256,6 +256,7 @@
|
||||
v-model="form.product_area"
|
||||
placeholder=""
|
||||
style="width: 200px"
|
||||
@change="getworkprocedureByarea(form.product_area)"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.product_area"
|
||||
@@ -275,7 +276,7 @@
|
||||
@change="getNotWorkDeviceByWorkproceduceId(form.workprocedure_id)"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in workprocedureList"
|
||||
v-for="item in workprocedureListArea"
|
||||
:key="item.workprocedure_id"
|
||||
:label="item.workprocedure_name"
|
||||
:value="item.workprocedure_id"
|
||||
@@ -288,6 +289,7 @@
|
||||
clearable
|
||||
class="filter-item"
|
||||
style="width: 200px;"
|
||||
@change="changeEvent1(form.device_code)"
|
||||
>
|
||||
<el-option
|
||||
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-select>
|
||||
</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-radio
|
||||
v-for="item in dict.IS_OR_NOT"
|
||||
@@ -418,7 +412,17 @@
|
||||
>{{ item.label }}
|
||||
</el-radio>
|
||||
</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
|
||||
v-model="form.package_ext.auto_confirm"
|
||||
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-select>
|
||||
</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
|
||||
v-model="form.package_ext.time"
|
||||
style="width: 200px;"
|
||||
@@ -690,9 +694,10 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
workprocedureList: [],
|
||||
workprocedureListArea: [],
|
||||
zxj: [{ value: 'A1_ZXJ_1', label: '一线1号装箱机' }, { value: 'A1_ZXJ_2', label: '一线2号装箱机' }],
|
||||
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: '否' }],
|
||||
deviceList: [],
|
||||
classes3: [],
|
||||
@@ -748,6 +753,23 @@ export default {
|
||||
methods: {
|
||||
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) {
|
||||
var ret = ''
|
||||
@@ -960,10 +982,16 @@ export default {
|
||||
},
|
||||
getworkprocedure() {
|
||||
// 查询工序
|
||||
crudWorkProcedure.downSelect({}).then(res => {
|
||||
crudWorkProcedure.downSelect().then(res => {
|
||||
this.workprocedureList = res
|
||||
})
|
||||
},
|
||||
getworkprocedureByarea(area) {
|
||||
const params = { product_area: area }
|
||||
crudWorkProcedure.downSelect(params).then(res => {
|
||||
this.workprocedureListArea = res
|
||||
})
|
||||
},
|
||||
// 下发
|
||||
submits(rows) {
|
||||
var orders = []
|
||||
|
||||
Reference in New Issue
Block a user