代码更新
This commit is contained in:
@@ -100,6 +100,12 @@
|
||||
<artifactId>spring-boot-starter-websocket</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.redisson</groupId>
|
||||
<artifactId>redisson</artifactId>
|
||||
<version>3.16.1</version> <!-- 使用适当的版本号 -->
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.redisson</groupId>
|
||||
<artifactId>redisson-spring-boot-starter</artifactId>
|
||||
|
||||
@@ -315,7 +315,6 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
}
|
||||
|
||||
@Override
|
||||
// @Transactional(rollbackFor = Exception.class)
|
||||
public Map<String, Object> manipulatorApply(Map jsonObject) {
|
||||
log.debug("ACS的manipulatorApply请求参数为:" + jsonObject);
|
||||
String device_code = (String) jsonObject.get("device_code");
|
||||
|
||||
@@ -142,6 +142,7 @@ public interface ProducetaskService {
|
||||
* @param param
|
||||
*/
|
||||
void issued(JSONObject param);
|
||||
void transSyn(JSONObject param);
|
||||
/**
|
||||
* 同步
|
||||
* @param param
|
||||
|
||||
@@ -56,7 +56,8 @@ import javax.servlet.http.HttpServletRequest;
|
||||
@Slf4j
|
||||
public class ProducetaskServiceImpl implements ProducetaskService {
|
||||
|
||||
@Autowired DeviceService deviceService;
|
||||
@Autowired
|
||||
DeviceService deviceService;
|
||||
|
||||
@Override
|
||||
public Map<String, Object> queryAll(Map whereJson, Pageable page) {
|
||||
@@ -135,6 +136,10 @@ public class ProducetaskServiceImpl implements ProducetaskService {
|
||||
String nickName = UserInfoUtil.getNickName();
|
||||
String now = DateUtil.now();
|
||||
|
||||
if (ObjectUtil.isEmpty(dto.getMaterial_id())) {
|
||||
throw new BadRequestException("物料不能为空!");
|
||||
}
|
||||
|
||||
String material_id = dto.getMaterial_id().toString();
|
||||
// 根据物料去找木托盘类型
|
||||
JSONObject materialObj =
|
||||
@@ -145,7 +150,21 @@ public class ProducetaskServiceImpl implements ProducetaskService {
|
||||
if (StrUtil.isEmpty(vehicle_type) || StrUtil.equals(vehicle_type, "0")) {
|
||||
throw new RuntimeException("木托盘类型不可为空!");
|
||||
}
|
||||
if (vehicle_type.equals("1")) {
|
||||
dto.setVehicle_type("03");
|
||||
} else if (vehicle_type.equals("2")) {
|
||||
dto.setVehicle_type("04");
|
||||
} else if (vehicle_type.equals("3")) {
|
||||
dto.setVehicle_type("05");
|
||||
} else if (vehicle_type.equals("4")) {
|
||||
dto.setVehicle_type("06");
|
||||
} else if (vehicle_type.equals("5")) {
|
||||
dto.setVehicle_type("07");
|
||||
}
|
||||
if (ObjectUtil.isEmpty(dto.getVehicle_type())){
|
||||
dto.setVehicle_type(vehicle_type);
|
||||
}
|
||||
|
||||
dto.setProducetask_id(IdUtil.getSnowflake(1, 1).nextId());
|
||||
dto.setProducetask_code(CodeUtil.getNewCode("PRODUCE_CODE"));
|
||||
dto.setCreate_id(currentUserId);
|
||||
@@ -180,6 +199,7 @@ public class ProducetaskServiceImpl implements ProducetaskService {
|
||||
throw new BadRequestException("编码已存在!");
|
||||
}
|
||||
|
||||
|
||||
Long currentUserId = UserInfoUtil.getCurrentUserId();
|
||||
String nickName = UserInfoUtil.getNickName();
|
||||
|
||||
@@ -306,10 +326,14 @@ public class ProducetaskServiceImpl implements ProducetaskService {
|
||||
param.put("update_time", now);
|
||||
wo.update(map, "producetask_id = '" + producetask_id + "'");
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized void issued(JSONObject param) {
|
||||
ProducetaskService producetaskService = SpringContextHolder.getBean(ProducetaskService.class);
|
||||
producetaskService.transSyn(param);
|
||||
}
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void issued(JSONObject param) {
|
||||
public void transSyn(JSONObject param) {
|
||||
Long currentUserId = UserInfoUtil.getCurrentUserId();
|
||||
String nickName = UserInfoUtil.getNickName();
|
||||
String now = DateUtil.now();
|
||||
@@ -337,7 +361,7 @@ public class ProducetaskServiceImpl implements ProducetaskService {
|
||||
String material_code = taskObj.getString("material_code");
|
||||
String product_code = taskObj.getString("product_code");
|
||||
if (ObjectUtil.isEmpty(product_code)) {
|
||||
throw new BadRequestException("物料【"+material_code+"】的垛形参数未设置!");
|
||||
throw new BadRequestException("物料【" + material_code + "】的垛形参数未设置!");
|
||||
}
|
||||
} else {
|
||||
taskObj = WQL.getWO("PDM_ProduceTask_01").addParam("flag", "4").addParam("producetask_id", producetask_id).process().uniqueResult(0);
|
||||
|
||||
@@ -374,12 +374,12 @@ public class CallMaterialTask extends AbstractAcsTask {
|
||||
iosObj.put("create_time", DateUtil.now());
|
||||
WQLObject.getWQLObject("ST_IVT_workProcedureIOS").insert(iosObj);
|
||||
// 将组盘里面的task_id改为当前的任务
|
||||
WQLObject groupTable = WQLObject.getWQLObject("st_buss_vehiclegroup");
|
||||
/*WQLObject groupTable = WQLObject.getWQLObject("st_buss_vehiclegroup");
|
||||
JSONObject groupObj = groupTable.query("vehicle_code='" + vehicle_code + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(groupObj)) {
|
||||
groupObj.put("task_id", task_id);
|
||||
groupTable.update(groupObj);
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
task_status = TaskStatusEnum.START_AND_POINT.getCode();
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
<el-form-item label="所属设备">
|
||||
<el-select v-model="query.device_id" style="width: 185px;" filterable clearable placeholder="请选择设备" @change="refrence">
|
||||
<el-option
|
||||
v-for="item in deviceList"
|
||||
v-for="item in deviceList1"
|
||||
:key="item.device_id"
|
||||
:label="item.device_name"
|
||||
:value="item.device_id"
|
||||
|
||||
Reference in New Issue
Block a user