Commit 49040a0af6332ed670544bc4a3e717453f4f22be
Merge branch 'pudong' of http://222.66.0.204:8090/panzhaov5/bsth_control into pudong
Showing
6 changed files
with
296 additions
and
296 deletions
src/main/java/com/bsth/data/summary/entity/TempSchSituation.java
| 1 | -package com.bsth.data.summary.entity; | |
| 2 | - | |
| 3 | -import javax.persistence.Entity; | |
| 4 | -import javax.persistence.Id; | |
| 5 | -import javax.persistence.Table; | |
| 6 | - | |
| 7 | -/** | |
| 8 | - * 临加情况 | |
| 9 | - * Created by panzhao on 2017/10/31. | |
| 10 | - */ | |
| 11 | -@Entity | |
| 12 | -@Table(name = "z_calc_temp_detail") | |
| 13 | -public class TempSchSituation { | |
| 14 | - | |
| 15 | - @Id | |
| 16 | - private Long id; | |
| 17 | - | |
| 18 | - private String rq; | |
| 19 | - | |
| 20 | - private String gsBm; | |
| 21 | - | |
| 22 | - private String fgsBm; | |
| 23 | - | |
| 24 | - private String lineCode; | |
| 25 | - | |
| 26 | - private String lineName; | |
| 27 | - | |
| 28 | - private String nbbm; | |
| 29 | - | |
| 30 | - private String jGh; | |
| 31 | - | |
| 32 | - private String sGh; | |
| 33 | - | |
| 34 | - private int size; | |
| 35 | - | |
| 36 | - private Double mileage; | |
| 37 | - | |
| 38 | - private Long t; | |
| 39 | - | |
| 40 | - private String remark; | |
| 41 | - | |
| 42 | - private String idsStr; | |
| 43 | - | |
| 44 | - public Long getId() { | |
| 45 | - return id; | |
| 46 | - } | |
| 47 | - | |
| 48 | - public void setId(Long id) { | |
| 49 | - this.id = id; | |
| 50 | - } | |
| 51 | - | |
| 52 | - public String getRq() { | |
| 53 | - return rq; | |
| 54 | - } | |
| 55 | - | |
| 56 | - public void setRq(String rq) { | |
| 57 | - this.rq = rq; | |
| 58 | - } | |
| 59 | - | |
| 60 | - public String getLineCode() { | |
| 61 | - return lineCode; | |
| 62 | - } | |
| 63 | - | |
| 64 | - public void setLineCode(String lineCode) { | |
| 65 | - this.lineCode = lineCode; | |
| 66 | - } | |
| 67 | - | |
| 68 | - public String getLineName() { | |
| 69 | - return lineName; | |
| 70 | - } | |
| 71 | - | |
| 72 | - public void setLineName(String lineName) { | |
| 73 | - this.lineName = lineName; | |
| 74 | - } | |
| 75 | - | |
| 76 | - public String getNbbm() { | |
| 77 | - return nbbm; | |
| 78 | - } | |
| 79 | - | |
| 80 | - public void setNbbm(String nbbm) { | |
| 81 | - this.nbbm = nbbm; | |
| 82 | - } | |
| 83 | - | |
| 84 | - public String getjGh() { | |
| 85 | - return jGh; | |
| 86 | - } | |
| 87 | - | |
| 88 | - public void setjGh(String jGh) { | |
| 89 | - this.jGh = jGh; | |
| 90 | - } | |
| 91 | - | |
| 92 | - public String getsGh() { | |
| 93 | - return sGh; | |
| 94 | - } | |
| 95 | - | |
| 96 | - public void setsGh(String sGh) { | |
| 97 | - this.sGh = sGh; | |
| 98 | - } | |
| 99 | - | |
| 100 | - public int getSize() { | |
| 101 | - return size; | |
| 102 | - } | |
| 103 | - | |
| 104 | - public void setSize(int size) { | |
| 105 | - this.size = size; | |
| 106 | - } | |
| 107 | - | |
| 108 | - public Double getMileage() { | |
| 109 | - return mileage; | |
| 110 | - } | |
| 111 | - | |
| 112 | - public void setMileage(Double mileage) { | |
| 113 | - this.mileage = mileage; | |
| 114 | - } | |
| 115 | - | |
| 116 | - public Long getT() { | |
| 117 | - return t; | |
| 118 | - } | |
| 119 | - | |
| 120 | - public void setT(Long t) { | |
| 121 | - this.t = t; | |
| 122 | - } | |
| 123 | - | |
| 124 | - public String getRemark() { | |
| 125 | - return remark; | |
| 126 | - } | |
| 127 | - | |
| 128 | - public void setRemark(String remark) { | |
| 129 | - this.remark = remark; | |
| 130 | - } | |
| 131 | - | |
| 132 | - public String getIdsStr() { | |
| 133 | - return idsStr; | |
| 134 | - } | |
| 135 | - | |
| 136 | - public void setIdsStr(String idsStr) { | |
| 137 | - this.idsStr = idsStr; | |
| 138 | - } | |
| 139 | - | |
| 140 | - public String getGsBm() { | |
| 141 | - return gsBm; | |
| 142 | - } | |
| 143 | - | |
| 144 | - public void setGsBm(String gsBm) { | |
| 145 | - this.gsBm = gsBm; | |
| 146 | - } | |
| 147 | - | |
| 148 | - public String getFgsBm() { | |
| 149 | - return fgsBm; | |
| 150 | - } | |
| 151 | - | |
| 152 | - public void setFgsBm(String fgsBm) { | |
| 153 | - this.fgsBm = fgsBm; | |
| 154 | - } | |
| 1 | +package com.bsth.data.summary.entity; | |
| 2 | + | |
| 3 | +import javax.persistence.Entity; | |
| 4 | +import javax.persistence.Id; | |
| 5 | +import javax.persistence.Table; | |
| 6 | + | |
| 7 | +/** | |
| 8 | + * 临加情况 | |
| 9 | + * Created by panzhao on 2017/10/31. | |
| 10 | + */ | |
| 11 | +@Entity | |
| 12 | +@Table(name = "z_calc_temp_detail") | |
| 13 | +public class TempSchSituation { | |
| 14 | + | |
| 15 | + @Id | |
| 16 | + private Long id; | |
| 17 | + | |
| 18 | + private String rq; | |
| 19 | + | |
| 20 | + private String gsBm; | |
| 21 | + | |
| 22 | + private String fgsBm; | |
| 23 | + | |
| 24 | + private String lineCode; | |
| 25 | + | |
| 26 | + private String lineName; | |
| 27 | + | |
| 28 | + private String nbbm; | |
| 29 | + | |
| 30 | + private String jGh; | |
| 31 | + | |
| 32 | + private String sGh; | |
| 33 | + | |
| 34 | + private int size; | |
| 35 | + | |
| 36 | + private Double mileage; | |
| 37 | + | |
| 38 | + private Long t; | |
| 39 | + | |
| 40 | + private String remark; | |
| 41 | + | |
| 42 | + private String idsStr; | |
| 43 | + | |
| 44 | + public Long getId() { | |
| 45 | + return id; | |
| 46 | + } | |
| 47 | + | |
| 48 | + public void setId(Long id) { | |
| 49 | + this.id = id; | |
| 50 | + } | |
| 51 | + | |
| 52 | + public String getRq() { | |
| 53 | + return rq; | |
| 54 | + } | |
| 55 | + | |
| 56 | + public void setRq(String rq) { | |
| 57 | + this.rq = rq; | |
| 58 | + } | |
| 59 | + | |
| 60 | + public String getLineCode() { | |
| 61 | + return lineCode; | |
| 62 | + } | |
| 63 | + | |
| 64 | + public void setLineCode(String lineCode) { | |
| 65 | + this.lineCode = lineCode; | |
| 66 | + } | |
| 67 | + | |
| 68 | + public String getLineName() { | |
| 69 | + return lineName; | |
| 70 | + } | |
| 71 | + | |
| 72 | + public void setLineName(String lineName) { | |
| 73 | + this.lineName = lineName; | |
| 74 | + } | |
| 75 | + | |
| 76 | + public String getNbbm() { | |
| 77 | + return nbbm; | |
| 78 | + } | |
| 79 | + | |
| 80 | + public void setNbbm(String nbbm) { | |
| 81 | + this.nbbm = nbbm; | |
| 82 | + } | |
| 83 | + | |
| 84 | + public String getjGh() { | |
| 85 | + return jGh; | |
| 86 | + } | |
| 87 | + | |
| 88 | + public void setjGh(String jGh) { | |
| 89 | + this.jGh = jGh; | |
| 90 | + } | |
| 91 | + | |
| 92 | + public String getsGh() { | |
| 93 | + return sGh; | |
| 94 | + } | |
| 95 | + | |
| 96 | + public void setsGh(String sGh) { | |
| 97 | + this.sGh = sGh; | |
| 98 | + } | |
| 99 | + | |
| 100 | + public int getSize() { | |
| 101 | + return size; | |
| 102 | + } | |
| 103 | + | |
| 104 | + public void setSize(int size) { | |
| 105 | + this.size = size; | |
| 106 | + } | |
| 107 | + | |
| 108 | + public Double getMileage() { | |
| 109 | + return mileage; | |
| 110 | + } | |
| 111 | + | |
| 112 | + public void setMileage(Double mileage) { | |
| 113 | + this.mileage = mileage; | |
| 114 | + } | |
| 115 | + | |
| 116 | + public Long getT() { | |
| 117 | + return t; | |
| 118 | + } | |
| 119 | + | |
| 120 | + public void setT(Long t) { | |
| 121 | + this.t = t; | |
| 122 | + } | |
| 123 | + | |
| 124 | + public String getRemark() { | |
| 125 | + return remark; | |
| 126 | + } | |
| 127 | + | |
| 128 | + public void setRemark(String remark) { | |
| 129 | + this.remark = remark; | |
| 130 | + } | |
| 131 | + | |
| 132 | + public String getIdsStr() { | |
| 133 | + return idsStr; | |
| 134 | + } | |
| 135 | + | |
| 136 | + public void setIdsStr(String idsStr) { | |
| 137 | + this.idsStr = idsStr; | |
| 138 | + } | |
| 139 | + | |
| 140 | + public String getGsBm() { | |
| 141 | + return gsBm; | |
| 142 | + } | |
| 143 | + | |
| 144 | + public void setGsBm(String gsBm) { | |
| 145 | + this.gsBm = gsBm; | |
| 146 | + } | |
| 147 | + | |
| 148 | + public String getFgsBm() { | |
| 149 | + return fgsBm; | |
| 150 | + } | |
| 151 | + | |
| 152 | + public void setFgsBm(String fgsBm) { | |
| 153 | + this.fgsBm = fgsBm; | |
| 154 | + } | |
| 155 | 155 | } |
| 156 | 156 | \ No newline at end of file | ... | ... |
src/main/java/com/bsth/data/summary/service/impl/TempSchSituationServiceImpl.java
| 1 | -package com.bsth.data.summary.service.impl; | |
| 2 | - | |
| 3 | -import com.bsth.data.summary.entity.TempSchSituation; | |
| 4 | -import com.bsth.data.summary.service.TempSchSituationService; | |
| 5 | -import com.bsth.data.utils.CustomStringUtils; | |
| 6 | -import com.bsth.service.impl.BaseServiceImpl; | |
| 7 | -import org.apache.poi.hssf.usermodel.HSSFWorkbook; | |
| 8 | -import org.apache.poi.poifs.filesystem.POIFSFileSystem; | |
| 9 | -import org.apache.poi.ss.usermodel.Row; | |
| 10 | -import org.apache.poi.ss.usermodel.Sheet; | |
| 11 | -import org.slf4j.Logger; | |
| 12 | -import org.slf4j.LoggerFactory; | |
| 13 | -import org.springframework.stereotype.Service; | |
| 14 | - | |
| 15 | -import javax.servlet.http.HttpServletRequest; | |
| 16 | -import javax.servlet.http.HttpServletResponse; | |
| 17 | -import java.io.FileInputStream; | |
| 18 | -import java.io.OutputStream; | |
| 19 | -import java.net.URLEncoder; | |
| 20 | -import java.text.SimpleDateFormat; | |
| 21 | -import java.util.*; | |
| 22 | - | |
| 23 | -/** | |
| 24 | - * Created by panzhao on 2017/11/1. | |
| 25 | - */ | |
| 26 | -@Service | |
| 27 | -public class TempSchSituationServiceImpl extends BaseServiceImpl<TempSchSituation, Long> implements TempSchSituationService { | |
| 28 | - | |
| 29 | - Logger logger = LoggerFactory.getLogger(this.getClass()); | |
| 30 | - | |
| 31 | - @Override | |
| 32 | - public Iterable<TempSchSituation> list(Map<String, Object> map) { | |
| 33 | - List<TempSchSituation> list = (List<TempSchSituation>) super.list(map); | |
| 34 | - | |
| 35 | - //排序 | |
| 36 | - Collections.sort(list, new Comparator<TempSchSituation>() { | |
| 37 | - @Override | |
| 38 | - public int compare(TempSchSituation o1, TempSchSituation o2) { | |
| 39 | - int i = o1.getRq().compareTo(o2.getRq()); | |
| 40 | - if (i != 0) | |
| 41 | - return i; | |
| 42 | - | |
| 43 | - i = o1.getLineName().compareTo(o2.getLineName()); | |
| 44 | - if (i != 0) | |
| 45 | - return i; | |
| 46 | - | |
| 47 | - i = (int) (o1.getT() - o2.getT()); | |
| 48 | - return i; | |
| 49 | - } | |
| 50 | - }); | |
| 51 | - return list; | |
| 52 | - } | |
| 53 | - | |
| 54 | - @Override | |
| 55 | - public void excel(Map<String, Object> map, HttpServletRequest request, HttpServletResponse response) { | |
| 56 | - try { | |
| 57 | - map.put("rq_le", CustomStringUtils.maxEndTime(map.get("rq_ge").toString() | |
| 58 | - , map.get("rq_le").toString(), 62)); | |
| 59 | - | |
| 60 | - List<TempSchSituation> list = (List<TempSchSituation>) super.list(map); | |
| 61 | - | |
| 62 | - if (list.size() == 0) { | |
| 63 | - response.setHeader("Content-type", "text/html;charset=UTF-8"); | |
| 64 | - response.getWriter().print("<span style='color:red;font-size:24px;'>根据查询条件没有搜索到数据,别导了!</span>"); | |
| 65 | - return; | |
| 66 | - } | |
| 67 | - | |
| 68 | - //排序 | |
| 69 | - Collections.sort(list, new Comparator<TempSchSituation>() { | |
| 70 | - @Override | |
| 71 | - public int compare(TempSchSituation o1, TempSchSituation o2) { | |
| 72 | - int i = o1.getRq().compareTo(o2.getRq()); | |
| 73 | - if (i != 0) | |
| 74 | - return i; | |
| 75 | - | |
| 76 | - i = o1.getLineName().compareTo(o2.getLineName()); | |
| 77 | - if (i != 0) | |
| 78 | - return i; | |
| 79 | - | |
| 80 | - i = (int) (o1.getT() - o2.getT()); | |
| 81 | - return i; | |
| 82 | - } | |
| 83 | - }); | |
| 84 | - | |
| 85 | - //输出excel | |
| 86 | - String basePath = Thread.currentThread().getContextClassLoader().getResource("").getPath(); | |
| 87 | - String filePath = basePath + "/static/pages/summary/excel/临加明细情况.xls"; | |
| 88 | - POIFSFileSystem fs = new POIFSFileSystem(new FileInputStream(filePath)); | |
| 89 | - HSSFWorkbook wb = new HSSFWorkbook(fs); | |
| 90 | - | |
| 91 | - //写入数据 | |
| 92 | - Sheet sheet = wb.getSheetAt(0); | |
| 93 | - Row row; | |
| 94 | - TempSchSituation tss; | |
| 95 | - SimpleDateFormat sdf = new SimpleDateFormat("HH:mm"); | |
| 96 | - for (int i = 0; i < list.size(); i++) { | |
| 97 | - tss = list.get(i); | |
| 98 | - row = sheet.createRow(i + 1); | |
| 99 | - row.createCell(0).setCellValue(tss.getRq()); | |
| 100 | - row.createCell(1).setCellValue(tss.getLineName()); | |
| 101 | - row.createCell(2).setCellValue(tss.getNbbm()); | |
| 102 | - row.createCell(3).setCellValue(tss.getjGh()); | |
| 103 | - row.createCell(4).setCellValue(tss.getsGh()); | |
| 104 | - row.createCell(5).setCellValue(tss.getSize()); | |
| 105 | - row.createCell(6).setCellValue(tss.getMileage()); | |
| 106 | - row.createCell(7).setCellValue(sdf.format(new Date(tss.getT()))); | |
| 107 | - row.createCell(8).setCellValue(tss.getRemark()); | |
| 108 | - } | |
| 109 | - | |
| 110 | - String name = "";//list.get(0).getLineName(); | |
| 111 | - wb.setSheetName(0, name + "临加明细"); | |
| 112 | - //response 输出 | |
| 113 | - String filename = name + map.get("rq_ge") + "至" + map.get("rq_le") + "临加明细情况.xls"; | |
| 114 | - response.setContentType("application/x-msdownload"); | |
| 115 | - response.setHeader("content-disposition", "attachment;filename=" + URLEncoder.encode(filename, "UTF-8")); | |
| 116 | - | |
| 117 | - OutputStream os = response.getOutputStream(); | |
| 118 | - wb.write(os); | |
| 119 | - os.flush(); | |
| 120 | - os.close(); | |
| 121 | - } catch (Exception e) { | |
| 122 | - logger.error("", e); | |
| 123 | - } | |
| 124 | - } | |
| 1 | +package com.bsth.data.summary.service.impl; | |
| 2 | + | |
| 3 | +import com.bsth.data.summary.entity.TempSchSituation; | |
| 4 | +import com.bsth.data.summary.service.TempSchSituationService; | |
| 5 | +import com.bsth.data.utils.CustomStringUtils; | |
| 6 | +import com.bsth.service.impl.BaseServiceImpl; | |
| 7 | +import org.apache.poi.hssf.usermodel.HSSFWorkbook; | |
| 8 | +import org.apache.poi.poifs.filesystem.POIFSFileSystem; | |
| 9 | +import org.apache.poi.ss.usermodel.Row; | |
| 10 | +import org.apache.poi.ss.usermodel.Sheet; | |
| 11 | +import org.slf4j.Logger; | |
| 12 | +import org.slf4j.LoggerFactory; | |
| 13 | +import org.springframework.stereotype.Service; | |
| 14 | + | |
| 15 | +import javax.servlet.http.HttpServletRequest; | |
| 16 | +import javax.servlet.http.HttpServletResponse; | |
| 17 | +import java.io.FileInputStream; | |
| 18 | +import java.io.OutputStream; | |
| 19 | +import java.net.URLEncoder; | |
| 20 | +import java.text.SimpleDateFormat; | |
| 21 | +import java.util.*; | |
| 22 | + | |
| 23 | +/** | |
| 24 | + * Created by panzhao on 2017/11/1. | |
| 25 | + */ | |
| 26 | +@Service | |
| 27 | +public class TempSchSituationServiceImpl extends BaseServiceImpl<TempSchSituation, Long> implements TempSchSituationService { | |
| 28 | + | |
| 29 | + Logger logger = LoggerFactory.getLogger(this.getClass()); | |
| 30 | + | |
| 31 | + @Override | |
| 32 | + public Iterable<TempSchSituation> list(Map<String, Object> map) { | |
| 33 | + List<TempSchSituation> list = (List<TempSchSituation>) super.list(map); | |
| 34 | + | |
| 35 | + //排序 | |
| 36 | + Collections.sort(list, new Comparator<TempSchSituation>() { | |
| 37 | + @Override | |
| 38 | + public int compare(TempSchSituation o1, TempSchSituation o2) { | |
| 39 | + int i = o1.getRq().compareTo(o2.getRq()); | |
| 40 | + if (i != 0) | |
| 41 | + return i; | |
| 42 | + | |
| 43 | + i = o1.getLineName().compareTo(o2.getLineName()); | |
| 44 | + if (i != 0) | |
| 45 | + return i; | |
| 46 | + | |
| 47 | + i = (int) (o1.getT() - o2.getT()); | |
| 48 | + return i; | |
| 49 | + } | |
| 50 | + }); | |
| 51 | + return list; | |
| 52 | + } | |
| 53 | + | |
| 54 | + @Override | |
| 55 | + public void excel(Map<String, Object> map, HttpServletRequest request, HttpServletResponse response) { | |
| 56 | + try { | |
| 57 | + map.put("rq_le", CustomStringUtils.maxEndTime(map.get("rq_ge").toString() | |
| 58 | + , map.get("rq_le").toString(), 62)); | |
| 59 | + | |
| 60 | + List<TempSchSituation> list = (List<TempSchSituation>) super.list(map); | |
| 61 | + | |
| 62 | + if (list.size() == 0) { | |
| 63 | + response.setHeader("Content-type", "text/html;charset=UTF-8"); | |
| 64 | + response.getWriter().print("<span style='color:red;font-size:24px;'>根据查询条件没有搜索到数据,别导了!</span>"); | |
| 65 | + return; | |
| 66 | + } | |
| 67 | + | |
| 68 | + //排序 | |
| 69 | + Collections.sort(list, new Comparator<TempSchSituation>() { | |
| 70 | + @Override | |
| 71 | + public int compare(TempSchSituation o1, TempSchSituation o2) { | |
| 72 | + int i = o1.getRq().compareTo(o2.getRq()); | |
| 73 | + if (i != 0) | |
| 74 | + return i; | |
| 75 | + | |
| 76 | + i = o1.getLineName().compareTo(o2.getLineName()); | |
| 77 | + if (i != 0) | |
| 78 | + return i; | |
| 79 | + | |
| 80 | + i = (int) (o1.getT() - o2.getT()); | |
| 81 | + return i; | |
| 82 | + } | |
| 83 | + }); | |
| 84 | + | |
| 85 | + //输出excel | |
| 86 | + String basePath = Thread.currentThread().getContextClassLoader().getResource("").getPath(); | |
| 87 | + String filePath = basePath + "/static/pages/summary/excel/临加明细情况.xls"; | |
| 88 | + POIFSFileSystem fs = new POIFSFileSystem(new FileInputStream(filePath)); | |
| 89 | + HSSFWorkbook wb = new HSSFWorkbook(fs); | |
| 90 | + | |
| 91 | + //写入数据 | |
| 92 | + Sheet sheet = wb.getSheetAt(0); | |
| 93 | + Row row; | |
| 94 | + TempSchSituation tss; | |
| 95 | + SimpleDateFormat sdf = new SimpleDateFormat("HH:mm"); | |
| 96 | + for (int i = 0; i < list.size(); i++) { | |
| 97 | + tss = list.get(i); | |
| 98 | + row = sheet.createRow(i + 1); | |
| 99 | + row.createCell(0).setCellValue(tss.getRq()); | |
| 100 | + row.createCell(1).setCellValue(tss.getLineName()); | |
| 101 | + row.createCell(2).setCellValue(tss.getNbbm()); | |
| 102 | + row.createCell(3).setCellValue(tss.getjGh()); | |
| 103 | + row.createCell(4).setCellValue(tss.getsGh()); | |
| 104 | + row.createCell(5).setCellValue(tss.getSize()); | |
| 105 | + row.createCell(6).setCellValue(tss.getMileage()); | |
| 106 | + row.createCell(7).setCellValue(sdf.format(new Date(tss.getT()))); | |
| 107 | + row.createCell(8).setCellValue(tss.getRemark()); | |
| 108 | + } | |
| 109 | + | |
| 110 | + String name = "";//list.get(0).getLineName(); | |
| 111 | + wb.setSheetName(0, name + "临加明细"); | |
| 112 | + //response 输出 | |
| 113 | + String filename = name + map.get("rq_ge") + "至" + map.get("rq_le") + "临加明细情况.xls"; | |
| 114 | + response.setContentType("application/x-msdownload"); | |
| 115 | + response.setHeader("content-disposition", "attachment;filename=" + URLEncoder.encode(filename, "UTF-8")); | |
| 116 | + | |
| 117 | + OutputStream os = response.getOutputStream(); | |
| 118 | + wb.write(os); | |
| 119 | + os.flush(); | |
| 120 | + os.close(); | |
| 121 | + } catch (Exception e) { | |
| 122 | + logger.error("", e); | |
| 123 | + } | |
| 124 | + } | |
| 125 | 125 | } |
| 126 | 126 | \ No newline at end of file | ... | ... |
src/main/java/com/bsth/repository/CarDeviceRepository.java
| ... | ... | @@ -13,6 +13,6 @@ import org.springframework.stereotype.Repository; |
| 13 | 13 | */ |
| 14 | 14 | @Repository |
| 15 | 15 | public interface CarDeviceRepository extends BaseRepository<CarDevice, Long> { |
| 16 | - @Query(value="select s from CarDevice s where s.oldDeviceNo=?1 and s.qyrq>=?2 ") | |
| 16 | + @Query(value="select s from CarDevice s where s.newDeviceNo=?1 and s.qyrq<=?2 ") | |
| 17 | 17 | List<CarDevice> findCarDevice(String device,Date date ); |
| 18 | 18 | } | ... | ... |
src/main/java/com/bsth/repository/LineRepository.java
| ... | ... | @@ -45,7 +45,7 @@ public interface LineRepository extends BaseRepository<Line, Integer> { |
| 45 | 45 | |
| 46 | 46 | public Line findByLineCode(String string); |
| 47 | 47 | |
| 48 | - @Query(value = " SELECT l FROM Line l where l.company like %?1% and l.brancheCompany like %?2% and l.lineCode like ?3") | |
| 48 | + @Query(value = " SELECT l FROM Line l where l.company like ?1 and l.brancheCompany like ?2 and l.lineCode like ?3") | |
| 49 | 49 | public List<Line> findLineBygsBm(String gsBm, String fgsBm, String line); |
| 50 | 50 | |
| 51 | 51 | @Query("SELECT L FROM Line L where L.destroy=0") | ... | ... |
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
| ... | ... | @@ -1129,8 +1129,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 1129 | 1129 | if(BasicData.deviceId2NbbmMap.get(obj[0].toString())==null){ |
| 1130 | 1130 | List<CarDevice> carDeviceList=new ArrayList<CarDevice>(); |
| 1131 | 1131 | try { |
| 1132 | - carDeviceList = carDeviceRepository.findCarDevice(obj[0].toString(), sdf.parse(date + " 00:00:00")); | |
| 1133 | - } catch (ParseException e) { | |
| 1132 | + carDeviceList = carDeviceRepository.findCarDevice(obj[0].toString(), new Date(Long.parseLong(obj[3].toString()))); | |
| 1133 | + } catch (Exception e) { | |
| 1134 | 1134 | // TODO Auto-generated catch block |
| 1135 | 1135 | e.printStackTrace(); |
| 1136 | 1136 | } |
| ... | ... | @@ -1870,7 +1870,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 1870 | 1870 | code=BasicData.deviceId2NbbmMap.inverse().get(code); |
| 1871 | 1871 | } |
| 1872 | 1872 | String fgs=""; |
| 1873 | - List<Line> lineList= lineRepository.findLineBygsBm("", "", line); | |
| 1873 | + List<Line> lineList= lineRepository.findLineByCode(line); | |
| 1874 | 1874 | if(lineList.size()>0){ |
| 1875 | 1875 | Line l=lineList.get(0); |
| 1876 | 1876 | fgs=BasicData.businessFgsCodeNameMap.get(l.getBrancheCompany()+"_"+l.getCompany()); |
| ... | ... | @@ -1901,8 +1901,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 1901 | 1901 | if(BasicData.deviceId2NbbmMap.get(obj[2])==null){ |
| 1902 | 1902 | List<CarDevice> carDeviceList=new ArrayList<CarDevice>(); |
| 1903 | 1903 | try { |
| 1904 | - carDeviceList = carDeviceRepository.findCarDevice(obj[2].toString(), sdf.parse(date + " 00:00:00")); | |
| 1905 | - } catch (ParseException e) { | |
| 1904 | + carDeviceList = carDeviceRepository.findCarDevice(obj[2].toString(), sdf.parse(obj[1].toString())); | |
| 1905 | + } catch (Exception e) { | |
| 1906 | 1906 | // TODO Auto-generated catch block |
| 1907 | 1907 | e.printStackTrace(); |
| 1908 | 1908 | } |
| ... | ... | @@ -1938,7 +1938,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 1938 | 1938 | code=BasicData.deviceId2NbbmMap.inverse().get(code); |
| 1939 | 1939 | } |
| 1940 | 1940 | String fgs=""; |
| 1941 | - List<Line> lineList= lineRepository.findLineBygsBm("", "", line); | |
| 1941 | + List<Line> lineList= lineRepository.findLineByCode(line); | |
| 1942 | 1942 | if(lineList.size()>0){ |
| 1943 | 1943 | Line l=lineList.get(0); |
| 1944 | 1944 | fgs=BasicData.businessFgsCodeNameMap.get(l.getBrancheCompany()+"_"+l.getCompany()); |
| ... | ... | @@ -1956,8 +1956,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 1956 | 1956 | if(BasicData.deviceId2NbbmMap.get(obj[2])==null){ |
| 1957 | 1957 | List<CarDevice> carDeviceList=new ArrayList<CarDevice>(); |
| 1958 | 1958 | try { |
| 1959 | - carDeviceList = carDeviceRepository.findCarDevice(obj[2].toString(), sdf.parse(date + " 00:00:00")); | |
| 1960 | - } catch (ParseException e) { | |
| 1959 | + carDeviceList = carDeviceRepository.findCarDevice(obj[2].toString(), sdf.parse(obj[1].toString())); | |
| 1960 | + } catch (Exception e) { | |
| 1961 | 1961 | // TODO Auto-generated catch block |
| 1962 | 1962 | e.printStackTrace(); |
| 1963 | 1963 | } | ... | ... |
src/main/resources/static/pages/mforms/singledatas/jquery.table2excel.min.js
| 1 | -/* | |
| 2 | - * jQuery table2excel - v1.1.1 | |
| 3 | - * jQuery plugin to export an .xls file in browser from an HTML table | |
| 4 | - * https://github.com/rainabba/jquery-table2excel | |
| 5 | - * | |
| 6 | - * Made by rainabba | |
| 7 | - * Under MIT License | |
| 8 | - */ | |
| 1 | +/* | |
| 2 | + * jQuery table2excel - v1.1.1 | |
| 3 | + * jQuery plugin to export an .xls file in browser from an HTML table | |
| 4 | + * https://github.com/rainabba/jquery-table2excel | |
| 5 | + * | |
| 6 | + * Made by rainabba | |
| 7 | + * Under MIT License | |
| 8 | + */ | |
| 9 | 9 | !function(a,b,c,d){function e(b,c){this.element=b,this.settings=a.extend({},k,c),this._defaults=k,this._name=j,this.init()}function f(a){return a.filename?a.filename:"table2excel"}function g(a){var b=/(\s+alt\s*=\s*"([^"]*)"|\s+alt\s*=\s*'([^']*)')/i;return a.replace(/<img[^>]*>/gi,function(a){var c=b.exec(a);return null!==c&&c.length>=2?c[2]:""})}function h(a){return a.replace(/<a[^>]*>|<\/a>/gi,"")}function i(a){var b=/(\s+value\s*=\s*"([^"]*)"|\s+value\s*=\s*'([^']*)')/i;return a.replace(/<input[^>]*>|<\/input>/gi,function(a){var c=b.exec(a);return null!==c&&c.length>=2?c[2]:""})}var j="table2excel",k={exclude:".noExl",name:"Table2Excel",filename:"table2excel",fileext:".xls",exclude_img:!0,exclude_links:!0,exclude_inputs:!0};e.prototype={init:function(){var b=this;b.template={head:'<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"><meta http-equiv="content-type" content="application/vnd.ms-excel; charset=UTF-8"><head>\x3c!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets>',sheet:{head:"<x:ExcelWorksheet><x:Name>",tail:"</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet>"},mid:"</x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--\x3e</head><body>",table:{head:"<table>",tail:"</table>"},foot:"</body></html>"},b.tableRows=[],a(b.element).each(function(c,d){var e="";a(d).find("tr").not(b.settings.exclude).each(function(c,d){e+="<tr>",a(d).find("td,th").not(b.settings.exclude).each(function(c,d){var f={rows:a(this).attr("rowspan"),cols:a(this).attr("colspan"),flag:a(d).find(b.settings.exclude)};f.flag.length>0?e+="<td> </td>":f.rows&f.cols?e+="<td>"+a(d).html()+"</td>":(e+="<td",f.rows>0&&(e+=" rowspan='"+f.rows+"' "),f.cols>0&&(e+=" colspan='"+f.cols+"' "),e+="/>"+a(d).html()+"</td>")}),e+="</tr>"}),b.settings.exclude_img&&(e=g(e)),b.settings.exclude_links&&(e=h(e)),b.settings.exclude_inputs&&(e=i(e)),b.tableRows.push(e)}),b.tableToExcel(b.tableRows,b.settings.name,b.settings.sheetName)},tableToExcel:function(d,e,g){var h,i,j,k=this,l="";if(k.format=function(a,b){return a.replace(/{(\w+)}/g,function(a,c){return b[c]})},g=void 0===g?"Sheet":g,k.ctx={worksheet:e||"Worksheet",table:d,sheetName:g},l=k.template.head,a.isArray(d))for(h in d)l+=k.template.sheet.head+g+h+k.template.sheet.tail;if(l+=k.template.mid,a.isArray(d))for(h in d)l+=k.template.table.head+"{table"+h+"}"+k.template.table.tail;l+=k.template.foot;for(h in d)k.ctx["table"+h]=d[h];if(delete k.ctx.table,!c.documentMode){var m=new Blob([k.format(l,k.ctx)],{type:"application/vnd.ms-excel"});b.URL=b.URL||b.webkitURL,i=b.URL.createObjectURL(m),j=c.createElement("a"),j.download=f(k.settings),j.href=i,c.body.appendChild(j),j.click(),c.body.removeChild(j)}else if("undefined"!=typeof Blob){l=k.format(l,k.ctx),l=[l];var n=new Blob(l,{type:"text/html"});b.navigator.msSaveBlob(n,f(k.settings))}else txtArea1.document.open("text/html","replace"),txtArea1.document.write(k.format(l,k.ctx)),txtArea1.document.close(),txtArea1.focus(),sa=txtArea1.document.execCommand("SaveAs",!0,f(k.settings));return!0}},a.fn[j]=function(b){var c=this;return c.each(function(){a.data(c,"plugin_"+j)||a.data(c,"plugin_"+j,new e(this,b))}),c}}(jQuery,window,document); |
| 10 | 10 | \ No newline at end of file | ... | ... |