rev:取消或者完成任务权限控制
This commit is contained in:
@@ -43,6 +43,9 @@ public enum PackageInfoIvtEnum {
|
|||||||
//是否自动下发
|
//是否自动下发
|
||||||
IS_SEND(MapOf.of("是", "1","否","0")),
|
IS_SEND(MapOf.of("是", "1","否","0")),
|
||||||
|
|
||||||
|
//是否分配过
|
||||||
|
IS_ALLOCATE(MapOf.of("放货是", "2","否","0","取货是","1")),
|
||||||
|
|
||||||
//起点终点类型
|
//起点终点类型
|
||||||
TASK_POINT_TYPE(MapOf.of("取货任务", "1", "放货任务", "2", "取货分配", "3", "放货分配", "4", "取货任务取货分配", "5", "放货任务放货分配", "6", "四个点任务取货", "7","空载具放货", "8", "四个点任务分配", "9","空载具放货分配", "10")),
|
TASK_POINT_TYPE(MapOf.of("取货任务", "1", "放货任务", "2", "取货分配", "3", "放货分配", "4", "取货任务取货分配", "5", "放货任务放货分配", "6", "四个点任务取货", "7","空载具放货", "8", "四个点任务分配", "9","空载具放货分配", "10")),
|
||||||
|
|
||||||
|
|||||||
@@ -87,6 +87,15 @@ public class ISysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> imp
|
|||||||
} else {
|
} else {
|
||||||
sysUser.setPassword(SaSecureUtil.md5BySalt(sysUser.getPassword(), "salt"));
|
sysUser.setPassword(SaSecureUtil.md5BySalt(sysUser.getPassword(), "salt"));
|
||||||
}
|
}
|
||||||
|
List<String> roles = (ArrayList<String>) userDetail.get("roles");
|
||||||
|
if (roles != null) {
|
||||||
|
String role = roles.get(0);
|
||||||
|
if (role.equals("1")){
|
||||||
|
sysUser.setIs_admin(true);
|
||||||
|
}else {
|
||||||
|
sysUser.setIs_admin(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
String userId = IdUtil.getStringId();
|
String userId = IdUtil.getStringId();
|
||||||
sysUser.setUser_id(userId);
|
sysUser.setUser_id(userId);
|
||||||
this.save(sysUser);
|
this.save(sysUser);
|
||||||
|
|||||||
@@ -128,24 +128,24 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
Thread.sleep(1000);
|
Thread.sleep(1000);
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
}
|
}
|
||||||
String pointCode = "";
|
String pointCode = "";
|
||||||
String action = "";
|
String action = "";
|
||||||
switch (actionType) {
|
switch (actionType) {
|
||||||
case "1":
|
case "1":
|
||||||
case "2":
|
case "2":
|
||||||
case "3":
|
case "3":
|
||||||
case "4":
|
case "4":
|
||||||
case "5":
|
case "5":
|
||||||
// 取货分配, 放货分配
|
// 取货分配, 放货分配
|
||||||
pointCode = getNewPoint(taskCode, actionType, type);
|
pointCode = getNewPoint(taskCode, actionType, type);
|
||||||
result.put("data", pointCode);
|
result.put("data", pointCode);
|
||||||
result.put("message", taskCode + "取放货分配成功,新点位为:" + pointCode);
|
result.put("message", taskCode + "取放货分配成功,新点位为:" + pointCode);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
result.put("status", org.springframework.http.HttpStatus.OK.value());
|
result.put("status", org.springframework.http.HttpStatus.OK.value());
|
||||||
return result;
|
return result;
|
||||||
}, "secondaryAllocationPoint" + actionType, null);
|
}, "secondaryAllocationPoint" + actionType, null);
|
||||||
log.info("二次分配" + taskCode + "---------------------------------------------" + result);
|
log.info("二次分配" + taskCode + "---------------------------------------------" + result);
|
||||||
return result;
|
return result;
|
||||||
@@ -164,15 +164,13 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
throw new BadRequestException("该任务未执行或不存在!");
|
throw new BadRequestException("该任务未执行或不存在!");
|
||||||
}
|
}
|
||||||
//已分配过二次分配点位
|
//已分配过二次分配点位
|
||||||
// if (StringUtils.isNotBlank(baseTask.getResponse_param())) {
|
if (StringUtils.isNotBlank(baseTask.getResponse_param())) {
|
||||||
// if (baseTask.getResponse_param().equals(PackageInfoIvtEnum.IS_SEND.code("是"))) {
|
if ("1".equals(type) && baseTask.getResponse_param().equals(PackageInfoIvtEnum.IS_SEND.code("取货是"))) {
|
||||||
// if ("1".equals(type)) {
|
return baseTask.getPoint_code1();
|
||||||
// return baseTask.getPoint_code1();
|
} else if ("2".equals(type) && baseTask.getResponse_param().equals(PackageInfoIvtEnum.IS_SEND.code("放货是"))) {
|
||||||
// } else if ("2".equals(type)) {
|
return baseTask.getPoint_code2();
|
||||||
// return baseTask.getPoint_code2();
|
}
|
||||||
// }
|
}
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
//
|
||||||
if (baseTask.getVehicle_code2().equals("2")) {
|
if (baseTask.getVehicle_code2().equals("2")) {
|
||||||
newPoint = getNewStartBasePoint(baseTask);
|
newPoint = getNewStartBasePoint(baseTask);
|
||||||
@@ -207,7 +205,11 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//标记二次分配已分配过点位
|
//标记二次分配已分配过点位
|
||||||
updateWrapper.set(SchBaseTask::getResponse_param, PackageInfoIvtEnum.IS_SEND.code("是"));
|
if ("1".equals(type)) {
|
||||||
|
updateWrapper.set(SchBaseTask::getResponse_param, PackageInfoIvtEnum.IS_ALLOCATE.code("取货是"));
|
||||||
|
} else if ("2".equals(type)) {
|
||||||
|
updateWrapper.set(SchBaseTask::getResponse_param, PackageInfoIvtEnum.IS_ALLOCATE.code("放货是"));
|
||||||
|
}
|
||||||
taskService.update(null, updateWrapper);
|
taskService.update(null, updateWrapper);
|
||||||
log.info("二次分配" + taskCode + ",接口返回最新点位:---------------------------------------------" + newPoint.getPoint_code());
|
log.info("二次分配" + taskCode + ",接口返回最新点位:---------------------------------------------" + newPoint.getPoint_code());
|
||||||
return newPoint.getPoint_code();
|
return newPoint.getPoint_code();
|
||||||
|
|||||||
@@ -762,6 +762,9 @@ public class PdaTaskServiceImpl implements PdaTaskService {
|
|||||||
point.setStoragevehicle_code("");
|
point.setStoragevehicle_code("");
|
||||||
point.setMaterial_code("");
|
point.setMaterial_code("");
|
||||||
point.setIng_task_code("");
|
point.setIng_task_code("");
|
||||||
|
point.setUpdate_id(SecurityUtils.getCurrentUserId());
|
||||||
|
point.setUpdate_name(SecurityUtils.getCurrentNickName());
|
||||||
|
point.setUpdate_time(DateUtil.now());
|
||||||
pointMapper.updateById(point);
|
pointMapper.updateById(point);
|
||||||
JSONObject ret = new JSONObject();
|
JSONObject ret = new JSONObject();
|
||||||
ret.put("status", String.valueOf(HttpStatus.HTTP_OK));
|
ret.put("status", String.valueOf(HttpStatus.HTTP_OK));
|
||||||
|
|||||||
@@ -196,7 +196,7 @@
|
|||||||
AND point_type = #{point_type}
|
AND point_type = #{point_type}
|
||||||
AND is_used = 1
|
AND is_used = 1
|
||||||
AND point_status = '1'
|
AND point_status = '1'
|
||||||
ORDER BY in_order_seq desc
|
ORDER BY in_order_seq asc
|
||||||
</select>
|
</select>
|
||||||
<select id="selectSameRowPoints" resultType="org.nl.wms.sch.point.service.dao.SchBasePoint">
|
<select id="selectSameRowPoints" resultType="org.nl.wms.sch.point.service.dao.SchBasePoint">
|
||||||
SELECT *
|
SELECT *
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ nl:
|
|||||||
port: 3306
|
port: 3306
|
||||||
username: root
|
username: root
|
||||||
password: 123456
|
password: 123456
|
||||||
database: fengtiandl_lms
|
database: fengtiandl_lms1
|
||||||
redis:
|
redis:
|
||||||
ip: 127.0.0.1
|
ip: 127.0.0.1
|
||||||
port: 6379
|
port: 6379
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
server:
|
server:
|
||||||
port: 8011
|
port: 8010
|
||||||
# 项目配置
|
# 项目配置
|
||||||
nl:
|
nl:
|
||||||
config:
|
config:
|
||||||
@@ -7,8 +7,8 @@ nl:
|
|||||||
ip: 127.0.0.1
|
ip: 127.0.0.1
|
||||||
port: 3306
|
port: 3306
|
||||||
username: root
|
username: root
|
||||||
password: 12356
|
password: 123456
|
||||||
database: nl-platform
|
database: fengtiandl_lms
|
||||||
redis:
|
redis:
|
||||||
ip: 127.0.0.1
|
ip: 127.0.0.1
|
||||||
port: 6379
|
port: 6379
|
||||||
|
|||||||
@@ -4,10 +4,10 @@ server:
|
|||||||
relaxed-path-chars: [ '|','{','}','[',']' ] #字符问题: https://blog.csdn.net/weixin_41996632/article/details/90715118
|
relaxed-path-chars: [ '|','{','}','[',']' ] #字符问题: https://blog.csdn.net/weixin_41996632/article/details/90715118
|
||||||
lucene:
|
lucene:
|
||||||
index:
|
index:
|
||||||
path: D:\lucene2\index
|
path: C:\lucene2\index
|
||||||
spring:
|
spring:
|
||||||
profiles:
|
profiles:
|
||||||
active: dev
|
active: prod
|
||||||
autoconfigure:
|
autoconfigure:
|
||||||
exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
|
exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
|
||||||
messages:
|
messages:
|
||||||
@@ -197,6 +197,7 @@ security:
|
|||||||
- /auth/login
|
- /auth/login
|
||||||
- /auth/code
|
- /auth/code
|
||||||
- /auth/logout
|
- /auth/logout
|
||||||
|
- /auth/info
|
||||||
- /sys-user-do/**
|
- /sys-user-do/**
|
||||||
- /webjars/**
|
- /webjars/**
|
||||||
- /file/**
|
- /file/**
|
||||||
@@ -270,7 +271,7 @@ sa-token:
|
|||||||
token-session-check-login: false
|
token-session-check-login: false
|
||||||
alone-redis:
|
alone-redis:
|
||||||
# Redis数据库索引(默认为0)
|
# Redis数据库索引(默认为0)
|
||||||
database: ${nl.config.redis.database}
|
database: 12
|
||||||
# Redis服务器地址
|
# Redis服务器地址
|
||||||
host: ${nl.config.redis.ip}
|
host: ${nl.config.redis.ip}
|
||||||
# Redis服务器连接端口
|
# Redis服务器连接端口
|
||||||
|
|||||||
@@ -380,6 +380,7 @@
|
|||||||
<!-- @click="doOperate(scope.row, 'c')"-->
|
<!-- @click="doOperate(scope.row, 'c')"-->
|
||||||
<!-- >下发</el-button>-->
|
<!-- >下发</el-button>-->
|
||||||
<el-button
|
<el-button
|
||||||
|
v-permission="['admin','task:operation']"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-success"
|
icon="el-icon-success"
|
||||||
:disabled="scope.row.task_status==='5' || scope.row.task_status==='6'"
|
:disabled="scope.row.task_status==='5' || scope.row.task_status==='6'"
|
||||||
@@ -387,6 +388,7 @@
|
|||||||
>{{ $t('Task.table.complete') }}
|
>{{ $t('Task.table.complete') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
|
v-permission="['admin','task:operation']"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-error"
|
icon="el-icon-error"
|
||||||
:disabled="scope.row.task_status==='5' || scope.row.task_status==='6'"
|
:disabled="scope.row.task_status==='5' || scope.row.task_status==='6'"
|
||||||
@@ -394,6 +396,7 @@
|
|||||||
>{{ $t('common.Cancel') }}
|
>{{ $t('common.Cancel') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
|
v-permission="['admin','task:operation']"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-error"
|
icon="el-icon-error"
|
||||||
:disabled="scope.row.task_status==='5' || scope.row.task_status==='6'"
|
:disabled="scope.row.task_status==='5' || scope.row.task_status==='6'"
|
||||||
|
|||||||
Reference in New Issue
Block a user