rev 更新日志
This commit is contained in:
@@ -128,7 +128,7 @@ file:
|
||||
avatarMaxSize: 5
|
||||
logging:
|
||||
file:
|
||||
path: C:\log\wms
|
||||
path: C:\log\acs
|
||||
config: classpath:logback-spring.xml
|
||||
|
||||
# Sa-Token配置
|
||||
|
||||
@@ -5,6 +5,7 @@ import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import cn.hutool.http.HttpResponse;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson.serializer.SerializerFeature;
|
||||
@@ -357,6 +358,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
String material_id = ObjectUtil.isEmpty(redis_material_id) ? null : String.valueOf(redis_material_id);
|
||||
Object redis_ivt_qty = redisUtils.get(barcode + "-ivt_qty");
|
||||
String ivt_qty = ObjectUtil.isEmpty(redis_ivt_qty) ? "0" : String.valueOf(redis_ivt_qty);
|
||||
log.info("acs反馈条码信息,设备号:{},载具号:{},从redis获取物料信息:{},物料个数:{}", device_code, barcode, redis_material_id, redis_ivt_qty);
|
||||
Long materialId = null;
|
||||
String point_status = "2";
|
||||
if (StrUtil.equals("0000", barcode)) {
|
||||
@@ -370,6 +372,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
//根据工位去查对应的工位的信息
|
||||
//将新的条码 物料等信息更新到到库存表中
|
||||
StructivtDto structivtDto = structivtService.findByCode(device_code);
|
||||
log.info("acs反馈条码信息,根据设备号:{},从库存中查到原库存信息为:{}", device_code, JSONObject.toJSONString(structivtDto));
|
||||
structivtDto.setMaterial_id(materialId);
|
||||
structivtDto.setIvt_qty(new BigDecimal(ivt_qty));
|
||||
VehicleDto vehicleDto = vehicleService.findByCode(barcode);
|
||||
@@ -386,6 +389,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
WQLObject
|
||||
.getWQLObject("st_ivt_structivt")
|
||||
.update(JSONObject.parseObject(JSONObject.toJSONString(structivtDto, SerializerFeature.WriteMapNullValue)));
|
||||
log.info("acs反馈条码信息,设备号:{},更改载具信息为:{},物料信息为:{}", device_code, structivtDto.getVehicle_code(), structivtDto.getMaterial_id());
|
||||
//同时修改该工位的点位状态
|
||||
JSONObject pointJson = wo.query("point_code = '" + device_code + "'").uniqueResult(0);
|
||||
pointJson.put("point_status", point_status);
|
||||
|
||||
@@ -63,10 +63,7 @@ public class InStructServiceImpl implements InStructService {
|
||||
throw new BadRequestException("载具号不存在");
|
||||
}
|
||||
JSONObject map = new JSONObject();
|
||||
String vehicle_type = "";
|
||||
if (ObjectUtil.isNotEmpty(vehicle)) {
|
||||
vehicle_type = vehicle.getVehicle_type();
|
||||
}
|
||||
String vehicle_type = vehicle.getVehicle_type();
|
||||
String type = param.getString("type");
|
||||
if ("2".equals(type)) {
|
||||
String material_code = param.getString("material_code");
|
||||
@@ -77,9 +74,14 @@ public class InStructServiceImpl implements InStructService {
|
||||
if (ObjectUtil.isEmpty(material)) {
|
||||
throw new BadRequestException("物料不存在");
|
||||
}
|
||||
redisUtils.set(vehicle_code, material.getMaterial_id());
|
||||
redisUtils.set(vehicle_code, material.getMaterial_id().toString());
|
||||
redisUtils.set(vehicle_code + "-ivt_qty", "1");
|
||||
log.info("手持入库确认type2,往redis中存储载具信息,载具号:{},物料信息:{},物料数量:{}", vehicle_code, material.getMaterial_id(), "1");
|
||||
map.put("material_code", material_code);
|
||||
} else {
|
||||
redisUtils.set(vehicle_code, "");
|
||||
redisUtils.set(vehicle_code + "-ivt_qty", "1");
|
||||
log.info("手持入库确认type1,往redis中存储载具信息,载具号:{},物料信息:{},物料数量:{}", vehicle_code, "", "1");
|
||||
}
|
||||
map.put("vehicle_code", vehicle_code);
|
||||
map.put("vehicle_type", vehicle_type);
|
||||
|
||||
@@ -36,20 +36,21 @@ public class OutStructServiceImpl implements OutStructService {
|
||||
}
|
||||
WQLObject wo = WQLObject.getWQLObject("ST_IVT_StructIvt");
|
||||
WQLObject wo_point = WQLObject.getWQLObject("sch_base_point");
|
||||
log.info("手持出库确认,从redis中删除对应的载具号:{},物料信息:{}", vehicle_code, redisUtils.get(vehicle_code));
|
||||
redisUtils.del(vehicle_code);
|
||||
redisUtils.del(vehicle_code + "-ivt_qty");
|
||||
JSONObject jsonObject = wo.query("vehicle_code = '" + vehicle + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(jsonObject)){
|
||||
jsonObject.put("vehicle_type","");
|
||||
jsonObject.put("vehicle_code","");
|
||||
jsonObject.put("material_id","");
|
||||
jsonObject.put("instorage_time","");
|
||||
if (ObjectUtil.isNotEmpty(jsonObject)) {
|
||||
jsonObject.put("vehicle_type", "");
|
||||
jsonObject.put("vehicle_code", "");
|
||||
jsonObject.put("material_id", "");
|
||||
jsonObject.put("instorage_time", "");
|
||||
wo.update(jsonObject);
|
||||
String point_id = jsonObject.getString("point_id");
|
||||
JSONObject jsonObject1 = wo_point.query("point_id = '" + point_id + "'").uniqueResult(0);
|
||||
jsonObject1.put("point_status","1");
|
||||
jsonObject1.put("lock_type","1");
|
||||
jsonObject1.put("task_id","");
|
||||
jsonObject1.put("point_status", "1");
|
||||
jsonObject1.put("lock_type", "1");
|
||||
jsonObject1.put("task_id", "");
|
||||
jsonObject1.put("vehicle_type", "");
|
||||
jsonObject1.put("vehicle_code", "");
|
||||
wo_point.update(jsonObject1);
|
||||
|
||||
@@ -125,6 +125,7 @@ public class WorkorderServiceImpl implements WorkordeService {
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void create(WorkorderDto dto) {
|
||||
WQLObject wo = WQLObject.getWQLObject("PDM_BD_WorkOrder");
|
||||
Long device_id = dto.getDevice_id();
|
||||
if (ObjectUtil.isNotEmpty(device_id)) {
|
||||
WQLObject deviceTab = WQLObject.getWQLObject("PDM_BI_Device");
|
||||
@@ -145,7 +146,6 @@ public class WorkorderServiceImpl implements WorkordeService {
|
||||
dto.setUpdate_optid(currentUserId);
|
||||
dto.setUpdate_optname(nickName);
|
||||
dto.setUpdate_time(now);
|
||||
WQLObject wo = WQLObject.getWQLObject("PDM_BD_WorkOrder");
|
||||
JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto));
|
||||
json.put("sysdeptid", deptId);
|
||||
json.put("syscompanyid", deptId);
|
||||
@@ -202,7 +202,7 @@ public class WorkorderServiceImpl implements WorkordeService {
|
||||
JSONObject json = wo.query("workorder_id = '" + param.getString("workorder_id") + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(json.getString("device_id"))) throw new BadRequestException("请先绑定设备");
|
||||
|
||||
JSONArray orderArr = wo.query("device_id = '" + param.getString("device_id") + "' and order_status = '02'").getResultJSONArray(0);
|
||||
JSONArray orderArr = wo.query("device_id = '" + json.getString("device_id") + "' and order_status > 1 and order_status < 5 and is_delete = '0'").getResultJSONArray(0);
|
||||
if (ObjectUtil.isNotEmpty(orderArr)) throw new BadRequestException("当前设备正在生产中");
|
||||
|
||||
JSONObject jsonObject = wo_material.query("material_id = '" + json.getString("material_id") + "'").uniqueResult(0);
|
||||
|
||||
@@ -92,6 +92,7 @@ public class YljCallMaterialTask extends AbstractAcsTask {
|
||||
|
||||
String vehicle_code = taskObj.getString("vehicle_code");
|
||||
RedisUtils redisUtils = SpringContextHolder.getBean(RedisUtils.class);
|
||||
log.info("压力机上料完成,从redis中删除对应的载具号:{},物料信息:{}", vehicle_code, redisUtils.get(vehicle_code));
|
||||
redisUtils.del(vehicle_code);
|
||||
redisUtils.del(vehicle_code + "-ivt_qty");
|
||||
|
||||
@@ -129,7 +130,7 @@ public class YljCallMaterialTask extends AbstractAcsTask {
|
||||
ivtTab.update(ivtEnd);
|
||||
|
||||
JSONObject jsonEnd = pointTab.query("point_code = '" + ivtEnd.getString("point_code") + "'").uniqueResult(0);
|
||||
jsonEnd.put("point_status","2");
|
||||
jsonEnd.put("point_status", "2");
|
||||
pointTab.update(jsonEnd);
|
||||
|
||||
}
|
||||
@@ -190,7 +191,7 @@ public class YljCallMaterialTask extends AbstractAcsTask {
|
||||
@Override
|
||||
public List<AcsTaskDto> addTask() {
|
||||
WQLObject taskTab = WQLObject.getWQLObject("SCH_BASE_Task");
|
||||
// WQLObject materialTab = WQLObject.getWQLObject("md_me_materialbase");
|
||||
// WQLObject materialTab = WQLObject.getWQLObject("md_me_materialbase");
|
||||
/*
|
||||
* 下发给ACS时需要特殊处理
|
||||
*/
|
||||
@@ -334,7 +335,7 @@ public class YljCallMaterialTask extends AbstractAcsTask {
|
||||
} else {
|
||||
this.updateTaskStatus(taskObj, "0");
|
||||
}
|
||||
}else {
|
||||
} else {
|
||||
throw new BadRequestException("任务已删除或者已完成!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@ import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.nl.modules.common.utils.RedisUtils;
|
||||
import org.nl.modules.common.utils.SecurityUtils;
|
||||
import org.nl.modules.system.util.CodeUtil;
|
||||
import org.nl.modules.wql.core.bean.WQLObject;
|
||||
import org.nl.modules.wql.util.SpringContextHolder;
|
||||
@@ -97,6 +96,7 @@ public class HandlingTask extends AbstractAcsTask {
|
||||
//更新起点终点的库存
|
||||
JSONObject ivtStart = ivtTab.query("point_code = '" + point_code1 + "'").uniqueResult(0);
|
||||
JSONObject ivtEnd = ivtTab.query("point_code = '" + point_code2 + "'").uniqueResult(0);
|
||||
RedisUtils redisUtils = SpringContextHolder.getBean(RedisUtils.class);
|
||||
|
||||
if (StrUtil.equals(region_codeS, RegionTypeEnum.HNJQ.getCode())) {
|
||||
MaterialbaseServiceImpl materialbaseService = SpringContextHolder.getBean(MaterialbaseServiceImpl.class);
|
||||
@@ -111,6 +111,9 @@ public class HandlingTask extends AbstractAcsTask {
|
||||
if (ObjectUtil.isNotEmpty(materialbaseDto)) {
|
||||
param.put("material_code", materialbaseDto.getMaterial_code());
|
||||
}
|
||||
redisUtils.set(jsonTask.getString("vehicle_code"), StrUtil.isEmpty(jsonTask.getString("material_id")) ? "" : jsonTask.getString("material_id"));
|
||||
redisUtils.set(jsonTask.getString("vehicle_code") + "-ivt_qty", "1");
|
||||
log.info("手持创建任务,任务号:{},往redis中存储载具信息,载具号:{},物料信息:{},物料个数:{}", jsonTask.getString("task_code"), jsonTask.getString("vehicle_code"), jsonTask.getLong("material_id"), "1");
|
||||
boolean flag = klzhcwUtil.judge(ll, param);
|
||||
if (flag) {
|
||||
jsonEnd.put("lock_type", "1");
|
||||
@@ -149,6 +152,10 @@ public class HandlingTask extends AbstractAcsTask {
|
||||
if (ObjectUtil.isNotEmpty(materialbaseDto)) {
|
||||
param.put("material_code", materialbaseDto.getMaterial_code());
|
||||
}
|
||||
redisUtils.set(jsonTask.getString("vehicle_code"), StrUtil.isEmpty(jsonTask.getString("material_id")) ? "" : jsonTask.getString("material_id"));
|
||||
redisUtils.set(jsonTask.getString("vehicle_code") + "-ivt_qty", "1");
|
||||
log.info("手持创建任务,任务号:{},往redis中存储载具信息,载具号:{},物料信息:{},物料个数:{}", jsonTask.getString("task_code"), jsonTask.getString("vehicle_code"), jsonTask.getLong("material_id"), "1");
|
||||
|
||||
boolean flag = klzhcwUtil.judge(ll, param);
|
||||
if (flag) {
|
||||
jsonEnd.put("lock_type", "1");
|
||||
@@ -228,7 +235,7 @@ public class HandlingTask extends AbstractAcsTask {
|
||||
jsonStart.put("update_time", DateUtil.now());
|
||||
pointTab.update(jsonStart);
|
||||
} else if (StrUtil.equals(region_codeS, RegionTypeEnum.GT4.getCode())) {
|
||||
RedisUtils redisUtils = SpringContextHolder.getBean(RedisUtils.class);
|
||||
log.info("手持创建任务,从redis删除对应的载具信息,载具号:{},物料信息:{}", jsonTask.getString("vehicle_code"), redisUtils.get(jsonTask.getString("vehicle_code")));
|
||||
redisUtils.del(jsonTask.getString("vehicle_code"));
|
||||
redisUtils.del(jsonTask.getString("vehicle_code") + "-ivt_qty");
|
||||
//修改终点库存
|
||||
|
||||
@@ -9,11 +9,11 @@ import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.nl.modules.common.utils.RedisUtils;
|
||||
import org.nl.modules.common.utils.SecurityUtils;
|
||||
import org.nl.modules.system.util.CodeUtil;
|
||||
import org.nl.modules.wql.core.bean.WQLObject;
|
||||
import org.nl.modules.wql.util.SpringContextHolder;
|
||||
import org.nl.wms.basedata.service.dto.MaterialbaseDto;
|
||||
import org.nl.wms.ext.acs.service.WmsToAcsService;
|
||||
import org.nl.wms.ext.acs.service.impl.WmsToAcsServiceImpl;
|
||||
import org.nl.wms.pda.scanGroup.KlzhcwUtil;
|
||||
@@ -116,6 +116,10 @@ public class KzdjwSendEmpVehicleTask extends AbstractAcsTask {
|
||||
jsonEnd.put("update_time", DateUtil.now());
|
||||
pointTab.update(jsonEnd);
|
||||
}
|
||||
RedisUtils redisUtils = SpringContextHolder.getBean(RedisUtils.class);
|
||||
redisUtils.set(taskObj.getString("vehicle_code"), StrUtil.isEmpty(taskObj.getString("material_id")) ? "" : taskObj.getString("material_id"));
|
||||
redisUtils.set(taskObj.getString("vehicle_code") + "-ivt_qty", "1");
|
||||
log.info("空盅对接位送空盅到GT01,往redis中存载具信息:载具号:{},物料信息:{}", taskObj.getString("vehicle_code"), taskObj.getString("material_id"));
|
||||
} else {
|
||||
|
||||
JSONObject ivtEnd = ivtTab.query("point_code = '" + point_code2 + "'").uniqueResult(0);
|
||||
|
||||
@@ -373,15 +373,22 @@ public class HnjSendMaterialTask extends AbstractAcsTask {
|
||||
JSONObject taskObj1 = taskTab.query("is_delete='0' and point_code2 = '" + point_code1 + "' and task_status <> '" + TaskStatusEnum.FINISHED.getCode() + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(taskObj1)) throw new BadRequestException("当前点位" + point_code1 + "存在未完成的终点任务");
|
||||
|
||||
JSONObject workOrderObj = workOrderTab.query("device_code = '" + workDevice + "' and order_status = '3' and is_delete ='0'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(workOrderObj)) throw new BadRequestException("该设备当前未生产或者已删除");
|
||||
JSONArray workOrderObjs = workOrderTab.query("device_code = '" + workDevice + "' and order_status = '3' and is_delete ='0'").getResultJSONArray(0);
|
||||
if (ObjectUtil.isEmpty(workOrderObjs)) {
|
||||
throw new BadRequestException("该设备当前未生产或者已删除");
|
||||
}
|
||||
if (workOrderObjs.size() > 1) {
|
||||
throw new BadRequestException("工单数量大于1,任务生成失败!");
|
||||
}
|
||||
JSONObject workOrderObj = workOrderObjs.getJSONObject(0);
|
||||
|
||||
JSONObject point = pointTab.query("is_delete = '0' AND point_code = '" + point_code1 + "'").uniqueResult(0);
|
||||
String vehicle_code = point.getString("vehicle_code");
|
||||
log.info("混碾机申请满料任务,根据设备号:{},查找载具号:{}", point_code1, vehicle_code);
|
||||
RedisUtils redisUtils = SpringContextHolder.getBean(RedisUtils.class);
|
||||
redisUtils.set(vehicle_code, workOrderObj.getString("material_id"));
|
||||
redisUtils.set(vehicle_code + "-ivt_qty", "1");
|
||||
|
||||
log.info("混碾机申请满料任务,设备号:{},往redis中存储载具信息,载具号:{},物料信息:{},物料个数:{}", point_code1, vehicle_code, workOrderObj.getString("material_id"), "1");
|
||||
Long task_group_id = IdUtil.getLongId();
|
||||
|
||||
SchTaskDto emptyDto = SchTaskDto.builder()
|
||||
|
||||
@@ -149,8 +149,9 @@ public class StructivtServiceImpl implements StructivtService {
|
||||
}
|
||||
if (StrUtil.isNotBlank(dto.getVehicle_code())) {
|
||||
// if (ObjectUtil.isNotEmpty(dto.getMaterial_id())) {
|
||||
redisUtils.set(dto.getVehicle_code(), String.valueOf(dto.getMaterial_id()));
|
||||
redisUtils.set(dto.getVehicle_code(), ObjectUtil.isEmpty(dto.getMaterial_id()) ? "" : dto.getMaterial_id().toString());
|
||||
redisUtils.set(dto.getVehicle_code() + "-ivt_qty", "1");
|
||||
log.info("手动修改库存信息,往redis存储载具信息,载具号:{},物料信息:{},物料个数:{}", dto.getVehicle_code(), dto.getMaterial_id(), "1");
|
||||
// }
|
||||
// else {
|
||||
// redisUtils.del(dto.getVehicle_code());
|
||||
@@ -161,12 +162,15 @@ public class StructivtServiceImpl implements StructivtService {
|
||||
// 找主表获取之前的数据
|
||||
StructivtDto structivtDto = this.findById(dto.getStockrecord_id());
|
||||
if (structivtDto == null) throw new BadRequestException("被删除或无权限,操作失败!");
|
||||
log.info("手动修改库存信息,原库存信息为" +
|
||||
",载具号:{},物料信息:{},物料个数:{}------redis中存储的原载具号对应的物料信息为:{}",
|
||||
structivtDto.getVehicle_code(), structivtDto.getMaterial_id(), structivtDto.getVehicle_qty(), redisUtils.get(structivtDto.getVehicle_code()));
|
||||
String region_code = structivtDto.getRegion_code();
|
||||
// if (StrUtil.isBlank(dto.getVehicle_code())
|
||||
// || !dto.getVehicle_code().equals(structivtDto.getVehicle_code())) {
|
||||
// redisUtils.del(structivtDto.getVehicle_code());
|
||||
// redisUtils.del(structivtDto.getVehicle_code() + "-ivt_qty");
|
||||
// }
|
||||
if (StrUtil.isBlank(dto.getVehicle_code())
|
||||
|| !dto.getVehicle_code().equals(structivtDto.getVehicle_code())) {
|
||||
redisUtils.set(structivtDto.getVehicle_code(), "");
|
||||
redisUtils.set(structivtDto.getVehicle_code() + "-ivt_qty", "1");
|
||||
}
|
||||
|
||||
Long currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getCurrentNickName();
|
||||
|
||||
@@ -128,7 +128,7 @@ file:
|
||||
avatarMaxSize: 5
|
||||
logging:
|
||||
file:
|
||||
path: C:\log\wms
|
||||
path: C:\log\lms
|
||||
config: classpath:logback-spring.xml
|
||||
|
||||
# Sa-Token配置
|
||||
|
||||
@@ -2,7 +2,7 @@ spring:
|
||||
freemarker:
|
||||
check-template-location: false
|
||||
profiles:
|
||||
active: dev
|
||||
active: prod
|
||||
jackson:
|
||||
time-zone: GMT+8
|
||||
data:
|
||||
|
||||
@@ -24,7 +24,7 @@ export default {
|
||||
this.timmer = setTimeout(() => {
|
||||
sessionStorage.clear()
|
||||
this.logout()
|
||||
}, 1000 * 60 * 15) // 15分钟 https://blog.csdn.net/qq_42345108/article/details/103496456
|
||||
}, 50000 * 60 * 15) // 15分钟 https://blog.csdn.net/qq_42345108/article/details/103496456
|
||||
},
|
||||
logout() {
|
||||
this.$store.dispatch('LogOut').then(() => {
|
||||
|
||||
@@ -186,7 +186,7 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col>
|
||||
<el-form-item label="工单状态">
|
||||
<el-form-item v-if="false" label="工单状态">
|
||||
<el-select
|
||||
v-model="form.order_status"
|
||||
clearable
|
||||
|
||||
Reference in New Issue
Block a user