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