Compare commits
175 Commits
135d64b078
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d14d142472 | ||
|
|
571cee49a0 | ||
|
|
f1878910e3 | ||
|
|
f5aa87d7e9 | ||
| fa189331b8 | |||
|
|
0616844403 | ||
| ac476e936e | |||
| 6259a0237e | |||
| b0540ce4dc | |||
|
|
395817f10e | ||
|
|
21a4cfab23 | ||
|
|
63d251325f | ||
| a002354d49 | |||
|
|
7e9d8f5e64 | ||
| bcff5830f4 | |||
| 75471b7166 | |||
| ec7f364ccf | |||
|
|
5582a6929c | ||
|
|
74b42527c6 | ||
| b407f99872 | |||
| 292c511c22 | |||
| 59921c28ca | |||
| 5eed777f0a | |||
| 592d27b858 | |||
| 59f008f19e | |||
| 3ecf06ae6a | |||
|
|
605cdb5aa0 | ||
|
|
647e3f5761 | ||
| 85299bb26a | |||
| 1a6c19bf14 | |||
| 7cfa7168e1 | |||
| d5464eed6c | |||
| 9d8b6c065f | |||
| e6995b99a3 | |||
|
|
ef0ba77715 | ||
|
|
2def9c889f | ||
| 17f5ddbfa0 | |||
| 6ed7a735ed | |||
|
|
f359470fc4 | ||
| 5e54011371 | |||
| 8643ca11d7 | |||
|
|
5711a2acf6 | ||
| cb0be1cbbf | |||
| 9a7170d9e9 | |||
| 18590dafb9 | |||
| d107699d2c | |||
| d49759efdf | |||
| 412dbd04d4 | |||
| 249ca25963 | |||
| 942bde619f | |||
|
|
bd14fe3ed9 | ||
|
|
1ea55bd39a | ||
|
|
dd1a4b448e | ||
| 4af20b8551 | |||
|
|
1616215534 | ||
|
|
ddf6078774 | ||
|
|
f125fac9ee | ||
| 8abbc7193a | |||
| 17c0c1e973 | |||
|
|
c19066792c | ||
|
|
40f44f57d9 | ||
|
|
fbdb10ace7 | ||
| 2c186a6ff4 | |||
|
|
05fb4a348a | ||
|
|
771351b12f | ||
| d2e37ee2c8 | |||
|
|
7000c02653 | ||
|
|
2013d5b815 | ||
| e1181e0423 | |||
| 5d9ce09137 | |||
|
|
4c0f84d742 | ||
|
|
039f791c97 | ||
| 4c731348d4 | |||
|
|
1dd028a202 | ||
|
|
7812f248a2 | ||
| 2741a7aa6e | |||
| 8b488b0f45 | |||
| 1c0f610e52 | |||
| 95f1c30cad | |||
|
|
e3d17d1923 | ||
|
|
be0ffcae00 | ||
| d595e8985c | |||
| 41227ec816 | |||
| 373b66aaa3 | |||
|
|
c742686502 | ||
| af9b7a83cb | |||
| 3dce5380d8 | |||
|
|
a4951da905 | ||
| 9189d77953 | |||
| 2ee047474a | |||
| f5342d1427 | |||
| a509e54803 | |||
| 592fdf285d | |||
| f2de6a3a04 | |||
| 1f7332fdbb | |||
|
|
5aa655b2b0 | ||
|
|
189475f09b | ||
|
|
f555907877 | ||
|
|
c44edba722 | ||
|
|
ae816ce7f3 | ||
|
|
8c735058a1 | ||
|
|
c73289bcc0 | ||
|
|
03d2e453fb | ||
|
|
dae060d573 | ||
| 25d9354d81 | |||
| 1a6940eb70 | |||
|
|
6eb2839b7a | ||
|
|
8047bab61c | ||
|
|
26e5b24c32 | ||
| f0992ed9ce | |||
|
|
9f4dd3b1e3 | ||
| b9e55a7e5b | |||
| c734d69ce5 | |||
|
|
766b17274b | ||
|
|
52dfdc9c7f | ||
|
|
22c6288659 | ||
| 3015a43a55 | |||
| dd2ae384ad | |||
| 1cb26378a1 | |||
| 8d0b4aed82 | |||
|
|
5ae4100205 | ||
|
|
93eaf9ed40 | ||
|
|
ddf86e07b4 | ||
|
|
f3dda753a4 | ||
| 10e46121c3 | |||
| a440684232 | |||
|
|
8af8c45335 | ||
| 0c026853ef | |||
| 591716ebc8 | |||
|
|
0a1c21970b | ||
|
|
002a0cd1c3 | ||
|
|
d8e4cb5bfa | ||
|
|
40c4e20949 | ||
| 4867a5cc26 | |||
|
|
6f0e487bc4 | ||
| 835b98e486 | |||
| 0fcdcd462c | |||
|
|
936dc5b71a | ||
|
|
722ecf61c0 | ||
|
|
b12bd2294f | ||
| c324aa524f | |||
| 81b9f5c45e | |||
|
|
9cc6ef98f9 | ||
| 4133285cdd | |||
| f260cffd56 | |||
|
|
0c67641710 | ||
| b2319f2a51 | |||
| cf1c8eeb5e | |||
| b107cd2446 | |||
| 14b05bae7e | |||
| 0dd56c1e8b | |||
| 4531db10da | |||
| 186a28bffc | |||
| c8119c5bd0 | |||
| c1ce765634 | |||
| 2104ddc7fc | |||
| de098ec968 | |||
| edd0f8c77b | |||
| bb957ab4ea | |||
| 211c017278 | |||
| 274fdd6a35 | |||
| ee05bbf7bb | |||
| b2f279d9a6 | |||
| 0b4795e92c | |||
| 962d47b308 | |||
| 10821861aa | |||
| e0a61480eb | |||
| aac7b8c080 | |||
| 2ce5380397 | |||
| 0a34af7c00 | |||
| 59e480ad6a | |||
| f3b97b9559 | |||
| fd11d890ec | |||
| 8e49c0be65 | |||
| 31acfeea76 |
1765
5.数据库/dump-mt_wms_qj-202112230921.sql
Normal file
1765
5.数据库/dump-mt_wms_qj-202112230921.sql
Normal file
File diff suppressed because it is too large
Load Diff
@@ -24,7 +24,7 @@
|
||||
<packaging>pom</packaging>
|
||||
<version>1.0</version>
|
||||
|
||||
<name>wms</name>
|
||||
<name>wms-qj</name>
|
||||
<description>wms</description>
|
||||
<url>https://wms.picaiba.com</url>
|
||||
|
||||
@@ -45,16 +45,19 @@
|
||||
<spring.rabbitmq.username>guest</spring.rabbitmq.username>
|
||||
<spring.rabbitmq.password>guest</spring.rabbitmq.password>
|
||||
<!-- redis -->
|
||||
<spring.redis.cluster.nodes>redis.picaiba.com:6380</spring.redis.cluster.nodes>
|
||||
<!-- <spring.redis.cluster.nodes>redis.picaiba.com:6380</spring.redis.cluster.nodes>
|
||||
<spring.redis.host>redis.picaiba.com</spring.redis.host>
|
||||
<spring.redis.port>6380</spring.redis.port>
|
||||
<spring.redis.password><![CDATA["@WSXcde3"]]></spring.redis.password>
|
||||
<spring.redis.database>5</spring.redis.database>
|
||||
<spring.redis.database>5</spring.redis.database>-->
|
||||
<!-- database -->
|
||||
<spring.datasource.url>jdbc:p6spy:mysql://mysql.picaiba.com:30307/mt_wms_qj?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false
|
||||
</spring.datasource.url>
|
||||
<!--<spring.datasource.url>jdbc:p6spy:mysql://localhost:30306/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>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 -->
|
||||
@@ -422,6 +425,14 @@
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<configuration>
|
||||
<delimiters>@</delimiters>
|
||||
<useDefaultDelimiters>false</useDefaultDelimiters>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
package com.mt.wms.basic.controller;
|
||||
|
||||
import com.mt.wms.basic.params.AlarmBaseParam;
|
||||
import com.mt.wms.basic.params.AlarmBaseQueryParam;
|
||||
import com.mt.wms.basic.params.CraftInfoParam;
|
||||
import com.mt.wms.basic.params.CraftInfoQueryParam;
|
||||
import com.mt.wms.basic.service.AlarmBaseService;
|
||||
import com.mt.wms.basic.service.CraftInfoService;
|
||||
import com.mt.wms.basic.vo.AlarmBaseVo;
|
||||
import com.mt.wms.basic.vo.CraftInfoVo;
|
||||
import com.mt.wms.core.base.BaseController;
|
||||
import com.mt.wms.core.constants.CommonConstant;
|
||||
import com.mt.wms.core.params.IdParam;
|
||||
import com.mt.wms.core.utils.IDGenerator;
|
||||
import com.mt.wms.core.validator.groups.AddGroup;
|
||||
import com.mt.wms.core.validator.groups.PageGroup;
|
||||
import com.mt.wms.core.validator.groups.UpdateGroup;
|
||||
import com.mt.wms.core.vo.IdVo;
|
||||
import com.mt.wms.core.vo.PageVo;
|
||||
import com.mt.wms.core.vo.R;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.validation.groups.Default;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: liguanghao
|
||||
* @Date: 2021/10/9 11:09
|
||||
* @Version 1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping(CommonConstant.API_MODULE_BASE + "craftInfo")
|
||||
@Slf4j
|
||||
@Api(value = "工艺基础信息管理", tags = "工艺基础信息管理", hidden = false)
|
||||
public class CraftInfoController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private CraftInfoService craftInfoService;
|
||||
|
||||
@PostMapping(value = "get")
|
||||
@ApiOperation(value = "获取报警基础信息")
|
||||
private R<CraftInfoVo> get(@Validated @RequestBody IdParam idParam) {
|
||||
return craftInfoService.get(idParam);
|
||||
}
|
||||
|
||||
@PostMapping(value = "list")
|
||||
@ApiOperation(value = "获取报警基础信息列表")
|
||||
private R<List<CraftInfoVo>> list(@Validated({Default.class}) @RequestBody CraftInfoQueryParam craftInfoQueryParam) {
|
||||
return craftInfoService.list(craftInfoQueryParam);
|
||||
}
|
||||
|
||||
@PostMapping(value = "page")
|
||||
@ApiOperation(value = "获取分页报警基础信息")
|
||||
private R<PageVo<CraftInfoVo>> page(@Validated({PageGroup.class, Default.class}) @RequestBody CraftInfoQueryParam craftInfoQueryParam) {
|
||||
return craftInfoService.page(craftInfoQueryParam);
|
||||
}
|
||||
|
||||
@PostMapping(value = "add")
|
||||
@ApiOperation(value = "新增")
|
||||
private R<IdVo> add(@Validated({AddGroup.class, Default.class}) @RequestBody CraftInfoParam craftInfoParam) {
|
||||
return craftInfoService.add(craftInfoParam);
|
||||
}
|
||||
|
||||
@PostMapping(value = "update")
|
||||
@ApiOperation(value = "更新")
|
||||
private R<IdVo> update(@Validated({UpdateGroup.class, Default.class}) @RequestBody CraftInfoParam craftInfoParam) {
|
||||
return craftInfoService.update(craftInfoParam);
|
||||
}
|
||||
|
||||
@PostMapping(value = "delete")
|
||||
@ApiOperation(value = "删除报警基础信息")
|
||||
private R<IdVo> delete(@Validated @RequestBody IdParam idParam) {
|
||||
return craftInfoService.delete(idParam);
|
||||
}
|
||||
|
||||
@PostMapping(value = "codeGenerator")
|
||||
@ApiOperation(value = "编码生成")
|
||||
private R<String> codeGenerator() {
|
||||
return successful(IDGenerator.gen("GY", "yyyyMMddHHmm", 2, "CRAFTINFO_CODE"));
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
package com.mt.wms.basic.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.mt.wms.basic.params.VehicleParam;
|
||||
import com.mt.wms.basic.params.VehicleQueryParam;
|
||||
import com.mt.wms.basic.service.VehicleService;
|
||||
import com.mt.wms.basic.vo.VehicleVo;
|
||||
import com.mt.wms.core.base.BaseController;
|
||||
import com.mt.wms.core.constants.CommonConstant;
|
||||
import com.mt.wms.core.dal.entity.VehicleInfo;
|
||||
import com.mt.wms.core.dal.service.VehicleInfoServiceBiz;
|
||||
import com.mt.wms.core.params.IdParam;
|
||||
import com.mt.wms.core.utils.IDGenerator;
|
||||
import com.mt.wms.core.validator.groups.AddGroup;
|
||||
@@ -40,6 +43,8 @@ public class VehicleController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private VehicleService vehicleService;
|
||||
@Autowired
|
||||
private VehicleInfoServiceBiz vehicleInfoServiceBiz;
|
||||
@PostMapping(value = "get")
|
||||
@ApiOperation(value = "获取车辆信息")
|
||||
private R<VehicleVo> get(@Validated @RequestBody IdParam idParam) {
|
||||
@@ -82,4 +87,15 @@ public class VehicleController extends BaseController {
|
||||
return successful(IDGenerator.gen("CL", "yyyyMMddHHmm", 2, "VEHICLE_CODE"));
|
||||
}
|
||||
|
||||
@PostMapping(value = "resetStatus")
|
||||
@ApiOperation(value = "重置车辆状态")
|
||||
private R<String> reset(){
|
||||
List<VehicleInfo> vehicleInfoList = vehicleInfoServiceBiz.list(new QueryWrapper<VehicleInfo>().eq(VehicleInfo.STATUS, 1));
|
||||
for (VehicleInfo vehicleInfo:vehicleInfoList
|
||||
) {
|
||||
vehicleInfo.setStatus(0);
|
||||
vehicleInfoServiceBiz.updateById(vehicleInfo);
|
||||
}
|
||||
return successful("操作成功,车辆状态已重置为空闲!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.mt.wms.basic.params;
|
||||
|
||||
import com.mt.wms.core.base.BaseParam;
|
||||
import com.mt.wms.core.validator.groups.UpdateGroup;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @Author: liguanghao
|
||||
* @Date: 2022/1/25 21:34
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value = "工艺基础信息参数对象", description = "用于新增和更新工艺基础信息")
|
||||
public class CraftInfoParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 主键,自增
|
||||
*/
|
||||
@ApiModelProperty(value = "主键",required = false, example = "1")
|
||||
@NotNull(message = "xxID不能为空", groups = {UpdateGroup.class})
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 编码
|
||||
*/
|
||||
@ApiModelProperty(value = "编码", example = "1")
|
||||
private String code;
|
||||
/**
|
||||
* 工艺号
|
||||
*/
|
||||
@ApiModelProperty(value = "工艺号", example = "1")
|
||||
@NotNull(message = "工艺号不能为空")
|
||||
private String craftCode;
|
||||
/**
|
||||
* plc值
|
||||
*/
|
||||
@ApiModelProperty(value = "plc值", example = "1")
|
||||
@NotNull(message = "plc值不能为空")
|
||||
private Integer plcValue;
|
||||
/**
|
||||
* 说明
|
||||
*/
|
||||
@ApiModelProperty(value = "说明", example = "1")
|
||||
private String content;
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.mt.wms.basic.params;
|
||||
|
||||
import com.mt.wms.core.params.BasePageParam;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @Author: liguanghao
|
||||
* @Date: 2022/1/25 21:37
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value = "报警基础信息查询参数", description = "用于查询报警基础信息")
|
||||
public class CraftInfoQueryParam extends BasePageParam {
|
||||
/**
|
||||
* 主键,自增
|
||||
*/
|
||||
@ApiModelProperty(value = "主键",required = false, example = "1")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 工艺号
|
||||
*/
|
||||
@ApiModelProperty(value = "工艺号",required = false, example = "1")
|
||||
private String craftCode;
|
||||
}
|
||||
@@ -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;
|
||||
@@ -49,6 +49,12 @@ public class KilnInfoParam extends BaseParam {
|
||||
@ApiModelProperty(value = "缩写(别名)", example = "1")
|
||||
@NotNull(message = "别名不能为空")
|
||||
private String kilnAlias;
|
||||
/**
|
||||
* 设备类型,存储数据字典编码,修改为1:加工炉,2:回火炉,3:氮化炉,4:清洗炉
|
||||
*/
|
||||
@ApiModelProperty(value = "设备类型,存储数据字典编码,修改为1:加工炉,2:回火炉,3:氮化炉,4:清洗炉", example = "1")
|
||||
@NotNull(message = "设备类型不能为空")
|
||||
private Integer type;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -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 {
|
||||
/**
|
||||
* 主键,自增
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
package com.mt.wms.basic.service;
|
||||
|
||||
import com.mt.wms.basic.params.AlarmBaseParam;
|
||||
import com.mt.wms.basic.params.AlarmBaseQueryParam;
|
||||
import com.mt.wms.basic.params.CraftInfoParam;
|
||||
import com.mt.wms.basic.params.CraftInfoQueryParam;
|
||||
import com.mt.wms.basic.vo.AlarmBaseVo;
|
||||
import com.mt.wms.basic.vo.CraftInfoVo;
|
||||
import com.mt.wms.core.dal.entity.CraftInfo;
|
||||
import com.mt.wms.core.params.IdParam;
|
||||
import com.mt.wms.core.vo.IdVo;
|
||||
import com.mt.wms.core.vo.PageVo;
|
||||
import com.mt.wms.core.vo.R;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: liguanghao
|
||||
* @Date: 2021/10/9 10:46
|
||||
* @Version 1.0
|
||||
*/
|
||||
public interface CraftInfoService {
|
||||
|
||||
/**
|
||||
* 获取xx
|
||||
*
|
||||
* @param idParam 主键参数
|
||||
* @return xx
|
||||
*/
|
||||
R<CraftInfoVo> get(IdParam idParam);
|
||||
|
||||
/**
|
||||
* 获取xx列表
|
||||
*
|
||||
* @param craftInfoQueryParam xx查询参数
|
||||
* @return xx列表
|
||||
*/
|
||||
R<List<CraftInfoVo>> list(CraftInfoQueryParam craftInfoQueryParam);
|
||||
|
||||
/**
|
||||
* 获取xx分页列表
|
||||
*
|
||||
* @param craftInfoQueryParam xx查询参数
|
||||
* @return xx分页列表
|
||||
*/
|
||||
R<PageVo<CraftInfoVo>> page(CraftInfoQueryParam craftInfoQueryParam);
|
||||
|
||||
|
||||
/**
|
||||
* 新增xx
|
||||
*
|
||||
* @param craftInfoParam xx参数
|
||||
* @return 主键
|
||||
*/
|
||||
R<IdVo> add(CraftInfoParam craftInfoParam);
|
||||
|
||||
/**
|
||||
* 更新xx
|
||||
*
|
||||
* @param craftInfoParam xx参数
|
||||
* @return 主键
|
||||
*/
|
||||
R<IdVo> update(CraftInfoParam craftInfoParam);
|
||||
|
||||
|
||||
/**
|
||||
* 删除xx
|
||||
*
|
||||
* @param idParam 主键参数
|
||||
* @return 主键
|
||||
*/
|
||||
R<IdVo> delete(IdParam idParam);
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
package com.mt.wms.basic.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.mt.wms.basic.params.AlarmBaseParam;
|
||||
import com.mt.wms.basic.params.AlarmBaseQueryParam;
|
||||
import com.mt.wms.basic.params.CraftInfoParam;
|
||||
import com.mt.wms.basic.params.CraftInfoQueryParam;
|
||||
import com.mt.wms.basic.service.AlarmBaseService;
|
||||
import com.mt.wms.basic.service.CraftInfoService;
|
||||
import com.mt.wms.basic.vo.AlarmBaseVo;
|
||||
import com.mt.wms.basic.vo.CraftInfoVo;
|
||||
import com.mt.wms.core.api.Assert;
|
||||
import com.mt.wms.core.base.BaseService;
|
||||
import com.mt.wms.core.dal.entity.AlarmBase;
|
||||
import com.mt.wms.core.dal.entity.CraftInfo;
|
||||
import com.mt.wms.core.dal.service.AlarmBaseServiceBiz;
|
||||
import com.mt.wms.core.dal.service.CraftInfoServiceBiz;
|
||||
import com.mt.wms.core.errorcode.ApiErrorCode;
|
||||
import com.mt.wms.core.params.IdParam;
|
||||
import com.mt.wms.core.vo.IdVo;
|
||||
import com.mt.wms.core.vo.PageVo;
|
||||
import com.mt.wms.core.vo.R;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: liguanghao
|
||||
* @Date: 2021/10/9 10:49
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
public class CraftInfoServiceImpl extends BaseService implements CraftInfoService {
|
||||
|
||||
@Resource
|
||||
private CraftInfoServiceBiz craftInfoServiceBiz;
|
||||
|
||||
@Override
|
||||
public R<CraftInfoVo> get(IdParam idParam) {
|
||||
Assert.notNull(ApiErrorCode.INVALID_PARAMETER,idParam.getId());
|
||||
CraftInfo craftInfo = craftInfoServiceBiz.getById(idParam.getId());
|
||||
CraftInfoVo craftInfoVo = CraftInfoVo.builder().build();
|
||||
BeanUtils.copyProperties(craftInfo,craftInfoVo);
|
||||
return successful(craftInfoVo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<List<CraftInfoVo>> list(CraftInfoQueryParam craftInfoQueryParam) {
|
||||
QueryWrapper<CraftInfo> wrapper=new QueryWrapper<>();
|
||||
wrapper.eq(CraftInfo.VALID,1);
|
||||
List<CraftInfo> craftInfoList = craftInfoServiceBiz.list(wrapper);
|
||||
List<CraftInfoVo> craftInfoVoList = com.mt.wms.core.utils.BeanUtils.copyList(craftInfoList, CraftInfoVo.class);
|
||||
return successful(craftInfoVoList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<PageVo<CraftInfoVo>> page(CraftInfoQueryParam craftInfoQueryParam) {
|
||||
QueryWrapper<CraftInfo> wrapper=new QueryWrapper<>();
|
||||
wrapper.like(StringUtils.isNotBlank(craftInfoQueryParam.getCraftCode()),CraftInfo.CRAFT_CODE,craftInfoQueryParam.getCraftCode())
|
||||
.orderByAsc(CraftInfo.CREATE_TIME);
|
||||
Page<CraftInfo> page = craftInfoServiceBiz.page(new Page<>(craftInfoQueryParam.getCurrent(), craftInfoQueryParam.getSize()), wrapper);
|
||||
return successful(new PageVo<>(page,CraftInfoVo.class));
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<IdVo> add(CraftInfoParam craftInfoParam) {
|
||||
QueryWrapper<CraftInfo> wrapper=new QueryWrapper<>();
|
||||
|
||||
CraftInfo craftInfo=new CraftInfo();
|
||||
BeanUtils.copyProperties(craftInfoParam,craftInfo);
|
||||
setCommonField(craftInfo);
|
||||
craftInfoServiceBiz.save(craftInfo);
|
||||
return successful(IdVo.builder().id(craftInfo.getId()).build());
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<IdVo> update(CraftInfoParam craftInfoParam) {
|
||||
CraftInfo craftInfo = craftInfoServiceBiz.getById(craftInfoParam.getId());
|
||||
CraftInfo updateCraftInfo=new CraftInfo();
|
||||
BeanUtils.copyProperties(craftInfoParam,updateCraftInfo);
|
||||
setUpdateCommonField(updateCraftInfo);
|
||||
craftInfoServiceBiz.updateById(updateCraftInfo);
|
||||
return successful(IdVo.builder().id(updateCraftInfo.getId()).build());
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<IdVo> delete(IdParam idParam) {
|
||||
craftInfoServiceBiz.removeById(idParam.getId());
|
||||
return successful(IdVo.builder().id(idParam.getId()).build());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package com.mt.wms.basic.vo;
|
||||
|
||||
import com.mt.wms.core.base.BaseVo;
|
||||
import com.mt.wms.core.vo.PageVo;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.models.auth.In;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @Author: liguanghao
|
||||
* @Date: 2022/1/25 21:27
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@Builder
|
||||
@ApiModel(value = "工艺信息视图对象", description = "用于查询工艺信息信息")
|
||||
public class CraftInfoVo extends BaseVo implements PageVo.ConvertVo{
|
||||
/**
|
||||
* 主键,自增
|
||||
*/
|
||||
@ApiModelProperty(value = "主键,更新时需要填写", example = "1")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 编码
|
||||
*/
|
||||
@ApiModelProperty(value = "编码", example = "1")
|
||||
private String code;
|
||||
/**
|
||||
* 工艺号
|
||||
*/
|
||||
@ApiModelProperty(value = "工艺号", example = "1")
|
||||
private String craftCode;
|
||||
/**
|
||||
* plc值
|
||||
*/
|
||||
@ApiModelProperty(value = "plc值", example = "1")
|
||||
private Integer plcValue;
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@ApiModelProperty(value = "状态", example = "1")
|
||||
private Integer status;
|
||||
/**
|
||||
* 说明
|
||||
*/
|
||||
@ApiModelProperty(value = "说明", example = "1")
|
||||
private String content;
|
||||
}
|
||||
@@ -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 {
|
||||
/**
|
||||
* 主键,自增
|
||||
@@ -32,6 +32,12 @@ public class KilnInfoVo extends BaseVo implements PageVo.ConvertVo {
|
||||
@ApiModelProperty(value = "编码", example = "1")
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 类型,存储数据字典编码,修改为1:加工炉,2:回火炉,3:氮化炉,4:清洗炉
|
||||
*/
|
||||
@ApiModelProperty(value = "类型,存储数据字典编码,修改为1:加工炉,2:回火炉,3:氮化炉,4:清洗炉", example = "1")
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
|
||||
@@ -48,7 +48,7 @@ public class LocationInfoVo extends BaseVo implements PageVo.ConvertVo {
|
||||
* 状态
|
||||
*/
|
||||
@ApiModelProperty(value = "状态:0空闲,1使用,2不可用", example = "1")
|
||||
private String status;
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 缓存区
|
||||
|
||||
@@ -60,4 +60,10 @@ public class VehicleVo extends BaseVo implements PageVo.ConvertVo{
|
||||
*/
|
||||
@ApiModelProperty(value = "描述信息", example = "1")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 描述信息
|
||||
*/
|
||||
@ApiModelProperty(value = "车辆状态:0-空闲,1-占用", example = "1")
|
||||
private Integer status;
|
||||
}
|
||||
|
||||
@@ -21,9 +21,9 @@ public class MyGenerator {
|
||||
/**
|
||||
* 数据库地址
|
||||
*/
|
||||
static String dbUrl = "jdbc:mysql://mysql.picaiba.com:30307/mt_wms_qj";
|
||||
static String dbUrl = "jdbc:mysql://localhost:3306/mt_wms_qj";
|
||||
static String userName = "root";
|
||||
static String password = "1qaz@WSX3edc$RFV";
|
||||
static String password = "123456";
|
||||
/**
|
||||
* 是否去掉生成实体的属性名前缀
|
||||
*/
|
||||
@@ -106,8 +106,7 @@ public class MyGenerator {
|
||||
|
||||
@Test
|
||||
public void generateCodeWithInjectConfigForAllTable() {
|
||||
generateByTablesWithInjectConfig(new String[]{"t_curr_task"});
|
||||
generateByTablesWithInjectConfig(new String[]{"t_task_his"});
|
||||
generateByTablesWithInjectConfig(new String[]{"t_question_answer"});
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
@@ -100,6 +100,19 @@ public abstract class BaseSupport {
|
||||
protected <T> R<T> successful(String msg, T data) {
|
||||
return R.ok(msg, data);
|
||||
}
|
||||
/**
|
||||
* <p>
|
||||
* 请求成功
|
||||
* </p>
|
||||
* @param code 正确码
|
||||
* @param msg 提示内容
|
||||
* @param data 数据内容
|
||||
* @param <T> 对象泛型
|
||||
* @return
|
||||
*/
|
||||
protected <T> R<T> successful(int code,String msg, T data) {
|
||||
return R.ok(code,msg, data);
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
|
||||
@@ -19,7 +19,7 @@ import lombok.experimental.Accessors;
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2021-11-18
|
||||
* @since 2022-02-28
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@@ -92,7 +92,7 @@ public class AlarmInfo extends Model<AlarmInfo> {
|
||||
* 设备id
|
||||
*/
|
||||
@TableField("equipment_id")
|
||||
private Integer equipmentId;
|
||||
private Long equipmentId;
|
||||
|
||||
/**
|
||||
* 设备名称
|
||||
@@ -101,7 +101,7 @@ public class AlarmInfo extends Model<AlarmInfo> {
|
||||
private String equipmentName;
|
||||
|
||||
/**
|
||||
* 报警类型 0窑炉,1表示车辆,依次类推
|
||||
* 报警类型 0工业炉,1表示车辆,依次类推
|
||||
*/
|
||||
@TableField("type")
|
||||
private Integer type;
|
||||
@@ -130,6 +130,12 @@ public class AlarmInfo extends Model<AlarmInfo> {
|
||||
@TableField("note")
|
||||
private String note;
|
||||
|
||||
/**
|
||||
* 加工任务编码(炉子报警时记录)
|
||||
*/
|
||||
@TableField("task_code")
|
||||
private String taskCode;
|
||||
|
||||
|
||||
public static final String ID = "id";
|
||||
|
||||
@@ -165,6 +171,8 @@ public class AlarmInfo extends Model<AlarmInfo> {
|
||||
|
||||
public static final String NOTE = "note";
|
||||
|
||||
public static final String TASK_CODE = "task_code";
|
||||
|
||||
@Override
|
||||
protected Serializable pkVal() {
|
||||
return this.id;
|
||||
|
||||
@@ -15,7 +15,7 @@ import java.time.LocalDateTime;
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2021-11-19
|
||||
* @since 2022-01-05
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@@ -79,7 +79,7 @@ public class ApmsCheckResult extends Model<ApmsCheckResult> {
|
||||
private String idenCardNum;
|
||||
|
||||
/**
|
||||
* 硬度检验结果(合格、不合格、返工、作废)
|
||||
* 硬度检验结果(待检验、合格、不合格、返工、作废)
|
||||
*/
|
||||
@TableField("hardness")
|
||||
private String hardness;
|
||||
@@ -94,7 +94,115 @@ public class ApmsCheckResult extends Model<ApmsCheckResult> {
|
||||
* 心部硬度检验值
|
||||
*/
|
||||
@TableField("heart_hardness")
|
||||
private Float heartHardness;
|
||||
private String heartHardness;
|
||||
|
||||
/**
|
||||
* 备注,特殊注释等
|
||||
*/
|
||||
@TableField("remake")
|
||||
private String remake;
|
||||
|
||||
/**
|
||||
* 硬度检验结果1
|
||||
*/
|
||||
@TableField("hardness_value_one")
|
||||
private String hardnessValueOne;
|
||||
|
||||
/**
|
||||
* 硬度检验结果2
|
||||
*/
|
||||
@TableField("hardness_value_two")
|
||||
private String hardnessValueTwo;
|
||||
|
||||
/**
|
||||
* 硬度检验结果3
|
||||
*/
|
||||
@TableField("hardness_value_three")
|
||||
private String hardnessValueThree;
|
||||
|
||||
/**
|
||||
* 金相检验渗碳淬火 渗碳层深度
|
||||
*/
|
||||
@TableField("metallography_stch_stccsd")
|
||||
private Float metallographyStchStccsd;
|
||||
|
||||
/**
|
||||
* 金相检验渗碳淬火 表面为马氏体、残余奥氏体(级)
|
||||
*/
|
||||
@TableField("metallography_stch_mstost")
|
||||
private String metallographyStchMstost;
|
||||
|
||||
/**
|
||||
* 金相检验渗碳淬火 细小颗粒状碳化物
|
||||
*/
|
||||
@TableField("metallography_stch_xxklzthw")
|
||||
private String metallographyStchXxklzthw;
|
||||
|
||||
/**
|
||||
* 金相检验渗碳淬火 心部为低碳马氏体加游离铁素体(级)
|
||||
*/
|
||||
@TableField("metallography_stch_dtmstyltst")
|
||||
private String metallographyStchDtmstyltst;
|
||||
|
||||
/**
|
||||
* 金相检验整体淬火 基体为回火马氏体(级)
|
||||
*/
|
||||
@TableField("metallography_ztch_hhmst")
|
||||
private String metallographyZtchHhmst;
|
||||
|
||||
/**
|
||||
* 金相检验整体淬火 基体为回火托式体(级)
|
||||
*/
|
||||
@TableField("metallography_ztch_hhtst")
|
||||
private String metallographyZtchHhtst;
|
||||
|
||||
/**
|
||||
* 金相检验整体淬火 基体为回火素式体(级)
|
||||
*/
|
||||
@TableField("metallography_ztch_hhsst")
|
||||
private String metallographyZtchHhsst;
|
||||
|
||||
/**
|
||||
* 金相检验氮化 表面亮白色的为氮化合物层深
|
||||
*/
|
||||
@TableField("metallography_dh_dhhwcs")
|
||||
private Float metallographyDhDhhwcs;
|
||||
|
||||
/**
|
||||
* 金相检验氮化 向内为扩散层深
|
||||
*/
|
||||
@TableField("metallography_dh_kscs")
|
||||
private Float metallographyDhKscs;
|
||||
|
||||
/**
|
||||
* 金相检验氮化 心部
|
||||
*/
|
||||
@TableField("metallography_dh_xb")
|
||||
private String metallographyDhXb;
|
||||
|
||||
/**
|
||||
* 金相检验表面淬火 表面为板条马氏体(级)
|
||||
*/
|
||||
@TableField("metallography_bmch_btmst")
|
||||
private String metallographyBmchBtmst;
|
||||
|
||||
/**
|
||||
* 金相检验表面淬火 心部
|
||||
*/
|
||||
@TableField("metallography_bmch_xb")
|
||||
private String metallographyBmchXb;
|
||||
|
||||
/**
|
||||
* 金相检验 备注
|
||||
*/
|
||||
@TableField("metallography_bz")
|
||||
private String metallographyBz;
|
||||
|
||||
/**
|
||||
* 金相检验心部硬度 心部硬度检验结果
|
||||
*/
|
||||
@TableField("metallography_xbyd_xbydjyjg")
|
||||
private Float metallographyXbydXbydjyjg;
|
||||
|
||||
|
||||
public static final String ID = "id";
|
||||
@@ -121,6 +229,42 @@ public class ApmsCheckResult extends Model<ApmsCheckResult> {
|
||||
|
||||
public static final String HEART_HARDNESS = "heart_hardness";
|
||||
|
||||
public static final String REMAKE = "remake";
|
||||
|
||||
public static final String HARDNESS_VALUE_ONE = "hardness_value_one";
|
||||
|
||||
public static final String HARDNESS_VALUE_TWO = "hardness_value_two";
|
||||
|
||||
public static final String HARDNESS_VALUE_THREE = "hardness_value_three";
|
||||
|
||||
public static final String METALLOGRAPHY_STCH_STCCSD = "metallography_stch_stccsd";
|
||||
|
||||
public static final String METALLOGRAPHY_STCH_MSTOST = "metallography_stch_mstost";
|
||||
|
||||
public static final String METALLOGRAPHY_STCH_XXKLZTHW = "metallography_stch_xxklzthw";
|
||||
|
||||
public static final String METALLOGRAPHY_STCH_DTMSTYLTST = "metallography_stch_dtmstyltst";
|
||||
|
||||
public static final String METALLOGRAPHY_ZTCH_HHMST = "metallography_ztch_hhmst";
|
||||
|
||||
public static final String METALLOGRAPHY_ZTCH_HHTST = "metallography_ztch_hhtst";
|
||||
|
||||
public static final String METALLOGRAPHY_ZTCH_HHSST = "metallography_ztch_hhsst";
|
||||
|
||||
public static final String METALLOGRAPHY_DH_DHHWCS = "metallography_dh_dhhwcs";
|
||||
|
||||
public static final String METALLOGRAPHY_DH_KSCS = "metallography_dh_kscs";
|
||||
|
||||
public static final String METALLOGRAPHY_DH_XB = "metallography_dh_xb";
|
||||
|
||||
public static final String METALLOGRAPHY_BMCH_BTMST = "metallography_bmch_btmst";
|
||||
|
||||
public static final String METALLOGRAPHY_BMCH_XB = "metallography_bmch_xb";
|
||||
|
||||
public static final String METALLOGRAPHY_BZ = "metallography_bz";
|
||||
|
||||
public static final String METALLOGRAPHY_XBYD_XBYDJYJG = "metallography_xbyd_xbydjyjg";
|
||||
|
||||
@Override
|
||||
protected Serializable pkVal() {
|
||||
return this.id;
|
||||
|
||||
@@ -19,7 +19,7 @@ import lombok.experimental.Accessors;
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2021-12-14
|
||||
* @since 2022-03-04
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@@ -46,7 +46,7 @@ public class AutoExeTask extends Model<AutoExeTask> {
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 状态,0:新增,1:执行中,2完成
|
||||
* 状态,0:新增,1:执行中,2完成,3 终止
|
||||
*/
|
||||
@TableField("status")
|
||||
private Integer status;
|
||||
@@ -117,6 +117,12 @@ public class AutoExeTask extends Model<AutoExeTask> {
|
||||
@TableField("f_equipment_id")
|
||||
private Long fEquipmentId;
|
||||
|
||||
/**
|
||||
* 设备名称(炉子名称)
|
||||
*/
|
||||
@TableField("f_equipment_name")
|
||||
private String fEquipmentName;
|
||||
|
||||
/**
|
||||
* 工艺号ID,关联工艺号表:t_craft_info
|
||||
*/
|
||||
@@ -165,6 +171,12 @@ public class AutoExeTask extends Model<AutoExeTask> {
|
||||
@TableField("t_equipment_type_id")
|
||||
private Long tEquipmentTypeId;
|
||||
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
@TableField("t_equipment_name")
|
||||
private String tEquipmentName;
|
||||
|
||||
/**
|
||||
* 设备ID,关联设备表:t_kiln_info
|
||||
*/
|
||||
@@ -219,6 +231,12 @@ public class AutoExeTask extends Model<AutoExeTask> {
|
||||
@TableField("th_equipment_type_id")
|
||||
private Long thEquipmentTypeId;
|
||||
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
@TableField("th_equipment_name")
|
||||
private String thEquipmentName;
|
||||
|
||||
/**
|
||||
* 设备ID,关联设备表:t_kiln_info
|
||||
*/
|
||||
@@ -292,6 +310,8 @@ public class AutoExeTask extends Model<AutoExeTask> {
|
||||
|
||||
public static final String F_EQUIPMENT_ID = "f_equipment_id";
|
||||
|
||||
public static final String F_EQUIPMENT_NAME = "f_equipment_name";
|
||||
|
||||
public static final String F_CRAFT_CODE_ID = "f_craft_code_id";
|
||||
|
||||
public static final String F_PLC_VALUE = "f_plc_value";
|
||||
@@ -308,6 +328,8 @@ public class AutoExeTask extends Model<AutoExeTask> {
|
||||
|
||||
public static final String T_EQUIPMENT_TYPE_ID = "t_equipment_type_id";
|
||||
|
||||
public static final String T_EQUIPMENT_NAME = "t_equipment_name";
|
||||
|
||||
public static final String T_EQUIPMENT_ID = "t_equipment_id";
|
||||
|
||||
public static final String T_CRAFT_CODE_ID = "t_craft_code_id";
|
||||
@@ -326,6 +348,8 @@ public class AutoExeTask extends Model<AutoExeTask> {
|
||||
|
||||
public static final String TH_EQUIPMENT_TYPE_ID = "th_equipment_type_id";
|
||||
|
||||
public static final String TH_EQUIPMENT_NAME = "th_equipment_name";
|
||||
|
||||
public static final String TH_EQUIPMENT_ID = "th_equipment_id";
|
||||
|
||||
public static final String TH_CRAFT_CODE_ID = "th_craft_code_id";
|
||||
|
||||
@@ -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;
|
||||
@@ -228,6 +228,12 @@ public class CurrTask extends Model<CurrTask> {
|
||||
@TableField("process_type")
|
||||
private Integer processType;
|
||||
|
||||
/**
|
||||
* 炉号
|
||||
*/
|
||||
@TableField("stove_code")
|
||||
private String stoveCode;
|
||||
|
||||
|
||||
public static final String ID = "id";
|
||||
|
||||
@@ -297,6 +303,8 @@ public class CurrTask extends Model<CurrTask> {
|
||||
|
||||
public static final String PROCESS_TYPE = "process_type";
|
||||
|
||||
public static final String STOVE_CODE = "stove_code";
|
||||
|
||||
@Override
|
||||
protected Serializable pkVal() {
|
||||
return this.id;
|
||||
|
||||
@@ -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,11 +15,11 @@ import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 窑炉信息
|
||||
* 工业炉信息
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2021-11-18
|
||||
* @since 2022-02-28
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@@ -71,7 +71,7 @@ public class KilnInfo extends Model<KilnInfo> {
|
||||
private String version;
|
||||
|
||||
/**
|
||||
* 状态 0初始化,1损坏
|
||||
* 状态 0初始化,1损坏 ,2 工作中
|
||||
*/
|
||||
@TableField("status")
|
||||
private Integer status;
|
||||
@@ -83,7 +83,7 @@ public class KilnInfo extends Model<KilnInfo> {
|
||||
private String interCode;
|
||||
|
||||
/**
|
||||
* 编码
|
||||
* 编码 必须与AMPS相同
|
||||
*/
|
||||
@TableField("code")
|
||||
private String code;
|
||||
@@ -95,13 +95,13 @@ public class KilnInfo extends Model<KilnInfo> {
|
||||
private Integer factoryId;
|
||||
|
||||
/**
|
||||
* 窑炉名称
|
||||
* 工业炉名称 建议与AMPS相同
|
||||
*/
|
||||
@TableField("kiln_name")
|
||||
private String kilnName;
|
||||
|
||||
/**
|
||||
* 窑炉别名
|
||||
* 工业炉别名
|
||||
*/
|
||||
@TableField("kiln_alias")
|
||||
private String kilnAlias;
|
||||
@@ -113,10 +113,10 @@ public class KilnInfo extends Model<KilnInfo> {
|
||||
private String en;
|
||||
|
||||
/**
|
||||
* 设备类型,存储数据字典编码
|
||||
* 设备类型,存储数据字典编码,修改为1:加工炉,2:回火炉,3:氮化炉,4:清洗炉
|
||||
*/
|
||||
@TableField("type")
|
||||
private String type;
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* ip地址
|
||||
|
||||
@@ -97,7 +97,7 @@ public class OrderInfo extends Model<OrderInfo> {
|
||||
private String orderNo;
|
||||
|
||||
/**
|
||||
* 原订单号,APMS系统获取 返单时才存在
|
||||
* 原订单号(对应原先的标识卡号),APMS系统获取 返单时才存在
|
||||
*/
|
||||
@TableField("old_order_no")
|
||||
private String oldOrderNo;
|
||||
|
||||
@@ -14,11 +14,11 @@ import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 窑炉电能参数值
|
||||
* 工业炉电能参数值
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2021-11-18
|
||||
* @since 2022-03-01
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@@ -50,10 +50,16 @@ public class ParEleValue extends Model<ParEleValue> {
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 窑炉id,关联设备窑炉表:t_kiln_info
|
||||
* 工业炉id,关联设备工业炉表:t_kiln_info
|
||||
*/
|
||||
@TableField("kiln_id")
|
||||
private Integer kilnId;
|
||||
private Long kilnId;
|
||||
|
||||
/**
|
||||
* 任务id
|
||||
*/
|
||||
@TableField("task_id")
|
||||
private Long taskId;
|
||||
|
||||
/**
|
||||
* 参数id,关联参数表:t_par_info
|
||||
@@ -104,10 +110,10 @@ public class ParEleValue extends Model<ParEleValue> {
|
||||
private Float totalBat;
|
||||
|
||||
/**
|
||||
* 扩展字段1
|
||||
* 时间段类型。0:半小时,1:天,2:月
|
||||
*/
|
||||
@TableField("add_a")
|
||||
private Float addA;
|
||||
@TableField("date_type")
|
||||
private Integer dateType;
|
||||
|
||||
/**
|
||||
* 扩展字段2
|
||||
@@ -150,6 +156,8 @@ public class ParEleValue extends Model<ParEleValue> {
|
||||
|
||||
public static final String KILN_ID = "kiln_id";
|
||||
|
||||
public static final String TASK_ID = "task_id";
|
||||
|
||||
public static final String PAR_ID = "par_id";
|
||||
|
||||
public static final String A_VOLTAGEV_VALUE = "a_voltagev_value";
|
||||
@@ -166,7 +174,7 @@ public class ParEleValue extends Model<ParEleValue> {
|
||||
|
||||
public static final String TOTAL_BAT = "total_bat";
|
||||
|
||||
public static final String ADD_A = "add_a";
|
||||
public static final String DATE_TYPE = "date_type";
|
||||
|
||||
public static final String ADD_B = "add_b";
|
||||
|
||||
|
||||
@@ -14,11 +14,11 @@ import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 窑炉使用气检测值
|
||||
* 工业炉使用气检测值
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2021-11-18
|
||||
* @since 2022-03-01
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@@ -50,10 +50,16 @@ public class ParGasValue extends Model<ParGasValue> {
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 窑炉id,关联设备窑炉表:t_kiln_info
|
||||
* 工业炉id,关联设备工业炉表:t_kiln_info
|
||||
*/
|
||||
@TableField("kiln_id")
|
||||
private Integer kilnId;
|
||||
private Long kilnId;
|
||||
|
||||
/**
|
||||
* 任务id
|
||||
*/
|
||||
@TableField("task_id")
|
||||
private Long taskId;
|
||||
|
||||
/**
|
||||
* 参数id,关联参数表:t_par_info
|
||||
@@ -62,13 +68,13 @@ public class ParGasValue extends Model<ParGasValue> {
|
||||
private Integer parId;
|
||||
|
||||
/**
|
||||
* 设定氮势值
|
||||
* 设定氮/碳势值
|
||||
*/
|
||||
@TableField("set_nit_pot_value")
|
||||
private Float setNitPotValue;
|
||||
|
||||
/**
|
||||
* 实际氮势值
|
||||
* 实际氮/碳势值
|
||||
*/
|
||||
@TableField("actual_nit_pot_value")
|
||||
private Float actualNitPotValue;
|
||||
@@ -80,46 +86,46 @@ public class ParGasValue extends Model<ParGasValue> {
|
||||
private Float acceptNitPotValue;
|
||||
|
||||
/**
|
||||
* 氮气流量
|
||||
* 氮气量
|
||||
*/
|
||||
@TableField("nit_flow_value")
|
||||
private Float nitFlowValue;
|
||||
|
||||
/**
|
||||
* 氨气流量
|
||||
* 氨气量
|
||||
*/
|
||||
@TableField("ammonia_flow_value")
|
||||
private Float ammoniaFlowValue;
|
||||
|
||||
/**
|
||||
* 二氧化碳流量
|
||||
* 二氧化碳量
|
||||
*/
|
||||
@TableField("car_dioxide_flow_value")
|
||||
private Float carDioxideFlowValue;
|
||||
|
||||
/**
|
||||
* 扩展字段1
|
||||
* 甲烷量
|
||||
*/
|
||||
@TableField("add_a")
|
||||
private Float addA;
|
||||
@TableField("methanol_flow")
|
||||
private Float methanolFlow;
|
||||
|
||||
/**
|
||||
* 扩展字段2
|
||||
* 丙烷量
|
||||
*/
|
||||
@TableField("add_b")
|
||||
private Float addB;
|
||||
@TableField("propane_flow")
|
||||
private Float propaneFlow;
|
||||
|
||||
/**
|
||||
* 扩展字段3
|
||||
* 氢含量
|
||||
*/
|
||||
@TableField("add_c")
|
||||
private Float addC;
|
||||
@TableField("hydrogen_content")
|
||||
private Float hydrogenContent;
|
||||
|
||||
/**
|
||||
* 扩展字段4
|
||||
* 分解率
|
||||
*/
|
||||
@TableField("orther_a")
|
||||
private String ortherA;
|
||||
@TableField("decomposition_rate")
|
||||
private Float decompositionRate;
|
||||
|
||||
/**
|
||||
* 扩展字段5
|
||||
@@ -144,6 +150,8 @@ public class ParGasValue extends Model<ParGasValue> {
|
||||
|
||||
public static final String KILN_ID = "kiln_id";
|
||||
|
||||
public static final String TASK_ID = "task_id";
|
||||
|
||||
public static final String PAR_ID = "par_id";
|
||||
|
||||
public static final String SET_NIT_POT_VALUE = "set_nit_pot_value";
|
||||
@@ -158,13 +166,13 @@ public class ParGasValue extends Model<ParGasValue> {
|
||||
|
||||
public static final String CAR_DIOXIDE_FLOW_VALUE = "car_dioxide_flow_value";
|
||||
|
||||
public static final String ADD_A = "add_a";
|
||||
public static final String METHANOL_FLOW = "methanol_flow";
|
||||
|
||||
public static final String ADD_B = "add_b";
|
||||
public static final String PROPANE_FLOW = "propane_flow";
|
||||
|
||||
public static final String ADD_C = "add_c";
|
||||
public static final String HYDROGEN_CONTENT = "hydrogen_content";
|
||||
|
||||
public static final String ORTHER_A = "orther_a";
|
||||
public static final String DECOMPOSITION_RATE = "decomposition_rate";
|
||||
|
||||
public static final String ORTHER_B = "orther_b";
|
||||
|
||||
|
||||
@@ -14,11 +14,11 @@ import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 窑炉运转速度
|
||||
* 工业炉运转速度
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2021-11-18
|
||||
* @since 2022-03-01
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@@ -50,10 +50,16 @@ public class ParRotSpeedValue extends Model<ParRotSpeedValue> {
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 窑炉id,关联设备窑炉表:t_kiln_info
|
||||
* 工业炉id,关联设备工业炉表:t_kiln_info
|
||||
*/
|
||||
@TableField("kiln_id")
|
||||
private Integer kilnId;
|
||||
private Long kilnId;
|
||||
|
||||
/**
|
||||
* 任务id
|
||||
*/
|
||||
@TableField("task_id")
|
||||
private Long taskId;
|
||||
|
||||
/**
|
||||
* 参数id,关联参数表:t_par_info
|
||||
@@ -156,6 +162,8 @@ public class ParRotSpeedValue extends Model<ParRotSpeedValue> {
|
||||
|
||||
public static final String KILN_ID = "kiln_id";
|
||||
|
||||
public static final String TASK_ID = "task_id";
|
||||
|
||||
public static final String PAR_ID = "par_id";
|
||||
|
||||
public static final String FAN_SPEED_A_VALUE = "fan_speed_a_value";
|
||||
|
||||
@@ -14,11 +14,11 @@ import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 窑炉温度监控
|
||||
* 工业炉温度监控
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2021-11-18
|
||||
* @since 2022-03-01
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@@ -50,10 +50,16 @@ public class ParTemValue extends Model<ParTemValue> {
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 窑炉id,关联设备窑炉表:t_kiln_info
|
||||
* 工业炉id,关联设备工业炉表:t_kiln_info
|
||||
*/
|
||||
@TableField("kiln_id")
|
||||
private Integer kilnId;
|
||||
private Long kilnId;
|
||||
|
||||
/**
|
||||
* 任务id
|
||||
*/
|
||||
@TableField("task_id")
|
||||
private Long taskId;
|
||||
|
||||
/**
|
||||
* 参数id,关联参数表:t_par_info
|
||||
@@ -98,22 +104,22 @@ public class ParTemValue extends Model<ParTemValue> {
|
||||
private Float takeOverOilSetTemValue;
|
||||
|
||||
/**
|
||||
* 扩展字段1
|
||||
* 外一区温度
|
||||
*/
|
||||
@TableField("add_a")
|
||||
private Float addA;
|
||||
@TableField("outer_zone1_temp")
|
||||
private Float outerZone1Temp;
|
||||
|
||||
/**
|
||||
* 扩展字段2
|
||||
* 外二区温度
|
||||
*/
|
||||
@TableField("add_b")
|
||||
private Float addB;
|
||||
@TableField("outer_zone2_temp")
|
||||
private Float outerZone2Temp;
|
||||
|
||||
/**
|
||||
* 扩展字段3
|
||||
* 炉压
|
||||
*/
|
||||
@TableField("add_c")
|
||||
private Float addC;
|
||||
@TableField("furnace_pressure")
|
||||
private Float furnacePressure;
|
||||
|
||||
/**
|
||||
* 扩展字段4
|
||||
@@ -144,6 +150,8 @@ public class ParTemValue extends Model<ParTemValue> {
|
||||
|
||||
public static final String KILN_ID = "kiln_id";
|
||||
|
||||
public static final String TASK_ID = "task_id";
|
||||
|
||||
public static final String PAR_ID = "par_id";
|
||||
|
||||
public static final String SET_TEM_VALUE = "set_tem_value";
|
||||
@@ -158,11 +166,11 @@ public class ParTemValue extends Model<ParTemValue> {
|
||||
|
||||
public static final String TAKE_OVER_OIL_SET_TEM_VALUE = "take_over_oil_set_tem_value";
|
||||
|
||||
public static final String ADD_A = "add_a";
|
||||
public static final String OUTER_ZONE1_TEMP = "outer_zone1_temp";
|
||||
|
||||
public static final String ADD_B = "add_b";
|
||||
public static final String OUTER_ZONE2_TEMP = "outer_zone2_temp";
|
||||
|
||||
public static final String ADD_C = "add_c";
|
||||
public static final String FURNACE_PRESSURE = "furnace_pressure";
|
||||
|
||||
public static final String ORTHER_A = "orther_a";
|
||||
|
||||
|
||||
@@ -0,0 +1,98 @@
|
||||
package com.mt.wms.core.dal.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import com.baomidou.mybatisplus.annotation.Version;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* PLC变量nameSpace对照表
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2022-02-28
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@TableName("t_plc_name_space")
|
||||
public class PlcNameSpace extends Model<PlcNameSpace> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableField("id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 设备类型,1:多用加工炉,2:氮化炉,3:回火炉,4:清洗机,5:rgv
|
||||
*/
|
||||
@TableField("eq_type")
|
||||
private Integer eqType;
|
||||
|
||||
/**
|
||||
* 变量名称
|
||||
*/
|
||||
@TableField("name")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 变量的含义
|
||||
*/
|
||||
@TableField("note")
|
||||
private String note;
|
||||
|
||||
/**
|
||||
* 设备id
|
||||
*/
|
||||
@TableField("eq_id")
|
||||
private Long eqId;
|
||||
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
@TableField("eq_name")
|
||||
private String eqName;
|
||||
|
||||
/**
|
||||
* 变量类型,0:变量,1:报警变量
|
||||
*/
|
||||
@TableField("type")
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField("remark")
|
||||
private String remark;
|
||||
|
||||
|
||||
public static final String ID = "id";
|
||||
|
||||
public static final String EQ_TYPE = "eq_type";
|
||||
|
||||
public static final String NAME = "name";
|
||||
|
||||
public static final String NOTE = "note";
|
||||
|
||||
public static final String EQ_ID = "eq_id";
|
||||
|
||||
public static final String EQ_NAME = "eq_name";
|
||||
|
||||
public static final String TYPE = "type";
|
||||
|
||||
public static final String REMARK = "remark";
|
||||
|
||||
@Override
|
||||
protected Serializable pkVal() {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
package com.mt.wms.core.dal.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import java.time.LocalDate;
|
||||
import com.baomidou.mybatisplus.annotation.Version;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 点位信息表
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2022-03-02
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@TableName("t_point_info")
|
||||
public class PointInfo extends Model<PointInfo> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableField("id")
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 点位编码,对应plc
|
||||
*/
|
||||
@TableField("code")
|
||||
private Long code;
|
||||
|
||||
/**
|
||||
* 点位对应的设备名称
|
||||
*/
|
||||
@TableField("name")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 点位说明;关联对应表数据的code,工业炉code,库位code等等
|
||||
*/
|
||||
@TableField("note")
|
||||
private String note;
|
||||
|
||||
/**
|
||||
* 类型:1 炉子,2 液压台,3 库位
|
||||
*/
|
||||
@TableField("type")
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 距离原点的距离
|
||||
*/
|
||||
@TableField("distance")
|
||||
private Double distance;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField("create_time")
|
||||
private LocalDate createTime;
|
||||
|
||||
|
||||
public static final String ID = "id";
|
||||
|
||||
public static final String CODE = "code";
|
||||
|
||||
public static final String NAME = "name";
|
||||
|
||||
public static final String NOTE = "note";
|
||||
|
||||
public static final String TYPE = "type";
|
||||
|
||||
public static final String DISTANCE = "distance";
|
||||
|
||||
public static final String CREATE_TIME = "create_time";
|
||||
|
||||
@Override
|
||||
protected Serializable pkVal() {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,149 @@
|
||||
package com.mt.wms.core.dal.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import com.baomidou.mybatisplus.annotation.Version;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 问题解答表
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2022-08-11
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@TableName("t_question_answer")
|
||||
public class QuestionAnswer extends Model<QuestionAnswer> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 删除标志,是否有效:1 可用 0不可用
|
||||
*/
|
||||
@TableField("valid")
|
||||
@TableLogic
|
||||
private Integer valid;
|
||||
|
||||
/**
|
||||
* 添加时间
|
||||
*/
|
||||
@TableField("create_time")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
@TableField("creator_id")
|
||||
private Integer creatorId;
|
||||
|
||||
/**
|
||||
* 更新人id
|
||||
*/
|
||||
@TableField("updater_id")
|
||||
private Integer updaterId;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@TableField("update_time")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 版本号 默认为 1
|
||||
*/
|
||||
@TableField("version")
|
||||
@Version
|
||||
private String version;
|
||||
|
||||
/**
|
||||
* 状态 0初始化
|
||||
*/
|
||||
@TableField("status")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 内部编码
|
||||
*/
|
||||
@TableField("inter_code")
|
||||
private String interCode;
|
||||
|
||||
/**
|
||||
* 编码
|
||||
*/
|
||||
@TableField("code")
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 问题
|
||||
*/
|
||||
@TableField("question")
|
||||
private String question;
|
||||
|
||||
/**
|
||||
* 解答
|
||||
*/
|
||||
@TableField("answer")
|
||||
private String answer;
|
||||
|
||||
/**
|
||||
* 描述信息
|
||||
*/
|
||||
@TableField("description")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField("note")
|
||||
private String note;
|
||||
|
||||
|
||||
public static final String ID = "id";
|
||||
|
||||
public static final String VALID = "valid";
|
||||
|
||||
public static final String CREATE_TIME = "create_time";
|
||||
|
||||
public static final String CREATOR_ID = "creator_id";
|
||||
|
||||
public static final String UPDATER_ID = "updater_id";
|
||||
|
||||
public static final String UPDATE_TIME = "update_time";
|
||||
|
||||
public static final String VERSION = "version";
|
||||
|
||||
public static final String STATUS = "status";
|
||||
|
||||
public static final String INTER_CODE = "inter_code";
|
||||
|
||||
public static final String CODE = "code";
|
||||
|
||||
public static final String QUESTION = "question";
|
||||
|
||||
public static final String ANSWER = "answer";
|
||||
|
||||
public static final String DESCRIPTION = "description";
|
||||
|
||||
public static final String NOTE = "note";
|
||||
|
||||
@Override
|
||||
protected Serializable pkVal() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -91,8 +91,8 @@ public class TaskDetHis extends Model<TaskDetHis> {
|
||||
/**
|
||||
* 历史任务id,关联当前任务表:t_task_his
|
||||
*/
|
||||
@TableField("task_id")
|
||||
private Long taskId;
|
||||
@TableField("curr_task_id")
|
||||
private Long currTaskId;
|
||||
|
||||
/**
|
||||
* 订单号
|
||||
@@ -163,7 +163,7 @@ public class TaskDetHis extends Model<TaskDetHis> {
|
||||
|
||||
public static final String TASK_CODE = "task_code";
|
||||
|
||||
public static final String TASK_ID = "task_id";
|
||||
public static final String CURR_TASK_ID = "curr_task_id";
|
||||
|
||||
public static final String ORDER_NO = "order_no";
|
||||
|
||||
|
||||
@@ -1,21 +1,25 @@
|
||||
package com.mt.wms.core.dal.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import com.baomidou.mybatisplus.annotation.Version;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 任务历史表
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2021-12-14
|
||||
* @since 2022-08-01
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@@ -228,6 +232,17 @@ public class TaskHis extends Model<TaskHis> {
|
||||
@TableField("sheet_no")
|
||||
private String sheetNo;
|
||||
|
||||
/**
|
||||
* 生产单号 APMS生成生产单后返回
|
||||
*/
|
||||
@TableField("task_id")
|
||||
private Long taskId;
|
||||
|
||||
/**
|
||||
* 炉号
|
||||
*/
|
||||
@TableField("stove_code")
|
||||
private String stoveCode;
|
||||
|
||||
public static final String ID = "id";
|
||||
|
||||
@@ -297,6 +312,10 @@ public class TaskHis extends Model<TaskHis> {
|
||||
|
||||
public static final String SHEET_NO = "sheet_no";
|
||||
|
||||
public static final String TASK_ID = "task_id";
|
||||
|
||||
public static final String STOVE_CODE = "stove_code";
|
||||
|
||||
@Override
|
||||
protected Serializable pkVal() {
|
||||
return this.id;
|
||||
|
||||
@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2021-11-18
|
||||
* @since 2022-02-28
|
||||
*/
|
||||
public interface AlarmInfoMapper extends BaseMapper<AlarmInfo> {
|
||||
|
||||
|
||||
@@ -21,11 +21,12 @@
|
||||
<result column="alarm_info" property="alarmInfo" />
|
||||
<result column="description" property="description" />
|
||||
<result column="note" property="note" />
|
||||
<result column="task_code" property="taskCode" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
id, valid, create_time, creator_id, updater_id, update_time, version, status, inter_code, code, equipment_id, equipment_name, type, alarm_code, alarm_info, description, note
|
||||
id, valid, create_time, creator_id, updater_id, update_time, version, status, inter_code, code, equipment_id, equipment_name, type, alarm_code, alarm_info, description, note, task_code
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -9,7 +9,7 @@ import com.mt.wms.core.dal.entity.ApmsCheckResult;
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2021-11-19
|
||||
* @since 2022-01-05
|
||||
*/
|
||||
public interface ApmsCheckResultMapper extends BaseMapper<ApmsCheckResult> {
|
||||
|
||||
|
||||
@@ -16,12 +16,34 @@
|
||||
<result column="hardness" property="hardness"/>
|
||||
<result column="metallography" property="metallography"/>
|
||||
<result column="heart_hardness" property="heartHardness"/>
|
||||
<result column="remake" property="remake"/>
|
||||
<result column="hardness_value_one" property="hardnessValueOne"/>
|
||||
<result column="hardness_value_two" property="hardnessValueTwo"/>
|
||||
<result column="hardness_value_three" property="hardnessValueThree"/>
|
||||
<result column="metallography_stch_stccsd" property="metallographyStchStccsd"/>
|
||||
<result column="metallography_stch_mstost" property="metallographyStchMstost"/>
|
||||
<result column="metallography_stch_xxklzthw" property="metallographyStchXxklzthw"/>
|
||||
<result column="metallography_stch_dtmstyltst" property="metallographyStchDtmstyltst"/>
|
||||
<result column="metallography_ztch_hhmst" property="metallographyZtchHhmst"/>
|
||||
<result column="metallography_ztch_hhtst" property="metallographyZtchHhtst"/>
|
||||
<result column="metallography_ztch_hhsst" property="metallographyZtchHhsst"/>
|
||||
<result column="metallography_dh_dhhwcs" property="metallographyDhDhhwcs"/>
|
||||
<result column="metallography_dh_kscs" property="metallographyDhKscs"/>
|
||||
<result column="metallography_dh_xb" property="metallographyDhXb"/>
|
||||
<result column="metallography_bmch_btmst" property="metallographyBmchBtmst"/>
|
||||
<result column="metallography_bmch_xb" property="metallographyBmchXb"/>
|
||||
<result column="metallography_bz" property="metallographyBz"/>
|
||||
<result column="metallography_xbyd_xbydjyjg" property="metallographyXbydXbydjyjg"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
id, valid, create_time, creator_id, updater_id, update_time, version, sheet_no, iden_card_num, hardness,
|
||||
metallography, heart_hardness
|
||||
metallography, heart_hardness, remake, hardness_value_one, hardness_value_two, hardness_value_three,
|
||||
metallography_stch_stccsd, metallography_stch_mstost, metallography_stch_xxklzthw,
|
||||
metallography_stch_dtmstyltst, metallography_ztch_hhmst, metallography_ztch_hhtst, metallography_ztch_hhsst,
|
||||
metallography_dh_dhhwcs, metallography_dh_kscs, metallography_dh_xb, metallography_bmch_btmst,
|
||||
metallography_bmch_xb, metallography_bz, metallography_xbyd_xbydjyjg
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2021-12-14
|
||||
* @since 2022-03-04
|
||||
*/
|
||||
public interface AutoExeTaskMapper extends BaseMapper<AutoExeTask> {
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
<result column="f_det_task_code" property="fDetTaskCode" />
|
||||
<result column="f_equipment_type_id" property="fEquipmentTypeId" />
|
||||
<result column="f_equipment_id" property="fEquipmentId" />
|
||||
<result column="f_equipment_name" property="fEquipmentName" />
|
||||
<result column="f_craft_code_id" property="fCraftCodeId" />
|
||||
<result column="f_plc_value" property="fPlcValue" />
|
||||
<result column="f_in_tran_status" property="fInTranStatus" />
|
||||
@@ -27,6 +28,7 @@
|
||||
<result column="t_task_id" property="tTaskId" />
|
||||
<result column="t_det_task_code" property="tDetTaskCode" />
|
||||
<result column="t_equipment_type_id" property="tEquipmentTypeId" />
|
||||
<result column="t_equipment_name" property="tEquipmentName" />
|
||||
<result column="t_equipment_id" property="tEquipmentId" />
|
||||
<result column="t_craft_code_id" property="tCraftCodeId" />
|
||||
<result column="t_plc_value" property="tPlcValue" />
|
||||
@@ -36,6 +38,7 @@
|
||||
<result column="th_task_id" property="thTaskId" />
|
||||
<result column="th_det_task_code" property="thDetTaskCode" />
|
||||
<result column="th_equipment_type_id" property="thEquipmentTypeId" />
|
||||
<result column="th_equipment_name" property="thEquipmentName" />
|
||||
<result column="th_equipment_id" property="thEquipmentId" />
|
||||
<result column="th_craft_code_id" property="thCraftCodeId" />
|
||||
<result column="th_plc_value" property="thPlcValue" />
|
||||
@@ -47,7 +50,7 @@
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
id, valid, create_time, status, inter_code, process_flow_id, process_flow_name, process_flow_type, craft_code_id, craft_code, warehouse_id, f_task_id, f_det_task_code, f_equipment_type_id, f_equipment_id, f_craft_code_id, f_plc_value, f_in_tran_status, f_pro_status, f_out_tran_status, t_task_id, t_det_task_code, t_equipment_type_id, t_equipment_id, t_craft_code_id, t_plc_value, t_in_tran_status, t_pro_status, t_out_tran_status, th_task_id, th_det_task_code, th_equipment_type_id, th_equipment_id, th_craft_code_id, th_plc_value, th_in_tran_status, th_pro_status, th_out_tran_status, content
|
||||
id, valid, create_time, status, inter_code, process_flow_id, process_flow_name, process_flow_type, craft_code_id, craft_code, warehouse_id, f_task_id, f_det_task_code, f_equipment_type_id, f_equipment_id, f_equipment_name, f_craft_code_id, f_plc_value, f_in_tran_status, f_pro_status, f_out_tran_status, t_task_id, t_det_task_code, t_equipment_type_id, t_equipment_name, t_equipment_id, t_craft_code_id, t_plc_value, t_in_tran_status, t_pro_status, t_out_tran_status, th_task_id, th_det_task_code, th_equipment_type_id, th_equipment_name, th_equipment_id, th_craft_code_id, th_plc_value, th_in_tran_status, th_pro_status, th_out_tran_status, content
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -5,11 +5,11 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 窑炉信息 Mapper 接口
|
||||
* 工业炉信息 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2021-11-18
|
||||
* @since 2022-02-28
|
||||
*/
|
||||
public interface KilnInfoMapper extends BaseMapper<KilnInfo> {
|
||||
|
||||
|
||||
@@ -5,11 +5,11 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 窑炉电能参数值 Mapper 接口
|
||||
* 工业炉电能参数值 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2021-11-18
|
||||
* @since 2022-03-01
|
||||
*/
|
||||
public interface ParEleValueMapper extends BaseMapper<ParEleValue> {
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
<result column="inter_code" property="interCode" />
|
||||
<result column="status" property="status" />
|
||||
<result column="kiln_id" property="kilnId" />
|
||||
<result column="task_id" property="taskId" />
|
||||
<result column="par_id" property="parId" />
|
||||
<result column="a_voltagev_value" property="aVoltagevValue" />
|
||||
<result column="b_voltagev_value" property="bVoltagevValue" />
|
||||
@@ -17,7 +18,7 @@
|
||||
<result column="b_current_value" property="bCurrentValue" />
|
||||
<result column="c_current_value" property="cCurrentValue" />
|
||||
<result column="total_bat" property="totalBat" />
|
||||
<result column="add_a" property="addA" />
|
||||
<result column="date_type" property="dateType" />
|
||||
<result column="add_b" property="addB" />
|
||||
<result column="add_c" property="addC" />
|
||||
<result column="orther_a" property="ortherA" />
|
||||
@@ -27,7 +28,7 @@
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
id, create_time, inter_code, status, kiln_id, par_id, a_voltagev_value, b_voltagev_value, c_voltagev_value, a_current_value, b_current_value, c_current_value, total_bat, add_a, add_b, add_c, orther_a, orther_b, orther_c
|
||||
id, create_time, inter_code, status, kiln_id, task_id, par_id, a_voltagev_value, b_voltagev_value, c_voltagev_value, a_current_value, b_current_value, c_current_value, total_bat, date_type, add_b, add_c, orther_a, orther_b, orther_c
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -5,11 +5,11 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 窑炉使用气检测值 Mapper 接口
|
||||
* 工业炉使用气检测值 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2021-11-18
|
||||
* @since 2022-03-01
|
||||
*/
|
||||
public interface ParGasValueMapper extends BaseMapper<ParGasValue> {
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
<result column="inter_code" property="interCode" />
|
||||
<result column="status" property="status" />
|
||||
<result column="kiln_id" property="kilnId" />
|
||||
<result column="task_id" property="taskId" />
|
||||
<result column="par_id" property="parId" />
|
||||
<result column="set_nit_pot_value" property="setNitPotValue" />
|
||||
<result column="actual_nit_pot_value" property="actualNitPotValue" />
|
||||
@@ -16,17 +17,17 @@
|
||||
<result column="nit_flow_value" property="nitFlowValue" />
|
||||
<result column="ammonia_flow_value" property="ammoniaFlowValue" />
|
||||
<result column="car_dioxide_flow_value" property="carDioxideFlowValue" />
|
||||
<result column="add_a" property="addA" />
|
||||
<result column="add_b" property="addB" />
|
||||
<result column="add_c" property="addC" />
|
||||
<result column="orther_a" property="ortherA" />
|
||||
<result column="methanol_flow" property="methanolFlow" />
|
||||
<result column="propane_flow" property="propaneFlow" />
|
||||
<result column="hydrogen_content" property="hydrogenContent" />
|
||||
<result column="decomposition_rate" property="decompositionRate" />
|
||||
<result column="orther_b" property="ortherB" />
|
||||
<result column="orther_c" property="ortherC" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
id, create_time, inter_code, status, kiln_id, par_id, set_nit_pot_value, actual_nit_pot_value, accept_nit_pot_value, nit_flow_value, ammonia_flow_value, car_dioxide_flow_value, add_a, add_b, add_c, orther_a, orther_b, orther_c
|
||||
id, create_time, inter_code, status, kiln_id, task_id, par_id, set_nit_pot_value, actual_nit_pot_value, accept_nit_pot_value, nit_flow_value, ammonia_flow_value, car_dioxide_flow_value, methanol_flow, propane_flow, hydrogen_content, decomposition_rate, orther_b, orther_c
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -5,11 +5,11 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 窑炉运转速度 Mapper 接口
|
||||
* 工业炉运转速度 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2021-11-18
|
||||
* @since 2022-03-01
|
||||
*/
|
||||
public interface ParRotSpeedValueMapper extends BaseMapper<ParRotSpeedValue> {
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
<result column="inter_code" property="interCode" />
|
||||
<result column="status" property="status" />
|
||||
<result column="kiln_id" property="kilnId" />
|
||||
<result column="task_id" property="taskId" />
|
||||
<result column="par_id" property="parId" />
|
||||
<result column="fan_speed_a_value" property="fanSpeedAValue" />
|
||||
<result column="fan_speed_b_value" property="fanSpeedBValue" />
|
||||
@@ -28,7 +29,7 @@
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
id, create_time, inter_code, status, kiln_id, par_id, fan_speed_a_value, fan_speed_b_value, oil_sti_speed_a_value, oil_sti_speed_b_value, oil_sti_speed_c_value, oil_sti_speed_d_value, oil_sti_speed_e_value, oil_sti_speed_f_value, add_a, add_b, add_c, orther_a, orther_b, orther_c
|
||||
id, create_time, inter_code, status, kiln_id, task_id, par_id, fan_speed_a_value, fan_speed_b_value, oil_sti_speed_a_value, oil_sti_speed_b_value, oil_sti_speed_c_value, oil_sti_speed_d_value, oil_sti_speed_e_value, oil_sti_speed_f_value, add_a, add_b, add_c, orther_a, orther_b, orther_c
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -5,11 +5,11 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 窑炉温度监控 Mapper 接口
|
||||
* 工业炉温度监控 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2021-11-18
|
||||
* @since 2022-03-01
|
||||
*/
|
||||
public interface ParTemValueMapper extends BaseMapper<ParTemValue> {
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
<result column="inter_code" property="interCode" />
|
||||
<result column="status" property="status" />
|
||||
<result column="kiln_id" property="kilnId" />
|
||||
<result column="task_id" property="taskId" />
|
||||
<result column="par_id" property="parId" />
|
||||
<result column="set_tem_value" property="setTemValue" />
|
||||
<result column="act_tem_value" property="actTemValue" />
|
||||
@@ -16,9 +17,9 @@
|
||||
<result column="oil_tank_set_tem_value" property="oilTankSetTemValue" />
|
||||
<result column="take_over_set_tem_value" property="takeOverSetTemValue" />
|
||||
<result column="take_over_oil_set_tem_value" property="takeOverOilSetTemValue" />
|
||||
<result column="add_a" property="addA" />
|
||||
<result column="add_b" property="addB" />
|
||||
<result column="add_c" property="addC" />
|
||||
<result column="outer_zone1_temp" property="outerZone1Temp" />
|
||||
<result column="outer_zone2_temp" property="outerZone2Temp" />
|
||||
<result column="furnace_pressure" property="furnacePressure" />
|
||||
<result column="orther_a" property="ortherA" />
|
||||
<result column="orther_b" property="ortherB" />
|
||||
<result column="orther_c" property="ortherC" />
|
||||
@@ -26,7 +27,7 @@
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
id, create_time, inter_code, status, kiln_id, par_id, set_tem_value, act_tem_value, oil_tank_act_tem_value, oil_tank_set_tem_value, take_over_set_tem_value, take_over_oil_set_tem_value, add_a, add_b, add_c, orther_a, orther_b, orther_c
|
||||
id, create_time, inter_code, status, kiln_id, task_id, par_id, set_tem_value, act_tem_value, oil_tank_act_tem_value, oil_tank_set_tem_value, take_over_set_tem_value, take_over_oil_set_tem_value, outer_zone1_temp, outer_zone2_temp, furnace_pressure, orther_a, orther_b, orther_c
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.mt.wms.core.dal.mapper;
|
||||
|
||||
import com.mt.wms.core.dal.entity.PlcNameSpace;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* PLC变量nameSpace对照表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2022-02-28
|
||||
*/
|
||||
public interface PlcNameSpaceMapper extends BaseMapper<PlcNameSpace> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
<?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="com.mt.wms.core.dal.mapper.PlcNameSpaceMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.mt.wms.core.dal.entity.PlcNameSpace">
|
||||
<result column="id" property="id" />
|
||||
<result column="eq_type" property="eqType" />
|
||||
<result column="name" property="name" />
|
||||
<result column="note" property="note" />
|
||||
<result column="eq_id" property="eqId" />
|
||||
<result column="eq_name" property="eqName" />
|
||||
<result column="type" property="type" />
|
||||
<result column="remark" property="remark" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
id, eq_type, name, note, eq_id, eq_name, type, remark
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.mt.wms.core.dal.mapper;
|
||||
|
||||
import com.mt.wms.core.dal.entity.PointInfo;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 点位信息表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2022-03-02
|
||||
*/
|
||||
public interface PointInfoMapper extends BaseMapper<PointInfo> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<?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="com.mt.wms.core.dal.mapper.PointInfoMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.mt.wms.core.dal.entity.PointInfo">
|
||||
<result column="id" property="id" />
|
||||
<result column="code" property="code" />
|
||||
<result column="name" property="name" />
|
||||
<result column="note" property="note" />
|
||||
<result column="type" property="type" />
|
||||
<result column="distance" property="distance" />
|
||||
<result column="create_time" property="createTime" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
id, code, name, note, type, distance, create_time
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.mt.wms.core.dal.mapper;
|
||||
|
||||
import com.mt.wms.core.dal.entity.QuestionAnswer;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 问题解答表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2022-08-11
|
||||
*/
|
||||
public interface QuestionAnswerMapper extends BaseMapper<QuestionAnswer> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
<?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="com.mt.wms.core.dal.mapper.QuestionAnswerMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.mt.wms.core.dal.entity.QuestionAnswer">
|
||||
<id column="id" property="id" />
|
||||
<result column="valid" property="valid" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="creator_id" property="creatorId" />
|
||||
<result column="updater_id" property="updaterId" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="version" property="version" />
|
||||
<result column="status" property="status" />
|
||||
<result column="inter_code" property="interCode" />
|
||||
<result column="code" property="code" />
|
||||
<result column="question" property="question" />
|
||||
<result column="answer" property="answer" />
|
||||
<result column="description" property="description" />
|
||||
<result column="note" property="note" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
id, valid, create_time, creator_id, updater_id, update_time, version, status, inter_code, code, question, answer, description, note
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
@@ -14,7 +14,7 @@
|
||||
<result column="status" property="status" />
|
||||
<result column="inter_code" property="interCode" />
|
||||
<result column="task_code" property="taskCode" />
|
||||
<result column="task_id" property="taskId" />
|
||||
<result column="curr_task_id" property="currTaskId" />
|
||||
<result column="order_no" property="orderNo" />
|
||||
<result column="iden_card_num" property="idenCardNum" />
|
||||
<result column="product_name" property="productName" />
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
id, valid, create_time, creator_id, updater_id, update_time, version, status, inter_code, task_code, task_id, order_no, iden_card_num, product_name, material_des, craft_ill, unit, weight, quantity
|
||||
id, valid, create_time, creator_id, updater_id, update_time, version, status, inter_code, task_code, curr_task_id, order_no, iden_card_num, product_name, material_des, craft_ill, unit, weight, quantity
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2021-12-14
|
||||
* @since 2022-08-01
|
||||
*/
|
||||
public interface TaskHisMapper extends BaseMapper<TaskHis> {
|
||||
|
||||
|
||||
@@ -25,27 +25,25 @@
|
||||
<result column="run_task_id" property="runTaskId" />
|
||||
<result column="start_position" property="startPosition" />
|
||||
<result column="target_position" property="targetPosition" />
|
||||
<result column="is_cache" property="isCache"/>
|
||||
<result column="cache_satatus" property="cacheSatatus"/>
|
||||
<result column="cache_run_task_id" property="cacheRunTaskId"/>
|
||||
<result column="location_id" property="locationId"/>
|
||||
<result column="location_name" property="locationName"/>
|
||||
<result column="is_out" property="isOut"/>
|
||||
<result column="out_run_task_id" property="outRunTaskId"/>
|
||||
<result column="out_start_position" property="outStartPosition"/>
|
||||
<result column="out_target_position" property="outTargetPosition"/>
|
||||
<result column="task_code" property="taskCode"/>
|
||||
<result column="process_type" property="processType"/>
|
||||
<result column="task_type" property="taskType"/>
|
||||
<result column="sheet_no" property="sheetNo"/>
|
||||
<result column="is_cache" property="isCache" />
|
||||
<result column="cache_satatus" property="cacheSatatus" />
|
||||
<result column="cache_run_task_id" property="cacheRunTaskId" />
|
||||
<result column="location_id" property="locationId" />
|
||||
<result column="location_name" property="locationName" />
|
||||
<result column="is_out" property="isOut" />
|
||||
<result column="out_run_task_id" property="outRunTaskId" />
|
||||
<result column="out_start_position" property="outStartPosition" />
|
||||
<result column="out_target_position" property="outTargetPosition" />
|
||||
<result column="task_code" property="taskCode" />
|
||||
<result column="process_type" property="processType" />
|
||||
<result column="task_type" property="taskType" />
|
||||
<result column="sheet_no" property="sheetNo" />
|
||||
<result column="task_id" property="taskId" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
id, valid, create_time, creator_id, updater_id, update_time, version, status, inter_code, is_auto,
|
||||
auto_exe_task_id, kiln_id, kiln_name, craft_code_id, plc_value, begin_time, end_time, is_in, run_task_id,
|
||||
start_position, target_position, is_cache, cache_satatus, cache_run_task_id, location_id, location_name, is_out,
|
||||
out_run_task_id, out_start_position, out_target_position, task_code, process_type, task_type, sheet_no
|
||||
id, valid, create_time, creator_id, updater_id, update_time, version, status, inter_code, is_auto, auto_exe_task_id, kiln_id, kiln_name, craft_code_id, plc_value, begin_time, end_time, is_in, run_task_id, start_position, target_position, is_cache, cache_satatus, cache_run_task_id, location_id, location_name, is_out, out_run_task_id, out_start_position, out_target_position, task_code, process_type, task_type, sheet_no, task_id
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2021-11-18
|
||||
* @since 2022-02-28
|
||||
*/
|
||||
public interface AlarmInfoServiceBiz extends IService<AlarmInfo> {
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import com.mt.wms.core.dal.entity.ApmsCheckResult;
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2021-11-19
|
||||
* @since 2022-01-05
|
||||
*/
|
||||
public interface ApmsCheckResultServiceBiz extends IService<ApmsCheckResult> {
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2021-12-14
|
||||
* @since 2022-03-04
|
||||
*/
|
||||
public interface AutoExeTaskServiceBiz extends IService<AutoExeTask> {
|
||||
|
||||
|
||||
@@ -5,11 +5,11 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 窑炉信息 服务类
|
||||
* 工业炉信息 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2021-11-18
|
||||
* @since 2022-02-28
|
||||
*/
|
||||
public interface KilnInfoServiceBiz extends IService<KilnInfo> {
|
||||
|
||||
|
||||
@@ -5,11 +5,11 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 窑炉电能参数值 服务类
|
||||
* 工业炉电能参数值 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2021-11-18
|
||||
* @since 2022-03-01
|
||||
*/
|
||||
public interface ParEleValueServiceBiz extends IService<ParEleValue> {
|
||||
|
||||
|
||||
@@ -5,11 +5,11 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 窑炉使用气检测值 服务类
|
||||
* 工业炉使用气检测值 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2021-11-18
|
||||
* @since 2022-03-01
|
||||
*/
|
||||
public interface ParGasValueServiceBiz extends IService<ParGasValue> {
|
||||
|
||||
|
||||
@@ -5,11 +5,11 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 窑炉运转速度 服务类
|
||||
* 工业炉运转速度 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2021-11-18
|
||||
* @since 2022-03-01
|
||||
*/
|
||||
public interface ParRotSpeedValueServiceBiz extends IService<ParRotSpeedValue> {
|
||||
|
||||
|
||||
@@ -5,11 +5,11 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 窑炉温度监控 服务类
|
||||
* 工业炉温度监控 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2021-11-18
|
||||
* @since 2022-03-01
|
||||
*/
|
||||
public interface ParTemValueServiceBiz extends IService<ParTemValue> {
|
||||
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.mt.wms.core.dal.service;
|
||||
|
||||
import com.mt.wms.core.dal.entity.PlcNameSpace;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* PLC变量nameSpace对照表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2022-02-28
|
||||
*/
|
||||
public interface PlcNameSpaceServiceBiz extends IService<PlcNameSpace> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.mt.wms.core.dal.service;
|
||||
|
||||
import com.mt.wms.core.dal.entity.PointInfo;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 点位信息表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2022-03-02
|
||||
*/
|
||||
public interface PointInfoServiceBiz extends IService<PointInfo> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.mt.wms.core.dal.service;
|
||||
|
||||
import com.mt.wms.core.dal.entity.QuestionAnswer;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 问题解答表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2022-08-11
|
||||
*/
|
||||
public interface QuestionAnswerServiceBiz extends IService<QuestionAnswer> {
|
||||
|
||||
}
|
||||
@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2021-12-14
|
||||
* @since 2022-08-01
|
||||
*/
|
||||
public interface TaskHisServiceBiz extends IService<TaskHis> {
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ import org.springframework.stereotype.Service;
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2021-11-18
|
||||
* @since 2022-02-28
|
||||
*/
|
||||
@Service
|
||||
public class AlarmInfoServiceBizImpl extends ServiceImpl<AlarmInfoMapper, AlarmInfo> implements AlarmInfoServiceBiz {
|
||||
|
||||
@@ -12,7 +12,7 @@ import org.springframework.stereotype.Service;
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2021-11-19
|
||||
* @since 2022-01-05
|
||||
*/
|
||||
@Service
|
||||
public class ApmsCheckResultServiceBizImpl extends ServiceImpl<ApmsCheckResultMapper, ApmsCheckResult> implements ApmsCheckResultServiceBiz {
|
||||
|
||||
@@ -12,7 +12,7 @@ import org.springframework.stereotype.Service;
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2021-12-14
|
||||
* @since 2022-03-04
|
||||
*/
|
||||
@Service
|
||||
public class AutoExeTaskServiceBizImpl extends ServiceImpl<AutoExeTaskMapper, AutoExeTask> implements AutoExeTaskServiceBiz {
|
||||
|
||||
@@ -8,11 +8,11 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 窑炉信息 服务实现类
|
||||
* 工业炉信息 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2021-11-18
|
||||
* @since 2022-02-28
|
||||
*/
|
||||
@Service
|
||||
public class KilnInfoServiceBizImpl extends ServiceImpl<KilnInfoMapper, KilnInfo> implements KilnInfoServiceBiz {
|
||||
|
||||
@@ -8,11 +8,11 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 窑炉电能参数值 服务实现类
|
||||
* 工业炉电能参数值 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2021-11-18
|
||||
* @since 2022-03-01
|
||||
*/
|
||||
@Service
|
||||
public class ParEleValueServiceBizImpl extends ServiceImpl<ParEleValueMapper, ParEleValue> implements ParEleValueServiceBiz {
|
||||
|
||||
@@ -8,11 +8,11 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 窑炉使用气检测值 服务实现类
|
||||
* 工业炉使用气检测值 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2021-11-18
|
||||
* @since 2022-03-01
|
||||
*/
|
||||
@Service
|
||||
public class ParGasValueServiceBizImpl extends ServiceImpl<ParGasValueMapper, ParGasValue> implements ParGasValueServiceBiz {
|
||||
|
||||
@@ -8,11 +8,11 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 窑炉运转速度 服务实现类
|
||||
* 工业炉运转速度 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2021-11-18
|
||||
* @since 2022-03-01
|
||||
*/
|
||||
@Service
|
||||
public class ParRotSpeedValueServiceBizImpl extends ServiceImpl<ParRotSpeedValueMapper, ParRotSpeedValue> implements ParRotSpeedValueServiceBiz {
|
||||
|
||||
@@ -8,11 +8,11 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 窑炉温度监控 服务实现类
|
||||
* 工业炉温度监控 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2021-11-18
|
||||
* @since 2022-03-01
|
||||
*/
|
||||
@Service
|
||||
public class ParTemValueServiceBizImpl extends ServiceImpl<ParTemValueMapper, ParTemValue> implements ParTemValueServiceBiz {
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.mt.wms.core.dal.service.impl;
|
||||
|
||||
import com.mt.wms.core.dal.entity.PlcNameSpace;
|
||||
import com.mt.wms.core.dal.mapper.PlcNameSpaceMapper;
|
||||
import com.mt.wms.core.dal.service.PlcNameSpaceServiceBiz;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* PLC变量nameSpace对照表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2022-02-28
|
||||
*/
|
||||
@Service
|
||||
public class PlcNameSpaceServiceBizImpl extends ServiceImpl<PlcNameSpaceMapper, PlcNameSpace> implements PlcNameSpaceServiceBiz {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.mt.wms.core.dal.service.impl;
|
||||
|
||||
import com.mt.wms.core.dal.entity.PointInfo;
|
||||
import com.mt.wms.core.dal.mapper.PointInfoMapper;
|
||||
import com.mt.wms.core.dal.service.PointInfoServiceBiz;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 点位信息表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2022-03-02
|
||||
*/
|
||||
@Service
|
||||
public class PointInfoServiceBizImpl extends ServiceImpl<PointInfoMapper, PointInfo> implements PointInfoServiceBiz {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.mt.wms.core.dal.service.impl;
|
||||
|
||||
import com.mt.wms.core.dal.entity.QuestionAnswer;
|
||||
import com.mt.wms.core.dal.mapper.QuestionAnswerMapper;
|
||||
import com.mt.wms.core.dal.service.QuestionAnswerServiceBiz;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 问题解答表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2022-08-11
|
||||
*/
|
||||
@Service
|
||||
public class QuestionAnswerServiceBizImpl extends ServiceImpl<QuestionAnswerMapper, QuestionAnswer> implements QuestionAnswerServiceBiz {
|
||||
|
||||
}
|
||||
@@ -12,7 +12,7 @@ import org.springframework.stereotype.Service;
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2021-12-14
|
||||
* @since 2022-08-01
|
||||
*/
|
||||
@Service
|
||||
public class TaskHisServiceBizImpl extends ServiceImpl<TaskHisMapper, TaskHis> implements TaskHisServiceBiz {
|
||||
|
||||
@@ -27,7 +27,41 @@ public class CodeGeneratorHelper {
|
||||
*/
|
||||
public static final String ORDER_CODE = "ORDER_CODE";
|
||||
|
||||
/**
|
||||
* 报警编码
|
||||
*/
|
||||
public static final String ALARM_CODE = "ALARM_CODE";
|
||||
|
||||
/**
|
||||
* 自动任务编码
|
||||
*/
|
||||
public static final String AUTO_TASK_CODE = "AUTO_TASK_CODE";
|
||||
|
||||
/**
|
||||
* 炉号编码
|
||||
*/
|
||||
public static final String STOVE_CODE = "STOVE_CODE";
|
||||
|
||||
/**
|
||||
* 生成自炉号编码
|
||||
*
|
||||
* @return 订单编号
|
||||
*/
|
||||
public static String getStoveCode(String kilnNameAndCraft) {
|
||||
return IDGenerator.gen(kilnNameAndCraft, "yyMMdd", 2, STOVE_CODE);
|
||||
}
|
||||
|
||||
public static String getStoveCode(String kilnName,String craft) {
|
||||
return IDGenerator.gen(kilnName+"-"+craft+"-", "yyMMdd", 4,kilnName);
|
||||
}
|
||||
/**
|
||||
* 生成自动任务编码
|
||||
*
|
||||
* @return 订单编号
|
||||
*/
|
||||
public static String getAutoTaskCode() {
|
||||
return IDGenerator.gen("ZD", "yyyyMMdd", 6, AUTO_TASK_CODE);
|
||||
}
|
||||
/**
|
||||
* 生成订单编号
|
||||
*
|
||||
@@ -36,5 +70,13 @@ public class CodeGeneratorHelper {
|
||||
public static String getOrderCode() {
|
||||
return IDGenerator.gen("20", "yyyyMMdd", 6, ORDER_CODE);
|
||||
}
|
||||
/**
|
||||
* 生成报警编码
|
||||
*
|
||||
* @return 报警编码
|
||||
*/
|
||||
public static String getAlarmCode() {
|
||||
return IDGenerator.gen("BJ", "yyyyMMdd", 6, ALARM_CODE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ import java.io.IOException;
|
||||
import java.nio.charset.Charset;
|
||||
import java.security.cert.CertificateException;
|
||||
import java.security.cert.X509Certificate;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
* 使用 OKhttp 请求 Api 数据
|
||||
@@ -46,7 +47,11 @@ public class HttpClient {
|
||||
}
|
||||
|
||||
public static String httpPost(String url, String json) throws IOException {
|
||||
OkHttpClient httpClient = new OkHttpClient();
|
||||
//OkHttpClient httpClient = new OkHttpClient();
|
||||
OkHttpClient httpClient = new OkHttpClient().newBuilder().connectTimeout(300L, TimeUnit.MINUTES)
|
||||
.writeTimeout(60*300, TimeUnit.SECONDS)
|
||||
.readTimeout(60*300, TimeUnit.SECONDS)
|
||||
.build();
|
||||
RequestBody requestBody = RequestBody.create(JSON, json);
|
||||
Request request = new Request.Builder()
|
||||
.url(url)
|
||||
|
||||
@@ -11,10 +11,8 @@ import org.springframework.stereotype.Component;
|
||||
import javax.annotation.PostConstruct;
|
||||
import java.text.DecimalFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
* id生成器,使用redis自增接口实现
|
||||
@@ -153,6 +151,13 @@ public class IDGenerator {
|
||||
}
|
||||
if (!isEmpty(sequenceName)) {
|
||||
long sequence = gen(sequenceName);
|
||||
//设置key有效期为当天,次日凌晨失效
|
||||
Calendar curDate = Calendar.getInstance();
|
||||
Calendar tomorrowDate = new GregorianCalendar(curDate.get(Calendar.YEAR), curDate.get(Calendar.MONTH), curDate.get(Calendar.DATE) + 1, 0, 0, 0);
|
||||
int second = (int)(tomorrowDate.getTimeInMillis() - curDate.getTimeInMillis()) / 1000;
|
||||
idGenerator.redisTemplate.opsForValue().set(KEY_PREFIX_SEQUENCE + sequenceName, sequence, second, TimeUnit.SECONDS);
|
||||
idGenerator.redisTemplate.opsForValue().getOperations();
|
||||
|
||||
if (sequenceLength > 0) {
|
||||
if (sequenceLength > MAX_SEQUENCE_LENGTH) {
|
||||
sequenceLength = MAX_SEQUENCE_LENGTH;
|
||||
|
||||
@@ -99,5 +99,8 @@ public class R<T> implements Serializable {
|
||||
public static <T> R<T> ok(String msg, T data) {
|
||||
return new R<T>().msg(msg).data(data);
|
||||
}
|
||||
public static <T> R<T> ok(int code,String msg, T data) {
|
||||
return new R<T>().code(code).msg(msg).data(data);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -25,6 +25,13 @@
|
||||
<artifactId>hutool-all</artifactId>
|
||||
<version>5.5.7</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-websocket -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-websocket</artifactId>
|
||||
<version>2.5.4</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.mt.wms.empty.controller;
|
||||
|
||||
import com.mt.wms.core.base.BaseController;
|
||||
import com.mt.wms.core.constants.CommonConstant;
|
||||
import com.mt.wms.core.validator.groups.PageGroup;
|
||||
import com.mt.wms.core.vo.PageVo;
|
||||
import com.mt.wms.core.vo.R;
|
||||
import com.mt.wms.empty.params.AlarmInfoQueryParam;
|
||||
import com.mt.wms.empty.service.AlarmInfoService;
|
||||
import com.mt.wms.empty.vo.AlarmInfoVo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.groups.Default;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: liguanghao
|
||||
* @Date: 2021/12/16 19:22
|
||||
* @Version 1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping(CommonConstant.API_MODULE_BASE + "alarmInfo")
|
||||
@Slf4j
|
||||
@Api(value = "报警信息相关接口", tags = "报警信息相关接口", hidden = false)
|
||||
public class AlarmInfoController extends BaseController {
|
||||
|
||||
|
||||
@Autowired
|
||||
private AlarmInfoService alarmInfoService;
|
||||
|
||||
@PostMapping(value = "page")
|
||||
@ApiOperation(value = "获取分页报警基础信息")
|
||||
private R<PageVo<AlarmInfoVo>> page(@Validated({PageGroup.class, Default.class}) @RequestBody AlarmInfoQueryParam alarmInfoQueryParam) {
|
||||
return alarmInfoService.page(alarmInfoQueryParam);
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,7 @@ import cn.hutool.http.HttpResponse;
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import cn.hutool.json.JSON;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.mt.wms.core.base.BaseController;
|
||||
import com.mt.wms.core.constants.CommonConstant;
|
||||
import com.mt.wms.core.dal.entity.CommunicationLog;
|
||||
@@ -17,6 +18,7 @@ import com.mt.wms.empty.vo.ApmsCreateProcessSheetVo;
|
||||
import com.mt.wms.empty.vo.ApmsEndProcessVo;
|
||||
import com.mt.wms.empty.vo.ApmsFinishProcessSheetVo;
|
||||
import com.mt.wms.empty.vo.ApmsStoveVo;
|
||||
import com.mt.wms.empty.websocket.WebSocketServer;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -27,6 +29,8 @@ import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.IOException;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.HashMap;
|
||||
@@ -46,11 +50,12 @@ public class ApmsController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private CommunicationLogServiceBiz communicationLogServiceBiz;
|
||||
@Autowired
|
||||
private WebSocketServer webSocketServer;
|
||||
|
||||
// static String Token = "eyJhbGciOiJIUzI1NiJ9.eyJkYXRlIjozMTkyNzU4NDk4ODA3LCJwbGF0Rm9ybUlkIjoyLCJhcGlLZXkiOiI3ZWU4ZjU5YmJhZWFlMjdlIiwiZXhwIjozMTkyNzU4NDk4LCJpYXQiOjE2Mzc1NTg0OTh9.RH3MRQr1dCBYW996-WXN69eXu1ZFblAQHfhZHNbTmCg";
|
||||
static String Token = "";
|
||||
static LocalDateTime TokenExpireTime = LocalDateTime.now();
|
||||
static String ApiAddress = "http://59.110.171.25:9010";
|
||||
static String ApiAddress = "http://192.168.1.109:80";
|
||||
|
||||
@PostMapping(value = "apmsPostOrder")
|
||||
@ApiOperation(value = "WMS接收APMS推送订单信息")
|
||||
@@ -58,24 +63,26 @@ public class ApmsController extends BaseController {
|
||||
CommunicationLog communicationLog = new CommunicationLog();
|
||||
communicationLog.setCode("APMS" + System.currentTimeMillis());
|
||||
communicationLog.setLogName("WMS接收APMS推送订单信息");
|
||||
communicationLog.setContent(apmsPostOrderParam.toString());
|
||||
communicationLog.setType(3);
|
||||
setCommonField(communicationLog);
|
||||
R<String> stringR = orderInfoService.apmsPostOrder(apmsPostOrderParam);
|
||||
communicationLog.setContent("param:" + apmsPostOrderParam.toString() + "\nresult:" + stringR.toString());
|
||||
communicationLogServiceBiz.save(communicationLog);
|
||||
return orderInfoService.apmsPostOrder(apmsPostOrderParam);
|
||||
return stringR;
|
||||
}
|
||||
|
||||
@PostMapping(value = "apmsVoidOrder")
|
||||
@ApiOperation(value = "WMS接收APMS作废订单信息")
|
||||
public R<String> apmsVoidOrder(@Validated @RequestBody String idenCardNum) {
|
||||
public R<String> apmsVoidOrder(@Validated @RequestBody Iden idenCardNum) {
|
||||
CommunicationLog communicationLog = new CommunicationLog();
|
||||
communicationLog.setCode("APMS" + System.currentTimeMillis());
|
||||
communicationLog.setLogName("WMS接收APMS作废订单信息");
|
||||
communicationLog.setType(3);
|
||||
communicationLog.setContent(idenCardNum);
|
||||
setCommonField(communicationLog);
|
||||
R<String> stringR = orderInfoService.apmsVoidOrder(idenCardNum.getIdenCardNum());
|
||||
communicationLog.setContent("param:" + idenCardNum + "\nresult:" + stringR.toString());
|
||||
communicationLogServiceBiz.save(communicationLog);
|
||||
return orderInfoService.apmsVoidOrder(idenCardNum);
|
||||
return stringR;
|
||||
}
|
||||
|
||||
@PostMapping(value = "apmsCompleteOrder")
|
||||
@@ -85,11 +92,12 @@ public class ApmsController extends BaseController {
|
||||
communicationLog.setCode("APMS" + System.currentTimeMillis());
|
||||
communicationLog.setLogName("WMS接收APMS加工单检验结果");
|
||||
communicationLog.setType(3);
|
||||
communicationLog.setContent(apmsCompleteOrder.toString());
|
||||
setCommonField(communicationLog);
|
||||
communicationLogServiceBiz.save(communicationLog);
|
||||
//APMS完成订单,返回检验结果,更新结果和后续处理
|
||||
return orderInfoService.apmsCompleteOrder(apmsCompleteOrder);
|
||||
R<String> stringR = orderInfoService.apmsCompleteOrder(apmsCompleteOrder);
|
||||
communicationLog.setContent("param:" + apmsCompleteOrder + "\nresult:" + stringR.toString());
|
||||
communicationLogServiceBiz.save(communicationLog);
|
||||
return stringR;
|
||||
}
|
||||
|
||||
|
||||
@@ -100,7 +108,7 @@ public class ApmsController extends BaseController {
|
||||
* @return 删除结果
|
||||
*/
|
||||
@PostMapping(value = "deleteBySheetNo")
|
||||
@ApiOperation(value = "通知APMS删除生产单")
|
||||
@ApiOperation(value = "通知APMS删除生产单", hidden = false)
|
||||
public R<ApmsEndProcessVo> deleteBySheetNo(@Validated @RequestBody String sheetNo) {
|
||||
checkToken();
|
||||
HashMap<String, Object> paramMap = new HashMap<>();
|
||||
@@ -118,12 +126,13 @@ public class ApmsController extends BaseController {
|
||||
}
|
||||
|
||||
@PostMapping(value = "createProcessSheet")
|
||||
@ApiOperation(value = "通知APMS创建生产单接口")
|
||||
@ApiOperation(value = "通知APMS创建生产单接口", hidden = false)
|
||||
public R<ApmsCreateProcessSheetVo> createProcessSheet(@Validated @RequestBody ApmsCreateProcessSheet apmsCreateProcess) {
|
||||
checkToken();
|
||||
String paramJson = JSONUtil.toJsonStr(apmsCreateProcess);
|
||||
HttpResponse response = HttpUtil.createPost(ApiAddress + "/platform/api/createProcessSheet")
|
||||
.header("token", Token).body(paramJson, ContentType.JSON.toString()).execute();
|
||||
int status = response.getStatus();
|
||||
CommunicationLog communicationLog = new CommunicationLog();
|
||||
communicationLog.setCode("APMS" + System.currentTimeMillis());
|
||||
communicationLog.setLogName("WMS通知APMS创建生产单");
|
||||
@@ -131,16 +140,35 @@ public class ApmsController extends BaseController {
|
||||
communicationLog.setContent("param:" + paramJson + "\nresult:" + response.body());
|
||||
setCommonField(communicationLog);
|
||||
communicationLogServiceBiz.save(communicationLog);
|
||||
return successful(JSONUtil.toBean(response.body(), ApmsCreateProcessSheetVo.class));
|
||||
String body = response.body();
|
||||
JSONObject jsonObject = com.alibaba.fastjson.JSON.parseObject(body);
|
||||
Object success = jsonObject.get("success");
|
||||
if (status == 200)
|
||||
{
|
||||
ApmsCreateProcessSheetVo apmsCreateProcessSheetVo = JSONUtil.toBean(response.body(), ApmsCreateProcessSheetVo.class);
|
||||
if (!apmsCreateProcessSheetVo.getSuccess()){
|
||||
try {
|
||||
webSocketServer.sendtoAll(apmsCreateProcessSheetVo.getMsg());
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return successful(apmsCreateProcessSheetVo);
|
||||
}
|
||||
else
|
||||
{
|
||||
return failed(status, response.body());
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(value = "startProcess")
|
||||
@ApiOperation(value = "通知APMS生产单开始处理")
|
||||
@ApiOperation(value = "通知APMS生产单开始处理", hidden = false)
|
||||
public R<ApmsStartProcess> startProcess(@Validated @RequestBody ApmsStartProcess apmsStartProcess) {
|
||||
checkToken();
|
||||
String paramJson = JSONUtil.toJsonStr(apmsStartProcess);
|
||||
HttpResponse response = HttpUtil.createPost(ApiAddress + "/platform/api/startProcess")
|
||||
.header("token", Token).body(paramJson, ContentType.JSON.toString()).execute();
|
||||
int status = response.getStatus();
|
||||
CommunicationLog communicationLog = new CommunicationLog();
|
||||
communicationLog.setCode("APMS" + System.currentTimeMillis());
|
||||
communicationLog.setLogName("WMS通知APMS生产单开始处理");
|
||||
@@ -148,16 +176,24 @@ public class ApmsController extends BaseController {
|
||||
communicationLog.setContent("param:" + paramJson + "\nresult:" + response.body());
|
||||
setCommonField(communicationLog);
|
||||
communicationLogServiceBiz.save(communicationLog);
|
||||
return successful(JSONUtil.toBean(response.body(), ApmsStartProcess.class));
|
||||
if (status == 200)
|
||||
{
|
||||
return successful(JSONUtil.toBean(response.body(), ApmsStartProcess.class));
|
||||
}
|
||||
else
|
||||
{
|
||||
return failed(status, response.body());
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(value = "endProcess")
|
||||
@ApiOperation(value = "通知APMS生产单结束处理")
|
||||
@ApiOperation(value = "通知APMS生产单结束处理", hidden = false)
|
||||
public R<ApmsEndProcessVo> endProcess(@Validated @RequestBody ApmsEndProcess apmsEndProcess) {
|
||||
checkToken();
|
||||
String paramJson = JSONUtil.toJsonStr(apmsEndProcess);
|
||||
HttpResponse response = HttpUtil.createPost(ApiAddress + "/platform/api/endProcess")
|
||||
.header("token", Token).body(paramJson, ContentType.JSON.toString()).execute();
|
||||
int status = response.getStatus();
|
||||
CommunicationLog communicationLog = new CommunicationLog();
|
||||
communicationLog.setCode("APMS" + System.currentTimeMillis());
|
||||
communicationLog.setLogName("WMS通知APMS生产单结束处理");
|
||||
@@ -165,16 +201,24 @@ public class ApmsController extends BaseController {
|
||||
communicationLog.setContent("param:" + paramJson + "\nresult:" + response.body());
|
||||
setCommonField(communicationLog);
|
||||
communicationLogServiceBiz.save(communicationLog);
|
||||
return successful(JSONUtil.toBean(response.body(), ApmsEndProcessVo.class));
|
||||
if (status == 200)
|
||||
{
|
||||
return successful(JSONUtil.toBean(response.body(), ApmsEndProcessVo.class));
|
||||
}
|
||||
else
|
||||
{
|
||||
return failed(status, response.body());
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(value = "finishProcessSheet")
|
||||
@ApiOperation(value = "通知APMS完成生产单接口")
|
||||
@ApiOperation(value = "通知APMS完成生产单接口", hidden = false)
|
||||
public R<ApmsFinishProcessSheetVo> finishProcessSheet(@Validated @RequestBody ApmsFinishProcessSheet apmsFinishProcessSheet) {
|
||||
checkToken();
|
||||
String paramJson = JSONUtil.toJsonStr(apmsFinishProcessSheet);
|
||||
HttpResponse response = HttpUtil.createPost(ApiAddress + "/platform/api/finishProcessSheet")
|
||||
.header("token", Token).body(paramJson, ContentType.JSON.toString()).execute();
|
||||
int status = response.getStatus();
|
||||
CommunicationLog communicationLog = new CommunicationLog();
|
||||
communicationLog.setCode("APMS" + System.currentTimeMillis());
|
||||
communicationLog.setLogName("WMS通知APMS完成生产单");
|
||||
@@ -182,11 +226,18 @@ public class ApmsController extends BaseController {
|
||||
communicationLog.setContent("param:" + paramJson + "\nresult:" + response.body());
|
||||
setCommonField(communicationLog);
|
||||
communicationLogServiceBiz.save(communicationLog);
|
||||
return successful(JSONUtil.toBean(response.body(), ApmsFinishProcessSheetVo.class));
|
||||
if (status == 200)
|
||||
{
|
||||
return successful(JSONUtil.toBean(response.body(), ApmsFinishProcessSheetVo.class));
|
||||
}
|
||||
else
|
||||
{
|
||||
return failed(status, response.body());
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(value = "getApmsToken")
|
||||
@ApiOperation(value = "获取APMS Token")
|
||||
@ApiOperation(value = "获取APMS Token", hidden = true)
|
||||
public R<String> getApmsToken() {
|
||||
HashMap<String, Object> paramMap = new HashMap<>();
|
||||
paramMap.put("apiKey", "7ee8f59bbaeae27e");
|
||||
@@ -208,13 +259,14 @@ public class ApmsController extends BaseController {
|
||||
}
|
||||
|
||||
@PostMapping(value = "getStoveCodeByWorkShopCode")
|
||||
@ApiOperation(value = "WMS通过APMS使用车间编码获取炉号信息")
|
||||
@ApiOperation(value = "WMS通过APMS使用车间编码获取炉号信息", hidden = false)
|
||||
public R<ApmsStoveVo> getStoveCodeByWorkShopCode(String workShopCode) {
|
||||
checkToken();
|
||||
HashMap<String, Object> paramMap = new HashMap<>();
|
||||
paramMap.put("workShopCode", workShopCode);
|
||||
HttpResponse response = HttpUtil.createGet(ApiAddress + "/platform/api/getStoveCodeByWorkShopCode")
|
||||
.header("token", Token).form(paramMap).execute();
|
||||
int status = response.getStatus();
|
||||
CommunicationLog communicationLog = new CommunicationLog();
|
||||
communicationLog.setCode("APMS" + System.currentTimeMillis());
|
||||
communicationLog.setLogName("WMS通过APMS使用车间编码获取炉号信息");
|
||||
@@ -222,7 +274,14 @@ public class ApmsController extends BaseController {
|
||||
communicationLog.setContent("param:" + paramMap + "\nresult:" + response.body());
|
||||
setCommonField(communicationLog);
|
||||
communicationLogServiceBiz.save(communicationLog);
|
||||
return successful(JSONUtil.toBean(response.body(), ApmsStoveVo.class));
|
||||
if (status == 200)
|
||||
{
|
||||
return successful(JSONUtil.toBean(response.body(), ApmsStoveVo.class));
|
||||
}
|
||||
else
|
||||
{
|
||||
return failed(status, response.body());
|
||||
}
|
||||
}
|
||||
|
||||
private void checkToken() {
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
package com.mt.wms.empty.controller;
|
||||
|
||||
import com.mt.wms.core.base.BaseController;
|
||||
import com.mt.wms.core.constants.CommonConstant;
|
||||
import com.mt.wms.core.params.IdParam;
|
||||
import com.mt.wms.core.validator.groups.PageGroup;
|
||||
import com.mt.wms.core.vo.IdVo;
|
||||
import com.mt.wms.core.vo.PageVo;
|
||||
import com.mt.wms.core.vo.R;
|
||||
import com.mt.wms.empty.params.AutoTaskQueryParam;
|
||||
import com.mt.wms.empty.service.AutoTaskService;
|
||||
import com.mt.wms.empty.vo.AutoTaskVo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.validation.groups.Default;
|
||||
|
||||
/**
|
||||
* @Author: liguanghao
|
||||
* @Date: 2022/3/3 23:35
|
||||
* @Version 1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping(CommonConstant.API_MODULE_BASE + "autoTask")
|
||||
@Slf4j
|
||||
@Api(value = "自动任务相关接口", tags = "自动任务相关接口", hidden = false)
|
||||
public class AutoTaskController extends BaseController {
|
||||
@Autowired
|
||||
private AutoTaskService autoTaskService;
|
||||
|
||||
@PostMapping(value = "get")
|
||||
@ApiOperation(value = "获取自动任务基础信息")
|
||||
private R<AutoTaskVo> get(@Validated @RequestBody IdParam idParam) {
|
||||
return autoTaskService.get(idParam);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping(value = "page")
|
||||
@ApiOperation(value = "获取分页自动任务基础信息")
|
||||
private R<PageVo<AutoTaskVo>> page(@Validated({PageGroup.class, Default.class}) @RequestBody AutoTaskQueryParam autoTaskQueryParam) {
|
||||
return autoTaskService.page(autoTaskQueryParam);
|
||||
}
|
||||
|
||||
@PostMapping(value = "stop")
|
||||
@ApiOperation(value = "终止自动任务")
|
||||
private R<IdVo> stop(@Validated @RequestBody IdParam idParam){
|
||||
return autoTaskService.stop(idParam);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.mt.wms.empty.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.mt.wms.core.base.BaseController;
|
||||
import com.mt.wms.core.constants.CommonConstant;
|
||||
import com.mt.wms.core.dal.entity.ApmsCheckResult;
|
||||
import com.mt.wms.core.dal.service.ApmsCheckResultServiceBiz;
|
||||
import com.mt.wms.core.vo.R;
|
||||
import com.mt.wms.empty.params.ApmsCheckRusultQueryParam;
|
||||
import io.swagger.annotations.Api;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: LGH
|
||||
* @Date: 2022/7/6
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping(CommonConstant.API_MODULE_BASE + "checkResult")
|
||||
@Slf4j
|
||||
@Api(value = "检验结果相关接口", tags = "检验结果相关接口", hidden = false)
|
||||
public class CheckResultController extends BaseController {
|
||||
|
||||
@Resource
|
||||
private ApmsCheckResultServiceBiz apmsCheckResultServiceBiz;
|
||||
|
||||
public R<ApmsCheckResult> checkResult(ApmsCheckRusultQueryParam apmsCheckRusultQueryParam){
|
||||
ApmsCheckResult apmsCheckResult = apmsCheckResultServiceBiz.getOne(new QueryWrapper<ApmsCheckResult>()
|
||||
.eq(ApmsCheckResult.SHEET_NO, apmsCheckRusultQueryParam.getSheetNo())
|
||||
.eq(ApmsCheckResult.IDEN_CARD_NUM, apmsCheckRusultQueryParam.getIdenCardNum()));
|
||||
return successful(apmsCheckResult);
|
||||
}
|
||||
}
|
||||
@@ -1,29 +1,35 @@
|
||||
package com.mt.wms.empty.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.mt.wms.basic.service.KilnInfoService;
|
||||
import com.mt.wms.basic.vo.KilnInfoVo;
|
||||
import com.mt.wms.core.base.BaseController;
|
||||
import com.mt.wms.core.constants.CommonConstant;
|
||||
import com.mt.wms.core.dal.entity.AutoExeTask;
|
||||
import com.mt.wms.core.dal.entity.CurrTask;
|
||||
import com.mt.wms.core.dal.service.AutoExeTaskServiceBiz;
|
||||
import com.mt.wms.core.dal.service.CurrTaskServiceBiz;
|
||||
import com.mt.wms.core.params.BasePageParam;
|
||||
import com.mt.wms.core.params.IdParam;
|
||||
import com.mt.wms.core.utils.CodeGeneratorHelper;
|
||||
import com.mt.wms.core.utils.HttpClient;
|
||||
import com.mt.wms.core.vo.IdVo;
|
||||
import com.mt.wms.core.vo.PageVo;
|
||||
import com.mt.wms.core.vo.R;
|
||||
import com.mt.wms.empty.params.ApmsCreateProcessSheet;
|
||||
import com.mt.wms.empty.params.CreateItem;
|
||||
import com.mt.wms.empty.params.CurrTaskQueryParam;
|
||||
import com.mt.wms.empty.params.TaskCreateParam;
|
||||
import com.mt.wms.empty.params.*;
|
||||
import com.mt.wms.empty.service.CurrTaskDetService;
|
||||
import com.mt.wms.empty.service.CurrTaskService;
|
||||
import com.mt.wms.empty.service.OrderInfoService;
|
||||
import com.mt.wms.empty.vo.ApmsCreateProcessSheetVo;
|
||||
import com.mt.wms.empty.vo.ApmsStoveVo;
|
||||
import com.mt.wms.empty.vo.CurrTaskMainQueryVo;
|
||||
import com.mt.wms.empty.vo.CurrTaskQueryVo;
|
||||
import com.mt.wms.empty.task.StoveCodeUtils;
|
||||
import com.mt.wms.empty.task.TaskDistanceUtils;
|
||||
import com.mt.wms.empty.vo.*;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
@@ -31,10 +37,10 @@ import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @author xcc
|
||||
@@ -56,6 +62,13 @@ public class CurrTaskController extends BaseController {
|
||||
private ApmsController apmsControl;
|
||||
@Autowired
|
||||
private KilnInfoService kilnInfoService;
|
||||
@Autowired
|
||||
private CurrTaskServiceBiz currTaskServiceBiz;
|
||||
@Autowired
|
||||
private AutoExeTaskServiceBiz autoExeTaskServiceBiz;
|
||||
@Autowired
|
||||
private TaskDistanceUtils taskDistanceUtils;
|
||||
|
||||
|
||||
@PostMapping(value = "createProcessTask")
|
||||
@ApiOperation(value = "订单加工-创建一个加工任务至任务队列")
|
||||
@@ -73,26 +86,23 @@ public class CurrTaskController extends BaseController {
|
||||
stoveCodes.forEach(kilnMap -> {
|
||||
codeStr.add(kilnMap.get("code"));
|
||||
});
|
||||
for (String s : codeStr)
|
||||
{
|
||||
if (s.equals(kilnCode))
|
||||
{
|
||||
for (String s : codeStr) {
|
||||
if (s.equals(kilnCode)) {
|
||||
verifyCodes = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!verifyCodes)
|
||||
{
|
||||
if (!verifyCodes) {
|
||||
return failed("创建失败,APMS中验证炉号" + kilnCode + "失败!");
|
||||
}
|
||||
|
||||
//通知apms创建一个生产单
|
||||
ApmsCreateProcessSheet apmsCreateSheet = new ApmsCreateProcessSheet();
|
||||
apmsCreateSheet.setWorkShopCode("BM");
|
||||
apmsCreateSheet.setStartTime(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
|
||||
apmsCreateSheet.setTechCode(param.getCraftCode());
|
||||
//ApmsCreateProcessSheet apmsCreateSheet = new ApmsCreateProcessSheet();
|
||||
//apmsCreateSheet.setWorkShopCode("BM");
|
||||
//apmsCreateSheet.setStartTime(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
|
||||
//apmsCreateSheet.setTechCode(param.getCraftCode());
|
||||
//fixme 暂时没有正式user,使用测试账户
|
||||
apmsCreateSheet.setStartUser("QJJP03");
|
||||
//apmsCreateSheet.setStartUser("QJJP03");
|
||||
ArrayList<CreateItem> createItems = new ArrayList<>();
|
||||
param.getDetParams().forEach(e -> {
|
||||
CreateItem createItem = new CreateItem();
|
||||
@@ -101,29 +111,148 @@ public class CurrTaskController extends BaseController {
|
||||
createItem.setWeight(e.getWeight().doubleValue());
|
||||
createItems.add(createItem);
|
||||
});
|
||||
apmsCreateSheet.setStoveCode(kilnCode);
|
||||
apmsCreateSheet.setItems(createItems);
|
||||
R<ApmsCreateProcessSheetVo> processSheet = apmsControl.createProcessSheet(apmsCreateSheet);
|
||||
//apmsCreateSheet.setStoveCode(kilnCode);
|
||||
//apmsCreateSheet.setItems(createItems);
|
||||
//R<ApmsCreateProcessSheetVo> processSheet = apmsControl.createProcessSheet(apmsCreateSheet);
|
||||
|
||||
if (processSheet.getData().getSuccess())
|
||||
{
|
||||
//if (processSheet.getData().getSuccess())
|
||||
//{
|
||||
//apms创建成功后写入数据库
|
||||
param.setAutoTaskType(0);
|
||||
R<IdVo> mainTask = currTaskService.createProcessTask(param);
|
||||
currTaskDetService.createProcessTaskDet(param.getDetParams(), mainTask.getData().getId());
|
||||
//String sheetNo = processSheet.getData().getSheetNo();
|
||||
//将返回的生产单号写入到主任务中。
|
||||
//CurrTask currTaskById = currTaskService.getCurrTaskById(mainTask.getData().getId());
|
||||
//currTaskById.setSheetNo(sheetNo);
|
||||
//currTaskService.updateCurrTaskById(currTaskById);
|
||||
//生成详细任务中的检验结果数据在apms推送生产单结果时创建
|
||||
return successful(0, "创建成功,任务添加至等待执行队列。详情请在订单加工管理下当前任务列表查看", "");
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// return failed("创建失败,APMS报错:" + processSheet.getData().getMsg());
|
||||
//}
|
||||
}
|
||||
|
||||
@PostMapping(value = "createAutoTask")
|
||||
@ApiOperation(value = "订单加工-创建多个个分步骤加工任务至任务队列")
|
||||
public R<String> createAutoTask(@Validated @RequestBody AutoCurrTaskParam autoCurrTaskParam) {
|
||||
List<TaskCreateParam> detParams = autoCurrTaskParam.getTaskCreateParamList();
|
||||
Boolean apmsCreateProcessSheet = false;
|
||||
String sheetNo = null;
|
||||
int i = 1;
|
||||
R<ApmsCreateProcessSheetVo> processSheet = null;
|
||||
//自动任务循环添加多条currTask
|
||||
AutoExeTask autoExeTask = new AutoExeTask();
|
||||
for (TaskCreateParam param : detParams
|
||||
) {
|
||||
if(param.getDetParams().size()==0){
|
||||
return failed("请添加至少一个标识卡!");
|
||||
}
|
||||
//验证标识卡号正确无误。
|
||||
orderInfoService.verifyTaskInfoByIdenCardNum(param.getDetParams());
|
||||
//验证炉子编码信息在apms正确无误
|
||||
R<KilnInfoVo> kilnInfoVoR = kilnInfoService.get(IdParam.builder().id(param.getKilnId()).build());
|
||||
String kilnCode = kilnInfoVoR.getData().getCode();
|
||||
R<ApmsStoveVo> bm = apmsControl.getStoveCodeByWorkShopCode("BM");
|
||||
ArrayList<Map<String, String>> stoveCodes = bm.getData().getStoveCodes();
|
||||
//验证apms数据中存在这个炉子
|
||||
boolean verifyCodes = false;
|
||||
ArrayList<String> codeStr = new ArrayList<>();
|
||||
stoveCodes.forEach(kilnMap -> {
|
||||
codeStr.add(kilnMap.get("code"));
|
||||
});
|
||||
for (String s : codeStr) {
|
||||
if (s.equals(kilnCode)) {
|
||||
verifyCodes = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!verifyCodes) {
|
||||
return failed("创建失败,APMS中验证炉号" + kilnCode + "失败!");
|
||||
}
|
||||
/*
|
||||
if (i==1){
|
||||
//通知apms创建一个生产单
|
||||
ApmsCreateProcessSheet apmsCreateSheet = new ApmsCreateProcessSheet();
|
||||
apmsCreateSheet.setWorkShopCode("BM");
|
||||
apmsCreateSheet.setStartTime(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
|
||||
apmsCreateSheet.setTechCode(param.getCraftCode());
|
||||
//fixme 暂时没有正式user,使用测试账户
|
||||
apmsCreateSheet.setStartUser("QJJP03");
|
||||
ArrayList<CreateItem> createItems = new ArrayList<>();
|
||||
param.getDetParams().forEach(e -> {
|
||||
CreateItem createItem = new CreateItem();
|
||||
createItem.setItemCode(e.getIdenCardNum());
|
||||
createItem.setQuantity(e.getQuantity().intValue());
|
||||
createItem.setWeight(e.getWeight().doubleValue());
|
||||
createItems.add(createItem);
|
||||
});
|
||||
apmsCreateSheet.setStoveCode(kilnCode);
|
||||
apmsCreateSheet.setItems(createItems);
|
||||
processSheet = apmsControl.createProcessSheet(apmsCreateSheet);
|
||||
apmsCreateProcessSheet=processSheet.getData().getSuccess();
|
||||
sheetNo=processSheet.getData().getSheetNo();
|
||||
}
|
||||
*/
|
||||
|
||||
//if (apmsCreateProcessSheet)
|
||||
//{
|
||||
//apms创建成功后写入数据库
|
||||
R<IdVo> mainTask = currTaskService.createProcessTask(param);
|
||||
currTaskDetService.createProcessTaskDet(param.getDetParams(), mainTask.getData().getId());
|
||||
String sheetNo = processSheet.getData().getSheetNo();
|
||||
CurrTask currTask = currTaskServiceBiz.getById(mainTask.getData().getId());
|
||||
//工艺步骤中第一步
|
||||
if (param.getAutoTaskStep() == 1) {
|
||||
autoExeTask.setInterCode(CodeGeneratorHelper.getAutoTaskCode());
|
||||
autoExeTask.setProcessFlowType(param.getAutoTaskType());
|
||||
autoExeTask.setFTaskId(currTask.getId());
|
||||
autoExeTask.setFDetTaskCode(currTask.getTaskCode());
|
||||
autoExeTask.setFEquipmentId(currTask.getKilnId());
|
||||
autoExeTask.setFEquipmentName(currTask.getKilnName());
|
||||
autoExeTask.setFCraftCodeId(currTask.getCraftCodeId());
|
||||
autoExeTask.setFPlcValue(currTask.getPlcValue());
|
||||
setCommonField(autoExeTask);
|
||||
autoExeTaskServiceBiz.save(autoExeTask);
|
||||
}
|
||||
if (param.getAutoTaskStep() == 2) {
|
||||
autoExeTask.setTTaskId(currTask.getId());
|
||||
autoExeTask.setTDetTaskCode(currTask.getTaskCode());
|
||||
autoExeTask.setTEquipmentId(currTask.getKilnId());
|
||||
autoExeTask.setTEquipmentName(currTask.getKilnName());
|
||||
autoExeTask.setTCraftCodeId(currTask.getCraftCodeId());
|
||||
autoExeTask.setTPlcValue(currTask.getPlcValue());
|
||||
setUpdateCommonField(autoExeTask);
|
||||
autoExeTaskServiceBiz.updateById(autoExeTask);
|
||||
}
|
||||
if (param.getAutoTaskStep() == 3) {
|
||||
autoExeTask.setThTaskId(currTask.getId());
|
||||
autoExeTask.setThDetTaskCode(currTask.getTaskCode());
|
||||
autoExeTask.setThEquipmentId(currTask.getKilnId());
|
||||
autoExeTask.setThEquipmentName(currTask.getKilnName());
|
||||
autoExeTask.setThCraftCodeId(currTask.getCraftCodeId());
|
||||
autoExeTask.setThPlcValue(currTask.getPlcValue());
|
||||
setUpdateCommonField(autoExeTask);
|
||||
autoExeTaskServiceBiz.updateById(autoExeTask);
|
||||
}
|
||||
//将返回的生产单号写入到主任务中。
|
||||
CurrTask currTaskById = currTaskService.getCurrTaskById(mainTask.getData().getId());
|
||||
currTaskById.setSheetNo(sheetNo);
|
||||
//currTaskById.setSheetNo(sheetNo);
|
||||
currTaskById.setAutoExeTaskId(autoExeTask.getId());
|
||||
currTaskService.updateCurrTaskById(currTaskById);
|
||||
//生成详细任务中的检验结果数据在apms推送生产单结果时创建
|
||||
return successful("创建成功,任务添加至等待执行队列。");
|
||||
}
|
||||
else
|
||||
{
|
||||
return failed("创建失败,APMS报错:" + processSheet.getData().getMsg());
|
||||
}
|
||||
}
|
||||
//return successful("创建成功,任务添加至等待执行队列。");
|
||||
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// return failed("创建失败,APMS报错:" + processSheet.getData().getMsg());
|
||||
//}
|
||||
//i++;
|
||||
}
|
||||
return successful(0, "操作成功,任务加入待执行队列,详情请在订单加工管理下当前任务列表查看!", "");
|
||||
}
|
||||
|
||||
@PostMapping(value = "mainCurrentTaskNow")
|
||||
@ApiOperation(value = "首页-获取当前执行中的任务")
|
||||
@@ -132,11 +261,35 @@ public class CurrTaskController extends BaseController {
|
||||
}
|
||||
|
||||
@PostMapping(value = "currentTaskNow")
|
||||
@ApiOperation(value = "获取当前执行的任务 (车辆名称传id)")
|
||||
@ApiOperation(value = "获取当前执行的任务")
|
||||
public R<PageVo<CurrTaskQueryVo>> currentTask(@Validated @RequestBody CurrTaskQueryParam param) {
|
||||
return currTaskService.currentTaskPage(param);
|
||||
}
|
||||
|
||||
@PostMapping(value = "currentTaskInfo")
|
||||
@ApiOperation(value = "获取当前任务列表以及详情")
|
||||
public R<List<CurrTaskInfoVo>> currentTaskInfo(@Validated @RequestBody CurrTaskQueryParam param) {
|
||||
return currTaskService.currentTaskInfoPage(param);
|
||||
}
|
||||
|
||||
@PostMapping(value = "taskInfoNotToApms")
|
||||
@ApiOperation(value = "获取未报工任务列表以及详情")
|
||||
public R<List<CurrTaskInfoVo>> taskInfoNotToApms(@Validated @RequestBody CurrTaskQueryParam param) {
|
||||
return currTaskService.currentTaskInfoPageForNotToApms(param);
|
||||
}
|
||||
|
||||
@PostMapping(value = "oneStepToApms")
|
||||
@ApiOperation(value = "手动报工")
|
||||
public R<String> oneStepToApms(@Validated @RequestBody CurrTaskInfoVo currTaskInfoVo) {
|
||||
return currTaskService.oneStepToApms(currTaskInfoVo);
|
||||
}
|
||||
|
||||
@PostMapping(value = "updateCurrTaskStatus")
|
||||
@ApiOperation(value = "更新任务状态")
|
||||
public R<String> updateCurrTaskStatus(@Validated @RequestBody CurrTaskParam param) {
|
||||
return currTaskService.updateCurrTaskStatus(param);
|
||||
}
|
||||
|
||||
@PostMapping(value = "completeTask")
|
||||
@ApiOperation(value = "执行任务完成(仅wms,不通知apms)")
|
||||
public R<String> completeTask(@Validated @RequestBody IdParam param) {
|
||||
@@ -145,7 +298,72 @@ public class CurrTaskController extends BaseController {
|
||||
|
||||
@PostMapping(value = "deleteBySheetNo")
|
||||
@ApiOperation(value = "人工通过生产单编号删除未正式开始的生产单(通知APMS)")
|
||||
public R<String> deleteBySheetNo(@Validated @RequestBody String sheetNo) {
|
||||
return currTaskService.deleteBySheetNo(sheetNo);
|
||||
public R<String> deleteBySheetNo(@Validated @RequestBody CurrTaskQueryParam param) {
|
||||
return currTaskService.deleteBySheetNo(param.getSheetNo());
|
||||
}
|
||||
|
||||
@PostMapping(value = "deleteById")
|
||||
@ApiOperation(value = "人工id删除未正式开始的生产单")
|
||||
public R<String> deleteById(@Validated @RequestBody IdParam param) {
|
||||
return currTaskService.deleteById(param);
|
||||
}
|
||||
|
||||
@PostMapping(value = "top")
|
||||
@ApiOperation(value = "置顶该任务")
|
||||
public R<String> top(@Validated @RequestBody IdParam param) {
|
||||
return currTaskService.top(param);
|
||||
}
|
||||
|
||||
@PostMapping(value = "runTask")
|
||||
@ApiOperation(value = "执行任务")
|
||||
public R<String> runTask(@Validated @RequestBody IdParam param) throws InterruptedException, IOException {
|
||||
//点击执行按钮会判断当前任务是否为自动任务,如果是自动任务会去自动任务查一下该自动任务的上一步是否已完成(仅非一步时)
|
||||
return currTaskService.runTask(param.getId());
|
||||
}
|
||||
|
||||
@PostMapping(value = "testRunTask")
|
||||
@ApiOperation(value = "执行任务")
|
||||
public R<String> testRunTask(@RequestBody RGVTask rgvTask) {
|
||||
sendTaskToRgv(rgvTask.getTaskType(), rgvTask.getVehicleId(), rgvTask.getTaskNo(), rgvTask.getPickRow(), rgvTask.getSendRow(), rgvTask.getProcessNumber());
|
||||
return null;
|
||||
}
|
||||
|
||||
@PostMapping(value = "testRgv")
|
||||
@ApiOperation(value = "测试rgv避让逻辑")
|
||||
private String testRgv(@RequestBody TestRgv testRgv) throws IOException {
|
||||
Long aLong = taskDistanceUtils.chooseVehicle(testRgv.getStartPoint(), testRgv.getEndPoint());
|
||||
Boolean aBoolean = taskDistanceUtils.conflictForVehicle(testRgv.getVehicleId(), testRgv.getStartPoint(), testRgv.getEndPoint(), testRgv.getOtherVehicle());
|
||||
return String.valueOf(aLong) + String.valueOf(aBoolean);
|
||||
}
|
||||
|
||||
private Integer sendTaskToRgv(Integer taskType, Long vehicleId, Long currTaskId, Long startPoint, Long endPoint, Integer processNumber) {
|
||||
Map<String, Object> json = new HashMap();
|
||||
// taskType 1 搬运
|
||||
json.put("taskType", taskType);
|
||||
json.put("sendRow", endPoint);
|
||||
json.put("pickRow", startPoint);
|
||||
json.put("taskNo", currTaskId);
|
||||
json.put("ideNumber", currTaskId);
|
||||
json.put("processNumber", processNumber);
|
||||
String taskJson = JSON.toJSONString(json);
|
||||
String result = null;
|
||||
try {
|
||||
if (vehicleId == 1) {
|
||||
result = HttpClient.httpPost("http://192.168.6.51:8009/rgv1/sendTask", taskJson);
|
||||
}
|
||||
if (vehicleId == 2) {
|
||||
result = HttpClient.httpPost("http://192.168.6.51:8009/rgv2/sendTask", taskJson);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
JSONObject jsonObject = JSON.parseObject(result);
|
||||
return Integer.parseInt(String.valueOf(jsonObject.get("msg")));
|
||||
}
|
||||
|
||||
@PostMapping(value = "testStoveCode")
|
||||
@ApiOperation(value = "测试炉号生成")
|
||||
public String testStoveCode(@RequestBody TestStoveCode testStoveCode) {
|
||||
return StoveCodeUtils.getStoveCode(testStoveCode.getKilnName(), testStoveCode.getCraft());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,864 @@
|
||||
package com.mt.wms.empty.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.mt.wms.core.base.BaseController;
|
||||
import com.mt.wms.core.constants.CommonConstant;
|
||||
import com.mt.wms.core.dal.entity.*;
|
||||
import com.mt.wms.core.dal.service.*;
|
||||
import com.mt.wms.core.utils.BeanUtils;
|
||||
import com.mt.wms.core.vo.R;
|
||||
import com.mt.wms.empty.params.ElectricQueryParam;
|
||||
import com.mt.wms.empty.vo.ApmsCheckResultVo;
|
||||
import com.mt.wms.empty.vo.ConsumeDataVo;
|
||||
import com.mt.wms.empty.vo.EnergyVo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.groups.Default;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.DayOfWeek;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalTime;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.time.temporal.TemporalAdjusters;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @Author: liguanghao
|
||||
* @Date: 2021/12/16 11:20
|
||||
* @Version 1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping(CommonConstant.API_MODULE_BASE + "electric")
|
||||
@Slf4j
|
||||
@Api(value = "电能消耗相关接口", tags = "电能消耗相关接口", hidden = false)
|
||||
public class EnergyController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private ParEleValueServiceBiz parEleValueServiceBiz;
|
||||
@Autowired
|
||||
private ParGasValueServiceBiz parGasValueServiceBiz;
|
||||
@Autowired
|
||||
private ParRotSpeedValueServiceBiz parRotSpeedValueServiceBiz;
|
||||
@Autowired
|
||||
private ParTemValueServiceBiz parTemValueServiceBiz;
|
||||
@Autowired
|
||||
private KilnInfoServiceBiz kilnInfoServiceBiz;
|
||||
@Autowired
|
||||
private CurrTaskServiceBiz currTaskServiceBiz;
|
||||
@Autowired
|
||||
private TaskHisServiceBiz taskHisServiceBiz;
|
||||
@Autowired
|
||||
private ApmsCheckResultServiceBiz apmsCheckResultServiceBiz;
|
||||
|
||||
|
||||
@PostMapping(value = "energyList")
|
||||
@ApiOperation(value = "根据加工炉id获取能源消耗情况")
|
||||
public R<String> energyList(@Validated({Default.class}) @RequestBody ElectricQueryParam electricQueryParam) {
|
||||
List<Long> taskIds = electricQueryParam.getTaskIds();
|
||||
JSONObject json = new JSONObject();
|
||||
for (Long taskId : taskIds
|
||||
) {
|
||||
//TaskHis currTask = taskHisServiceBiz.getById(electricQueryParam.getTaskId());
|
||||
TaskHis currTask = taskHisServiceBiz.getOne(new QueryWrapper<TaskHis>().eq(TaskHis.TASK_ID, taskId));
|
||||
Long kilnId = currTask.getKilnId();
|
||||
KilnInfo kilnInfo = kilnInfoServiceBiz.getById(kilnId);
|
||||
Integer kilnType = kilnInfo.getType();
|
||||
//传入任务号,工业炉号,查询消耗数据,返回json字符串
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
ConsumeDataVo consumeDataVo = ConsumeDataVo.builder().build();
|
||||
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
//电能消耗
|
||||
List<ParEleValue> parEleValueList = parEleValueServiceBiz.list(new QueryWrapper<ParEleValue>()
|
||||
.eq(ParEleValue.KILN_ID, kilnId)
|
||||
.eq(ParEleValue.TASK_ID, taskId));
|
||||
if (parEleValueList.size() > 0) {
|
||||
List<Object> eleList = new ArrayList<>();
|
||||
//电能消耗
|
||||
List<Object> eleConsume = new ArrayList<>();
|
||||
//A向电压
|
||||
List<Object> aVolConsume = new ArrayList<>();
|
||||
//B向电压
|
||||
List<Object> bVolConsume = new ArrayList<>();
|
||||
//C向电压
|
||||
List<Object> cVolConsume = new ArrayList<>();
|
||||
Float talBat = 0F;
|
||||
int i = 0;
|
||||
for (ParEleValue parEleValue : parEleValueList
|
||||
) {
|
||||
//首位置为0
|
||||
if (i == 0) {
|
||||
talBat = parEleValue.getTotalBat();
|
||||
}
|
||||
|
||||
i++;
|
||||
map.put("time", parEleValue.getCreateTime());
|
||||
map.put("value", floatSubtract(parEleValue.getTotalBat(), talBat));
|
||||
map.put("name", "耗电量");
|
||||
map.put("unit", "KW");
|
||||
map.put("炉号", currTask.getSheetNo());
|
||||
eleConsume.add(JSONObject.toJSON(map));
|
||||
map.clear();
|
||||
map.put("time", parEleValue.getCreateTime());
|
||||
map.put("value", parEleValue.getAVoltagevValue());
|
||||
map.put("name", "A向电压");
|
||||
map.put("unit", "V");
|
||||
map.put("炉号", currTask.getSheetNo());
|
||||
aVolConsume.add(JSONObject.toJSON(map));
|
||||
map.clear();
|
||||
map.put("time", parEleValue.getCreateTime());
|
||||
map.put("value", parEleValue.getBVoltagevValue());
|
||||
map.put("name", "B向电压");
|
||||
map.put("unit", "V");
|
||||
map.put("炉号", currTask.getSheetNo());
|
||||
bVolConsume.add(JSONObject.toJSON(map));
|
||||
map.clear();
|
||||
map.put("time", parEleValue.getCreateTime());
|
||||
map.put("value", parEleValue.getCVoltagevValue());
|
||||
map.put("name", "C向电压");
|
||||
map.put("unit", "V");
|
||||
map.put("炉号", currTask.getSheetNo());
|
||||
cVolConsume.add(JSONObject.toJSON(map));
|
||||
map.clear();
|
||||
}
|
||||
eleList.add(eleConsume);
|
||||
eleList.add(aVolConsume);
|
||||
eleList.add(bVolConsume);
|
||||
eleList.add(cVolConsume);
|
||||
jsonObject.put("ele", eleList);
|
||||
}
|
||||
//氮气、甲醇、丙烷、氨气消耗量
|
||||
List<ParGasValue> parGasValueList = parGasValueServiceBiz.list(new QueryWrapper<ParGasValue>()
|
||||
.eq(ParEleValue.KILN_ID, kilnId)
|
||||
.eq(ParEleValue.TASK_ID, taskId));
|
||||
if (parGasValueList.size() > 0) {
|
||||
if (kilnType == 1) {
|
||||
List<Object> gasList = new ArrayList<>();
|
||||
//氮气
|
||||
List<Object> nitConsume = new ArrayList<>();
|
||||
Float nit = 0F;
|
||||
//甲醇
|
||||
List<Object> metConsume = new ArrayList<>();
|
||||
Float met = 0F;
|
||||
//丙烷
|
||||
List<Object> propaneConsume = new ArrayList<>();
|
||||
Float propane = 0F;
|
||||
//氨气
|
||||
List<Object> ammoniaConsume = new ArrayList<>();
|
||||
Float ammonia = 0F;
|
||||
int i = 0;
|
||||
for (ParGasValue parGasValue : parGasValueList
|
||||
) {
|
||||
//累计值的量首位置为0
|
||||
if (i == 0) {
|
||||
nit = parGasValue.getNitFlowValue();
|
||||
met = parGasValue.getMethanolFlow();
|
||||
propane = parGasValue.getPropaneFlow();
|
||||
ammonia = parGasValue.getAmmoniaFlowValue();
|
||||
}
|
||||
i++;
|
||||
map.put("time", parGasValue.getCreateTime());
|
||||
map.put("value", floatSubtract(parGasValue.getNitFlowValue(), nit));
|
||||
map.put("name", "氮气");
|
||||
map.put("unit", "m³");
|
||||
map.put("炉号", currTask.getSheetNo());
|
||||
nitConsume.add(JSONObject.toJSON(map));
|
||||
map.clear();
|
||||
map.put("time", parGasValue.getCreateTime());
|
||||
map.put("value", floatSubtract(parGasValue.getMethanolFlow(), met));
|
||||
map.put("name", "甲醇");
|
||||
map.put("unit", "m³");
|
||||
map.put("炉号", currTask.getSheetNo());
|
||||
metConsume.add(JSONObject.toJSON(map));
|
||||
map.clear();
|
||||
map.put("time", parGasValue.getCreateTime());
|
||||
map.put("value", floatSubtract(parGasValue.getPropaneFlow(), propane));
|
||||
map.put("name", "丙烷");
|
||||
map.put("unit", "m³");
|
||||
map.put("炉号", currTask.getSheetNo());
|
||||
propaneConsume.add(JSONObject.toJSON(map));
|
||||
map.clear();
|
||||
map.put("time", parGasValue.getCreateTime());
|
||||
map.put("value", floatSubtract(parGasValue.getAmmoniaFlowValue(), ammonia));
|
||||
map.put("name", "氨气");
|
||||
map.put("unit", "m³");
|
||||
map.put("炉号", currTask.getSheetNo());
|
||||
ammoniaConsume.add(JSONObject.toJSON(map));
|
||||
map.clear();
|
||||
}
|
||||
gasList.add(nitConsume);
|
||||
gasList.add(metConsume);
|
||||
gasList.add(propaneConsume);
|
||||
gasList.add(ammoniaConsume);
|
||||
jsonObject.put("gas", gasList);
|
||||
}
|
||||
if (kilnType == 3) {
|
||||
List<Object> gasList = new ArrayList<>();
|
||||
//氮气
|
||||
List<Object> nitConsume = new ArrayList<>();
|
||||
Float nit = 0F;
|
||||
//二氧化碳
|
||||
List<Object> carbonConsume = new ArrayList<>();
|
||||
Float carbon = 0F;
|
||||
//氨气
|
||||
List<Object> ammoniaConsume = new ArrayList<>();
|
||||
Float ammonia = 0F;
|
||||
int i = 0;
|
||||
for (ParGasValue parGasValue : parGasValueList
|
||||
) {
|
||||
//累计值的量首位置为0
|
||||
if (i == 0) {
|
||||
nit = parGasValue.getNitFlowValue();
|
||||
carbon = parGasValue.getCarDioxideFlowValue();
|
||||
ammonia = parGasValue.getAmmoniaFlowValue();
|
||||
}
|
||||
i++;
|
||||
map.put("time", parGasValue.getCreateTime());
|
||||
map.put("value", floatSubtract(parGasValue.getNitFlowValue(), nit));
|
||||
map.put("name", "氮气");
|
||||
map.put("unit", "m³");
|
||||
map.put("炉号", currTask.getSheetNo());
|
||||
nitConsume.add(JSONObject.toJSON(map));
|
||||
map.clear();
|
||||
map.put("time", parGasValue.getCreateTime());
|
||||
map.put("value", floatSubtract(parGasValue.getCarDioxideFlowValue(), carbon));
|
||||
map.put("name", "二氧化碳");
|
||||
map.put("unit", "m³");
|
||||
map.put("炉号", currTask.getSheetNo());
|
||||
carbonConsume.add(JSONObject.toJSON(map));
|
||||
map.clear();
|
||||
map.put("time", parGasValue.getCreateTime());
|
||||
map.put("value", floatSubtract(parGasValue.getAmmoniaFlowValue(), ammonia));
|
||||
map.put("name", "氨气");
|
||||
map.put("unit", "m³");
|
||||
map.put("炉号", currTask.getSheetNo());
|
||||
ammoniaConsume.add(JSONObject.toJSON(map));
|
||||
map.clear();
|
||||
}
|
||||
gasList.add(nitConsume);
|
||||
gasList.add(carbonConsume);
|
||||
gasList.add(ammoniaConsume);
|
||||
jsonObject.put("gas", gasList);
|
||||
}
|
||||
}
|
||||
//油搅拌转速趋势
|
||||
List<ParRotSpeedValue> parRotSpeedValueList = parRotSpeedValueServiceBiz.list(new QueryWrapper<ParRotSpeedValue>()
|
||||
.eq(ParEleValue.KILN_ID, kilnId)
|
||||
.eq(ParEleValue.TASK_ID, taskId));
|
||||
if (parRotSpeedValueList.size() > 0) {
|
||||
if (kilnType == 1) {
|
||||
List<Object> rotList = new ArrayList<>();
|
||||
List<Object> rot1Consume = new ArrayList<>();
|
||||
List<Object> rot2Consume = new ArrayList<>();
|
||||
for (ParRotSpeedValue parRotSpeedValue : parRotSpeedValueList
|
||||
) {
|
||||
map.put("time", parRotSpeedValue.getCreateTime());
|
||||
map.put("value", parRotSpeedValue.getOilStiSpeedAValue());
|
||||
map.put("name", "1号油搅拌转速");
|
||||
map.put("unit", "转/min");
|
||||
map.put("炉号", currTask.getSheetNo());
|
||||
rot1Consume.add(JSONObject.toJSON(map));
|
||||
map.clear();
|
||||
map.put("time", parRotSpeedValue.getCreateTime());
|
||||
map.put("value", parRotSpeedValue.getOilStiSpeedBValue());
|
||||
map.put("name", "2号油搅拌转速");
|
||||
map.put("unit", "转/min");
|
||||
map.put("炉号", currTask.getSheetNo());
|
||||
rot2Consume.add(JSONObject.toJSON(map));
|
||||
map.clear();
|
||||
}
|
||||
rotList.add(rot1Consume);
|
||||
rotList.add(rot2Consume);
|
||||
jsonObject.put("rot", rotList);
|
||||
}
|
||||
}
|
||||
//温度趋势(实际温度、设定温度)
|
||||
List<ParTemValue> parTemValueList = parTemValueServiceBiz.list(new QueryWrapper<ParTemValue>()
|
||||
.eq(ParEleValue.KILN_ID, kilnId)
|
||||
.eq(ParEleValue.TASK_ID, taskId));
|
||||
if (parTemValueList.size() > 0) {
|
||||
if (kilnType == 1) {
|
||||
List<Object> tempList = new ArrayList<>();
|
||||
List<Object> actualTempConsume = new ArrayList<>();
|
||||
List<Object> setupTempConsume = new ArrayList<>();
|
||||
List<Object> actualOilTempConsume = new ArrayList<>();
|
||||
List<Object> setupOilTempConsume = new ArrayList<>();
|
||||
for (ParTemValue parTemValue : parTemValueList
|
||||
) {
|
||||
map.put("time", parTemValue.getCreateTime());
|
||||
map.put("value", parTemValue.getActTemValue());
|
||||
map.put("name", "实际温度");
|
||||
map.put("unit", "℃");
|
||||
map.put("炉号", currTask.getSheetNo());
|
||||
actualTempConsume.add(JSONObject.toJSON(map));
|
||||
map.clear();
|
||||
map.put("time", parTemValue.getCreateTime());
|
||||
map.put("value", parTemValue.getSetTemValue());
|
||||
map.put("name", "设定温度");
|
||||
map.put("unit", "℃");
|
||||
map.put("炉号", currTask.getSheetNo());
|
||||
setupTempConsume.add(JSONObject.toJSON(map));
|
||||
map.clear();
|
||||
map.put("time", parTemValue.getCreateTime());
|
||||
map.put("value", parTemValue.getOilTankActTemValue());
|
||||
map.put("name", "油槽实际温度");
|
||||
map.put("unit", "℃");
|
||||
map.put("炉号", currTask.getSheetNo());
|
||||
actualOilTempConsume.add(JSONObject.toJSON(map));
|
||||
map.clear();
|
||||
map.put("time", parTemValue.getCreateTime());
|
||||
map.put("value", parTemValue.getOilTankSetTemValue());
|
||||
map.put("name", "油槽设定温度");
|
||||
map.put("unit", "℃");
|
||||
map.put("炉号", currTask.getSheetNo());
|
||||
setupOilTempConsume.add(JSONObject.toJSON(map));
|
||||
map.clear();
|
||||
}
|
||||
tempList.add(actualTempConsume);
|
||||
tempList.add(setupTempConsume);
|
||||
tempList.add(actualOilTempConsume);
|
||||
tempList.add(setupOilTempConsume);
|
||||
jsonObject.put("temp", tempList);
|
||||
}
|
||||
if (kilnType == 2) {
|
||||
List<Object> tempList = new ArrayList<>();
|
||||
List<Object> actualTempConsume = new ArrayList<>();
|
||||
List<Object> setupTempConsume = new ArrayList<>();
|
||||
for (ParTemValue parTemValue : parTemValueList
|
||||
) {
|
||||
map.put("time", parTemValue.getCreateTime());
|
||||
map.put("value", parTemValue.getActTemValue());
|
||||
map.put("name", "实际温度");
|
||||
map.put("unit", "℃");
|
||||
map.put("炉号", currTask.getSheetNo());
|
||||
actualTempConsume.add(JSONObject.toJSON(map));
|
||||
map.clear();
|
||||
map.put("time", parTemValue.getCreateTime());
|
||||
map.put("value", parTemValue.getSetTemValue());
|
||||
map.put("name", "设定温度");
|
||||
map.put("unit", "℃");
|
||||
map.put("炉号", currTask.getSheetNo());
|
||||
setupTempConsume.add(JSONObject.toJSON(map));
|
||||
map.clear();
|
||||
}
|
||||
tempList.add(actualTempConsume);
|
||||
tempList.add(setupTempConsume);
|
||||
jsonObject.put("temp", tempList);
|
||||
}
|
||||
if (kilnType == 3) {
|
||||
|
||||
List<Object> tempList = new ArrayList<>();
|
||||
List<Object> actualTempConsume = new ArrayList<>();
|
||||
List<Object> setupTempConsume = new ArrayList<>();
|
||||
List<Object> outerZone1TempConsume = new ArrayList<>();
|
||||
List<Object> outerZone2TempConsume = new ArrayList<>();
|
||||
for (ParTemValue parTemValue : parTemValueList
|
||||
) {
|
||||
map.put("time", parTemValue.getCreateTime());
|
||||
map.put("value", parTemValue.getActTemValue());
|
||||
map.put("name", "实际温度");
|
||||
map.put("unit", "℃");
|
||||
map.put("炉号", currTask.getSheetNo());
|
||||
actualTempConsume.add(JSONObject.toJSON(map));
|
||||
map.clear();
|
||||
map.put("time", parTemValue.getCreateTime());
|
||||
map.put("value", parTemValue.getSetTemValue());
|
||||
map.put("name", "设定温度");
|
||||
map.put("unit", "℃");
|
||||
map.put("炉号", currTask.getSheetNo());
|
||||
setupTempConsume.add(JSONObject.toJSON(map));
|
||||
map.clear();
|
||||
map.put("time", parTemValue.getCreateTime());
|
||||
map.put("value", parTemValue.getOuterZone1Temp());
|
||||
map.put("name", "外一区温度");
|
||||
map.put("unit", "℃");
|
||||
map.put("炉号", currTask.getSheetNo());
|
||||
outerZone1TempConsume.add(JSONObject.toJSON(map));
|
||||
map.clear();
|
||||
map.put("time", parTemValue.getCreateTime());
|
||||
|
||||
map.put("value", parTemValue.getOuterZone2Temp());
|
||||
map.put("name", "外二区温度");
|
||||
map.put("unit", "℃");
|
||||
map.put("炉号", currTask.getSheetNo());
|
||||
outerZone2TempConsume.add(JSONObject.toJSON(map));
|
||||
map.clear();
|
||||
}
|
||||
tempList.add(actualTempConsume);
|
||||
tempList.add(setupTempConsume);
|
||||
tempList.add(outerZone1TempConsume);
|
||||
tempList.add(outerZone2TempConsume);
|
||||
jsonObject.put("temp", tempList);
|
||||
}
|
||||
}
|
||||
json.put(String.valueOf(taskId), jsonObject);
|
||||
}
|
||||
return R.ok(json.toJSONString());
|
||||
}
|
||||
|
||||
private Float floatSubtract(Float a, Float b) {
|
||||
BigDecimal a1 = new BigDecimal(Float.toString(a));
|
||||
BigDecimal b1 = new BigDecimal(Float.toString(b));
|
||||
return a1.subtract(b1).floatValue();
|
||||
}
|
||||
|
||||
@PostMapping(value = "checkResultList")
|
||||
@ApiOperation(value = "根据生产单号获取apms检验结果")
|
||||
public List<ApmsCheckResult> getApmsCheckResult(@RequestBody ElectricQueryParam electricQueryParam) {
|
||||
return apmsCheckResultServiceBiz.list(new QueryWrapper<ApmsCheckResult>().eq(ApmsCheckResult.SHEET_NO, electricQueryParam.getSheetNo()));
|
||||
}
|
||||
|
||||
@PostMapping(value = "eletric")
|
||||
@ApiOperation(value = "根据任务id获取消耗情况", hidden = false)
|
||||
public R<JSONObject> list(@Validated({Default.class}) @RequestBody ElectricQueryParam electricQueryParam) {
|
||||
List<Long> taskIds = electricQueryParam.getTaskIds();
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
//电度值
|
||||
List<List<EnergyVo>> eleConsumeList = new ArrayList<>();
|
||||
//A向电压
|
||||
List<List<EnergyVo>> aVolConsumeList = new ArrayList<>();
|
||||
//B向电压
|
||||
List<List<EnergyVo>> bVolConsumeList = new ArrayList<>();
|
||||
//C向电压
|
||||
List<List<EnergyVo>> cVolConsumeList = new ArrayList<>();
|
||||
//A向电流
|
||||
List<List<EnergyVo>> aCurrentList = new ArrayList<>();
|
||||
//B向电流
|
||||
List<List<EnergyVo>> bCurrentList = new ArrayList<>();
|
||||
//C向电流
|
||||
List<List<EnergyVo>> cCurrentList = new ArrayList<>();
|
||||
//氮气
|
||||
List<List<EnergyVo>> nitConsumeList = new ArrayList<>();
|
||||
//甲醇
|
||||
List<List<EnergyVo>> metConsumeList = new ArrayList<>();
|
||||
//丙烷
|
||||
List<List<EnergyVo>> propaneConsumeList = new ArrayList<>();
|
||||
//氨气
|
||||
List<List<EnergyVo>> ammoniaConsumeList = new ArrayList<>();
|
||||
//二氧化碳
|
||||
List<List<EnergyVo>> carbonConsumeList = new ArrayList<>();
|
||||
//1号油搅拌转速
|
||||
List<List<EnergyVo>> rot1ConsumeList = new ArrayList<>();
|
||||
//2号油搅拌转速
|
||||
List<List<EnergyVo>> rot2ConsumeList = new ArrayList<>();
|
||||
//温度
|
||||
List<List<EnergyVo>> tempConsumeList = new ArrayList<>();
|
||||
//油槽温度
|
||||
List<List<EnergyVo>> oilTempConsumeList = new ArrayList<>();
|
||||
//外一区温度
|
||||
List<List<EnergyVo>> outerZone1TempConsumeList = new ArrayList<>();
|
||||
//外二区温度
|
||||
List<List<EnergyVo>> outerZone2TempConsumeList = new ArrayList<>();
|
||||
//碳/氮势
|
||||
List<List<EnergyVo>> carbonList = new ArrayList<>();
|
||||
List<List<ApmsCheckResultVo>> checkResultList = new ArrayList<>();
|
||||
for (Long taskId : taskIds
|
||||
) {
|
||||
TaskHis currTask = taskHisServiceBiz.getOne(new QueryWrapper<TaskHis>().eq(TaskHis.TASK_ID, taskId));
|
||||
//防止早期没有炉号的报错
|
||||
if (currTask.getStoveCode() == null) {
|
||||
currTask.setStoveCode(currTask.getSheetNo());
|
||||
}
|
||||
//获取检验结果
|
||||
List<ApmsCheckResult> apmsCheckResults = apmsCheckResultServiceBiz.list(new QueryWrapper<ApmsCheckResult>()
|
||||
.eq(ApmsCheckResult.SHEET_NO, currTask.getSheetNo()));
|
||||
if (apmsCheckResults.size() != 0) {
|
||||
List<ApmsCheckResultVo> apmsCheckResultVos = BeanUtils.copyList(apmsCheckResults, ApmsCheckResultVo.class);
|
||||
for (ApmsCheckResultVo apmsCheckResultVo : apmsCheckResultVos
|
||||
) {
|
||||
apmsCheckResultVo.setStoveCode(currTask.getStoveCode());
|
||||
}
|
||||
checkResultList.add(apmsCheckResultVos);
|
||||
}
|
||||
|
||||
Long kilnId = currTask.getKilnId();
|
||||
KilnInfo kilnInfo = kilnInfoServiceBiz.getById(kilnId);
|
||||
Integer kilnType = kilnInfo.getType();
|
||||
//电能消耗
|
||||
List<ParEleValue> parEleValueList = parEleValueServiceBiz.list(new QueryWrapper<ParEleValue>()
|
||||
.eq(ParEleValue.KILN_ID, kilnId)
|
||||
.eq(ParEleValue.TASK_ID, taskId));
|
||||
if (parEleValueList.size() > 0) {
|
||||
List<Object> eleList = new ArrayList<>();
|
||||
//电能消耗
|
||||
List<EnergyVo> eleConsume = new ArrayList<>();
|
||||
//A向电压
|
||||
List<EnergyVo> aVolConsume = new ArrayList<>();
|
||||
//B向电压
|
||||
List<EnergyVo> bVolConsume = new ArrayList<>();
|
||||
//C向电压
|
||||
List<EnergyVo> cVolConsume = new ArrayList<>();
|
||||
//A向电流
|
||||
List<EnergyVo> aCurrentConsume = new ArrayList<>();
|
||||
//B向电流
|
||||
List<EnergyVo> bCurrentConsume = new ArrayList<>();
|
||||
//C向电流
|
||||
List<EnergyVo> cCurrentConsume = new ArrayList<>();
|
||||
Float talBat = 0F;
|
||||
int i = 0;
|
||||
for (ParEleValue parEleValue : parEleValueList
|
||||
) {
|
||||
//首位置为0
|
||||
if (i == 0) {
|
||||
talBat = parEleValue.getTotalBat();
|
||||
}
|
||||
i++;
|
||||
EnergyVo eleVo = EnergyVo.builder().build();
|
||||
eleVo.setCode(currTask.getStoveCode());
|
||||
eleVo.setName("耗电量");
|
||||
eleVo.setUnit("KW");
|
||||
eleVo.setTime(parEleValue.getCreateTime());
|
||||
eleVo.setValue(floatSubtract(parEleValue.getTotalBat(), talBat));
|
||||
eleConsume.add(eleVo);
|
||||
|
||||
EnergyVo aVolVo = EnergyVo.builder().build();
|
||||
aVolVo.setCode(currTask.getStoveCode());
|
||||
aVolVo.setName("A向电压");
|
||||
aVolVo.setUnit("V");
|
||||
aVolVo.setTime(parEleValue.getCreateTime());
|
||||
aVolVo.setValue(parEleValue.getAVoltagevValue());
|
||||
aVolConsume.add(aVolVo);
|
||||
|
||||
EnergyVo bVolVo = EnergyVo.builder().build();
|
||||
bVolVo.setCode(currTask.getStoveCode());
|
||||
bVolVo.setName("B向电压");
|
||||
bVolVo.setUnit("V");
|
||||
bVolVo.setTime(parEleValue.getCreateTime());
|
||||
bVolVo.setValue(parEleValue.getBVoltagevValue());
|
||||
bVolConsume.add(bVolVo);
|
||||
|
||||
EnergyVo cVolVo = EnergyVo.builder().build();
|
||||
cVolVo.setCode(currTask.getStoveCode());
|
||||
cVolVo.setName("C向电压");
|
||||
cVolVo.setUnit("V");
|
||||
cVolVo.setTime(parEleValue.getCreateTime());
|
||||
cVolVo.setValue(parEleValue.getCVoltagevValue());
|
||||
cVolConsume.add(cVolVo);
|
||||
|
||||
EnergyVo aCurrVo = EnergyVo.builder().build();
|
||||
aCurrVo.setCode(currTask.getStoveCode());
|
||||
aCurrVo.setName("A向电流");
|
||||
aCurrVo.setUnit("A");
|
||||
aCurrVo.setTime(parEleValue.getCreateTime());
|
||||
aCurrVo.setValue(parEleValue.getACurrentValue());
|
||||
aCurrentConsume.add(aCurrVo);
|
||||
|
||||
EnergyVo bCurrVo = EnergyVo.builder().build();
|
||||
bCurrVo.setCode(currTask.getStoveCode());
|
||||
bCurrVo.setName("B向电流");
|
||||
bCurrVo.setUnit("A");
|
||||
bCurrVo.setTime(parEleValue.getCreateTime());
|
||||
bCurrVo.setValue(parEleValue.getBCurrentValue());
|
||||
bCurrentConsume.add(bCurrVo);
|
||||
|
||||
EnergyVo cCurrVo = EnergyVo.builder().build();
|
||||
cCurrVo.setCode(currTask.getStoveCode());
|
||||
cCurrVo.setName("C向电流");
|
||||
cCurrVo.setUnit("A");
|
||||
cCurrVo.setTime(parEleValue.getCreateTime());
|
||||
cCurrVo.setValue(parEleValue.getCCurrentValue());
|
||||
cCurrentConsume.add(cCurrVo);
|
||||
}
|
||||
eleConsumeList.add(eleConsume);
|
||||
aVolConsumeList.add(aVolConsume);
|
||||
bVolConsumeList.add(bVolConsume);
|
||||
cVolConsumeList.add(cVolConsume);
|
||||
aCurrentList.add(aCurrentConsume);
|
||||
bCurrentList.add(bCurrentConsume);
|
||||
cCurrentList.add(cCurrentConsume);
|
||||
|
||||
}
|
||||
//氮气、甲醇、丙烷、氨气二氧化碳消耗量碳势
|
||||
List<ParGasValue> parGasValueList = parGasValueServiceBiz.list(new QueryWrapper<ParGasValue>()
|
||||
.eq(ParEleValue.KILN_ID, kilnId)
|
||||
.eq(ParEleValue.TASK_ID, taskId));
|
||||
if (parGasValueList.size() > 0) {
|
||||
if (kilnType == 1) {
|
||||
//碳/氮势
|
||||
List<EnergyVo> carbon = new ArrayList<>();
|
||||
//碳/氮势-设定
|
||||
List<EnergyVo> carbonSet = new ArrayList<>();
|
||||
//氮气
|
||||
List<EnergyVo> nitConsume = new ArrayList<>();
|
||||
//甲醇
|
||||
List<EnergyVo> metConsume = new ArrayList<>();
|
||||
//丙烷
|
||||
List<EnergyVo> propaneConsume = new ArrayList<>();
|
||||
//氨气
|
||||
List<EnergyVo> ammoniaConsume = new ArrayList<>();
|
||||
for (ParGasValue parGasValue : parGasValueList
|
||||
) {
|
||||
EnergyVo carbonSetVo = EnergyVo.builder().build();
|
||||
carbonSetVo.setTime(parGasValue.getCreateTime());
|
||||
carbonSetVo.setCode(currTask.getStoveCode().concat("-设定"));
|
||||
carbonSetVo.setUnit("%");
|
||||
carbonSetVo.setName("碳/氮势");
|
||||
carbonSetVo.setValue(parGasValue.getSetNitPotValue());
|
||||
carbonSet.add(carbonSetVo);
|
||||
EnergyVo carbonActVo = EnergyVo.builder().build();
|
||||
carbonActVo.setValue(parGasValue.getActualNitPotValue());
|
||||
carbonActVo.setUnit("%");
|
||||
carbonActVo.setName("碳/氮势");
|
||||
carbonActVo.setTime(parGasValue.getCreateTime());
|
||||
carbonActVo.setCode(currTask.getStoveCode());
|
||||
carbon.add(carbonActVo);
|
||||
|
||||
EnergyVo nitVo = EnergyVo.builder().build();
|
||||
nitVo.setTime(parGasValue.getCreateTime());
|
||||
nitVo.setUnit("m³/h");
|
||||
nitVo.setValue(parGasValue.getNitFlowValue());
|
||||
nitVo.setName("氮气");
|
||||
nitVo.setCode(currTask.getStoveCode());
|
||||
nitConsume.add(nitVo);
|
||||
|
||||
EnergyVo metVo = EnergyVo.builder().build();
|
||||
metVo.setCode(currTask.getStoveCode());
|
||||
metVo.setValue(parGasValue.getMethanolFlow());
|
||||
metVo.setName("甲醇");
|
||||
metVo.setUnit("m³/h");
|
||||
metVo.setTime(parGasValue.getCreateTime());
|
||||
metConsume.add(metVo);
|
||||
|
||||
EnergyVo propaneVo = EnergyVo.builder().build();
|
||||
propaneVo.setTime(parGasValue.getCreateTime());
|
||||
propaneVo.setCode(currTask.getStoveCode());
|
||||
propaneVo.setUnit("m³/h");
|
||||
propaneVo.setValue(parGasValue.getPropaneFlow());
|
||||
propaneVo.setName("丙烷");
|
||||
propaneConsume.add(propaneVo);
|
||||
|
||||
EnergyVo ammoniaVo = EnergyVo.builder().build();
|
||||
ammoniaVo.setName("氨气");
|
||||
ammoniaVo.setCode(currTask.getStoveCode());
|
||||
ammoniaVo.setValue(parGasValue.getAmmoniaFlowValue());
|
||||
ammoniaVo.setUnit("m³/h");
|
||||
ammoniaVo.setTime(parGasValue.getCreateTime());
|
||||
ammoniaConsume.add(ammoniaVo);
|
||||
}
|
||||
carbonList.add(carbon);
|
||||
carbonList.add(carbonSet);
|
||||
nitConsumeList.add(nitConsume);
|
||||
metConsumeList.add(metConsume);
|
||||
propaneConsumeList.add(propaneConsume);
|
||||
ammoniaConsumeList.add(ammoniaConsume);
|
||||
}
|
||||
if (kilnType == 3) {
|
||||
//碳/氮势
|
||||
List<EnergyVo> carbon = new ArrayList<>();
|
||||
//碳/氮势-设定
|
||||
List<EnergyVo> carbonSet = new ArrayList<>();
|
||||
//氮气
|
||||
List<EnergyVo> nitConsume = new ArrayList<>();
|
||||
//二氧化碳
|
||||
List<EnergyVo> carbonConsume = new ArrayList<>();
|
||||
//氨气
|
||||
List<EnergyVo> ammoniaConsume = new ArrayList<>();
|
||||
for (ParGasValue parGasValue : parGasValueList
|
||||
) {
|
||||
EnergyVo carbonSetVo = EnergyVo.builder().build();
|
||||
carbonSetVo.setTime(parGasValue.getCreateTime());
|
||||
carbonSetVo.setCode(currTask.getStoveCode().concat("-设定"));
|
||||
carbonSetVo.setUnit("%");
|
||||
carbonSetVo.setName("碳/氮势");
|
||||
carbonSetVo.setValue(parGasValue.getSetNitPotValue());
|
||||
carbonSet.add(carbonSetVo);
|
||||
EnergyVo carbonActVo = EnergyVo.builder().build();
|
||||
carbonActVo.setTime(parGasValue.getCreateTime());
|
||||
carbonActVo.setValue(parGasValue.getActualNitPotValue());
|
||||
carbonActVo.setUnit("%");
|
||||
carbonActVo.setName("碳/氮势");
|
||||
carbonActVo.setTime(parGasValue.getCreateTime());
|
||||
carbonActVo.setCode(currTask.getStoveCode());
|
||||
carbon.add(carbonActVo);
|
||||
|
||||
EnergyVo nitVo = EnergyVo.builder().build();
|
||||
nitVo.setTime(parGasValue.getCreateTime());
|
||||
nitVo.setUnit("m³/h");
|
||||
nitVo.setValue(parGasValue.getNitFlowValue());
|
||||
nitVo.setName("氮气");
|
||||
nitVo.setCode(currTask.getStoveCode());
|
||||
nitConsume.add(nitVo);
|
||||
|
||||
EnergyVo carbonVo = EnergyVo.builder().build();
|
||||
carbonVo.setTime(parGasValue.getCreateTime());
|
||||
carbonVo.setCode(currTask.getStoveCode());
|
||||
carbonVo.setUnit("m³/h");
|
||||
carbonVo.setValue(parGasValue.getCarDioxideFlowValue());
|
||||
carbonVo.setName("二氧化碳");
|
||||
carbonConsume.add(carbonVo);
|
||||
|
||||
EnergyVo ammoniaVo = EnergyVo.builder().build();
|
||||
ammoniaVo.setName("氨气");
|
||||
ammoniaVo.setCode(currTask.getStoveCode());
|
||||
ammoniaVo.setValue(parGasValue.getAmmoniaFlowValue());
|
||||
ammoniaVo.setUnit("m³/h");
|
||||
ammoniaVo.setTime(parGasValue.getCreateTime());
|
||||
ammoniaConsume.add(ammoniaVo);
|
||||
}
|
||||
carbonList.add(carbon);
|
||||
carbonList.add(carbonSet);
|
||||
carbonConsumeList.add(carbonConsume);
|
||||
nitConsumeList.add(nitConsume);
|
||||
ammoniaConsumeList.add(ammoniaConsume);
|
||||
}
|
||||
}
|
||||
//油搅拌转速趋势
|
||||
List<ParRotSpeedValue> parRotSpeedValueList = parRotSpeedValueServiceBiz.list(new QueryWrapper<ParRotSpeedValue>()
|
||||
.eq(ParEleValue.KILN_ID, kilnId)
|
||||
.eq(ParEleValue.TASK_ID, taskId));
|
||||
if (parRotSpeedValueList.size() > 0) {
|
||||
if (kilnType == 1) {
|
||||
List<EnergyVo> rot1Consume = new ArrayList<>();
|
||||
for (ParRotSpeedValue parRotSpeedValue : parRotSpeedValueList
|
||||
) {
|
||||
EnergyVo rot1Vo = EnergyVo.builder().build();
|
||||
rot1Vo.setCode(currTask.getStoveCode());
|
||||
rot1Vo.setUnit("转/min");
|
||||
rot1Vo.setName("1号油搅拌转速");
|
||||
rot1Vo.setValue(parRotSpeedValue.getOilStiSpeedAValue());
|
||||
rot1Vo.setTime(parRotSpeedValue.getCreateTime());
|
||||
rot1Consume.add(rot1Vo);
|
||||
}
|
||||
rot1ConsumeList.add(rot1Consume);
|
||||
}
|
||||
}
|
||||
//温度趋势(实际温度、设定温度)油槽温度外区温度
|
||||
List<ParTemValue> parTemValueList = parTemValueServiceBiz.list(new QueryWrapper<ParTemValue>()
|
||||
.eq(ParEleValue.KILN_ID, kilnId)
|
||||
.eq(ParEleValue.TASK_ID, taskId));
|
||||
if (parTemValueList.size() > 0) {
|
||||
if (kilnType == 1) {
|
||||
List<EnergyVo> actualTempConsume = new ArrayList<>();
|
||||
List<EnergyVo> setupTempConsume = new ArrayList<>();
|
||||
List<EnergyVo> actualOilTempConsume = new ArrayList<>();
|
||||
List<EnergyVo> setupOilTempConsume = new ArrayList<>();
|
||||
for (ParTemValue parTemValue : parTemValueList
|
||||
) {
|
||||
EnergyVo actTempVo = EnergyVo.builder().build();
|
||||
actTempVo.setTime(parTemValue.getCreateTime());
|
||||
actTempVo.setCode(currTask.getStoveCode());
|
||||
actTempVo.setUnit("℃");
|
||||
actTempVo.setValue(parTemValue.getActTemValue());
|
||||
actTempVo.setName("实际温度");
|
||||
actualTempConsume.add(actTempVo);
|
||||
|
||||
EnergyVo setTempVo = EnergyVo.builder().build();
|
||||
setTempVo.setTime(parTemValue.getCreateTime());
|
||||
setTempVo.setCode(currTask.getStoveCode().concat("-设定"));
|
||||
setTempVo.setUnit("℃");
|
||||
setTempVo.setValue(parTemValue.getSetTemValue());
|
||||
setTempVo.setName("设定温度");
|
||||
setupTempConsume.add(setTempVo);
|
||||
|
||||
EnergyVo oilSetTempVo = EnergyVo.builder().build();
|
||||
oilSetTempVo.setTime(parTemValue.getCreateTime());
|
||||
oilSetTempVo.setCode(currTask.getStoveCode().concat("-设定"));
|
||||
oilSetTempVo.setUnit("℃");
|
||||
oilSetTempVo.setValue(parTemValue.getOilTankSetTemValue());
|
||||
oilSetTempVo.setName("油槽设定温度");
|
||||
setupOilTempConsume.add(oilSetTempVo);
|
||||
|
||||
EnergyVo oilActTempVo = EnergyVo.builder().build();
|
||||
oilActTempVo.setTime(parTemValue.getCreateTime());
|
||||
oilActTempVo.setCode(currTask.getStoveCode());
|
||||
oilActTempVo.setUnit("℃");
|
||||
oilActTempVo.setValue(parTemValue.getOilTankActTemValue());
|
||||
oilActTempVo.setName("油槽实际温度");
|
||||
actualOilTempConsume.add(oilActTempVo);
|
||||
|
||||
}
|
||||
tempConsumeList.add(actualTempConsume);
|
||||
tempConsumeList.add(setupTempConsume);
|
||||
oilTempConsumeList.add(actualOilTempConsume);
|
||||
oilTempConsumeList.add(setupOilTempConsume);
|
||||
}
|
||||
if (kilnType == 2) {
|
||||
List<EnergyVo> actualTempConsume = new ArrayList<>();
|
||||
List<EnergyVo> setupTempConsume = new ArrayList<>();
|
||||
for (ParTemValue parTemValue : parTemValueList
|
||||
) {
|
||||
EnergyVo actTempVo = EnergyVo.builder().build();
|
||||
actTempVo.setTime(parTemValue.getCreateTime());
|
||||
actTempVo.setCode(currTask.getStoveCode());
|
||||
actTempVo.setUnit("℃");
|
||||
actTempVo.setValue(parTemValue.getActTemValue());
|
||||
actTempVo.setName("实际温度");
|
||||
actualTempConsume.add(actTempVo);
|
||||
|
||||
EnergyVo setTempVo = EnergyVo.builder().build();
|
||||
setTempVo.setTime(parTemValue.getCreateTime());
|
||||
setTempVo.setCode(currTask.getStoveCode().concat("-设定"));
|
||||
setTempVo.setUnit("℃");
|
||||
setTempVo.setValue(parTemValue.getSetTemValue());
|
||||
setTempVo.setName("设定温度");
|
||||
setupTempConsume.add(setTempVo);
|
||||
}
|
||||
tempConsumeList.add(actualTempConsume);
|
||||
tempConsumeList.add(setupTempConsume);
|
||||
;
|
||||
}
|
||||
if (kilnType == 3) {
|
||||
|
||||
List<EnergyVo> actualTempConsume = new ArrayList<>();
|
||||
List<EnergyVo> setupTempConsume = new ArrayList<>();
|
||||
List<EnergyVo> outerZone1TempConsume = new ArrayList<>();
|
||||
List<EnergyVo> outerZone2TempConsume = new ArrayList<>();
|
||||
for (ParTemValue parTemValue : parTemValueList
|
||||
) {
|
||||
EnergyVo actTempVo = EnergyVo.builder().build();
|
||||
actTempVo.setTime(parTemValue.getCreateTime());
|
||||
actTempVo.setCode(currTask.getStoveCode());
|
||||
actTempVo.setUnit("℃");
|
||||
actTempVo.setValue(parTemValue.getActTemValue());
|
||||
actTempVo.setName("实际温度");
|
||||
actualTempConsume.add(actTempVo);
|
||||
|
||||
EnergyVo setTempVo = EnergyVo.builder().build();
|
||||
setTempVo.setTime(parTemValue.getCreateTime());
|
||||
setTempVo.setCode(currTask.getStoveCode().concat("-设定"));
|
||||
setTempVo.setUnit("℃");
|
||||
setTempVo.setValue(parTemValue.getSetTemValue());
|
||||
setTempVo.setName("设定温度");
|
||||
setupTempConsume.add(setTempVo);
|
||||
|
||||
}
|
||||
tempConsumeList.add(actualTempConsume);
|
||||
tempConsumeList.add(setupTempConsume);
|
||||
}
|
||||
}
|
||||
}
|
||||
map.put("checkResult", checkResultList);
|
||||
map.put("ele", eleConsumeList);
|
||||
map.put("aVol", aVolConsumeList);
|
||||
map.put("bVol", bVolConsumeList);
|
||||
map.put("cVol", cVolConsumeList);
|
||||
map.put("aCurr", aCurrentList);
|
||||
map.put("bCurr", bCurrentList);
|
||||
map.put("cCurr", cCurrentList);
|
||||
map.put("carbon", carbonList);
|
||||
map.put("nit", nitConsumeList);
|
||||
map.put("met", metConsumeList);
|
||||
map.put("propane", propaneConsumeList);
|
||||
map.put("ammon", ammoniaConsumeList);
|
||||
map.put("car", carbonConsumeList);
|
||||
map.put("rot1", rot1ConsumeList);
|
||||
map.put("temp", tempConsumeList);
|
||||
map.put("oilTemp", oilTempConsumeList);
|
||||
return successful(JSONObject.parseObject(JSON.toJSONString(map)));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.mt.wms.empty.controller;
|
||||
|
||||
import com.mt.wms.core.base.BaseController;
|
||||
import com.mt.wms.core.constants.CommonConstant;
|
||||
import com.mt.wms.core.params.IdParam;
|
||||
import com.mt.wms.core.vo.R;
|
||||
import com.mt.wms.empty.service.StockInfoService;
|
||||
import com.mt.wms.empty.vo.CurrTaskDetVo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: LGH
|
||||
* @Date: 2022/9/9
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping(CommonConstant.API_MODULE_BASE + "inStockInfo")
|
||||
@Slf4j
|
||||
@Api(value = "缓存库位相关接口", tags = "缓存库位相关接口", hidden = false)
|
||||
public class InStockInfoController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private StockInfoService stockInfoService;
|
||||
@PostMapping(value = "top")
|
||||
@ApiOperation(value = "置顶改缓存库位")
|
||||
private R<String> top(@Validated @RequestBody IdParam idParam) {
|
||||
return stockInfoService.top(idParam);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package com.mt.wms.empty.controller;
|
||||
|
||||
import com.mt.wms.core.base.BaseController;
|
||||
import com.mt.wms.core.constants.CommonConstant;
|
||||
import com.mt.wms.core.params.IdParam;
|
||||
import com.mt.wms.core.validator.groups.PageGroup;
|
||||
import com.mt.wms.core.vo.R;
|
||||
import com.mt.wms.empty.params.OutStockParam;
|
||||
import com.mt.wms.empty.params.StockInfoQueryParam;
|
||||
import com.mt.wms.empty.service.OutStockService;
|
||||
import com.mt.wms.empty.service.StockInfoService;
|
||||
import com.mt.wms.empty.vo.CurrTaskDetVo;
|
||||
import com.mt.wms.empty.vo.StockInfoVo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.validation.groups.Default;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: liguanghao
|
||||
* @Date: 2021/12/17 8:48
|
||||
* @Version 1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping(CommonConstant.API_MODULE_BASE + "outStock")
|
||||
@Slf4j
|
||||
@Api(value = "出库相关接口", tags = "出库相关接口", hidden = false)
|
||||
public class OutStockController extends BaseController {
|
||||
@Autowired
|
||||
private StockInfoService stockInfoService;
|
||||
@Autowired
|
||||
private OutStockService outStockService;
|
||||
@PostMapping(value = "get")
|
||||
@ApiOperation(value = "获取库位详细信息")
|
||||
private R<List<CurrTaskDetVo>> get(@Validated @RequestBody IdParam idParam) {
|
||||
return stockInfoService.get(idParam);
|
||||
}
|
||||
|
||||
@PostMapping(value = "list")
|
||||
@ApiOperation(value = "获取库位信息列表")
|
||||
private R<List<StockInfoVo>> list() {
|
||||
return stockInfoService.list();
|
||||
}
|
||||
@PostMapping(value = "runOutTask")
|
||||
@ApiOperation(value = "执行出库操作")
|
||||
private R<String> runOutTask(@Validated({PageGroup.class, Default.class}) @RequestBody OutStockParam outStockParam) throws IOException {
|
||||
return outStockService.outTask(outStockParam);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package com.mt.wms.empty.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.mt.wms.basic.params.AlarmBaseParam;
|
||||
import com.mt.wms.basic.params.AlarmBaseQueryParam;
|
||||
import com.mt.wms.basic.service.AlarmBaseService;
|
||||
import com.mt.wms.basic.vo.AlarmBaseVo;
|
||||
import com.mt.wms.core.base.BaseController;
|
||||
import com.mt.wms.core.constants.CommonConstant;
|
||||
import com.mt.wms.core.dal.entity.AlarmBase;
|
||||
import com.mt.wms.core.dal.entity.QuestionAnswer;
|
||||
import com.mt.wms.core.dal.service.QuestionAnswerServiceBiz;
|
||||
import com.mt.wms.core.params.IdParam;
|
||||
import com.mt.wms.core.validator.groups.AddGroup;
|
||||
import com.mt.wms.core.validator.groups.PageGroup;
|
||||
import com.mt.wms.core.validator.groups.UpdateGroup;
|
||||
import com.mt.wms.core.vo.IdVo;
|
||||
import com.mt.wms.core.vo.PageVo;
|
||||
import com.mt.wms.core.vo.R;
|
||||
import com.mt.wms.empty.params.QuestionAnswerParam;
|
||||
import com.mt.wms.empty.params.QuestionAnswerQueryparam;
|
||||
import com.mt.wms.empty.vo.QuestionAnswerVo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.validation.groups.Default;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: LGH
|
||||
* @Date: 2022/8/11
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping(CommonConstant.API_MODULE_BASE + "questionAnswer")
|
||||
@Slf4j
|
||||
@Api(value = "问题解答相关接口", tags = "问题解答相关接口", hidden = false)
|
||||
public class QuestionAnswerController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private QuestionAnswerServiceBiz questionAnswerServiceBiz;
|
||||
|
||||
@PostMapping(value = "get")
|
||||
@ApiOperation(value = "获取报警基础信息")
|
||||
private R<QuestionAnswerVo> get(@Validated @RequestBody IdParam idParam) {
|
||||
QuestionAnswer questionAnswer = questionAnswerServiceBiz.getById(idParam.getId());
|
||||
QuestionAnswerVo questionAnswerVo= QuestionAnswerVo.builder().build();
|
||||
BeanUtils.copyProperties(questionAnswer,QuestionAnswerVo.class);
|
||||
return successful(questionAnswerVo);
|
||||
}
|
||||
|
||||
@PostMapping(value = "list")
|
||||
@ApiOperation(value = "获取报警基础信息列表")
|
||||
private R<List<QuestionAnswerVo>> list(@Validated({Default.class}) @RequestBody QuestionAnswerQueryparam questionAnswerQueryparam) {
|
||||
List<QuestionAnswer> questionAnswerList = questionAnswerServiceBiz.list(new QueryWrapper<QuestionAnswer>()
|
||||
.like(StringUtils.isNotBlank(questionAnswerQueryparam.getKey()), QuestionAnswer.QUESTION, questionAnswerQueryparam.getKey()));
|
||||
List<QuestionAnswerVo> questionAnswerVos = com.mt.wms.core.utils.BeanUtils.copyList(questionAnswerList, QuestionAnswerVo.class);
|
||||
return successful(questionAnswerVos);
|
||||
}
|
||||
|
||||
@PostMapping(value = "page")
|
||||
@ApiOperation(value = "获取分页报警基础信息")
|
||||
private R<PageVo<QuestionAnswerVo>> page(@Validated({PageGroup.class, Default.class}) @RequestBody QuestionAnswerQueryparam questionAnswerQueryparam) {
|
||||
QueryWrapper<QuestionAnswer> wrapper=new QueryWrapper<>();
|
||||
wrapper.like(StringUtils.isNotBlank(questionAnswerQueryparam.getKey()), QuestionAnswer.QUESTION, questionAnswerQueryparam.getKey());
|
||||
Page<QuestionAnswer> page = questionAnswerServiceBiz.page(new Page<>(questionAnswerQueryparam.getCurrent(), questionAnswerQueryparam.getSize()), wrapper);
|
||||
return successful(new PageVo<>(page,QuestionAnswerVo.class));
|
||||
}
|
||||
|
||||
@PostMapping(value = "add")
|
||||
@ApiOperation(value = "新增")
|
||||
private R<IdVo> add(@Validated({AddGroup.class, Default.class}) @RequestBody QuestionAnswerParam questionAnswerParam) {
|
||||
QuestionAnswer questionAnswer=new QuestionAnswer();
|
||||
BeanUtils.copyProperties(questionAnswerParam,questionAnswer);
|
||||
setCommonField(questionAnswer);
|
||||
questionAnswerServiceBiz.save(questionAnswer);
|
||||
return successful(IdVo.builder().id(questionAnswer.getId()).build());
|
||||
}
|
||||
|
||||
@PostMapping(value = "update")
|
||||
@ApiOperation(value = "更新")
|
||||
private R<IdVo> update(@Validated({UpdateGroup.class, Default.class}) @RequestBody QuestionAnswerParam questionAnswerParam) {
|
||||
QuestionAnswer questionAnswer=new QuestionAnswer();
|
||||
BeanUtils.copyProperties(questionAnswerParam,questionAnswer);
|
||||
setCommonField(questionAnswer);
|
||||
questionAnswerServiceBiz.save(questionAnswer);
|
||||
return successful(IdVo.builder().id(questionAnswer.getId()).build());
|
||||
}
|
||||
|
||||
@PostMapping(value = "delete")
|
||||
@ApiOperation(value = "删除报警基础信息")
|
||||
private R<IdVo> delete(@Validated @RequestBody IdParam idParam) {
|
||||
questionAnswerServiceBiz.removeById(idParam.getId());
|
||||
return successful(IdVo.builder().id(idParam.getId()).build());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,693 @@
|
||||
package com.mt.wms.empty.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.mt.wms.core.base.BaseController;
|
||||
import com.mt.wms.core.constants.CommonConstant;
|
||||
import com.mt.wms.core.dal.entity.*;
|
||||
import com.mt.wms.core.dal.service.*;
|
||||
import com.mt.wms.core.params.IdParam;
|
||||
import com.mt.wms.core.utils.BeanUtils;
|
||||
import com.mt.wms.core.utils.HttpClient;
|
||||
import com.mt.wms.core.vo.R;
|
||||
import com.mt.wms.empty.params.ElectricQueryParam;
|
||||
import com.mt.wms.empty.service.EleService;
|
||||
import com.mt.wms.empty.task.ScheduledTask;
|
||||
import com.mt.wms.empty.vo.ApmsCheckResultVo;
|
||||
import com.mt.wms.empty.vo.CurrTaskDetVo;
|
||||
import com.mt.wms.empty.vo.EnergyVo;
|
||||
import com.mt.wms.empty.vo.NowCurrTaskDetVo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.xmlbeans.impl.xb.xsdschema.Public;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.groups.Default;
|
||||
import java.io.IOException;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Author: LGH
|
||||
* @Date: 2022/12/27
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping(CommonConstant.API_MODULE_BASE + "screenInfo")
|
||||
@Slf4j
|
||||
@Api(value = "大屏信息相关接口", tags = "大屏信息相关接口", hidden = false)
|
||||
public class ScreenController extends BaseController {
|
||||
|
||||
private final static Logger logger = LoggerFactory.getLogger(ScreenController.class);
|
||||
@Autowired
|
||||
private PlcNameSpaceServiceBiz plcNameSpaceServiceBiz;
|
||||
@Autowired
|
||||
private CurrTaskDetServiceBiz currTaskDetServiceBiz;
|
||||
@Autowired
|
||||
private OrderInfoServiceBiz orderInfoServiceBiz;
|
||||
@Autowired
|
||||
private CurrTaskServiceBiz currTaskServiceBiz;
|
||||
@Autowired
|
||||
private KilnInfoServiceBiz kilnInfoServiceBiz;
|
||||
@Autowired
|
||||
private ParEleValueServiceBiz parEleValueServiceBiz;
|
||||
@Autowired
|
||||
private ParGasValueServiceBiz parGasValueServiceBiz;
|
||||
@Autowired
|
||||
private ParRotSpeedValueServiceBiz parRotSpeedValueServiceBiz;
|
||||
@Autowired
|
||||
private ParTemValueServiceBiz parTemValueServiceBiz;
|
||||
@Autowired
|
||||
private EleService eleService;
|
||||
|
||||
@PostMapping(value = "getKilnList")
|
||||
@ApiOperation(value = "获取加工炉信息")
|
||||
public R<List<KilnInfo>> getKilnList() {
|
||||
List<KilnInfo> kilnInfoList = kilnInfoServiceBiz.list();
|
||||
for (KilnInfo kilnInfo : kilnInfoList
|
||||
) {
|
||||
Boolean kilnWorking = kilnWorking(kilnInfo.getId());
|
||||
if (kilnWorking) {
|
||||
kilnInfo.setStatus(2);
|
||||
}
|
||||
Boolean kilnOnline = kilnOnline(kilnInfo.getId());
|
||||
if (!kilnOnline) {
|
||||
//不在线视为损坏
|
||||
kilnInfo.setStatus(1);
|
||||
}
|
||||
}
|
||||
return successful(kilnInfoList);
|
||||
}
|
||||
|
||||
@PostMapping(value = "getEleList")
|
||||
@ApiOperation(value = "获取加工炉最近十条加工任务电能消耗信息")
|
||||
public R countEleByKiln(@Validated @RequestBody IdParam idParam) {
|
||||
return eleService.list(idParam.getId());
|
||||
}
|
||||
|
||||
@PostMapping(value = "CurrTaskInfo")
|
||||
@ApiOperation(value = "获取当前加工任务基础信息")
|
||||
public R<List<NowCurrTaskDetVo>> CurrTaskInfo() {
|
||||
//查询出正在进炉加工的curr_task,查询对应炉号是否Working,查询计划时间,剩余时间,查询标识卡详情
|
||||
List<CurrTask> currTaskList = currTaskServiceBiz.list(new QueryWrapper<CurrTask>()
|
||||
.eq(CurrTask.IS_IN, 1)
|
||||
.eq(CurrTask.STATUS, 1));
|
||||
if (currTaskList.size() == 0) {
|
||||
return failed("");
|
||||
}
|
||||
List<NowCurrTaskDetVo> nowCurrTaskDetVoList = BeanUtils.copyList(currTaskList, NowCurrTaskDetVo.class);
|
||||
for (NowCurrTaskDetVo nowCurrTask : nowCurrTaskDetVoList
|
||||
) {
|
||||
Long kilnId = nowCurrTask.getKilnId();
|
||||
Boolean kilnWorking = kilnWorking(kilnId);
|
||||
//查询对应炉号是否Working
|
||||
if (kilnWorking) {
|
||||
String nameSpace = plcNameSpaceServiceBiz.getOne(new QueryWrapper<PlcNameSpace>()
|
||||
.eq(PlcNameSpace.EQ_TYPE, 0)
|
||||
.eq(PlcNameSpace.TYPE, 0)
|
||||
.eq(PlcNameSpace.EQ_ID, kilnId)).getName();
|
||||
KilnInfo kilnInfo = kilnInfoServiceBiz.getById(kilnId);
|
||||
nowCurrTask.setTaskCode(nowCurrTask.getSheetNo());
|
||||
nowCurrTask.setKilnCode(kilnInfo.getCode());
|
||||
nowCurrTask.setTaskId(nowCurrTask.getId());
|
||||
//设定时间
|
||||
Integer setupTime = 1;
|
||||
//剩余时间
|
||||
Integer remainingTime = 0;
|
||||
|
||||
|
||||
if (kilnInfo.getType() != 4) {
|
||||
if (kilnInfo.getType() == 3) {
|
||||
remainingTime = readPlc(nameSpace, "ProgramTimeRemaining").intValue();
|
||||
} else {
|
||||
remainingTime = readPlc(nameSpace, "ProgramTimeRemain").intValue();
|
||||
}
|
||||
|
||||
}
|
||||
if (kilnInfo.getType() == 1 || kilnInfo.getType() == 3) {
|
||||
//运行时间
|
||||
Integer runTime = readPlc(nameSpace, "ProgramRunTime").intValue();
|
||||
setupTime = runTime + remainingTime;
|
||||
}
|
||||
if (kilnInfo.getType() == 2) {
|
||||
setupTime = readPlc(nameSpace, "SetTime").intValue();
|
||||
}
|
||||
nowCurrTask.setSetupTime(setupTime);
|
||||
nowCurrTask.setRemainingTime(remainingTime);
|
||||
int completeness = (int) (((float) remainingTime / (float) setupTime) * 100);
|
||||
nowCurrTask.setCompleteness(completeness);
|
||||
nowCurrTask.setKilnCode(kilnInfo.getCode());
|
||||
//标识卡详情
|
||||
List<CurrTaskDet> currTaskDetList = currTaskDetServiceBiz.list(new QueryWrapper<CurrTaskDet>()
|
||||
.eq(CurrTaskDet.CURR_TASK_ID, nowCurrTask.getId()));
|
||||
List<CurrTaskDetVo> currTaskDetVoList = BeanUtils.copyList(currTaskDetList, CurrTaskDetVo.class);
|
||||
for (CurrTaskDetVo currTaskDetVo : currTaskDetVoList
|
||||
) {
|
||||
String customerName = orderInfoServiceBiz.getOne(new QueryWrapper<OrderInfo>().eq(OrderInfo.IDEN_CARD_NUM, currTaskDetVo.getIdenCardNum())).getCustomerName();
|
||||
currTaskDetVo.setCustomer(customerName);
|
||||
}
|
||||
nowCurrTask.setCurrTaskDetVoList(currTaskDetVoList);
|
||||
}
|
||||
}
|
||||
return successful(nowCurrTaskDetVoList);
|
||||
}
|
||||
|
||||
@PostMapping(value = "energyInfo")
|
||||
@ApiOperation(value = "获取当前加工任务能源消耗信息")
|
||||
public R<JSONObject> list(@Validated @RequestBody IdParam idParam) {
|
||||
Long taskId = idParam.getId();
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
//电度值
|
||||
List<List<EnergyVo>> eleConsumeList = new ArrayList<>();
|
||||
//A向电压
|
||||
List<List<EnergyVo>> aVolConsumeList = new ArrayList<>();
|
||||
//B向电压
|
||||
List<List<EnergyVo>> bVolConsumeList = new ArrayList<>();
|
||||
//C向电压
|
||||
List<List<EnergyVo>> cVolConsumeList = new ArrayList<>();
|
||||
//A向电流
|
||||
List<List<EnergyVo>> aCurrentList = new ArrayList<>();
|
||||
//B向电流
|
||||
List<List<EnergyVo>> bCurrentList = new ArrayList<>();
|
||||
//C向电流
|
||||
List<List<EnergyVo>> cCurrentList = new ArrayList<>();
|
||||
//氮气
|
||||
List<List<EnergyVo>> nitConsumeList = new ArrayList<>();
|
||||
//甲醇
|
||||
List<List<EnergyVo>> metConsumeList = new ArrayList<>();
|
||||
//丙烷
|
||||
List<List<EnergyVo>> propaneConsumeList = new ArrayList<>();
|
||||
//氨气
|
||||
List<List<EnergyVo>> ammoniaConsumeList = new ArrayList<>();
|
||||
//二氧化碳
|
||||
List<List<EnergyVo>> carbonConsumeList = new ArrayList<>();
|
||||
//1号油搅拌转速
|
||||
List<List<EnergyVo>> rot1ConsumeList = new ArrayList<>();
|
||||
//2号油搅拌转速
|
||||
List<List<EnergyVo>> rot2ConsumeList = new ArrayList<>();
|
||||
//温度
|
||||
List<List<EnergyVo>> tempConsumeList = new ArrayList<>();
|
||||
//油槽温度
|
||||
List<List<EnergyVo>> oilTempConsumeList = new ArrayList<>();
|
||||
//外一区温度
|
||||
List<List<EnergyVo>> outerZone1TempConsumeList = new ArrayList<>();
|
||||
//外二区温度
|
||||
List<List<EnergyVo>> outerZone2TempConsumeList = new ArrayList<>();
|
||||
//碳/氮势
|
||||
List<List<EnergyVo>> carbonList = new ArrayList<>();
|
||||
List<List<ApmsCheckResultVo>> checkResultList = new ArrayList<>();
|
||||
CurrTask currTask = currTaskServiceBiz.getById(taskId);
|
||||
//防止早期没有炉号的报错
|
||||
if (currTask.getStoveCode() == null) {
|
||||
currTask.setStoveCode(currTask.getSheetNo());
|
||||
}
|
||||
|
||||
Long kilnId = currTask.getKilnId();
|
||||
KilnInfo kilnInfo = kilnInfoServiceBiz.getById(kilnId);
|
||||
Integer kilnType = kilnInfo.getType();
|
||||
//电能消耗
|
||||
List<ParEleValue> parEleValueList = parEleValueServiceBiz.list(new QueryWrapper<ParEleValue>()
|
||||
.eq(ParEleValue.KILN_ID, kilnId)
|
||||
.eq(ParEleValue.TASK_ID, taskId));
|
||||
if (parEleValueList.size() > 0) {
|
||||
List<Object> eleList = new ArrayList<>();
|
||||
//电能消耗
|
||||
List<EnergyVo> eleConsume = new ArrayList<>();
|
||||
//A向电压
|
||||
List<EnergyVo> aVolConsume = new ArrayList<>();
|
||||
//B向电压
|
||||
List<EnergyVo> bVolConsume = new ArrayList<>();
|
||||
//C向电压
|
||||
List<EnergyVo> cVolConsume = new ArrayList<>();
|
||||
//A向电流
|
||||
List<EnergyVo> aCurrentConsume = new ArrayList<>();
|
||||
//B向电流
|
||||
List<EnergyVo> bCurrentConsume = new ArrayList<>();
|
||||
//C向电流
|
||||
List<EnergyVo> cCurrentConsume = new ArrayList<>();
|
||||
Float talBat = 0F;
|
||||
int i = 0;
|
||||
for (ParEleValue parEleValue : parEleValueList
|
||||
) {
|
||||
//首位置为0
|
||||
if (i == 0) {
|
||||
talBat = parEleValue.getTotalBat();
|
||||
}
|
||||
i++;
|
||||
EnergyVo eleVo = EnergyVo.builder().build();
|
||||
eleVo.setCode(currTask.getStoveCode());
|
||||
eleVo.setName("耗电量");
|
||||
eleVo.setUnit("KW");
|
||||
eleVo.setTime(parEleValue.getCreateTime());
|
||||
eleVo.setValue(floatSubtract(parEleValue.getTotalBat(), talBat));
|
||||
eleConsume.add(eleVo);
|
||||
|
||||
EnergyVo aVolVo = EnergyVo.builder().build();
|
||||
aVolVo.setCode(currTask.getStoveCode());
|
||||
aVolVo.setName("A向电压");
|
||||
aVolVo.setUnit("V");
|
||||
aVolVo.setTime(parEleValue.getCreateTime());
|
||||
aVolVo.setValue(parEleValue.getAVoltagevValue());
|
||||
aVolConsume.add(aVolVo);
|
||||
|
||||
EnergyVo bVolVo = EnergyVo.builder().build();
|
||||
bVolVo.setCode(currTask.getStoveCode());
|
||||
bVolVo.setName("B向电压");
|
||||
bVolVo.setUnit("V");
|
||||
bVolVo.setTime(parEleValue.getCreateTime());
|
||||
bVolVo.setValue(parEleValue.getBVoltagevValue());
|
||||
bVolConsume.add(bVolVo);
|
||||
|
||||
EnergyVo cVolVo = EnergyVo.builder().build();
|
||||
cVolVo.setCode(currTask.getStoveCode());
|
||||
cVolVo.setName("C向电压");
|
||||
cVolVo.setUnit("V");
|
||||
cVolVo.setTime(parEleValue.getCreateTime());
|
||||
cVolVo.setValue(parEleValue.getCVoltagevValue());
|
||||
cVolConsume.add(cVolVo);
|
||||
|
||||
EnergyVo aCurrVo = EnergyVo.builder().build();
|
||||
aCurrVo.setCode(currTask.getStoveCode());
|
||||
aCurrVo.setName("A向电流");
|
||||
aCurrVo.setUnit("A");
|
||||
aCurrVo.setTime(parEleValue.getCreateTime());
|
||||
aCurrVo.setValue(parEleValue.getACurrentValue());
|
||||
aCurrentConsume.add(aCurrVo);
|
||||
|
||||
EnergyVo bCurrVo = EnergyVo.builder().build();
|
||||
bCurrVo.setCode(currTask.getStoveCode());
|
||||
bCurrVo.setName("B向电流");
|
||||
bCurrVo.setUnit("A");
|
||||
bCurrVo.setTime(parEleValue.getCreateTime());
|
||||
bCurrVo.setValue(parEleValue.getBCurrentValue());
|
||||
bCurrentConsume.add(bCurrVo);
|
||||
|
||||
EnergyVo cCurrVo = EnergyVo.builder().build();
|
||||
cCurrVo.setCode(currTask.getStoveCode());
|
||||
cCurrVo.setName("C向电流");
|
||||
cCurrVo.setUnit("A");
|
||||
cCurrVo.setTime(parEleValue.getCreateTime());
|
||||
cCurrVo.setValue(parEleValue.getCCurrentValue());
|
||||
cCurrentConsume.add(cCurrVo);
|
||||
}
|
||||
eleConsumeList.add(eleConsume);
|
||||
aVolConsumeList.add(aVolConsume);
|
||||
bVolConsumeList.add(bVolConsume);
|
||||
cVolConsumeList.add(cVolConsume);
|
||||
aCurrentList.add(aCurrentConsume);
|
||||
bCurrentList.add(bCurrentConsume);
|
||||
cCurrentList.add(cCurrentConsume);
|
||||
|
||||
}
|
||||
//氮气、甲醇、丙烷、氨气二氧化碳消耗量碳势
|
||||
List<ParGasValue> parGasValueList = parGasValueServiceBiz.list(new QueryWrapper<ParGasValue>()
|
||||
.eq(ParEleValue.KILN_ID, kilnId)
|
||||
.eq(ParEleValue.TASK_ID, taskId));
|
||||
if (parGasValueList.size() > 0) {
|
||||
if (kilnType == 1) {
|
||||
//碳/氮势
|
||||
List<EnergyVo> carbon = new ArrayList<>();
|
||||
//碳/氮势-设定
|
||||
List<EnergyVo> carbonSet = new ArrayList<>();
|
||||
//氮气
|
||||
List<EnergyVo> nitConsume = new ArrayList<>();
|
||||
//甲醇
|
||||
List<EnergyVo> metConsume = new ArrayList<>();
|
||||
//丙烷
|
||||
List<EnergyVo> propaneConsume = new ArrayList<>();
|
||||
//氨气
|
||||
List<EnergyVo> ammoniaConsume = new ArrayList<>();
|
||||
for (ParGasValue parGasValue : parGasValueList
|
||||
) {
|
||||
EnergyVo carbonSetVo = EnergyVo.builder().build();
|
||||
carbonSetVo.setTime(parGasValue.getCreateTime());
|
||||
carbonSetVo.setCode(currTask.getStoveCode().concat("-设定"));
|
||||
carbonSetVo.setUnit("%");
|
||||
carbonSetVo.setName("碳/氮势");
|
||||
carbonSetVo.setValue(parGasValue.getSetNitPotValue());
|
||||
carbonSet.add(carbonSetVo);
|
||||
EnergyVo carbonActVo = EnergyVo.builder().build();
|
||||
carbonActVo.setValue(parGasValue.getActualNitPotValue());
|
||||
carbonActVo.setUnit("%");
|
||||
carbonActVo.setName("碳/氮势");
|
||||
carbonActVo.setCode(currTask.getStoveCode());
|
||||
carbon.add(carbonActVo);
|
||||
|
||||
EnergyVo nitVo = EnergyVo.builder().build();
|
||||
nitVo.setTime(parGasValue.getCreateTime());
|
||||
nitVo.setUnit("m³/h");
|
||||
nitVo.setValue(parGasValue.getNitFlowValue());
|
||||
nitVo.setName("氮气");
|
||||
nitVo.setCode(currTask.getStoveCode());
|
||||
nitConsume.add(nitVo);
|
||||
|
||||
EnergyVo metVo = EnergyVo.builder().build();
|
||||
metVo.setCode(currTask.getStoveCode());
|
||||
metVo.setValue(parGasValue.getMethanolFlow());
|
||||
metVo.setName("甲醇");
|
||||
metVo.setUnit("m³/h");
|
||||
metVo.setTime(parGasValue.getCreateTime());
|
||||
metConsume.add(metVo);
|
||||
|
||||
EnergyVo propaneVo = EnergyVo.builder().build();
|
||||
propaneVo.setTime(parGasValue.getCreateTime());
|
||||
propaneVo.setCode(currTask.getStoveCode());
|
||||
propaneVo.setUnit("m³/h");
|
||||
propaneVo.setValue(parGasValue.getPropaneFlow());
|
||||
propaneVo.setName("丙烷");
|
||||
propaneConsume.add(propaneVo);
|
||||
|
||||
EnergyVo ammoniaVo = EnergyVo.builder().build();
|
||||
ammoniaVo.setName("氨气");
|
||||
ammoniaVo.setCode(currTask.getStoveCode());
|
||||
ammoniaVo.setValue(parGasValue.getAmmoniaFlowValue());
|
||||
ammoniaVo.setUnit("m³/h");
|
||||
ammoniaVo.setTime(parGasValue.getCreateTime());
|
||||
ammoniaConsume.add(ammoniaVo);
|
||||
}
|
||||
carbonList.add(carbon);
|
||||
carbonList.add(carbonSet);
|
||||
nitConsumeList.add(nitConsume);
|
||||
metConsumeList.add(metConsume);
|
||||
propaneConsumeList.add(propaneConsume);
|
||||
ammoniaConsumeList.add(ammoniaConsume);
|
||||
}
|
||||
if (kilnType == 3) {
|
||||
//碳/氮势
|
||||
List<EnergyVo> carbon = new ArrayList<>();
|
||||
//碳/氮势-设定
|
||||
List<EnergyVo> carbonSet = new ArrayList<>();
|
||||
//氮气
|
||||
List<EnergyVo> nitConsume = new ArrayList<>();
|
||||
//二氧化碳
|
||||
List<EnergyVo> carbonConsume = new ArrayList<>();
|
||||
//氨气
|
||||
List<EnergyVo> ammoniaConsume = new ArrayList<>();
|
||||
for (ParGasValue parGasValue : parGasValueList
|
||||
) {
|
||||
EnergyVo carbonSetVo = EnergyVo.builder().build();
|
||||
carbonSetVo.setTime(parGasValue.getCreateTime());
|
||||
carbonSetVo.setCode(currTask.getStoveCode().concat("-设定"));
|
||||
carbonSetVo.setUnit("%");
|
||||
carbonSetVo.setName("碳/氮势");
|
||||
carbonSetVo.setValue(parGasValue.getSetNitPotValue());
|
||||
carbonSet.add(carbonSetVo);
|
||||
EnergyVo carbonActVo = EnergyVo.builder().build();
|
||||
carbonActVo.setTime(parGasValue.getCreateTime());
|
||||
carbonActVo.setValue(parGasValue.getActualNitPotValue());
|
||||
carbonActVo.setUnit("%");
|
||||
carbonActVo.setName("碳/氮势");
|
||||
carbonActVo.setCode(currTask.getStoveCode());
|
||||
carbon.add(carbonActVo);
|
||||
|
||||
EnergyVo nitVo = EnergyVo.builder().build();
|
||||
nitVo.setTime(parGasValue.getCreateTime());
|
||||
nitVo.setUnit("m³/h");
|
||||
nitVo.setValue(parGasValue.getNitFlowValue());
|
||||
nitVo.setName("氮气");
|
||||
nitVo.setCode(currTask.getStoveCode());
|
||||
nitConsume.add(nitVo);
|
||||
|
||||
EnergyVo carbonVo = EnergyVo.builder().build();
|
||||
carbonVo.setTime(parGasValue.getCreateTime());
|
||||
carbonVo.setCode(currTask.getStoveCode());
|
||||
carbonVo.setUnit("m³/h");
|
||||
carbonVo.setValue(parGasValue.getCarDioxideFlowValue());
|
||||
carbonVo.setName("二氧化碳");
|
||||
carbonConsume.add(carbonVo);
|
||||
|
||||
EnergyVo ammoniaVo = EnergyVo.builder().build();
|
||||
ammoniaVo.setName("氨气");
|
||||
ammoniaVo.setCode(currTask.getStoveCode());
|
||||
ammoniaVo.setValue(parGasValue.getAmmoniaFlowValue());
|
||||
ammoniaVo.setUnit("m³/h");
|
||||
ammoniaVo.setTime(parGasValue.getCreateTime());
|
||||
ammoniaConsume.add(ammoniaVo);
|
||||
}
|
||||
carbonList.add(carbon);
|
||||
carbonList.add(carbonSet);
|
||||
carbonConsumeList.add(carbonConsume);
|
||||
nitConsumeList.add(nitConsume);
|
||||
ammoniaConsumeList.add(ammoniaConsume);
|
||||
}
|
||||
}
|
||||
//油搅拌转速趋势
|
||||
List<ParRotSpeedValue> parRotSpeedValueList = parRotSpeedValueServiceBiz.list(new QueryWrapper<ParRotSpeedValue>()
|
||||
.eq(ParEleValue.KILN_ID, kilnId)
|
||||
.eq(ParEleValue.TASK_ID, taskId));
|
||||
if (parRotSpeedValueList.size() > 0) {
|
||||
if (kilnType == 1) {
|
||||
List<EnergyVo> rot1Consume = new ArrayList<>();
|
||||
List<EnergyVo> rot2Consume = new ArrayList<>();
|
||||
for (ParRotSpeedValue parRotSpeedValue : parRotSpeedValueList
|
||||
) {
|
||||
EnergyVo rot1Vo = EnergyVo.builder().build();
|
||||
rot1Vo.setCode(currTask.getStoveCode());
|
||||
rot1Vo.setUnit("转/min");
|
||||
rot1Vo.setName("1号油搅拌转速");
|
||||
rot1Vo.setValue(parRotSpeedValue.getOilStiSpeedAValue());
|
||||
rot1Vo.setTime(parRotSpeedValue.getCreateTime());
|
||||
rot1Consume.add(rot1Vo);
|
||||
|
||||
EnergyVo rot2Vo = EnergyVo.builder().build();
|
||||
rot2Vo.setCode(currTask.getStoveCode());
|
||||
rot2Vo.setUnit("转/min");
|
||||
rot2Vo.setName("2号油搅拌转速");
|
||||
rot2Vo.setValue(parRotSpeedValue.getOilStiSpeedBValue());
|
||||
rot2Vo.setTime(parRotSpeedValue.getCreateTime());
|
||||
rot2Consume.add(rot2Vo);
|
||||
}
|
||||
rot1ConsumeList.add(rot1Consume);
|
||||
rot2ConsumeList.add(rot2Consume);
|
||||
}
|
||||
}
|
||||
//温度趋势(实际温度、设定温度)油槽温度外区温度
|
||||
List<ParTemValue> parTemValueList = parTemValueServiceBiz.list(new QueryWrapper<ParTemValue>()
|
||||
.eq(ParEleValue.KILN_ID, kilnId)
|
||||
.eq(ParEleValue.TASK_ID, taskId));
|
||||
if (parTemValueList.size() > 0) {
|
||||
if (kilnType == 1) {
|
||||
List<EnergyVo> actualTempConsume = new ArrayList<>();
|
||||
List<EnergyVo> setupTempConsume = new ArrayList<>();
|
||||
List<EnergyVo> actualOilTempConsume = new ArrayList<>();
|
||||
List<EnergyVo> setupOilTempConsume = new ArrayList<>();
|
||||
for (ParTemValue parTemValue : parTemValueList
|
||||
) {
|
||||
EnergyVo actTempVo = EnergyVo.builder().build();
|
||||
actTempVo.setTime(parTemValue.getCreateTime());
|
||||
actTempVo.setCode(currTask.getStoveCode());
|
||||
actTempVo.setUnit("℃");
|
||||
actTempVo.setValue(parTemValue.getActTemValue());
|
||||
actTempVo.setName("实际温度");
|
||||
actualTempConsume.add(actTempVo);
|
||||
|
||||
EnergyVo setTempVo = EnergyVo.builder().build();
|
||||
setTempVo.setTime(parTemValue.getCreateTime());
|
||||
setTempVo.setCode(currTask.getStoveCode().concat("-设定"));
|
||||
setTempVo.setUnit("℃");
|
||||
setTempVo.setValue(parTemValue.getSetTemValue());
|
||||
setTempVo.setName("设定温度");
|
||||
setupTempConsume.add(setTempVo);
|
||||
|
||||
EnergyVo oilSetTempVo = EnergyVo.builder().build();
|
||||
oilSetTempVo.setTime(parTemValue.getCreateTime());
|
||||
oilSetTempVo.setCode(currTask.getStoveCode().concat("-设定"));
|
||||
oilSetTempVo.setUnit("℃");
|
||||
oilSetTempVo.setValue(parTemValue.getOilTankSetTemValue());
|
||||
oilSetTempVo.setName("油槽设定温度");
|
||||
setupOilTempConsume.add(oilSetTempVo);
|
||||
|
||||
EnergyVo oilActTempVo = EnergyVo.builder().build();
|
||||
oilActTempVo.setTime(parTemValue.getCreateTime());
|
||||
oilActTempVo.setCode(currTask.getStoveCode());
|
||||
oilActTempVo.setUnit("℃");
|
||||
oilActTempVo.setValue(parTemValue.getOilTankActTemValue());
|
||||
oilActTempVo.setName("油槽实际温度");
|
||||
actualOilTempConsume.add(oilActTempVo);
|
||||
|
||||
}
|
||||
tempConsumeList.add(actualTempConsume);
|
||||
tempConsumeList.add(setupTempConsume);
|
||||
oilTempConsumeList.add(actualOilTempConsume);
|
||||
oilTempConsumeList.add(setupOilTempConsume);
|
||||
}
|
||||
if (kilnType == 2) {
|
||||
List<EnergyVo> actualTempConsume = new ArrayList<>();
|
||||
List<EnergyVo> setupTempConsume = new ArrayList<>();
|
||||
for (ParTemValue parTemValue : parTemValueList
|
||||
) {
|
||||
EnergyVo actTempVo = EnergyVo.builder().build();
|
||||
actTempVo.setTime(parTemValue.getCreateTime());
|
||||
actTempVo.setCode(currTask.getStoveCode());
|
||||
actTempVo.setUnit("℃");
|
||||
actTempVo.setValue(parTemValue.getActTemValue());
|
||||
actTempVo.setName("实际温度");
|
||||
actualTempConsume.add(actTempVo);
|
||||
|
||||
EnergyVo setTempVo = EnergyVo.builder().build();
|
||||
setTempVo.setTime(parTemValue.getCreateTime());
|
||||
setTempVo.setCode(currTask.getStoveCode().concat("-设定"));
|
||||
setTempVo.setUnit("℃");
|
||||
setTempVo.setValue(parTemValue.getSetTemValue());
|
||||
setTempVo.setName("设定温度");
|
||||
setupTempConsume.add(setTempVo);
|
||||
}
|
||||
tempConsumeList.add(actualTempConsume);
|
||||
tempConsumeList.add(setupTempConsume);
|
||||
;
|
||||
}
|
||||
if (kilnType == 3) {
|
||||
|
||||
List<EnergyVo> actualTempConsume = new ArrayList<>();
|
||||
List<EnergyVo> setupTempConsume = new ArrayList<>();
|
||||
List<EnergyVo> outerZone1TempConsume = new ArrayList<>();
|
||||
List<EnergyVo> outerZone2TempConsume = new ArrayList<>();
|
||||
for (ParTemValue parTemValue : parTemValueList
|
||||
) {
|
||||
EnergyVo actTempVo = EnergyVo.builder().build();
|
||||
actTempVo.setTime(parTemValue.getCreateTime());
|
||||
actTempVo.setCode(currTask.getStoveCode());
|
||||
actTempVo.setUnit("℃");
|
||||
actTempVo.setValue(parTemValue.getActTemValue());
|
||||
actTempVo.setName("实际温度");
|
||||
actualTempConsume.add(actTempVo);
|
||||
|
||||
EnergyVo setTempVo = EnergyVo.builder().build();
|
||||
setTempVo.setTime(parTemValue.getCreateTime());
|
||||
setTempVo.setCode(currTask.getStoveCode().concat("-设定"));
|
||||
setTempVo.setUnit("℃");
|
||||
setTempVo.setValue(parTemValue.getSetTemValue());
|
||||
setTempVo.setName("设定温度");
|
||||
setupTempConsume.add(setTempVo);
|
||||
|
||||
EnergyVo outer1TempVo = EnergyVo.builder().build();
|
||||
outer1TempVo.setTime(parTemValue.getCreateTime());
|
||||
outer1TempVo.setCode(currTask.getStoveCode());
|
||||
outer1TempVo.setUnit("℃");
|
||||
outer1TempVo.setValue(parTemValue.getOuterZone1Temp());
|
||||
outer1TempVo.setName("外一区温度");
|
||||
outerZone1TempConsume.add(outer1TempVo);
|
||||
|
||||
EnergyVo outer2TempVo = EnergyVo.builder().build();
|
||||
outer2TempVo.setTime(parTemValue.getCreateTime());
|
||||
outer2TempVo.setCode(currTask.getStoveCode());
|
||||
outer2TempVo.setUnit("℃");
|
||||
outer2TempVo.setValue(parTemValue.getOuterZone2Temp());
|
||||
outer2TempVo.setName("外二区温度");
|
||||
outerZone2TempConsume.add(outer2TempVo);
|
||||
|
||||
}
|
||||
tempConsumeList.add(actualTempConsume);
|
||||
tempConsumeList.add(setupTempConsume);
|
||||
outerZone1TempConsumeList.add(outerZone1TempConsume);
|
||||
outerZone2TempConsumeList.add(outerZone2TempConsume);
|
||||
}
|
||||
}
|
||||
map.put("checkResult", checkResultList);
|
||||
map.put("ele", eleConsumeList);
|
||||
map.put("aVol", aVolConsumeList);
|
||||
map.put("bVol", bVolConsumeList);
|
||||
map.put("cVol", cVolConsumeList);
|
||||
map.put("aCurr", aCurrentList);
|
||||
map.put("bCurr", bCurrentList);
|
||||
map.put("cCurr", cCurrentList);
|
||||
map.put("carbon", carbonList);
|
||||
map.put("nit", nitConsumeList);
|
||||
map.put("met", metConsumeList);
|
||||
map.put("propane", propaneConsumeList);
|
||||
map.put("ammon", ammoniaConsumeList);
|
||||
map.put("car", carbonConsumeList);
|
||||
map.put("rot1", rot1ConsumeList);
|
||||
map.put("rot2", rot2ConsumeList);
|
||||
map.put("temp", tempConsumeList);
|
||||
map.put("oilTemp", oilTempConsumeList);
|
||||
map.put("outerZone1Temp",outerZone1TempConsumeList);
|
||||
map.put("outerZone2Temp",outerZone2TempConsumeList);
|
||||
return successful(JSONObject.parseObject(JSON.toJSONString(map)));
|
||||
}
|
||||
|
||||
private Boolean kilnWorking(Long kilnId) {
|
||||
PlcNameSpace nameSpace = plcNameSpaceServiceBiz.getOne(new QueryWrapper<PlcNameSpace>()
|
||||
.eq(PlcNameSpace.EQ_TYPE, 0)
|
||||
.eq(PlcNameSpace.EQ_ID, kilnId)
|
||||
.eq(PlcNameSpace.TYPE, 0));
|
||||
String nameSpaceNote = nameSpace.getName();
|
||||
String result = readPlcToString(nameSpaceNote, "Working");
|
||||
return Boolean.valueOf(JSONObject.parseObject(result).get("result").toString());
|
||||
}
|
||||
|
||||
private Boolean kilnOnline(Long kilnId) {
|
||||
PlcNameSpace nameSpace = plcNameSpaceServiceBiz.getOne(new QueryWrapper<PlcNameSpace>()
|
||||
.eq(PlcNameSpace.EQ_TYPE, 0)
|
||||
.eq(PlcNameSpace.EQ_ID, kilnId)
|
||||
.eq(PlcNameSpace.TYPE, 0));
|
||||
String nameSpaceNote = nameSpace.getName();
|
||||
String result = readPlcToString(nameSpaceNote, "ManualAutomatic");
|
||||
return Boolean.valueOf(JSONObject.parseObject(result).get("result").toString());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取变量值
|
||||
*
|
||||
* @param nameSpace nameSpace前缀
|
||||
* @param variableName 变量名称
|
||||
* @return 变量值
|
||||
*/
|
||||
private Double readPlc(String nameSpace, String variableName) {
|
||||
String identifier = nameSpace.concat(variableName);
|
||||
Map<String, Object> json = new HashMap();
|
||||
json.put("nameSpace", 6);
|
||||
json.put("plcName", "plc1");
|
||||
json.put("identifier", identifier);
|
||||
String result = null;
|
||||
try {
|
||||
result = HttpClient.httpPost("http://192.168.6.51:8009/opcua/read", JSON.toJSONString(json));
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
logger.info("能源消耗统计:获取 " + identifier + " 的值失败");
|
||||
}
|
||||
return Double.valueOf(JSONObject.parseObject(result).get("result").toString());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取变量值
|
||||
*
|
||||
* @param nameSpace nameSpace前缀
|
||||
* @param variableName 变量名称
|
||||
* @return result字符串
|
||||
*/
|
||||
private String readPlcToString(String nameSpace, String variableName) {
|
||||
String identifier = nameSpace.concat(variableName);
|
||||
Map<String, Object> json = new HashMap();
|
||||
json.put("nameSpace", 6);
|
||||
json.put("plcName", "plc1");
|
||||
json.put("identifier", identifier);
|
||||
String result = null;
|
||||
try {
|
||||
result = HttpClient.httpPost("http://192.168.6.51:8009/opcua/read", JSON.toJSONString(json));
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
logger.info("readPLC: " + identifier + " 的值失败");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private Float floatSubtract(Float a, Float b) {
|
||||
BigDecimal a1 = new BigDecimal(Float.toString(a));
|
||||
BigDecimal b1 = new BigDecimal(Float.toString(b));
|
||||
return a1.subtract(b1).floatValue();
|
||||
}
|
||||
}
|
||||
@@ -34,16 +34,8 @@ public class TaskHisController extends BaseController {
|
||||
private TaskHisService taskHisService;
|
||||
|
||||
@PostMapping(value = "taskHis")
|
||||
@ApiOperation(value = "获取历史执行的任务 (车辆名称传id)")
|
||||
@ApiOperation(value = "获取历史执行的任务")
|
||||
public R<PageVo<TaskHisQueryVo>> currentTask(@Validated @RequestBody TaskHisQueryParam param) {
|
||||
if (Objects.nonNull(param.getStartTime()))
|
||||
{
|
||||
param.setStartTime(LocalDateTimeUtils.getDayStart(param.getStartTime()));
|
||||
}
|
||||
if (Objects.nonNull(param.getEndTime()))
|
||||
{
|
||||
param.setEndTime(LocalDateTimeUtils.getDayEnd(param.getEndTime()));
|
||||
}
|
||||
return taskHisService.taskHisPage(param);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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, "出库到工业炉到缓存区"),
|
||||
/**
|
||||
* 缓存区出库
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.mt.wms.empty.mapper;
|
||||
|
||||
import com.mt.wms.empty.vo.CountEleVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: LGH
|
||||
* @Date: 2022/12/27
|
||||
*/
|
||||
public interface EleMapper {
|
||||
/**
|
||||
* 获取最近十条电能统计值
|
||||
*/
|
||||
List<CountEleVo> list(@Param("kilnId") Long kilnId);
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user