Commit af227588 authored by 夏东伟's avatar 夏东伟

网关采集

parent befd2dd5
......@@ -14,7 +14,7 @@ import java.util.Date;
* @Author: xiadongwei
* @Date: 2019/10/17 17:23
*/
@ApiModel("总装车间--新能源检测点")
@ApiModel(value = "总装车间--新能源检测点", description = "新能源检测点监控数据表")
@Data
@Search(code = "NEW_ENERGY")
@Table(name = "assembly_new_energy")
......
......@@ -14,7 +14,7 @@ import java.util.Date;
* @Author: xiadongwei
* @Date: 2019/10/17 17:23
*/
@ApiModel("底盘车间--车轮定位")
@ApiModel(value = "底盘车间--车轮定位", description = "四轮定位监控数据表")
@Data
@Search(code = "WHEEL_ALIGNMENT")
@Table(name = "wheel_alignment")
......
......@@ -4,9 +4,9 @@ import com.github.pagehelper.PageInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import net.vtstar.scada.base.equipmgt.domain.EquipInfo;
import net.vtstar.user.search.controller.vo.SearchVo;
import net.vtstar.utils.domain.Return;
import net.vtstar.zhongtong.avi.equipment.domain.EquipInfo;
import net.vtstar.zhongtong.avi.equipment.domain.Program;
import net.vtstar.zhongtong.avi.equipment.domain.vo.ProgramTransferVO;
import net.vtstar.zhongtong.avi.equipment.service.EquipmentService;
......@@ -17,7 +17,6 @@ import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
......@@ -36,39 +35,30 @@ public class EquipmentController {
"")
@PostMapping(value = "/realTime/data")
private Return getRealTimeData(@RequestBody SearchVo pageFilter) {
Object realTimeData = equipmentService.findRealTimeData(pageFilter);
List<Map<String, Object>> data = (List<Map<String, Object>>) realTimeData;
List<Map<String, Object>> data = equipmentService.findRealTimeData(pageFilter.toJSONObject());
return Return.success(new PageInfo<>(data));
}
@ApiOperation(value = "根据设备类型和车间code获得设备列表")
@GetMapping("/equip/findByType")
private Return findEquipByShopAndType(@RequestParam String workshopCode,@RequestParam String equipType){
List<EquipInfo> equipInfos = new ArrayList<>();
EquipInfo equipInfo = new EquipInfo();
equipInfo.setEquipCode("mingshao");
equipInfo.setEquipName("李氏集团");
EquipInfo equipInfo2 = new EquipInfo();
equipInfo2.setEquipCode("mingshao2");
equipInfo2.setEquipName("李氏集团2");
equipInfos.add(equipInfo);
equipInfos.add(equipInfo2);
private Return findEquipByShopAndType(@RequestParam String workshopCode, @RequestParam String equipType){
List<EquipInfo> equipInfos = equipmentService.findMachineByType(equipType);
return Return.success(equipInfos);
}
@ApiOperation(value = "程序传输")
@PostMapping("/program/transfer")
private Return programTransfer(@RequestBody ProgramTransferVO transferVO){
//TODO:
return Return.success();
}
@ApiOperation(value = "报表导出")
@PostMapping("/data/export")
private Return dataExport(@RequestBody SearchVo pageFilter,HttpServletResponse response) throws UnsupportedEncodingException {
private Return dataExport(@RequestBody SearchVo pageFilter, HttpServletResponse response) throws UnsupportedEncodingException {
try {
equipmentService.orderExport(response);
equipmentService.orderExport(pageFilter.toJSONObject(), response);
} catch (Exception e) {
String message = URLEncoder.encode("报表导出失败", "utf-8").replaceAll("\\+", "%20");
response.setHeader("status","601");
......@@ -82,8 +72,7 @@ public class EquipmentController {
@ApiOperation("文件上传")
@PostMapping("/file/upload")
public Return uploadNcFile(@RequestParam("file") MultipartFile file){
Program program = new Program();
program.setPath("D:/test/a.txt");
Program program = equipmentService.saveNcFile(file);
return Return.success(program);
}
}
package net.vtstar.zhongtong.avi.equipment.mapper;
import net.vtstar.user.mybatis.BaseMapper;
import net.vtstar.zhongtong.avi.equipment.domain.PaintshopLane;
import net.vtstar.zhongtong.avi.equipment.domain.PaintshopStation;
import org.apache.ibatis.annotations.Mapper;
......
package net.vtstar.zhongtong.avi.equipment.service;
import com.alibaba.fastjson.JSONObject;
import com.github.pagehelper.PageHelper;
import net.vtstar.user.mybatis.provider.Operation;
import net.vtstar.user.mybatis.provider.OrderBy;
import net.vtstar.user.mybatis.provider.WhereFilter;
import net.vtstar.user.search.controller.vo.SearchVo;
import net.vtstar.user.search.service.SearchService;
import net.vtstar.utils.asserts.ParamAssert;
import net.vtstar.zhongtong.avi.equipment.domain.EquipInfo;
import net.vtstar.zhongtong.avi.equipment.domain.PaintshopStation;
import net.vtstar.zhongtong.avi.equipment.domain.RuntimeRecord;
import net.vtstar.zhongtong.avi.equipment.domain.Program;
import net.vtstar.zhongtong.avi.equipment.mapper.BasicInfoMapper;
import net.vtstar.zhongtong.avi.equipment.mapper.EquipmentDataMapper;
import net.vtstar.zhongtong.avi.stamping.domain.LaserCuttingMachine;
import net.vtstar.zhongtong.avi.global.web.domain.ShowField;
import org.apache.poi.hssf.util.HSSFColor;
import org.apache.poi.ss.usermodel.BorderStyle;
import org.apache.poi.ss.usermodel.CellStyle;
......@@ -18,54 +20,51 @@ import org.apache.poi.xssf.usermodel.XSSFRow;
import org.apache.poi.xssf.usermodel.XSSFSheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.Cache;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.math.BigDecimal;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
@Service
public class EquipmentService {
@Autowired
private EquipmentService equipmentService;
@Autowired
private EquipmentDataMapper dataMapper;
@Resource(name = "classNameCache")
private Cache classNameCache;
@Resource(name = "showFieldCache")
private Cache showFieldCache;
@Autowired
private SearchService searchService;
@Autowired
private BasicInfoMapper basicInfoMapper;
public <T> T findRealTimeData(SearchVo pageFilter) {
List<LaserCuttingMachine> ma = new ArrayList<>();
LaserCuttingMachine machine = new LaserCuttingMachine();
machine.setBeginTime(new Date());
machine.setAlias("设备1");
machine.setEquipCode("511111");
machine.setCuttingSpeed(new BigDecimal(555));
machine.setGasPressure(new BigDecimal(477));
machine.setCreateTime(new Date());
machine.setLaserPower(new BigDecimal(77777));
ma.add(machine);
List<PaintshopStation> sequence = dataMapper.findList(new WhereFilter() {{
addOrderBy(PaintshopStation.class, "sequence", OrderBy.ASC);
}}, PaintshopStation.class);
return (T) ma;
private String baseUrl = "D:/scada/program/";
public List<Map<String, Object>> findRealTimeData(JSONObject pageFilter) {
PageHelper.startPage(pageFilter.getIntValue("pageNum"), pageFilter.getIntValue("pageSize"));
Class searchCode = classNameCache.get(pageFilter.getString("searchCode"), Class.class);
return dataMapper.findJoin(searchService.pageFilter2Filter(pageFilter), searchCode);
}
public void orderExport(HttpServletResponse response) throws IOException {
public void orderExport(JSONObject pageFilter, HttpServletResponse response) throws IOException {
String searchCode = pageFilter.getString("searchCode");
List<ShowField> showFields = showFieldCache.get(searchCode, ArrayList<ShowField>::new);
Class itemClazz = classNameCache.get(searchCode, Class.class);
List<Map<String, Object>> result = dataMapper.findJoin(searchService.pageFilter2Filter(pageFilter), itemClazz);
XSSFWorkbook wb = new XSSFWorkbook();
XSSFSheet sheet = wb.createSheet("0");
sheet.setColumnWidth(0, 4000);
sheet.setColumnWidth(1, 5000);
sheet.setColumnWidth(2, 3000);
sheet.setColumnWidth(3, 2000);
sheet.setColumnWidth(4, 6000);
sheet.setColumnWidth(5, 3000);
sheet.setColumnWidth(6, 4000);
sheet.setColumnWidth(7, 4000);
sheet.setColumnWidth(8, 4000);
XSSFSheet sheet = wb.createSheet("采集数据");
CellStyle cellStyle = wb.createCellStyle();
cellStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND);
cellStyle.setBorderTop(BorderStyle.DASHED);
......@@ -82,17 +81,26 @@ public class EquipmentService {
titleFont.setFontHeight(24);
titleFont.setBold(true);
String[] title = {"设备名称", "设备编码", "设备状态"};
int rowNumber = 0;
XSSFRow row = sheet.createRow(rowNumber);
rowNumber++;
for (int i = 0; i < title.length; i++) {
row.createCell(i).setCellValue(title[i]);
for (int i = 0; i < showFields.size(); i++) {
sheet.setColumnWidth(i, 5000);
row.createCell(i).setCellValue(showFields.get(i).getLabel());
}
for (Map<String, Object> item : result){
rowNumber++;
XSSFRow xssfRow = sheet.createRow(rowNumber);
for (int i = 0; i < showFields.size(); i++) {
Object value = item.get(showFields.get(i).getValue());
xssfRow.createCell(i).setCellValue(null == value ? "" : String.valueOf(value));
}
}
response.setCharacterEncoding("utf-8");
String filename = URLEncoder.encode("测试报表", "utf-8").replaceAll("\\+", "%20");
String name = classNameCache.get(searchCode + "name", String.class);
if (StringUtils.isEmpty(name)){
name = "监控数据表";
}
String filename = URLEncoder.encode(name, "utf-8").replaceAll("\\+", "%20");
response.setHeader("Content-disposition", "attachment;filename=" + filename + ".xlsx");
response.setHeader("filename", filename + ".xlsx");
......@@ -105,4 +113,44 @@ public class EquipmentService {
throw new IOException("报表导出失败!");
}
}
public List<EquipInfo> findMachineByType(String equipType) {
return basicInfoMapper.findList(new WhereFilter(){{
addFilter("equip_type", Operation.EQUAL, equipType);
}}, EquipInfo.class);
}
public Program saveNcFile(MultipartFile ncFile) {
ParamAssert.isTrue(ncFile != null && !ncFile.isEmpty(),
"文件不能为空!");
File fileHome = new File(baseUrl);
if (!fileHome.exists()) {
fileHome.mkdirs();
}
String fileName = ncFile.getOriginalFilename();
File saveNcFile = new File(baseUrl + fileName);
if (saveNcFile.exists()){
saveNcFile.delete();
}
FileOutputStream outputStream = null;
try {
outputStream = new FileOutputStream(saveNcFile);
outputStream.write(ncFile.getBytes());
outputStream.flush();
Program program = new Program();
program.setName(fileName);
program.setPath(baseUrl + fileName);
return program;
} catch (Exception e) {
throw new IllegalArgumentException("文件上传失败!");
}finally {
if (null != outputStream) {
try {
outputStream.close();
} catch (IOException e) {
throw new IllegalArgumentException("IO错误!");
}
}
}
}
}
......@@ -17,7 +17,7 @@ import java.util.Date;
* @Date: 2019/10/17 11:52
*/
@ApiModel("总装车间车间--离合油加注")
@ApiModel(value = "总装车间车间--离合油加注", description = "离合油加注监控数据表")
@Data
@Search(code = "CENTRALIZED_FILLING_CLUTCH")
@Table(name = "eqp_data_centralized_filling_clutch")
......
......@@ -17,7 +17,7 @@ import java.util.Date;
* @Date: 2019/10/17 11:52
*/
@ApiModel("总装车间车间--地板革热熔涂胶设备")
@ApiModel(value = "总装车间车间--地板革热熔涂胶设备", description = "地板隔热熔监控数据表")
@Data
@Search(code = "FLOOR_LEATHER_HOT")
@Table(name = "eqp_data_floor_leather_hot")
......
......@@ -17,7 +17,7 @@ import java.util.Date;
* @Date: 2019/10/17 11:52
*/
@ApiModel("总装车间车间--冷媒加注机")
@ApiModel(value = "总装车间车间--冷媒加注机", description = "冷媒加注机监控数据表")
@Data
@Search(code = "FOCUS_ADDING_REFRIGERANT")
@Table(name = "eqp_data_focus_adding_refrigerant")
......
......@@ -17,7 +17,7 @@ import java.util.Date;
* @Date: 2019/10/17 11:52
*/
@ApiModel("总装车间车间--助力油加注")
@ApiModel(value = "总装车间车间--助力油加注", description = "助力油加注机监控数据表")
@Data
@Search(code = "FOCUS_BOOSTER_OIL")
@Table(name = "eqp_data_focus_booster_oil")
......
......@@ -16,7 +16,7 @@ import java.util.Date;
* @Date: 2019/10/17 11:52
*/
@ApiModel("总装车间--板链记录")
@ApiModel(value = "总装车间--板链记录", description = "总装板链监控数据表")
@Data
@Search(code = "ASSEMBLY_PLATE_CHAIN")
@Table(name = "eqp_data_assembly_plate_chain")
......
......@@ -17,7 +17,7 @@ import java.util.Date;
* @Date: 2019/10/17 11:52
*/
@ApiModel("底盘车间车间--智能扭力扳手")
@ApiModel(value = "底盘车间车间--智能扭力扳手", description = "底盘拧紧机监控数据表")
@Data
@Search(code = "CHASSIS_TORQUE_WRENCH")
@Table(name = "eqp_data_chassis_torque_wrench")
......
......@@ -10,7 +10,7 @@ import javax.persistence.Table;
import java.util.Date;
@Data
@ApiModel("涂装--烘干室温度")
@ApiModel(value = "涂装--烘干室温度", description = "烘干室监控数据表")
@Table(name = "eqp_data_drying_room_temp")
public class DryingRoomTempMachine extends EquipmentData {
......
......@@ -14,7 +14,7 @@ import java.util.Date;
@Data
@Search(code = "PAINTING_ROBOT")
@ApiModel("喷涂机器人")
@ApiModel(value = "喷涂机器人", description = "喷涂机器人监控数据表")
@Table(name = "eqp_data_painting_robot")
public class PaintingRobotMachine extends EquipmentData {
......
......@@ -13,7 +13,7 @@ import java.util.Date;
@Data
@Search(code = "SPRAY_BOOTH")
@ApiModel("涂装-喷涂室温湿度")
@ApiModel(value = "涂装-喷涂室温湿度", description = "喷涂室监控数据表")
@Table(name = "eqp_data_spray_booth")
public class SprayBoothMachine extends EquipmentData {
......
......@@ -14,7 +14,7 @@ import java.util.Date;
@Data
@Search(code = "DUSTING_LINE")
@ApiModel("喷粉线")
@ApiModel(value = "喷粉线", description = "喷粉线监控数据表")
@Table(name = "eqp_data_dusting_line")
public class DustingLineMachine extends EquipmentData {
......
......@@ -14,7 +14,7 @@ import java.util.Date;
@Data
@Search(code = "PRETREATMENT")
@ApiModel("前处理")
@ApiModel(value = "前处理", description = "前处理监控数据表")
@Table(name = "eqp_data_pretreatment")
public class PretreatmentMachine extends EquipmentData {
......@@ -103,6 +103,4 @@ public class PretreatmentMachine extends EquipmentData {
@Column(name = "create_time")
@Search
private Date createTime;
private Integer status;
}
......@@ -14,7 +14,7 @@ import java.util.Date;
@Data
@Search(code = "STEEL_CNC_CUTTING")
@ApiModel("型钢数控下料")
@ApiModel(value = "型钢数控下料", description = "型钢数控下料监控数据表")
@Table(name = "eqp_data_steel_cnc_cutting")
public class SteelCncCuttingMachine extends EquipmentData {
......
......@@ -14,7 +14,7 @@ import java.util.Date;
@Data
@Search(code = "WELDING_ROBOT")
@ApiModel("机器人焊接")
@ApiModel(value = "机器人焊接", description = "机器人焊接监控数据表")
@Table(name = "eqp_data_welding_robot")
public class WeldingRobotMachine{
......
......@@ -17,7 +17,7 @@ import java.util.Date;
* @Date: 2019/10/17 11:52
*/
@ApiModel("试交车间--充电桩")
@ApiModel(value = "试交车间--充电桩", description = "充电桩监控数据表")
@Data
@Search(code = "CHARGING_PILE")
@Table(name = "eqp_data_charging_pile")
......
package net.vtstar.zhongtong.avi.gateway.trial.domain;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import net.vtstar.scada.base.gather.domain.EquipmentData;
import net.vtstar.user.search.Search;
import net.vtstar.zhongtong.avi.global.web.Show;
import net.vtstar.zhongtong.avi.global.web.domain.enums.FieldType;
import javax.persistence.Column;
import javax.persistence.Table;
import java.util.Date;
/**
* @Author: xiadongwei
* @Date: 2019/10/17 11:52
*/
@ApiModel(value = "试交车间--加氢站", description = "加氢站监控数据表")
@Data
@Search(code = "HYDROGEN_STATIONVoc")
@Table(name = "eqp_data_hydrogen_station")
public class HydrogenStationVocMachine extends EquipmentData {
@Show(label = "设备编号")
@Column(name = "eqp_code")
@ApiModelProperty(notes = "设备编号")
private String equipCode;
@Show(label = "设备名称")
@Column(name = "eqp_name")
@ApiModelProperty(notes = "设备名称")
@Search
private String alias;
@Show(label = "卸气口压力(Mpa)")
@ApiModelProperty(notes = "卸气口压力(Mpa)")
@Column(name = "discharge_port_pressure")
private Float dischargePortPressure;
@Show(label = "氢气源压力(mmH2O)")
@ApiModelProperty(notes = "氢气源压力(mmH2O)")
@Column(name = "hydrogen_source_pressure")
private Float hydrogenSourcePressure;
@Show(label = "泵出口压力(Mpa)")
@ApiModelProperty(notes = "泵出口压力(Mpa)")
@Column(name = "pump_outlet_pressure")
private Float pumpOutletPressure;
@Show(label = "仪表风压力(Mpa)")
@ApiModelProperty(notes = "仪表风压力(Mpa)")
@Column(name = "instrument_air_pressure")
private Float instrumentAirPressure;
@Show(label = "油温度(°C)")
@ApiModelProperty(notes = "油温度(°C)")
@Column(name = "oil_temperature")
private Float oilTemperature;
@Show(label = "采集时间",dataType = FieldType.DATETIME)
@ApiModelProperty("时间")
@Column(name = "create_time")
private Date createTime;
@Column(name = "state")
@ApiModelProperty(notes = "设备状态(0是关机,1是运行)")
private Integer status;
}
package net.vtstar.zhongtong.avi.gateway.trial.job;
import lombok.extern.slf4j.Slf4j;
import net.vtstar.scada.base.equipmgt.domain.Enum.EquipStatusEnum;
import net.vtstar.scada.base.gather.domain.EquipmentData;
import net.vtstar.scada.base.gather.job.GatherJob;
import net.vtstar.zhongtong.avi.gateway.trial.domain.HydrogenStationVocMachine;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.stereotype.Component;
import java.util.Date;
/**
* 加氢站设备数据采集JOB
*/
@Slf4j
@Component
public class HydrogenStationVocMachineJob extends GatherJob {
private static final String NAME = "HYDROGEN_STATIONVoc";
@Override
protected void executeInternal(JobExecutionContext context) throws JobExecutionException {
log.info("JobName: {}", context.getJobDetail().getKey().getName());
super.gatherByModbus(NAME, HydrogenStationVocMachine.class);
}
public boolean handleObject(EquipmentData equipmentData) {
HydrogenStationVocMachine data = (HydrogenStationVocMachine) equipmentData;
Integer state = data.getStatus();
if (state != null && state == 0) {
return false;
}
equipmentData.setEquipStatus(EquipStatusEnum.RUN);
return true;
}
@Override
public Object handleValue(String fieldName, Object value) {
return value;
}
@Override
protected void postHandle(EquipmentData equipmentData) {
((HydrogenStationVocMachine)equipmentData).setCreateTime(new Date());
}
}
......@@ -14,7 +14,7 @@ import java.util.Date;
@Data
@Search(code = "AUTOMATIC_SPOT_WELDING")
@ApiModel("车顶点焊")
@ApiModel(value = "车顶点焊", description = "车顶自动点焊监控数据表")
@Table(name = "eqp_data_automatic_spot_welding")
public class AutomaticSpotWeldingMachine extends EquipmentData {
......@@ -54,7 +54,4 @@ public class AutomaticSpotWeldingMachine extends EquipmentData {
@Column(name = "create_time")
@Search
private Date createTime;
private Integer status;
}
......@@ -14,7 +14,7 @@ import java.util.Date;
@Data
@Search(code = "PLATE_CHAIN")
@ApiModel("板链")
@ApiModel(value = "板链", description = "焊装板链监控数据表")
@Table(name = "eqp_data_plate_chain")
public class PlateChainMachine extends EquipmentData {
......
......@@ -14,7 +14,7 @@ import java.util.Date;
@Data
@Search(code = "PLC_CONTROL_TIRE_1")
@ApiModel("PLC数控合装胎, 串口")
@ApiModel(value = "PLC数控合装胎, 串口", description = "PLC数控合装胎监控数据表")
@Table(name = "eqp_data_control_tire_1")
public class PlcControlTireMachine1 extends EquipmentData {
......
......@@ -14,7 +14,7 @@ import java.util.Date;
@Data
@Search(code = "PLC_CONTROL_TIRE_2")
@ApiModel("PLC数控合装胎, 网口")
@ApiModel(value = "PLC数控合装胎, 网口", description = "PLC数控合装胎监控数据表")
@Table(name = "eqp_data_control_tire_2")
public class PlcControlTireMachine2 extends EquipmentData {
......@@ -73,7 +73,4 @@ public class PlcControlTireMachine2 extends EquipmentData {
@Column(name = "create_time")
@Search
private Date createTime;
@ApiModelProperty(notes = "系统运行(1,0)")
private Integer status;
}
......@@ -23,6 +23,11 @@ public class CacheConfig {
return cacheManager.getCache("showFieldCache");
}
@Bean
Cache classNameCache(ConcurrentMapCacheManager cacheManager) {
return cacheManager.getCache("classNameCache");
}
@Bean
Cache stationCache(ConcurrentMapCacheManager cacheManager) {
return cacheManager.getCache("stationCache");
......
package net.vtstar.zhongtong.avi.global.listener;
import io.swagger.annotations.ApiModel;
import lombok.extern.slf4j.Slf4j;
import net.vtstar.user.search.Search;
import net.vtstar.user.util.ReadAnnotationUtils;
......@@ -28,6 +29,9 @@ public class WebFiledListener implements ApplicationListener<ContextRefreshedEve
@Resource(name = "showFieldCache")
private Cache showFieldCache;
@Resource(name = "classNameCache")
private Cache classNameCache;
@Override
public void onApplicationEvent(ContextRefreshedEvent contextRefreshedEvent) {
......@@ -41,6 +45,11 @@ public class WebFiledListener implements ApplicationListener<ContextRefreshedEve
if (StringUtils.isEmpty(clazzAnnotation.code())) {
log.error("{} 类@Search注解code属性未赋值!", clazz);
}
classNameCache.put(clazzAnnotation.code(), clazz);
String name = clazz.getAnnotation(ApiModel.class).description();
if (!StringUtils.isEmpty(name)){
classNameCache.put(clazzAnnotation.code() + "name", name);
}
List<ShowField> showFileds = new ArrayList<>();
Field[] fields = clazz.getDeclaredFields();
for (Field field : fields) {
......
......@@ -16,7 +16,7 @@ import java.util.Date;
* @Date: 2019/10/17 11:52
*/
@ApiModel("总装车间车间--智能扭力扳手")
@ApiModel(value = "总装车间车间--智能扭力扳手", description = "总装拧紧机监控数据表")
@Data
@Search(code = "ASSEMBLY_TORQUE_WRENCH")
@Table(name = "assembly_torque_wrench")
......
......@@ -16,7 +16,7 @@ import java.util.Date;
* @Author: xiadongwei
* @Date: 2019/10/16 10:23
*/
@ApiModel("试交车间--检测线")
@ApiModel(value = "试交车间--检测线", description = "试交检测线监控数据表")
@Data
@Search(code = "CHECK_LINE")
@Table(name = "test_line_result")
......
......@@ -17,7 +17,7 @@ import java.util.Date;
* @Author: xiadongwei
* @Date: 2019/10/16 10:23
*/
@ApiModel("试交车间--动静态检测(限速值,错误帧)")
@ApiModel(value = "试交车间--动静态检测(限速值,错误帧)", description = "动静态检测监控数据表")
@Data
@Search(code = "DYNAMIC_STATIC_TEST")
@Table(name = "test_speed_result")
......
......@@ -56,8 +56,8 @@ public class MesWorkOrderJob extends QuartzJobBean {
String dateString = DateUtils.parseDateToString(startOfDay, "yyyy-MM-dd HH:mm:ss");
StringBuilder sql = new StringBuilder();
sql.append("SELECT SaleOrderNo, PreWONo, WONo, MaterialNo, ORDER_COUNT, UNIT, " +
"WorkShopCode, MLine, StartDate, EndDate, DeliveryDate, Status, CrtDate FROM PAINTING_WORKORDER " +
"WHERE WorkShopCode = 'HZ-焊装车间' or WorkShopCode = 'TZ-涂装车间'");
"WorkShopCode, MLine, StartDate, EndDate, DeliveryDate, Status, CrtDate FROM APS_PAINTING_WORKORDER " +
"WHERE WorkShopCode = 'HZ' or WorkShopCode = 'TZ'");
List<MesWorkOrderInfo> query = mesSqlServerJdbcTemplate.query(sql.toString(), (rs, rowNum) -> {
MesWorkOrderInfo map = new MesWorkOrderInfo();
map.setSalesOrderNo(rs.getString("SaleOrderNo"));
......
......@@ -15,7 +15,7 @@ import java.util.Date;
@Data
@Search(code = "3D_LASER_CUTTING")
@ApiModel("激光切割机")
@ApiModel(value = "激光切割机", description = "激光切割机监控数据表")
@Table(name = "eqp_data_3d_laser")
public class LaserCuttingMachine extends EquipmentData {
......
<?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="net.vtstar.zhongtong.avi.equipment.mapper.EquipmentDataMapper">
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment