bug修改
This commit is contained in:
parent
f3dda753a4
commit
ddf86e07b4
@ -53,11 +53,11 @@
|
||||
<!-- database -->
|
||||
<!--<spring.datasource.url>jdbc:p6spy:mysql://localhost:30306/mt_wms_qj?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false-->
|
||||
|
||||
<spring.datasource.url>jdbc:p6spy:mysql://mysql.picaiba.com:30307/mt_wms_qj?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false
|
||||
<spring.datasource.url>jdbc:p6spy:mysql://localhost:30306/mt_wms_qj?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false
|
||||
</spring.datasource.url>
|
||||
<spring.datasource.username>root</spring.datasource.username>
|
||||
<!--<spring.datasource.password>ABC.10086</spring.datasource.password>-->
|
||||
<spring.datasource.password>1qaz@WSX3edc$RFV</spring.datasource.password>
|
||||
<spring.datasource.password>ABC.10086</spring.datasource.password>
|
||||
<!-- <spring.datasource.password>1qaz@WSX3edc$RFV</spring.datasource.password>-->
|
||||
<!-- email -->
|
||||
<spring.mail.host>smtp.mxhichina.com</spring.mail.host>
|
||||
<!-- #25 ssl 465 -->
|
||||
|
@ -36,26 +36,26 @@ import java.util.List;
|
||||
@RestController
|
||||
@RequestMapping(CommonConstant.API_MODULE_BASE + "kilnInfo")
|
||||
@Slf4j
|
||||
@Api(value = "窑炉基础信息管理", tags = "窑炉基础信息管理", hidden = false)
|
||||
@Api(value = "工业炉基础信息管理", tags = "工业炉基础信息管理", hidden = false)
|
||||
public class KilnInfoController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private KilnInfoService kilnInfoService;
|
||||
|
||||
@PostMapping(value = "get")
|
||||
@ApiOperation(value = "获取窑炉信息")
|
||||
@ApiOperation(value = "获取工业炉信息")
|
||||
private R<KilnInfoVo> get(@Validated @RequestBody IdParam idParam) {
|
||||
return kilnInfoService.get(idParam);
|
||||
}
|
||||
|
||||
@PostMapping(value = "list")
|
||||
@ApiOperation(value = "获取窑炉列表")
|
||||
@ApiOperation(value = "获取工业炉列表")
|
||||
private R<List<KilnInfoVo>> list(@Validated({Default.class}) @RequestBody KilnInfoQueryParam kilnInfoQueryParam) {
|
||||
return kilnInfoService.list(kilnInfoQueryParam);
|
||||
}
|
||||
|
||||
@PostMapping(value = "page")
|
||||
@ApiOperation(value = "获取分页窑炉")
|
||||
@ApiOperation(value = "获取分页工业炉")
|
||||
private R<PageVo<KilnInfoVo>> page(@Validated({PageGroup.class, Default.class}) @RequestBody KilnInfoQueryParam kilnInfoQueryParam) {
|
||||
return kilnInfoService.page(kilnInfoQueryParam);
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ import javax.validation.constraints.NotNull;
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value = "窑炉参数对象", description = "用于新增和更新窑炉信息")
|
||||
@ApiModel(value = "工业炉参数对象", description = "用于新增和更新工业炉信息")
|
||||
public class KilnInfoParam extends BaseParam {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
@ -15,7 +15,7 @@ import lombok.experimental.Accessors;
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value = "窑炉查询参数", description = "用于查询窑炉信息")
|
||||
@ApiModel(value = "工业炉查询参数", description = "用于查询工业炉信息")
|
||||
public class KilnInfoQueryParam extends BasePageParam {
|
||||
/**
|
||||
* 主键,自增
|
||||
|
@ -18,7 +18,7 @@ import lombok.experimental.Accessors;
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@Builder
|
||||
@ApiModel(value = "窑炉视图对象", description = "用于查询窑炉信息")
|
||||
@ApiModel(value = "工业炉视图对象", description = "用于查询工业炉信息")
|
||||
public class KilnInfoVo extends BaseVo implements PageVo.ConvertVo {
|
||||
/**
|
||||
* 主键,自增
|
||||
|
@ -101,7 +101,7 @@ public class AlarmInfo extends Model<AlarmInfo> {
|
||||
private String equipmentName;
|
||||
|
||||
/**
|
||||
* 报警类型 0窑炉,1表示车辆,依次类推
|
||||
* 报警类型 0工业炉,1表示车辆,依次类推
|
||||
*/
|
||||
@TableField("type")
|
||||
private Integer type;
|
||||
|
@ -91,13 +91,13 @@ public class CurrTask extends Model<CurrTask> {
|
||||
private Long autoExeTaskId;
|
||||
|
||||
/**
|
||||
* 窑炉id,关联设备窑炉表:t_kiln_info
|
||||
* 工业炉id,关联设备工业炉表:t_kiln_info
|
||||
*/
|
||||
@TableField("kiln_id")
|
||||
private Long kilnId;
|
||||
|
||||
/**
|
||||
* 窑炉名称
|
||||
* 工业炉名称
|
||||
*/
|
||||
@TableField("kiln_name")
|
||||
private String kilnName;
|
||||
@ -145,13 +145,13 @@ public class CurrTask extends Model<CurrTask> {
|
||||
private String startPosition;
|
||||
|
||||
/**
|
||||
* 目标位置指的是窑炉的位置
|
||||
* 目标位置指的是工业炉的位置
|
||||
*/
|
||||
@TableField("target_position")
|
||||
private String targetPosition;
|
||||
|
||||
/**
|
||||
* 是否缓存,如果当前指的窑炉正在加工,系统自动分配货物到缓存位置, 并且记录缓存库位,这是当指定窑炉加工完成后系统先判断是否当前缓存有当前等待执行的任务,然后按照先来先执行原则(等待多个任务)自动调用车辆来执行
|
||||
* 是否缓存,如果当前指的工业炉正在加工,系统自动分配货物到缓存位置, 并且记录缓存库位,这是当指定工业炉加工完成后系统先判断是否当前缓存有当前等待执行的任务,然后按照先来先执行原则(等待多个任务)自动调用车辆来执行
|
||||
*/
|
||||
@TableField("is_cache")
|
||||
private Integer isCache;
|
||||
@ -217,7 +217,7 @@ public class CurrTask extends Model<CurrTask> {
|
||||
private String sheetNo;
|
||||
|
||||
/**
|
||||
* 任务类型:0:入库到窑炉,1:入库到缓存区,2出库到 窑炉到缓存区,3缓存区出库
|
||||
* 任务类型:0:入库到工业炉,1:入库到缓存区,2出库到 工业炉到缓存区,3缓存区出库
|
||||
*/
|
||||
@TableField("task_type")
|
||||
private Integer taskType;
|
||||
|
@ -95,13 +95,13 @@ public class InStockInfo extends Model<InStockInfo> {
|
||||
private Long taskId;
|
||||
|
||||
/**
|
||||
* 窑炉id ,if(status == 0){从窑炉出来等待库存} else if(status == 1){到目标窑炉前缓存到库位}关联设备窑炉表:t_kiln_info
|
||||
* 工业炉id ,if(status == 0){从工业炉出来等待库存} else if(status == 1){到目标工业炉前缓存到库位}关联设备工业炉表:t_kiln_info
|
||||
*/
|
||||
@TableField("kiln_id")
|
||||
private Long kilnId;
|
||||
|
||||
/**
|
||||
* 窑炉名称
|
||||
* 工业炉名称
|
||||
*/
|
||||
@TableField("kiln_name")
|
||||
private String kilnName;
|
||||
@ -125,7 +125,7 @@ public class InStockInfo extends Model<InStockInfo> {
|
||||
private String palletCode;
|
||||
|
||||
/**
|
||||
* 类型: 0等待出库,1到窑炉前缓存,2插单任务缓存
|
||||
* 类型: 0等待出库,1到工业炉前缓存,2插单任务缓存
|
||||
*/
|
||||
@TableField("type")
|
||||
private Integer type;
|
||||
|
@ -95,13 +95,13 @@ public class InStockInfoHis extends Model<InStockInfoHis> {
|
||||
private Integer taskId;
|
||||
|
||||
/**
|
||||
* 窑炉id ,if(status == 0){从窑炉出来等待库存} else if(status == 1){到目标窑炉前缓存到库位}关联设备窑炉表:t_kiln_info
|
||||
* 工业炉id ,if(status == 0){从工业炉出来等待库存} else if(status == 1){到目标工业炉前缓存到库位}关联设备工业炉表:t_kiln_info
|
||||
*/
|
||||
@TableField("kiln_id")
|
||||
private Integer kilnId;
|
||||
|
||||
/**
|
||||
* 窑炉名称
|
||||
* 工业炉名称
|
||||
*/
|
||||
@TableField("kiln_name")
|
||||
private String kilnName;
|
||||
@ -125,7 +125,7 @@ public class InStockInfoHis extends Model<InStockInfoHis> {
|
||||
private String palletCode;
|
||||
|
||||
/**
|
||||
* 类型: 0等待出库,1到窑炉前缓存,2插单任务缓存
|
||||
* 类型: 0等待出库,1到工业炉前缓存,2插单任务缓存
|
||||
*/
|
||||
@TableField("type")
|
||||
private Integer type;
|
||||
|
@ -15,7 +15,7 @@ import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 窑炉信息
|
||||
* 工业炉信息
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
@ -95,13 +95,13 @@ public class KilnInfo extends Model<KilnInfo> {
|
||||
private Integer factoryId;
|
||||
|
||||
/**
|
||||
* 窑炉名称 建议与AMPS相同
|
||||
* 工业炉名称 建议与AMPS相同
|
||||
*/
|
||||
@TableField("kiln_name")
|
||||
private String kilnName;
|
||||
|
||||
/**
|
||||
* 窑炉别名
|
||||
* 工业炉别名
|
||||
*/
|
||||
@TableField("kiln_alias")
|
||||
private String kilnAlias;
|
||||
|
@ -14,7 +14,7 @@ import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 窑炉电能参数值
|
||||
* 工业炉电能参数值
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
@ -50,7 +50,7 @@ public class ParEleValue extends Model<ParEleValue> {
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 窑炉id,关联设备窑炉表:t_kiln_info
|
||||
* 工业炉id,关联设备工业炉表:t_kiln_info
|
||||
*/
|
||||
@TableField("kiln_id")
|
||||
private Long kilnId;
|
||||
|
@ -14,7 +14,7 @@ import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 窑炉使用气检测值
|
||||
* 工业炉使用气检测值
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
@ -50,7 +50,7 @@ public class ParGasValue extends Model<ParGasValue> {
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 窑炉id,关联设备窑炉表:t_kiln_info
|
||||
* 工业炉id,关联设备工业炉表:t_kiln_info
|
||||
*/
|
||||
@TableField("kiln_id")
|
||||
private Long kilnId;
|
||||
|
@ -14,7 +14,7 @@ import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 窑炉运转速度
|
||||
* 工业炉运转速度
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
@ -50,7 +50,7 @@ public class ParRotSpeedValue extends Model<ParRotSpeedValue> {
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 窑炉id,关联设备窑炉表:t_kiln_info
|
||||
* 工业炉id,关联设备工业炉表:t_kiln_info
|
||||
*/
|
||||
@TableField("kiln_id")
|
||||
private Long kilnId;
|
||||
|
@ -14,7 +14,7 @@ import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 窑炉温度监控
|
||||
* 工业炉温度监控
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
@ -50,7 +50,7 @@ public class ParTemValue extends Model<ParTemValue> {
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 窑炉id,关联设备窑炉表:t_kiln_info
|
||||
* 工业炉id,关联设备工业炉表:t_kiln_info
|
||||
*/
|
||||
@TableField("kiln_id")
|
||||
private Long kilnId;
|
||||
|
@ -45,7 +45,7 @@ public class PointInfo extends Model<PointInfo> {
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 点位说明;关联对应表数据的code,窑炉code,库位code等等
|
||||
* 点位说明;关联对应表数据的code,工业炉code,库位code等等
|
||||
*/
|
||||
@TableField("note")
|
||||
private String note;
|
||||
|
@ -91,13 +91,13 @@ public class TaskHis extends Model<TaskHis> {
|
||||
private Long autoExeTaskId;
|
||||
|
||||
/**
|
||||
* 窑炉id,关联设备窑炉表:t_kiln_info
|
||||
* 工业炉id,关联设备工业炉表:t_kiln_info
|
||||
*/
|
||||
@TableField("kiln_id")
|
||||
private Long kilnId;
|
||||
|
||||
/**
|
||||
* 窑炉名称
|
||||
* 工业炉名称
|
||||
*/
|
||||
@TableField("kiln_name")
|
||||
private String kilnName;
|
||||
@ -145,13 +145,13 @@ public class TaskHis extends Model<TaskHis> {
|
||||
private String startPosition;
|
||||
|
||||
/**
|
||||
* 目标位置指的是窑炉的位置
|
||||
* 目标位置指的是工业炉的位置
|
||||
*/
|
||||
@TableField("target_position")
|
||||
private String targetPosition;
|
||||
|
||||
/**
|
||||
* 是否缓存,如果当前指的窑炉正在加工,系统自动分配货物到缓存位置, 并且记录缓存库位,这是当指定窑炉加工完成后系统先判断是否当前缓存有当前等待执行的任务,然后按照先来先执行原则(等待多个任务)自动调用车辆来执行
|
||||
* 是否缓存,如果当前指的工业炉正在加工,系统自动分配货物到缓存位置, 并且记录缓存库位,这是当指定工业炉加工完成后系统先判断是否当前缓存有当前等待执行的任务,然后按照先来先执行原则(等待多个任务)自动调用车辆来执行
|
||||
*/
|
||||
@TableField("is_cache")
|
||||
private Integer isCache;
|
||||
@ -217,7 +217,7 @@ public class TaskHis extends Model<TaskHis> {
|
||||
private Integer processType;
|
||||
|
||||
/**
|
||||
* 任务类型:0:入库到窑炉,1:入库到缓存区,2出库到 窑炉到缓存区,3缓存区出库
|
||||
* 任务类型:0:入库到工业炉,1:入库到缓存区,2出库到 工业炉到缓存区,3缓存区出库
|
||||
*/
|
||||
@TableField("task_type")
|
||||
private Integer taskType;
|
||||
|
@ -5,7 +5,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 窑炉信息 Mapper 接口
|
||||
* 工业炉信息 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
|
@ -5,7 +5,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 窑炉电能参数值 Mapper 接口
|
||||
* 工业炉电能参数值 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
|
@ -5,7 +5,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 窑炉使用气检测值 Mapper 接口
|
||||
* 工业炉使用气检测值 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
|
@ -5,7 +5,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 窑炉运转速度 Mapper 接口
|
||||
* 工业炉运转速度 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
|
@ -5,7 +5,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 窑炉温度监控 Mapper 接口
|
||||
* 工业炉温度监控 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
|
@ -5,7 +5,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 窑炉信息 服务类
|
||||
* 工业炉信息 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
|
@ -5,7 +5,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 窑炉电能参数值 服务类
|
||||
* 工业炉电能参数值 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
|
@ -5,7 +5,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 窑炉使用气检测值 服务类
|
||||
* 工业炉使用气检测值 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
|
@ -5,7 +5,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 窑炉运转速度 服务类
|
||||
* 工业炉运转速度 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
|
@ -5,7 +5,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 窑炉温度监控 服务类
|
||||
* 工业炉温度监控 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
|
@ -8,7 +8,7 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 窑炉信息 服务实现类
|
||||
* 工业炉信息 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
|
@ -8,7 +8,7 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 窑炉电能参数值 服务实现类
|
||||
* 工业炉电能参数值 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
|
@ -8,7 +8,7 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 窑炉使用气检测值 服务实现类
|
||||
* 工业炉使用气检测值 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
|
@ -8,7 +8,7 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 窑炉运转速度 服务实现类
|
||||
* 工业炉运转速度 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
|
@ -8,7 +8,7 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 窑炉温度监控 服务实现类
|
||||
* 工业炉温度监控 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
|
@ -84,10 +84,10 @@ public class EnergyController extends BaseController {
|
||||
private TaskHisServiceBiz taskHisServiceBiz;
|
||||
|
||||
@PostMapping(value = "eletric")
|
||||
@ApiOperation(value = "根据窑炉id获取消耗情况")
|
||||
@ApiOperation(value = "根据工业炉id获取消耗情况")
|
||||
public R<String> list(@Validated({Default.class}) @RequestBody ElectricQueryParam electricQueryParam) {
|
||||
Long kiln = electricQueryParam.getKilnId();
|
||||
//窑炉id为0代表全部,存储的时候计算全部
|
||||
//工业炉id为0代表全部,存储的时候计算全部
|
||||
JSONObject jsonObject=new JSONObject();
|
||||
//指定时间节点
|
||||
LocalDate timeDate = electricQueryParam.getTime().toLocalDate();
|
||||
@ -222,7 +222,7 @@ public class EnergyController extends BaseController {
|
||||
Long kilnId = currTask.getKilnId();
|
||||
KilnInfo kilnInfo = kilnInfoServiceBiz.getById(kilnId);
|
||||
Integer kilnType = kilnInfo.getType();
|
||||
//传入任务号,窑炉号,查询消耗数据,返回json字符串
|
||||
//传入任务号,工业炉号,查询消耗数据,返回json字符串
|
||||
JSONObject jsonObject=new JSONObject();
|
||||
ConsumeDataVo consumeDataVo=ConsumeDataVo.builder().build();
|
||||
|
||||
|
@ -16,17 +16,17 @@ import com.mt.wms.core.base.IEnum;
|
||||
*/
|
||||
public enum TaskTypeEnum implements IEnum<Integer> {
|
||||
/**
|
||||
* 入库到窑炉
|
||||
* 入库到工业炉
|
||||
*/
|
||||
WTK(0, "入库到窑炉"),
|
||||
WTK(0, "入库到工业炉"),
|
||||
/**
|
||||
* 入库到缓存
|
||||
*/
|
||||
WTC(1, "入库到缓存"),
|
||||
/**
|
||||
* 出库到窑炉到缓存区
|
||||
* 出库到工业炉到缓存区
|
||||
*/
|
||||
KTC(2, "出库到窑炉到缓存区"),
|
||||
KTC(2, "出库到工业炉到缓存区"),
|
||||
/**
|
||||
* 缓存区出库
|
||||
*/
|
||||
|
@ -26,7 +26,7 @@ public class AlarmInfoQueryParam extends BasePageParam {
|
||||
@ApiModelProperty(value = "设备ID", required = false)
|
||||
private Long equipmentId;
|
||||
|
||||
@ApiModelProperty(value = "报警类型0窑炉,1表示车辆", required = true)
|
||||
@ApiModelProperty(value = "报警类型0工业炉,1表示车辆", required = true)
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty(value = "开始时间", required = false)
|
||||
|
@ -22,7 +22,7 @@ public class ElectricQueryParam extends BaseParam {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "窑炉id", required = false)
|
||||
@ApiModelProperty(value = "工业炉id", required = false)
|
||||
private Long kilnId;
|
||||
|
||||
@ApiModelProperty(value = "任务id", required = true)
|
||||
|
@ -17,7 +17,7 @@ import lombok.experimental.Accessors;
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value = "工艺步骤参数", description = "工艺步骤参数")
|
||||
public class StepInfoParam extends BaseParam {
|
||||
@ApiModelProperty(value = "窑炉id", required = true)
|
||||
@ApiModelProperty(value = "工业炉id", required = true)
|
||||
private Long kilnId;
|
||||
|
||||
@ApiModelProperty(value = "工艺号id", required = true)
|
||||
|
@ -34,7 +34,7 @@ public class TaskCreateParam extends BaseParam {
|
||||
private String targetPosition;
|
||||
@ApiModelProperty(value = "加工类型:0 初始加工,1 复加工", required = true)
|
||||
private Integer processType;
|
||||
@ApiModelProperty(value = "窑炉Id", example = "1", required = true)
|
||||
@ApiModelProperty(value = "工业炉Id", example = "1", required = true)
|
||||
private Long kilnId;
|
||||
@ApiModelProperty(value = "工艺号", required = true)
|
||||
private String craftCode;
|
||||
|
@ -98,7 +98,7 @@ public class OrderInfoHisServiceImpl extends BaseService implements OrderInfoHis
|
||||
//获取车辆信息
|
||||
R<List<VehicleVo>> vehicle = vehicleService.list(new VehicleQueryParam());
|
||||
Map<Long, List<VehicleVo>> collect = vehicle.getData().stream().collect(Collectors.groupingBy(VehicleVo::getId));
|
||||
//获取窑炉信息
|
||||
//获取工业炉信息
|
||||
R<List<KilnInfoVo>> kiln = kilnInfoService.list(new KilnInfoQueryParam());
|
||||
Map<Long, List<KilnInfoVo>> collect2 = kiln.getData().stream().collect(Collectors.groupingBy(KilnInfoVo::getId));
|
||||
currOrderCurrTask.getRecords().forEach(orderInfo ->
|
||||
@ -113,7 +113,7 @@ public class OrderInfoHisServiceImpl extends BaseService implements OrderInfoHis
|
||||
orderInfo.setStartPosition(currTask.getStartPosition());
|
||||
orderInfo.setTargetPosition(currTask.getTargetPosition());
|
||||
orderInfo.setVehicleId(currTask.getVehicleId());
|
||||
//获取窑炉和车辆的名称信息
|
||||
//获取工业炉和车辆的名称信息
|
||||
if (orderInfo.getKilnId() != null)
|
||||
{
|
||||
orderInfo.setKilnName(collect2.get(orderInfo.getKilnId()).get(0).getKilnName());
|
||||
|
@ -169,7 +169,7 @@ public class OrderInfoServiceImpl extends BaseService implements OrderInfoServic
|
||||
//获取车辆信息
|
||||
//R<List<VehicleVo>> vehicle = vehicleService.list(new VehicleQueryParam());
|
||||
//Map<Long, List<VehicleVo>> collect = vehicle.getData().stream().collect(Collectors.groupingBy(VehicleVo::getId));
|
||||
//获取窑炉信息
|
||||
//获取工业炉信息
|
||||
R<List<KilnInfoVo>> kiln = kilnInfoService.list(new KilnInfoQueryParam());
|
||||
Map<Long, List<KilnInfoVo>> collect2 = kiln.getData().stream().collect(Collectors.groupingBy(KilnInfoVo::getId));
|
||||
currOrderCurrTask.getRecords().forEach(orderInfo ->
|
||||
@ -185,7 +185,7 @@ public class OrderInfoServiceImpl extends BaseService implements OrderInfoServic
|
||||
orderInfo.setTargetPosition(currTask.getTargetPosition());
|
||||
orderInfo.setTaskCode(currTask.getTaskCode());
|
||||
//orderInfo.setVehicleId(currTask.getVehicleId());
|
||||
//获取窑炉和车辆的名称信息
|
||||
//获取工业炉和车辆的名称信息
|
||||
if (orderInfo.getKilnId() != null)
|
||||
{
|
||||
orderInfo.setKilnName(collect2.get(orderInfo.getKilnId()).get(0).getKilnName());
|
||||
|
@ -82,7 +82,7 @@ public class AsynRunTaskService extends BaseService {
|
||||
@Resource
|
||||
private CurrTaskDetServiceBiz currTaskDetServiceBiz;
|
||||
|
||||
//窑炉可用未满的情况下,调用车辆起点为提升台终点为窑炉
|
||||
//工业炉可用未满的情况下,调用车辆起点为提升台终点为工业炉
|
||||
@Async("asyncServiceExecutor")
|
||||
public void asynRunTask(Long currTaskId, Long vehicleId) throws IOException {
|
||||
CurrTask currTask = currTaskServiceBiz.getById(currTaskId);
|
||||
@ -121,7 +121,7 @@ public class AsynRunTaskService extends BaseService {
|
||||
//执行成功,托盘进炉
|
||||
if (status == 1) {
|
||||
// TODO: 2022/7/7 开始记录能源消耗
|
||||
asynStartRecordConsume(currTaskId, currTask.getKilnId());
|
||||
|
||||
logger.info("===执行任务:" + currTaskId + " ,车辆搬运任务,车辆:" + vehicleId + " ,起点:" + startPoint + " ,终点:" + endPoint + "任务执行成功===");
|
||||
//更新调度表状态为完成
|
||||
runTask.setUpdateTime(LocalDateTime.now());
|
||||
@ -132,10 +132,12 @@ public class AsynRunTaskService extends BaseService {
|
||||
currTask.setIsIn(1);
|
||||
currTask.setRunTaskId(runTask.getId());
|
||||
currTask.setUpdateTime(LocalDateTime.now());
|
||||
currTask.setBeginTime(LocalDateTime.now());
|
||||
currTaskServiceBiz.updateById(currTask);
|
||||
//更新小车状态
|
||||
vehicle.setStatus(0);
|
||||
vehicleInfoServiceBiz.updateById(vehicle);
|
||||
asynStartRecordConsume(currTaskId, currTask.getKilnId());
|
||||
} else {
|
||||
runTask.setStatus(3);
|
||||
runTask.setUpdateTime(LocalDateTime.now());
|
||||
@ -147,7 +149,7 @@ public class AsynRunTaskService extends BaseService {
|
||||
}
|
||||
}
|
||||
|
||||
//窑炉可用未满的情况下,调用车辆起点为缓存区终点为窑炉
|
||||
//工业炉可用未满的情况下,调用车辆起点为缓存区终点为工业炉
|
||||
public void asynRunTaskForStockToKiln(Long stockInfokId, Long vehicleId) throws IOException {
|
||||
InStockInfo inStockInfo = inStockInfoServiceBiz.getById(stockInfokId);
|
||||
Location location = locationServiceBiz.getById(inStockInfo.getLocationId());
|
||||
@ -189,8 +191,7 @@ public class AsynRunTaskService extends BaseService {
|
||||
Integer status = sendTaskToRgv(vehicleId, currTaskId, startPoint, endPoint, currTask.getPlcValue());
|
||||
//执行成功,托盘进炉
|
||||
if (status == 1) {
|
||||
// TODO: 2022/7/7
|
||||
asynStartRecordConsume(currTaskId, currTask.getKilnId());
|
||||
|
||||
logger.info("===执行任务:" + currTaskId + " ,车辆搬运任务,车辆:" + vehicleId + " ,起点:" + startPoint + " ,终点:" + endPoint + "任务执行成功===");
|
||||
//更新调度表状态为完成
|
||||
runTask.setUpdateTime(LocalDateTime.now());
|
||||
@ -216,6 +217,8 @@ public class AsynRunTaskService extends BaseService {
|
||||
//更新小车状态
|
||||
vehicle.setStatus(0);
|
||||
vehicleInfoServiceBiz.updateById(vehicle);
|
||||
// TODO: 2022/7/7
|
||||
asynStartRecordConsume(currTaskId, currTask.getKilnId());
|
||||
} else {
|
||||
runTask.setStatus(3);
|
||||
runTask.setUpdateTime(LocalDateTime.now());
|
||||
@ -228,7 +231,7 @@ public class AsynRunTaskService extends BaseService {
|
||||
}
|
||||
}
|
||||
|
||||
//窑炉已满,调用车辆起点为提升台,终点为缓存区
|
||||
//工业炉已满,调用车辆起点为提升台,终点为缓存区
|
||||
@Async("asyncServiceExecutor")
|
||||
public void asynRunTaskToWarehouse(Long currTaskId, Long vehicleId) throws IOException {
|
||||
CurrTask currTask = currTaskServiceBiz.getById(currTaskId);
|
||||
@ -291,7 +294,7 @@ public class AsynRunTaskService extends BaseService {
|
||||
}
|
||||
}
|
||||
|
||||
//窑炉加工完成,调用车辆入库到缓存区
|
||||
//工业炉加工完成,调用车辆入库到缓存区
|
||||
@Async("asyncServiceExecutor")
|
||||
public void asynRunTaskForKilnToWarehouse(Long currTaskId, Long vehicleId) throws IOException {
|
||||
CurrTask currTask = currTaskServiceBiz.getById(currTaskId);
|
||||
@ -331,9 +334,8 @@ public class AsynRunTaskService extends BaseService {
|
||||
Long endPoint = pointInfoServiceBiz.getOne(new QueryWrapper<PointInfo>().eq(PointInfo.NOTE, runTask.getEndPosition())).getCode();
|
||||
Integer status = sendTaskToRgv(vehicleId, currTaskId, startPoint, endPoint, currTask.getPlcValue());
|
||||
if (status == 1) {
|
||||
|
||||
// TODO: 2022/7/7 加工完成,记录结束时能源消耗
|
||||
asynEndRecordConsume(currTaskId, currTask.getKilnId());
|
||||
|
||||
logger.info("===执行任务:" + currTaskId + " ,车辆搬运任务,车辆:" + vehicleId + " ,起点:" + startPoint + " ,终点:" + endPoint + "任务执行成功===");
|
||||
//更新关系表状态为完成
|
||||
runTask.setUpdateTime(LocalDateTime.now());
|
||||
@ -344,6 +346,7 @@ public class AsynRunTaskService extends BaseService {
|
||||
currTask.setIsOut(2);
|
||||
currTask.setUpdateTime(LocalDateTime.now());
|
||||
currTask.setStatus(2);
|
||||
currTask.setEndTime(LocalDateTime.now());
|
||||
currTaskServiceBiz.updateById(currTask);
|
||||
//更新in_stock_info表
|
||||
inStockInfo.setStatus(2);
|
||||
@ -352,6 +355,7 @@ public class AsynRunTaskService extends BaseService {
|
||||
//更新小车状态
|
||||
vehicle.setStatus(0);
|
||||
vehicleInfoServiceBiz.updateById(vehicle);
|
||||
asynEndRecordConsume(currTaskId, currTask.getKilnId());
|
||||
// TODO: 2022/7/6 上报apms加工完成.每次进炉加工完成后就上报apms完成处理生产单,等所有加工步骤都完成后上报apms完成生产单。
|
||||
logger.info("任务:" + currTaskId + " 生产单号:" + currTask.getSheetNo() + "开始上报apm完成处理生产单!");
|
||||
ApmsEndProcess apmsEndProcess = new ApmsEndProcess();
|
||||
@ -400,10 +404,10 @@ public class AsynRunTaskService extends BaseService {
|
||||
runTask.setStatus(3);
|
||||
runTask.setUpdateTime(LocalDateTime.now());
|
||||
runTaskServiceBiz.updateById(runTask);
|
||||
logger.info("任务 " + currTask.getTaskCode() + " 车辆从窑炉到缓存区过程中失败。");
|
||||
logger.info("任务 " + currTask.getTaskCode() + " 车辆从工业炉到缓存区过程中失败。");
|
||||
logger.info("===执行任务:" + currTaskId + " ,车辆搬运任务,车辆:" + vehicleId + " ,起点:" + startPoint + " ,终点:" + endPoint + "任务执行失败===");
|
||||
// 2021/12/14 websocket推送到前端
|
||||
webSocketServer.sendtoAll("任务 " + currTask.getTaskCode() + " 车辆从窑炉到缓存区过程中失败。");
|
||||
webSocketServer.sendtoAll("任务 " + currTask.getTaskCode() + " 车辆从工业炉到缓存区过程中失败。");
|
||||
}
|
||||
}
|
||||
|
||||
@ -507,6 +511,7 @@ public class AsynRunTaskService extends BaseService {
|
||||
}
|
||||
|
||||
//允许进炉信号为true,记录开始加工时的能源消耗数据,再写定时任务记录加工过程的消耗数据,再写一个异步方法,加工任务结束的时候记录一下各项消耗的值
|
||||
@Async("asyncServiceExecutor")
|
||||
public void asynStartRecordConsume(Long currTaskId, Long kilnId) {
|
||||
// TODO: 2022/2/17
|
||||
KilnInfo kilnInfo = kilnInfoServiceBiz.getById(kilnId);
|
||||
@ -681,9 +686,9 @@ public class AsynRunTaskService extends BaseService {
|
||||
//电度值
|
||||
electricalValue = readPlc(nameSpaceNote, "TotalElectricity");
|
||||
//A向电压
|
||||
phaseAVoltage = readPlc(nameSpaceNote, "PhaseAVoltage");
|
||||
phaseBVoltage = readPlc(nameSpaceNote, "PhaseBVoltage");
|
||||
phaseCVoltage = readPlc(nameSpaceNote, "PhaseCVoltage");
|
||||
phaseAVoltage = readPlc(nameSpaceNote, "AVoltage");
|
||||
phaseBVoltage = readPlc(nameSpaceNote, "BVoltage");
|
||||
phaseCVoltage = readPlc(nameSpaceNote, "CVoltage");
|
||||
ParEleValue parEleValue4 = new ParEleValue();
|
||||
parEleValue4.setAVoltagevValue(phaseAVoltage.floatValue());
|
||||
parEleValue4.setAVoltagevValue(phaseBVoltage.floatValue());
|
||||
@ -700,6 +705,7 @@ public class AsynRunTaskService extends BaseService {
|
||||
}
|
||||
|
||||
//允许出炉信号为true,记录结束加工时的能源消耗数据
|
||||
@Async("asyncServiceExecutor")
|
||||
public void asynEndRecordConsume(Long currTaskId, Long kilnId) {
|
||||
// TODO: 2022/2/17
|
||||
KilnInfo kilnInfo = kilnInfoServiceBiz.getById(kilnId);
|
||||
@ -874,9 +880,9 @@ public class AsynRunTaskService extends BaseService {
|
||||
//电度值
|
||||
electricalValue = readPlc(nameSpaceNote, "TotalElectricity");
|
||||
//A向电压
|
||||
phaseAVoltage = readPlc(nameSpaceNote, "PhaseAVoltage");
|
||||
phaseBVoltage = readPlc(nameSpaceNote, "PhaseBVoltage");
|
||||
phaseCVoltage = readPlc(nameSpaceNote, "PhaseCVoltage");
|
||||
phaseAVoltage = readPlc(nameSpaceNote, "AVoltage");
|
||||
phaseBVoltage = readPlc(nameSpaceNote, "BVoltage");
|
||||
phaseCVoltage = readPlc(nameSpaceNote, "CVoltage");
|
||||
ParEleValue parEleValue4 = new ParEleValue();
|
||||
parEleValue4.setAVoltagevValue(phaseAVoltage.floatValue());
|
||||
parEleValue4.setAVoltagevValue(phaseBVoltage.floatValue());
|
||||
|
@ -23,6 +23,7 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import static org.bouncycastle.asn1.x500.style.RFC4519Style.c;
|
||||
import static org.bouncycastle.asn1.x500.style.RFC4519Style.l;
|
||||
|
||||
/**
|
||||
@ -63,7 +64,7 @@ public class RunTaskUtils {
|
||||
*/
|
||||
public R runTaskForInKiln(Long currTaskId) throws InterruptedException, IOException {
|
||||
CurrTask currTask = currTaskServiceBiz.getById(currTaskId);
|
||||
//起点,起点和终点是液压台code、窑炉code、缓存区code
|
||||
//起点,起点和终点是液压台code、工业炉code、缓存区code
|
||||
String startPosition = currTask.getStartPosition();
|
||||
PointInfo startPoint = pointInfoServiceBiz.getOne(new QueryWrapper<PointInfo>().eq(PointInfo.NOTE, startPosition));
|
||||
// 可以根据点位类型判断起点是否为液压台(2是液压台)
|
||||
@ -98,18 +99,18 @@ public class RunTaskUtils {
|
||||
//有小车在运行,提示当前有车辆在运行,请稍后
|
||||
return R.failed("当前轨道有RGV车辆在运动,请等待当前RGV车辆执行完毕再执行任务!");
|
||||
}
|
||||
// 2022/2/27 传入任务id,起始点,若终点是窑炉,获取窑炉状态,能放两坨货的窑炉怎么判定状态?(AllowIn)
|
||||
// 2022/2/27 传入任务id,起始点,若终点是工业炉,获取工业炉状态,能放两坨货的工业炉怎么判定状态?(AllowIn)
|
||||
KilnInfo kilnInfo = kilnInfoServiceBiz.getById(currTask.getKilnId());
|
||||
String kilnNamePlace = plcNameSpaceServiceBiz.getOne(new QueryWrapper<PlcNameSpace>()
|
||||
.eq(PlcNameSpace.EQ_TYPE, 0)
|
||||
.eq(PlcNameSpace.EQ_ID, kilnInfo.getId())).getName();
|
||||
String result = readPlcToString(kilnNamePlace, "AllowIn");
|
||||
boolean resultBoolean = Boolean.parseBoolean(JSONObject.parseObject(result).get("result").toString());
|
||||
//窑炉状态为不可用
|
||||
//工业炉状态为不可用
|
||||
if (kilnInfo.getStatus() == 1) {
|
||||
return R.failed("目标窑炉不可用!");
|
||||
return R.failed("目标工业炉不可用!");
|
||||
}
|
||||
//窑炉可用未满
|
||||
//工业炉可用未满
|
||||
if (resultBoolean){
|
||||
//计算出路径最短的车辆id
|
||||
Long vehicleId = taskDistanceUtils.chooseVehicle(currTask.getStartPosition(), currTask.getTargetPosition());
|
||||
@ -130,7 +131,7 @@ public class RunTaskUtils {
|
||||
asynRunTaskService.asynRunTask(currTask.getId(),vehicleId);
|
||||
return R.ok("操作成功,任务已开始执行。");
|
||||
} else {
|
||||
//窑炉已满
|
||||
//工业炉已满
|
||||
//查询缓存区库位是否已满
|
||||
int count = locationServiceBiz.count(new QueryWrapper<Location>()
|
||||
.eq(Location.STATUS, 0)
|
||||
@ -150,6 +151,7 @@ public class RunTaskUtils {
|
||||
//计算出路径最短的车辆id,起点液压台,终点缓存区库位点
|
||||
Long vehicleId = taskDistanceUtils.chooseVehicle(currTask.getStartPosition(), location.getCode());
|
||||
if (vehicleId==0){
|
||||
logger.info("两辆车都不在线,请检查后重试!");
|
||||
return R.failed("两辆车都不在线,请检查后重试!");
|
||||
}
|
||||
//占用车辆
|
||||
@ -165,27 +167,28 @@ public class RunTaskUtils {
|
||||
currTaskServiceBiz.updateById(currTask);
|
||||
//异步调用车辆
|
||||
asynRunTaskService.asynRunTaskToWarehouse(currTask.getId(),vehicleId);
|
||||
return R.ok("操作成功!当前目标窑炉已满,托盘准备加入缓存区待加工队列。");
|
||||
return R.ok("操作成功!当前目标工业炉已满,托盘准备加入缓存区待加工队列。");
|
||||
}
|
||||
return R.failed("当前目标窑炉已满!缓存区已满!请稍后重试!");
|
||||
return R.failed("当前目标工业炉已满!缓存区已满!请稍后重试!");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 加工完成、出炉。传入窑炉id,查询正在该窑炉加工的currTask,查询是否有空闲车辆,有,
|
||||
* (查询是否为自动任务,是,查询下一步的窑炉是否空闲,是,调车去下一窑炉加工,否,暂存缓存区)
|
||||
* 呼叫车辆暂存缓存区,车辆调度任务结束后,(结束后再查询缓R存区队列避免车辆路线冲突)查询该窑炉的缓存区队列,开始下一托盘货物调度进窑炉
|
||||
* 加工完成、出炉。传入工业炉id,查询正在该工业炉加工的currTask,查询是否有空闲车辆,有,
|
||||
* (查询是否为自动任务,是,查询下一步的工业炉是否空闲,是,调车去下一工业炉加工,否,暂存缓存区)
|
||||
* 呼叫车辆暂存缓存区,车辆调度任务结束后,(结束后再查询缓R存区队列避免车辆路线冲突)查询该工业炉的缓存区队列,开始下一托盘货物调度进工业炉
|
||||
* @return R
|
||||
*/
|
||||
public R runTaskForOutKiln(Long kilnId) throws IOException {
|
||||
//查询正在该窑炉加工的currTask
|
||||
//查询正在该工业炉加工的currTask
|
||||
CurrTask currTask = currTaskServiceBiz.getOne(new QueryWrapper<CurrTask>()
|
||||
.eq("is_in", 1)
|
||||
.eq("status", 1)
|
||||
.eq("kiln_id", kilnId));
|
||||
//查询是否为自动任务
|
||||
if (currTask.getIsAuto()==1) {
|
||||
//查询自动任务的哪一步的设备id是该窑炉
|
||||
logger.info(currTask.getId()+"为自动任务");
|
||||
//查询自动任务的哪一步的设备id是该工业炉
|
||||
int firstCount = autoExeTaskServiceBiz.count(new QueryWrapper<AutoExeTask>().eq(AutoExeTask.F_TASK_ID, currTask.getId()));
|
||||
if (firstCount == 1) {
|
||||
//当前为自动任务第一步
|
||||
@ -197,6 +200,10 @@ public class RunTaskUtils {
|
||||
logger.info("自动任务第一步:"+currTask.getTaskCode()+"已执行完成。开始执行第二步任务:"+currTaskTwo);
|
||||
// 2022/2/27 websocket推送到页面显示
|
||||
webSocketServer.sendtoAll("自动任务第一步:"+currTask.getTaskCode()+"已执行完成。开始执行第二步任务:"+currTaskTwo);
|
||||
// TODO: 2022/7/12 第一步任务的结束上报
|
||||
currTask.setEndTime(LocalDateTime.now());
|
||||
currTask.setIsIn(2);
|
||||
currTaskServiceBiz.updateById(currTask);
|
||||
return runTaskForInKiln(taskId);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
@ -215,6 +222,7 @@ public class RunTaskUtils {
|
||||
logger.info("自动任务第二步:"+currTask.getTaskCode()+"已执行完成。开始执行第三步任务:"+currTaskThree);
|
||||
// 2022/2/27 websocket推送到页面显示
|
||||
webSocketServer.sendtoAll("自动任务第二步:"+currTask.getTaskCode()+"已执行完成。开始执行第三步任务:"+currTaskThree);
|
||||
// TODO: 2022/7/12 第二步任务的结束上报
|
||||
return runTaskForInKiln(thTaskId);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
@ -238,14 +246,16 @@ public class RunTaskUtils {
|
||||
List<VehicleInfo> vehicleInfoList = vehicleInfoServiceBiz.list(new QueryWrapper<VehicleInfo>().eq(VehicleInfo.STATUS, 1));
|
||||
if (vehicleInfoList.size()>0){
|
||||
//有小车在运行,提示当前有车辆在运行,请稍后
|
||||
logger.info("当前轨道有RGV车辆在运动,请等待当前RGV车辆执行完毕再执行任务!");
|
||||
return R.failed("当前轨道有RGV车辆在运动,请等待当前RGV车辆执行完毕再执行任务!");
|
||||
}
|
||||
//计算出路径最短的车辆id
|
||||
KilnInfo kilnInfo = kilnInfoServiceBiz.getById(kilnId);
|
||||
//窑炉为起点,缓存区为终点
|
||||
//工业炉为起点,缓存区为终点
|
||||
Location location = locationList.get(0);
|
||||
Long vehicleId = taskDistanceUtils.chooseVehicle(kilnInfo.getCode(), location.getCode());
|
||||
if (vehicleId==0){
|
||||
logger.info("两辆车都不在线,请检查后重试!");
|
||||
return R.failed("两辆车都不在线,请检查后重试!");
|
||||
}
|
||||
//占用车辆
|
||||
@ -262,7 +272,7 @@ public class RunTaskUtils {
|
||||
currTaskServiceBiz.updateById(currTask);
|
||||
// 2022/2/16 异步调用车辆
|
||||
asynRunTaskService.asynRunTaskForKilnToWarehouse(currTask.getId(),vehicleId);
|
||||
return R.ok("操作成功!当前目标窑炉已满,托盘加入缓存区待加工队列。");
|
||||
return R.ok("操作成功!托盘加入缓存区。");
|
||||
}else {
|
||||
return R.ok("当前缓存区已满,无法从加工炉出炉到缓存区。");
|
||||
}
|
||||
|
@ -77,9 +77,8 @@ public class ScheduledTask extends BaseService {
|
||||
@Test
|
||||
//@Scheduled(fixedDelay = 1000*20)
|
||||
public void test() throws IOException {
|
||||
System.out.println(CodeGeneratorHelper.getStoveCode("MBA102"));
|
||||
}
|
||||
@Scheduled(fixedDelay = 1000*60)
|
||||
//@Scheduled(fixedDelay = 1000*60)
|
||||
public void testWebsocket() throws IOException {
|
||||
//查询出正在进炉加工的curr_task,查询对应炉号是否Working,查询计划时间,剩余时间,查询标识卡详情
|
||||
List<CurrTask> currTaskList = currTaskServiceBiz.list(new QueryWrapper<CurrTask>().eq(CurrTask.IS_IN, 1));
|
||||
@ -185,14 +184,14 @@ public class ScheduledTask extends BaseService {
|
||||
webSocketServer.sendtoUser(JSON.toJSONString(nowCurrTaskDetVoList),"2");
|
||||
}
|
||||
/**
|
||||
* 查询加工完成的窑炉
|
||||
* 查询加工完成的工业炉
|
||||
*/
|
||||
@Scheduled(fixedDelay = 1000*60*2)
|
||||
public void taskForStockToKiln() throws IOException {
|
||||
//两辆车是否都空闲,只有两辆车都空闲才被允许做任务
|
||||
List<VehicleInfo> vehicleInfoList = vehicleInfoServiceBiz.list(new QueryWrapper<VehicleInfo>().eq(VehicleInfo.STATUS, 0));
|
||||
if (vehicleInfoList.size()==2){
|
||||
//遍历currTask为进行中且is_in为正在加工的窑炉状态,若加工完毕,调用runTaskForOutKiln
|
||||
//遍历currTask为进行中且is_in为正在加工的工业炉状态,若加工完毕,调用runTaskForOutKiln
|
||||
// 2022/3/6 有两托的判定哪一托好了(通过开始加工时间顺序排列)
|
||||
List<CurrTask> currTaskList = currTaskServiceBiz.list(new QueryWrapper<CurrTask>()
|
||||
.eq(CurrTask.STATUS, 1)
|
||||
@ -219,7 +218,7 @@ public class ScheduledTask extends BaseService {
|
||||
}
|
||||
}
|
||||
|
||||
//查询出正在加工的窑炉,遍历,根据采集频率的不同,采集高频数据能源消耗。暂定30秒
|
||||
//查询出正在加工的工业炉,遍历,根据采集频率的不同,采集高频数据能源消耗。暂定30秒
|
||||
@Scheduled(fixedDelay = 1000*30)
|
||||
public void getFastValue(){
|
||||
logger.info("==采集高频能耗数据开始==");
|
||||
@ -314,7 +313,7 @@ public class ScheduledTask extends BaseService {
|
||||
logger.info("==采集高频能耗数据结束==");
|
||||
}
|
||||
|
||||
//查询出正在加工的窑炉,遍历,根据采集频率的不同,采集低频数据能源消耗。暂定3分钟一次
|
||||
//查询出正在加工的工业炉,遍历,根据采集频率的不同,采集低频数据能源消耗。暂定3分钟一次
|
||||
@Scheduled(fixedDelay = 1000*60*3)
|
||||
public void getSlowValue(){
|
||||
logger.info("==开始采集低频数据==");
|
||||
@ -461,14 +460,14 @@ public class ScheduledTask extends BaseService {
|
||||
logger.info("==结束采集低频数据==");
|
||||
}
|
||||
|
||||
//遍历窑炉,空窑炉查询缓存区是否有等待加工的任务,
|
||||
//遍历工业炉,空工业炉查询缓存区是否有等待加工的任务,
|
||||
//待加工任务存在且没有状态为正在进炉的情况下,按照先进先出的规则选择待加工任务呼叫车辆进炉
|
||||
@Scheduled(fixedDelay = 1000*60)
|
||||
public void runTaskForEmptyKiln() throws IOException {
|
||||
List<KilnInfo> kilnInfoList = kilnInfoServiceBiz.list(new QueryWrapper<KilnInfo>()
|
||||
.eq(KilnInfo.VALID, 1).eq(KilnInfo.STATUS, 0).orderByAsc(KilnInfo.TYPE));
|
||||
// 呼叫车辆运送货物给炉子
|
||||
//存在空闲窑炉
|
||||
//存在空闲工业炉
|
||||
if (kilnInfoList.size()!=0) {
|
||||
for (KilnInfo kilnInfo:kilnInfoList
|
||||
) {
|
||||
@ -480,11 +479,13 @@ public class ScheduledTask extends BaseService {
|
||||
Boolean kilnReadyIn=false;
|
||||
if (kilnInfo.getType()==1){
|
||||
kilnReadyIn=kilnReadyIn(kilnInfo.getId());
|
||||
}else {
|
||||
kilnReadyIn=true;
|
||||
}
|
||||
//查询炉子是否allowIn
|
||||
Boolean kilnAllowIn = kilnAllowIn(kilnInfo.getId());
|
||||
if (kilnReadyIn||kilnAllowIn){
|
||||
//缓存区是否有目标位置为窑炉的待加工任务
|
||||
//缓存区是否有目标位置为工业炉的待加工任务
|
||||
List<InStockInfo> inStockInfoList = inStockInfoServiceBiz.list(new QueryWrapper<InStockInfo>()
|
||||
.eq(InStockInfo.TYPE, 1)
|
||||
.eq(InStockInfo.KILN_ID, kilnInfo.getId())
|
||||
|
@ -19,7 +19,7 @@ import java.util.Map;
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@Builder
|
||||
@ApiModel(value = "APMS返回窑炉信息", description = "APMS返回窑炉信息")
|
||||
@ApiModel(value = "APMS返回工业炉信息", description = "APMS返回工业炉信息")
|
||||
public class ApmsStoveVo extends BaseVo {
|
||||
/**
|
||||
* 返回消息,返回false时为失败原因
|
||||
|
@ -52,7 +52,7 @@ public class CurrTaskMainQueryVo extends BaseVo implements PageVo.ConvertVo {
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 任务类型:0:入库到窑炉,1:入库到缓存区,2出库到 窑炉到缓存区,3缓存区出库
|
||||
* 任务类型:0:入库到工业炉,1:入库到缓存区,2出库到 工业炉到缓存区,3缓存区出库
|
||||
*/
|
||||
@ApiModelProperty("任务类型")
|
||||
private Integer taskType;
|
||||
@ -69,9 +69,9 @@ public class CurrTaskMainQueryVo extends BaseVo implements PageVo.ConvertVo {
|
||||
private String startPosition;
|
||||
|
||||
/**
|
||||
* 目标位置指的是窑炉的位置
|
||||
* 目标位置指的是工业炉的位置
|
||||
*/
|
||||
@ApiModelProperty("窑炉位置")
|
||||
@ApiModelProperty("工业炉位置")
|
||||
private String targetPosition;
|
||||
/**
|
||||
* 库位
|
||||
@ -84,8 +84,8 @@ public class CurrTaskMainQueryVo extends BaseVo implements PageVo.ConvertVo {
|
||||
@ApiModelProperty("库位id")
|
||||
private Long locationId;
|
||||
/**
|
||||
* 窑炉名称
|
||||
* 工业炉名称
|
||||
*/
|
||||
@ApiModelProperty("窑炉名称")
|
||||
@ApiModelProperty("工业炉名称")
|
||||
private String kilnName;
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ public class CurrTaskQueryVo extends BaseVo implements PageVo.ConvertVo {
|
||||
@ApiModelProperty("状态")
|
||||
private Integer status;
|
||||
/**
|
||||
* 任务类型:0:入库到窑炉,1:入库到缓存区,2出库到 窑炉到缓存区,3缓存区出库
|
||||
* 任务类型:0:入库到工业炉,1:入库到缓存区,2出库到 工业炉到缓存区,3缓存区出库
|
||||
*/
|
||||
@ApiModelProperty("任务类型")
|
||||
private Integer taskType;
|
||||
@ -68,7 +68,7 @@ public class CurrTaskQueryVo extends BaseVo implements PageVo.ConvertVo {
|
||||
@ApiModelProperty("加工完成时间")
|
||||
private LocalDateTime aEndTime;
|
||||
|
||||
@ApiModelProperty("窑炉工艺号")
|
||||
@ApiModelProperty("工业炉工艺号")
|
||||
private String craftCode;
|
||||
/**
|
||||
* 开始位置
|
||||
@ -82,13 +82,19 @@ public class CurrTaskQueryVo extends BaseVo implements PageVo.ConvertVo {
|
||||
@ApiModelProperty("生产单号")
|
||||
private String sheetNo;
|
||||
/**
|
||||
* 目标位置指的是窑炉的位置
|
||||
* 目标位置指的是工业炉的位置
|
||||
*/
|
||||
@ApiModelProperty("窑炉位置")
|
||||
@ApiModelProperty("工业炉位置")
|
||||
private String targetPosition;
|
||||
/**
|
||||
* 车辆名称,关联车辆表:t_vehicle_info
|
||||
*/
|
||||
@ApiModelProperty("车辆名称")
|
||||
private String vehicleName;
|
||||
|
||||
/**
|
||||
* 车辆名称,关联车辆表:t_vehicle_info
|
||||
*/
|
||||
@ApiModelProperty("车辆名称")
|
||||
private Integer isAuto;
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ public class CurrTaskVo extends BaseVo implements PageVo.ConvertVo {
|
||||
private String taskSource;
|
||||
|
||||
/**
|
||||
* 任务类型:0:入库到窑炉,1:入库到缓存区,2出库到 窑炉到缓存区,3缓存区出库
|
||||
* 任务类型:0:入库到工业炉,1:入库到缓存区,2出库到 工业炉到缓存区,3缓存区出库
|
||||
*/
|
||||
@ApiModelProperty("任务类型")
|
||||
private Integer taskType;
|
||||
@ -88,7 +88,7 @@ public class CurrTaskVo extends BaseVo implements PageVo.ConvertVo {
|
||||
private LocalDateTime aBeginTime;
|
||||
|
||||
/**
|
||||
* 完成当前任务时间(可能是到缓存区,有可能直接到窑炉),车辆放完货物到缓存区收到的时间
|
||||
* 完成当前任务时间(可能是到缓存区,有可能直接到工业炉),车辆放完货物到缓存区收到的时间
|
||||
*/
|
||||
@ApiModelProperty("任务结束")
|
||||
private LocalDateTime aEndTime;
|
||||
@ -100,15 +100,15 @@ public class CurrTaskVo extends BaseVo implements PageVo.ConvertVo {
|
||||
private String startPosition;
|
||||
|
||||
/**
|
||||
* 目标位置指的是窑炉的位置
|
||||
* 目标位置指的是工业炉的位置
|
||||
*/
|
||||
@ApiModelProperty("窑炉位置")
|
||||
@ApiModelProperty("工业炉位置")
|
||||
private String targetPosition;
|
||||
|
||||
/**
|
||||
* 目标窑炉id
|
||||
* 目标工业炉id
|
||||
*/
|
||||
@ApiModelProperty("目标窑炉id")
|
||||
@ApiModelProperty("目标工业炉id")
|
||||
private Long kilnId;
|
||||
|
||||
/**
|
||||
|
@ -47,13 +47,13 @@ public class OrderInfoTaskDetVo extends BaseVo implements PageVo.ConvertVo {
|
||||
private LocalDateTime aBeginTime;
|
||||
|
||||
/**
|
||||
* 完成当前任务时间(可能是到缓存区,有可能直接到窑炉),车辆放完货物到缓存区收到的时间
|
||||
* 完成当前任务时间(可能是到缓存区,有可能直接到工业炉),车辆放完货物到缓存区收到的时间
|
||||
*/
|
||||
@ApiModelProperty(value = "完成当前任务时间")
|
||||
private LocalDateTime aEndTime;
|
||||
|
||||
/**
|
||||
* 任务类型:0:入库到窑炉,1:入库到缓存区,2出库到窑炉到缓存区,3缓存区出库
|
||||
* 任务类型:0:入库到工业炉,1:入库到缓存区,2出库到工业炉到缓存区,3缓存区出库
|
||||
*/
|
||||
@ApiModelProperty(value = "任务类型")
|
||||
private Integer taskType;
|
||||
|
@ -46,7 +46,7 @@ public class TaskHisQueryVo extends BaseVo implements PageVo.ConvertVo {
|
||||
@ApiModelProperty("状态")
|
||||
private Integer status;
|
||||
/**
|
||||
* 任务类型:0:入库到窑炉,1:入库到缓存区,2出库到 窑炉到缓存区,3缓存区出库
|
||||
* 任务类型:0:入库到工业炉,1:入库到缓存区,2出库到 工业炉到缓存区,3缓存区出库
|
||||
*/
|
||||
@ApiModelProperty("任务类型")
|
||||
private Integer taskType;
|
||||
@ -67,9 +67,9 @@ public class TaskHisQueryVo extends BaseVo implements PageVo.ConvertVo {
|
||||
@ApiModelProperty("加工完成时间")
|
||||
private LocalDateTime aEndTime;
|
||||
/**
|
||||
* 目标位置指的是窑炉的位置
|
||||
* 目标位置指的是工业炉的位置
|
||||
*/
|
||||
@ApiModelProperty("窑炉位置")
|
||||
@ApiModelProperty("工业炉位置")
|
||||
private String targetPosition;
|
||||
/**
|
||||
* 车辆名称,关联车辆表:t_vehicle_info
|
||||
|
Loading…
Reference in New Issue
Block a user