任务优先级,条码新增重量

This commit is contained in:
lyd
2022-11-11 15:14:04 +08:00
parent 0489f65328
commit ddf03aaa0b
7 changed files with 52 additions and 27 deletions

View File

@@ -181,12 +181,6 @@ class MaterialLabelServiceImpl implements MaterialLabelService {
jsonObject.put("is_active", is_active); jsonObject.put("is_active", is_active);
WQLObject.getWQLObject("md_base_materialLabelMst").update(jsonObject); WQLObject.getWQLObject("md_base_materialLabelMst").update(jsonObject);
} }
public static void main(String[] args) {
String nowDate = DateUtil.format(new Date(), "yyMMddHHmm");
System.out.println(nowDate);
}
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public JSONObject print(JSONObject jsonMst) { public JSONObject print(JSONObject jsonMst) {
@@ -205,6 +199,7 @@ class MaterialLabelServiceImpl implements MaterialLabelService {
jsonDtl.put("labeldtl_uuid", IdUtil.simpleUUID()); jsonDtl.put("labeldtl_uuid", IdUtil.simpleUUID());
jsonDtl.put("label_code", label_code); jsonDtl.put("label_code", label_code);
jsonDtl.put("order_seq", order_seq); jsonDtl.put("order_seq", order_seq);
jsonDtl.put("weight", jsonMst.optString("weight"));
jsonDtl.put("remark", ""); jsonDtl.put("remark", "");
jsonDtl.put("print_by", SecurityUtils.getCurrentUsername()); jsonDtl.put("print_by", SecurityUtils.getCurrentUsername());
jsonDtl.put("print_time", now); jsonDtl.put("print_time", now);

View File

@@ -8,6 +8,8 @@ import net.sf.json.JSONObject;
import org.nl.exception.BadRequestException; import org.nl.exception.BadRequestException;
import org.nl.modules.system.service.impl.ParamServiceImpl; import org.nl.modules.system.service.impl.ParamServiceImpl;
import org.nl.utils.SpringContextHolder; import org.nl.utils.SpringContextHolder;
import org.nl.wql.WQL;
import org.nl.wql.core.bean.WQLObject;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
/** /**
@@ -24,7 +26,12 @@ public class AcsUtil {
result.put("data", new JSONObject()); result.put("data", new JSONObject());
return result; return result;
} }
// 加优先级 list
for (int i = 0; i < list.size(); i++) {
JSONObject object = list.getJSONObject(i);
String value = SpringContextHolder.getBean(ParamServiceImpl.class).findByCode(object.getString("task_type")).getValue();
object.put("priority", value);
}
//ACS地址127.0.0.1:8010 //ACS地址127.0.0.1:8010
String acsUrl = SpringContextHolder.getBean(ParamServiceImpl.class).findByCode("ACS_URL").getValue(); String acsUrl = SpringContextHolder.getBean(ParamServiceImpl.class).findByCode("ACS_URL").getValue();

View File

@@ -54,7 +54,7 @@ public abstract class AbstractAcsTask {
AcsTaskDto taskDto = new AcsTaskDto(); AcsTaskDto taskDto = new AcsTaskDto();
taskDto.setTask_uuid(json.optString("task_uuid")); taskDto.setTask_uuid(json.optString("task_uuid"));
taskDto.setTask_code(json.optString("task_code")); taskDto.setTask_code(json.optString("task_code"));
taskDto.setTask_type(""); taskDto.setTask_type(task_type);
taskDto.setPriority(priority); taskDto.setPriority(priority);
taskDto.setStart_device_code(json.optString("start_point_code")); taskDto.setStart_device_code(json.optString("start_point_code"));
taskDto.setNext_device_code(json.optString("next_point_code")); taskDto.setNext_device_code(json.optString("next_point_code"));

View File

@@ -25,7 +25,7 @@ export default {
}, },
data() { data() {
return { return {
title: 'NLADMIN-后台管理', title: '诺力WMS系统',
logo: Logo logo: Logo
} }
} }

View File

@@ -26,7 +26,7 @@ module.exports = {
/** /**
* @description token key * @description token key
*/ */
TokenKey: 'EL-ADMIN-TOEKN', TokenKey: 'NL-CHENHOU-TOEKN',
/** /**
* @description 请求超时时间毫秒默认2分钟 * @description 请求超时时间毫秒默认2分钟
*/ */

View File

@@ -2,7 +2,7 @@
<div class="login" :style="'background-image:url('+ Background +');'"> <div class="login" :style="'background-image:url('+ Background +');'">
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" label-position="left" label-width="0px" class="login-form"> <el-form ref="loginForm" :model="loginForm" :rules="loginRules" label-position="left" label-width="0px" class="login-form">
<h3 class="title"> <h3 class="title">
NL-ADMIN 后台管理系统 诺力WMS系统
</h3> </h3>
<el-form-item prop="username"> <el-form-item prop="username">
<el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号"> <el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号">

View File

@@ -102,6 +102,9 @@
:max="100" :max="100"
/> />
</el-form-item> </el-form-item>
<el-form-item label="颜色">
<el-color-picker v-model="form.color"></el-color-picker>
</el-form-item>
<el-form-item label="备注"> <el-form-item label="备注">
<el-input v-model="form.remark" type="textarea" style="width: 370px;" /> <el-input v-model="form.remark" type="textarea" style="width: 370px;" />
</el-form-item> </el-form-item>
@@ -194,7 +197,9 @@ const defaultForm = {
create_by: null, create_by: null,
create_time: null, create_time: null,
update_by: null, update_by: null,
update_time: null update_time: null,
color: null,
weight: null
} }
export default { export default {
name: 'MaterialLabel', name: 'MaterialLabel',
@@ -270,21 +275,39 @@ export default {
}) })
}, },
print() { print() {
const _selectData = this.$refs.table.selection this.$prompt('', '请输入重量', {
if (!_selectData || _selectData.length !== 1) { confirmButtonText: '确定',
this.crud.notify('请选择一条记录', CRUD.NOTIFICATION_TYPE.INFO) cancelButtonText: '取消',
return inputPattern: /^\d{4}$/,
} inputErrorMessage: '重量由四个数字组成',
const data = _selectData[0] closeOnClickModal: false
debugger }).then(({ value }) => {
materialLabel.print(data).then(res => { console.log(value)
const code = res.label_code if (value === null) {
debugger this.crud.notify('请输入重量', CRUD.NOTIFICATION_TYPE.ERROR)
this.print2(code) return
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS) }
this.crud.toQuery() const _selectData = this.$refs.table.selection
}).cache(err => { if (!_selectData || _selectData.length !== 1) {
console.log(err.response.data.message) this.crud.notify('请选择一条记录', CRUD.NOTIFICATION_TYPE.INFO)
return
}
const data = _selectData[0]
data.weight = value
materialLabel.print(data).then(res => {
const code = res.label_code
debugger
this.print2(code)
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.crud.toQuery()
}).cache(err => {
console.log(err.response.data.message)
})
}).catch(() => {
this.$message({
type: 'info',
message: '取消输入'
})
}) })
}, },
print2(code) { print2(code) {