rev:更新
This commit is contained in:
@@ -32,21 +32,12 @@ public class AcsPointAngle implements Serializable {
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "起始点位编码")
|
||||
private String start_point_code;
|
||||
|
||||
@ApiModelProperty(value = "起始设备编码")
|
||||
private String start_device_code;
|
||||
|
||||
@ApiModelProperty(value = "目标点位编码")
|
||||
private String next_point_code;
|
||||
|
||||
@ApiModelProperty(value = "目标设备编码")
|
||||
private String next_device_code;
|
||||
|
||||
@ApiModelProperty(value = "起始点位角度")
|
||||
private BigDecimal start_point_angle;
|
||||
|
||||
@ApiModelProperty(value = "目标点位角度")
|
||||
private BigDecimal next_point_angle;
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import java.util.Map;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
@@ -44,22 +45,13 @@ public class AcsPointAngleServiceImpl extends ServiceImpl<AcsPointAngleMapper, A
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void create(AcsPointAngle dto) {
|
||||
AcsPointAngle acsPointAngle = new AcsPointAngle();
|
||||
String currentUsername = SecurityUtils.getCurrentUsername();
|
||||
String now = DateUtil.now();
|
||||
acsPointAngle.setId(dto.getId());
|
||||
acsPointAngle.setStart_point_code(dto.getStart_point_code());
|
||||
acsPointAngle.setStart_device_code(dto.getStart_device_code());
|
||||
acsPointAngle.setNext_point_code(dto.getNext_point_code());
|
||||
acsPointAngle.setNext_device_code(dto.getNext_device_code());
|
||||
acsPointAngle.setStart_point_angle(dto.getStart_point_angle());
|
||||
acsPointAngle.setNext_point_angle(dto.getNext_point_angle());
|
||||
acsPointAngle.setIs_active(dto.getIs_active());
|
||||
acsPointAngle.setCreate_by("auto");
|
||||
acsPointAngle.setCreate_time(now);
|
||||
acsPointAngle.setUpdate_by(currentUsername);
|
||||
acsPointAngle.setUpdate_time(now);
|
||||
acsPointAngleMapper.insert(acsPointAngle);
|
||||
dto.setCreate_by("auto");
|
||||
dto.setCreate_time(now);
|
||||
dto.setUpdate_by(currentUsername);
|
||||
dto.setUpdate_time(now);
|
||||
acsPointAngleMapper.insert(dto);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -67,16 +59,15 @@ public class AcsPointAngleServiceImpl extends ServiceImpl<AcsPointAngleMapper, A
|
||||
if (dto == null) {
|
||||
throw new BadRequestException(LangProcess.msg("error_nullPoint"));
|
||||
}
|
||||
AcsPointAngle acsPointAngle = new AcsPointAngle();
|
||||
acsPointAngle.setId(dto.getId());
|
||||
//起点角度,终点角度变化
|
||||
acsPointAngle.setStart_point_angle(dto.getStart_point_angle());
|
||||
acsPointAngle.setNext_point_angle(dto.getNext_point_angle());
|
||||
AcsPointAngle entity = this.getById(dto.getId());
|
||||
if (entity == null) {
|
||||
throw new BadRequestException(LangProcess.msg("error_nullPoint"));
|
||||
}
|
||||
String currentUsername = SecurityUtils.getCurrentUsername();
|
||||
String now = DateUtil.now();
|
||||
acsPointAngle.setUpdate_by(currentUsername);
|
||||
acsPointAngle.setUpdate_time(now);
|
||||
acsPointAngleMapper.updateById(acsPointAngle);
|
||||
dto.setUpdate_by(currentUsername);
|
||||
dto.setUpdate_time(now);
|
||||
acsPointAngleMapper.updateById(dto);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -458,15 +458,13 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
if (ObjectUtil.isEmpty(inst)) {
|
||||
return false;
|
||||
}
|
||||
List list = new ArrayList();
|
||||
Map map = new HashMap();
|
||||
Map<String, Object> map = new LinkedHashMap<>();
|
||||
map.put("to_target", next_addr);
|
||||
map.put("to_task", inst.getInstruction_code());
|
||||
map.put("to_command", CommonFinalParam.ONE);
|
||||
map.put("to_container_type", CommonFinalParam.ONE);
|
||||
map.put("to_container_no", CommonFinalParam.ONE);
|
||||
list.add(map);
|
||||
this.writing(list);
|
||||
this.writing(map);
|
||||
led_message = getLedMessage(inst);
|
||||
requireSucess = true;
|
||||
return true;
|
||||
@@ -555,16 +553,14 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
taskdto.setTask_status(CommonFinalParam.ONE);
|
||||
taskserver.update(taskdto);
|
||||
requireSucess = true;
|
||||
List list = new ArrayList<>();
|
||||
Map map = new HashMap();
|
||||
Map<String, Object> map = new LinkedHashMap<>();
|
||||
String next_addr = nextdevice.getExtraValue().get("address").toString();
|
||||
map.put("to_target", next_addr);
|
||||
map.put("to_task", instdto.getInstruction_code());
|
||||
map.put("to_command", CommonFinalParam.ONE);
|
||||
map.put("to_container_type", CommonFinalParam.ONE);
|
||||
map.put("to_container_no", CommonFinalParam.ONE);
|
||||
list.add(map);
|
||||
this.writing(list);
|
||||
this.writing(map);
|
||||
led_message = getLedMessage(instdto);
|
||||
requireSucess = true;
|
||||
return true;
|
||||
|
||||
@@ -501,8 +501,7 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
|
||||
}
|
||||
} else {
|
||||
List list = new ArrayList();
|
||||
HashMap map = new HashMap();
|
||||
Map<String, Object> map = new LinkedHashMap<>();
|
||||
switch (command) {
|
||||
case 0:
|
||||
boolean b = applyTask();
|
||||
@@ -599,8 +598,7 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
break;
|
||||
}
|
||||
if (ObjectUtil.isNotNull(map)) {
|
||||
list.add(map);
|
||||
this.writing(list);
|
||||
this.writing(map);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -849,6 +847,7 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void writing(List list) {
|
||||
|
||||
Map<String, Object> itemMap = new HashMap<String, Object>();
|
||||
@@ -890,6 +889,11 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
return this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code() + ".";
|
||||
}
|
||||
|
||||
/**
|
||||
* 多个信号一起下发电气
|
||||
*
|
||||
* @param map
|
||||
*/
|
||||
public void writing(Map<String, Object> map) {
|
||||
DeviceExecuteLogService logServer = SpringContextHolder.getBean("deviceExecuteLogServiceImpl");
|
||||
Map<String, Object> itemMap = new LinkedHashMap<>();
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.nl.acs.angle.mapper.AcsTaskMapper">
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
task_id, ext_task_id, task_code, vehicle_code, vehicle_type, task_type, task_status, compound_task, compound_task_data, request_again, request_again_success, link_num, is_send, material, quantity, priority, create_type, finish_type, execute_code, execute_message, start_point_code, start_device_code, put_point_code, put_device_code, start_point_code2, start_device_code2, next_point_code, next_device_code, next_point_code2, next_device_code2, from_x, from_y, from_z, put_x, put_y, put_z, to_x, to_y, to_z, from_x2, from_y2, from_z2, to_x2, to_y2, to_z2, route_plan_name, route_plan_code, is_needfeedback, emptypallet_num, remark, is_active, is_delete, create_by, create_time, update_by, update_time, weight, agv_system_type, storage_task_type, temperature, oven_time, car_no, start_height, next_height
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user