package com.hxzkoa.services;
|
|
import java.text.ParseException;
|
import java.util.ArrayList;
|
import java.util.List;
|
|
import javax.persistence.EntityManager;
|
import javax.persistence.PersistenceContext;
|
import javax.persistence.Query;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.stereotype.Service;
|
import org.springframework.transaction.annotation.Transactional;
|
|
import com.hxzkoa.json.tb_achor;
|
import com.hxzkoa.json.tb_fence;
|
import com.hxzkoa.json.tb_shipin;
|
import com.hxzkoa.json.tb_xunjianbaobiao;
|
import com.hxzkoa.json.tb_xunjianset;
|
import com.hxzkoa.util.Config;
|
import com.hxzkoa.util.ModifyConfig;
|
|
@Service
|
public class FenceService {
|
@PersistenceContext
|
private EntityManager em;
|
@Autowired
|
private CaozuoService cs;
|
|
public List<tb_fence> getFenceList() {
|
String sql = null;
|
Query query = null;
|
sql = "SELECT id,floor,type,bumen,name,zuobiao,shape,start,stop,addtime,color,baoliu1 FROM tb_fence";
|
query = this.em.createNativeQuery(sql);
|
List resultList = query.getResultList();
|
List<tb_fence> tb_fenceList = new ArrayList<tb_fence>();
|
if (resultList.size() > 0) {
|
for (int i = 0; i < resultList.size(); i++) {
|
tb_fence fence = new tb_fence();
|
Object[] obj = (Object[]) resultList.get(i);
|
fence.setId((int) obj[0]);
|
fence.setFloor(obj[1] == null ? "" : obj[1].toString());
|
fence.setType(obj[2] == null ? "" : obj[2].toString());
|
fence.setBumen(obj[3] == null ? "" : obj[3].toString());
|
fence.setName(obj[4] == null ? "" : obj[4].toString());
|
fence.setZuobiao(obj[5] == null ? "" : obj[5].toString());
|
fence.setShape(obj[6] == null ? "" : obj[6].toString());
|
fence.setStart(obj[7] == null ? "" : obj[7].toString());
|
fence.setStop(obj[8] == null ? "" : obj[8].toString());
|
fence.setAddtime(obj[9] == null ? "" : obj[9].toString());
|
fence.setColor(obj[10] == null ? "" : obj[10].toString());
|
fence.setBaoliu1(obj[11] == null ? "" : obj[11].toString());
|
tb_fenceList.add(fence);
|
}
|
}
|
return tb_fenceList;
|
}
|
|
public List<tb_shipin> getShipinManagement(int page) {
|
String sql = null;
|
Query query = null;
|
sql = "SELECT * FROM tb_shipin LIMIT :start,:end";
|
query = this.em.createNativeQuery(sql);
|
query.setParameter("start", (page - 1) * Integer.parseInt(ModifyConfig.readData(Config.getPageConfig(), "perPage")));
|
query.setParameter("end", Integer.parseInt(ModifyConfig.readData(Config.getPageConfig(), "perPage")));
|
List resultList = query.getResultList();
|
List<tb_shipin> tb_shipinList = new ArrayList<tb_shipin>();
|
if (resultList.size() > 0) {
|
for (int i = 0; i < resultList.size(); i++) {
|
tb_shipin shipin = new tb_shipin();
|
Object[] obj = (Object[]) resultList.get(i);
|
shipin.setId((int) obj[0]);
|
shipin.setFencename(obj[1] == null ? "" : obj[1].toString());
|
shipin.setShebeiid(obj[2] == null ? "" : obj[2].toString());
|
shipin.setTongdaoid(obj[3] == null ? "" : obj[3].toString());
|
shipin.setAddtime(obj[4] == null ? "" : obj[4].toString());
|
shipin.setPosx(obj[5] == null ? "" : obj[5].toString());
|
shipin.setPosy(obj[6] == null ? "" : obj[6].toString());
|
shipin.setPosz(obj[7] == null ? "" : obj[7].toString());
|
shipin.setFloor(obj[8] == null ? "" : obj[8].toString());
|
shipin.setName(obj[9] == null ? "" : obj[9].toString());
|
tb_shipinList.add(shipin);
|
}
|
}
|
return tb_shipinList;
|
}
|
|
public int getShipinManagementCount() {
|
String sql = null;
|
Query query = null;
|
sql = "SELECT count(1) FROM tb_shipin";
|
query = this.em.createNativeQuery(sql);
|
return Integer.parseInt(query.getSingleResult().toString());
|
}
|
|
@Transactional
|
public int shipinManagement_add(tb_shipin shipin) {
|
String sql = null;
|
Query query = null;
|
sql = "INSERT INTO tb_shipin(fencename,shebeiid,tongdaoid,addtime,posx,posy,posz,floor,name) VALUES(:fencename,:shebeiid,:tongdaoid,now(),:posx,:posy,:posz,:floor,:name)";
|
query = this.em.createNativeQuery(sql);
|
query.setParameter("fencename", shipin.getFencename());
|
query.setParameter("shebeiid", shipin.getShebeiid());
|
query.setParameter("tongdaoid", shipin.getTongdaoid());
|
query.setParameter("posx", shipin.getPosx());
|
query.setParameter("posy", shipin.getPosy());
|
query.setParameter("posz", shipin.getPosz());
|
query.setParameter("floor", shipin.getFloor());
|
query.setParameter("name", shipin.getName());
|
int executeUpdate = query.executeUpdate();
|
// String sql2 = null;
|
// Query query2 = null;
|
// sql2 = "SELECT id FROM tb_shipin WHERE shebeiid=:shebeiid";
|
// query2 = this.em.createNativeQuery(sql2);
|
// query2.setParameter("shebeiid",shipin.getShebeiid());
|
// List resultList2 = query2.getResultList();
|
// String id = null;
|
// if (resultList2.size() > 0) {
|
// Object[] obj = (Object[])resultList2.get(0);
|
// id = obj[0].toString();
|
// }
|
// String xieyi = "BSTOCS1,ADDVIDEO,"+id+","+shipin.getFencename()+","+shipin.getShebeiid()+","+shipin.getTongdaoid()+","+shipin.getPosx()+","+shipin.getPosy()+","+shipin.getPosz()+","+shipin.getFloor()+","+shipin.getName()+",END";
|
// Udp_
|
return executeUpdate;
|
}
|
|
@Transactional
|
public void shipinManagement_modify(tb_shipin shipin) {
|
String sql = null;
|
Query query = null;
|
sql = "UPDATE tb_shipin SET fencename=:fencename,shebeiid=:shebeiid,tongdaoid=:tongdaoid,posx=:posx,posy=:posy,posz=:posz,floor=:floor,name=:name WHERE id=:id";
|
query = this.em.createNativeQuery(sql);
|
query.setParameter("id", shipin.getId());
|
query.setParameter("fencename", shipin.getFencename());
|
query.setParameter("shebeiid", shipin.getShebeiid());
|
query.setParameter("tongdaoid", shipin.getTongdaoid());
|
query.setParameter("posx", shipin.getPosx());
|
query.setParameter("posy", shipin.getPosy());
|
query.setParameter("posz", shipin.getPosz());
|
query.setParameter("floor", shipin.getFloor());
|
query.setParameter("name", shipin.getName());
|
query.executeUpdate();
|
}
|
|
@Transactional
|
public void shipinManagement_delete(String[] checkVal) {
|
String sql = null;
|
Query query = null;
|
for (int i = 0; i < checkVal.length; i++) {
|
int id = Integer.parseInt(checkVal[i]);
|
sql = "DELETE FROM tb_shipin WHERE id = :id";
|
query = this.em.createNativeQuery(sql);
|
query.setParameter("id", id);
|
query.executeUpdate();
|
}
|
}
|
|
@Transactional
|
public List idfindshebeiid(String id) {
|
String sql = null;
|
Query query = null;
|
sql = "SELECT shebeiid FROM tb_shipin WHERE id = :id";
|
query = this.em.createNativeQuery(sql);
|
query.setParameter("id", id);
|
List resultList = query.getResultList();
|
return resultList;
|
}
|
|
@Transactional
|
public void shipinManagement_deleteAll() {
|
String sql = null;
|
Query query = null;
|
sql = "DELETE FROM tb_shipin";
|
query = this.em.createNativeQuery(sql);
|
query.executeUpdate();
|
}
|
|
public List<tb_shipin> searchshipinManagement(String input) {
|
String sql = null;
|
Query query = null;
|
sql = "SELECT * FROM tb_shipin WHERE name = :name";
|
query = this.em.createNativeQuery(sql);
|
query.setParameter("name", input);
|
List resultList = query.getResultList();
|
List<tb_shipin> tb_shipinList = new ArrayList<tb_shipin>();
|
if (resultList.size() > 0) {
|
for (int i = 0; i < resultList.size(); i++) {
|
tb_shipin shipin = new tb_shipin();
|
Object[] obj = (Object[]) resultList.get(i);
|
shipin.setId((int) obj[0]);
|
shipin.setFencename(obj[1] == null ? "" : obj[1].toString());
|
shipin.setShebeiid(obj[2] == null ? "" : obj[2].toString());
|
shipin.setTongdaoid(obj[3] == null ? "" : obj[3].toString());
|
shipin.setAddtime(obj[4] == null ? "" : obj[4].toString());
|
shipin.setPosx(obj[5] == null ? "" : obj[5].toString());
|
shipin.setPosy(obj[6] == null ? "" : obj[6].toString());
|
shipin.setPosz(obj[7] == null ? "" : obj[7].toString());
|
shipin.setFloor(obj[8] == null ? "" : obj[8].toString());
|
shipin.setName(obj[9] == null ? "" : obj[9].toString());
|
tb_shipinList.add(shipin);
|
}
|
}
|
return tb_shipinList;
|
}
|
|
public List<tb_fence> searchFenceList(String input) throws ParseException {
|
|
String sql = null;
|
Query query = null;
|
sql = "SELECT id,floor,type,bumen,`name`,zuobiao,shape,`start`,`stop`,addtime,color FROM tb_fence WHERE type LIKE :type";
|
query = this.em.createNativeQuery(sql);
|
query.setParameter("type", "%" + input + "%");
|
List resultList = query.getResultList();
|
List<tb_fence> tb_fenceList = new ArrayList<tb_fence>();
|
if (resultList.size() > 0) {
|
for (int i = 0; i < resultList.size(); i++) {
|
Object[] obj = (Object[]) resultList.get(i);
|
tb_fence fence = new tb_fence();
|
fence.setFloor(obj[1] == null ? "" : obj[1].toString());
|
fence.setType(obj[2] == null ? "" : obj[2].toString());
|
fence.setBumen(obj[3] == null ? "" : obj[3].toString());
|
fence.setName(obj[4] == null ? "" : obj[4].toString());
|
fence.setZuobiao(obj[5] == null ? "" : obj[5].toString());
|
fence.setShape(obj[6] == null ? "" : obj[6].toString());
|
// fence.setStart(new Time(new
|
// SimpleDateFormat("hh:mm:ss").parse(obj[7] == null ? "" :
|
// obj[7].toString()).getTime()));
|
// fence.setStop(new Time(new
|
// SimpleDateFormat("hh:mm:ss").parse(obj[8] == null ? "" :
|
// obj[8].toString()).getTime()));
|
fence.setStart(obj[7] == null ? "" : obj[7].toString());
|
fence.setStop(obj[8] == null ? "" : obj[8].toString());
|
fence.setAddtime(obj[9] == null ? "" : obj[9].toString());
|
fence.setColor(obj[10] == null ? "" : obj[10].toString());
|
tb_fenceList.add(fence);
|
}
|
}
|
return tb_fenceList;
|
}
|
|
@Transactional
|
public void fenceList_modify(tb_fence fence) {
|
String sql = null;
|
Query query = null;
|
sql = "UPDATE tb_fence SET bumen=:bumen,name=:name,zuobiao=:zuobiao,start=:start,stop=:stop,baoliu1=:baoliu1 WHERE id=:id";
|
cs.tb_caozuo("tb_fence", 3);
|
query = this.em.createNativeQuery(sql);
|
query.setParameter("bumen", fence.getBumen());
|
query.setParameter("name", fence.getName());
|
query.setParameter("zuobiao", fence.getZuobiao());
|
query.setParameter("start", fence.getStart());
|
query.setParameter("stop", fence.getStop());
|
query.setParameter("id", fence.getId());
|
query.setParameter("baoliu1", fence.getBaoliu1());
|
query.executeUpdate();
|
}
|
|
@Transactional
|
public void fenceList_delete(String[] checkVal) {
|
String sql = null;
|
Query query = null;
|
for (int i = 0; i < checkVal.length; i++) {
|
int id = Integer.parseInt(checkVal[i]);
|
sql = "DELETE FROM tb_fence WHERE id = :id";
|
cs.tb_caozuo("tb_fence", 2);
|
query = this.em.createNativeQuery(sql);
|
query.setParameter("id", id);
|
query.executeUpdate();
|
}
|
}
|
|
@Transactional
|
public void fenceList_deleteAll() {
|
String sql = null;
|
Query query = null;
|
sql = "DELETE FROM tb_fence";
|
cs.tb_caozuo("tb_fence", 2);
|
query = this.em.createNativeQuery(sql);
|
query.executeUpdate();
|
}
|
|
public List<tb_xunjianset> getInspectionSettings() {
|
String sql = null;
|
Query query = null;
|
sql = "SELECT quyu,startime,stoptime,xunshu,tagid,needstoptime,cishu,addtime FROM tb_xunjianset";
|
query = this.em.createNativeQuery(sql);
|
List resultList = query.getResultList();
|
List<tb_xunjianset> tb_xunjiansetList = new ArrayList<tb_xunjianset>();
|
if (resultList.size() > 0) {
|
for (int i = 0; i < resultList.size(); i++) {
|
tb_xunjianset xunjianset = new tb_xunjianset();
|
Object[] obj = (Object[]) resultList.get(i);
|
xunjianset.setId(i + 1);
|
xunjianset.setQuyu(obj[0] == null ? "" : obj[0].toString());
|
xunjianset.setStartime(obj[1] == null ? "" : obj[1].toString());
|
xunjianset.setStoptime(obj[2] == null ? "" : obj[2].toString());
|
xunjianset.setXunshu(obj[3] == null ? "" : obj[3].toString());
|
xunjianset.setTagid(obj[4] == null ? "" : obj[4].toString());
|
xunjianset.setNeedstoptime(obj[5] == null ? "" : obj[5].toString());
|
xunjianset.setCishu(obj[6] == null ? "" : obj[6].toString());
|
xunjianset.setAddtime(obj[7] == null ? "" : obj[7].toString());
|
tb_xunjiansetList.add(xunjianset);
|
}
|
}
|
return tb_xunjiansetList;
|
}
|
|
@Transactional
|
public void inspectionSettings_modify(tb_xunjianset xunjianset) {
|
String sql = null;
|
Query query = null;
|
sql = "UPDATE tb_xunjianset SET xunshu=:xunshu,tagid=:tagid,cishu=:cishu,needstoptime=:needstoptime,stoptime=:stoptime WHERE quyu=:quyu";
|
cs.tb_caozuo("tb_xunjianset", 3);
|
query = this.em.createNativeQuery(sql);
|
query.setParameter("quyu", xunjianset.getQuyu());
|
query.setParameter("xunshu", xunjianset.getXunshu());
|
query.setParameter("tagid", xunjianset.getTagid());
|
query.setParameter("cishu", xunjianset.getCishu());
|
query.setParameter("needstoptime", xunjianset.getNeedstoptime());
|
query.setParameter("stoptime", xunjianset.getStoptime());
|
query.executeUpdate();
|
}
|
|
public List<tb_xunjianbaobiao> getInspectionRecord() {
|
String sql = null;
|
Query query = null;
|
sql = "SELECT id,name,tagid,quyu,bianhao,intime,outtime,alltime,succ,addtime FROM tb_xunjianbaobiao";
|
query = this.em.createNativeQuery(sql);
|
List resultList = query.getResultList();
|
List<tb_xunjianbaobiao> tb_xunjianbaobiaoList = new ArrayList<tb_xunjianbaobiao>();
|
if (resultList.size() > 0) {
|
for (int i = 0; i < resultList.size(); i++) {
|
tb_xunjianbaobiao xunjianbaobiao = new tb_xunjianbaobiao();
|
Object[] obj = (Object[]) resultList.get(i);
|
xunjianbaobiao.setId((int) obj[0]);
|
xunjianbaobiao.setName(obj[1] == null ? "" : obj[1].toString());
|
xunjianbaobiao.setTagid(obj[2] == null ? "" : obj[2].toString());
|
xunjianbaobiao.setQuyu(obj[3] == null ? "" : obj[3].toString());
|
xunjianbaobiao.setBianhao(obj[4] == null ? "" : obj[4].toString());
|
xunjianbaobiao.setIntime(obj[5] == null ? "" : obj[5].toString());
|
xunjianbaobiao.setOuttime(obj[6] == null ? "" : obj[6].toString());
|
xunjianbaobiao.setAlltime(obj[7] == null ? "" : obj[7].toString());
|
xunjianbaobiao.setSucc(obj[8] == null ? "" : obj[8].toString());
|
xunjianbaobiao.setAddtime(obj[9] == null ? "" : obj[9].toString());
|
tb_xunjianbaobiaoList.add(xunjianbaobiao);
|
}
|
}
|
return tb_xunjianbaobiaoList;
|
}
|
|
public List<tb_xunjianbaobiao> getInspectionRecord(int page,int perPage) {
|
String sql = null;
|
Query query = null;
|
sql = "SELECT id,name,tagid,quyu,bianhao,intime,outtime,alltime,succ,addtime FROM tb_xunjianbaobiao LIMIT :start,:end";
|
query = this.em.createNativeQuery(sql);
|
query.setParameter("start", (page - 1) * perPage);
|
query.setParameter("end", perPage);
|
List resultList = query.getResultList();
|
List<tb_xunjianbaobiao> tb_xunjianbaobiaoList = new ArrayList<tb_xunjianbaobiao>();
|
if (resultList.size() > 0) {
|
for (int i = 0; i < resultList.size(); i++) {
|
tb_xunjianbaobiao xunjianbaobiao = new tb_xunjianbaobiao();
|
Object[] obj = (Object[]) resultList.get(i);
|
xunjianbaobiao.setId((int) obj[0]);
|
xunjianbaobiao.setName(obj[1] == null ? "" : obj[1].toString());
|
xunjianbaobiao.setTagid(obj[2] == null ? "" : obj[2].toString());
|
xunjianbaobiao.setQuyu(obj[3] == null ? "" : obj[3].toString());
|
xunjianbaobiao.setBianhao(obj[4] == null ? "" : obj[4].toString());
|
xunjianbaobiao.setIntime(obj[5] == null ? "" : obj[5].toString());
|
xunjianbaobiao.setOuttime(obj[6] == null ? "" : obj[6].toString());
|
xunjianbaobiao.setAlltime(obj[7] == null ? "" : obj[7].toString());
|
xunjianbaobiao.setSucc(obj[8] == null ? "" : obj[8].toString());
|
xunjianbaobiao.setAddtime(obj[9] == null ? "" : obj[9].toString());
|
tb_xunjianbaobiaoList.add(xunjianbaobiao);
|
}
|
}
|
return tb_xunjianbaobiaoList;
|
}
|
|
public List<tb_xunjianbaobiao> searchInspectionRecord(String input) {
|
String sql = null;
|
Query query = null;
|
sql = "SELECT id,name,tagid,quyu,bianhao,intime,outtime,alltime,succ,addtime FROM tb_xunjianbaobiao WHERE tagid = :tag_id";
|
query = this.em.createNativeQuery(sql);
|
query.setParameter("tag_id", input);
|
List resultList = query.getResultList();
|
List<tb_xunjianbaobiao> tb_xunjianbaobiaoList = new ArrayList<tb_xunjianbaobiao>();
|
if (resultList.size() > 0) {
|
for (int i = 0; i < resultList.size(); i++) {
|
tb_xunjianbaobiao xunjianbaobiao = new tb_xunjianbaobiao();
|
Object[] obj = (Object[]) resultList.get(i);
|
xunjianbaobiao.setId((int) obj[0]);
|
xunjianbaobiao.setName(obj[1] == null ? "" : obj[1].toString());
|
xunjianbaobiao.setTagid(obj[2] == null ? "" : obj[2].toString());
|
xunjianbaobiao.setQuyu(obj[3] == null ? "" : obj[3].toString());
|
xunjianbaobiao.setBianhao(obj[4] == null ? "" : obj[4].toString());
|
xunjianbaobiao.setIntime(obj[5] == null ? "" : obj[5].toString());
|
xunjianbaobiao.setOuttime(obj[6] == null ? "" : obj[6].toString());
|
xunjianbaobiao.setAlltime(obj[7] == null ? "" : obj[7].toString());
|
xunjianbaobiao.setSucc(obj[8] == null ? "" : obj[8].toString());
|
xunjianbaobiao.setAddtime(obj[9] == null ? "" : obj[9].toString());
|
tb_xunjianbaobiaoList.add(xunjianbaobiao);
|
}
|
}
|
return tb_xunjianbaobiaoList;
|
}
|
|
public int getInspectionRecordCount() {
|
String sql = null;
|
Query query = null;
|
sql = "SELECT count(1) FROM tb_xunjianbaobiao";
|
query = this.em.createNativeQuery(sql);
|
return Integer.parseInt(query.getSingleResult().toString());
|
}
|
|
@Transactional
|
public void inspectionRecord_delete(String[] checkVal) {
|
String sql = null;
|
Query query = null;
|
for (int i = 0; i < checkVal.length; i++) {
|
int id = Integer.parseInt(checkVal[i]);
|
sql = "DELETE FROM tb_xunjianbaobiao WHERE id = :id";
|
cs.tb_caozuo("tb_xunjianbaobiao", 2);
|
query = this.em.createNativeQuery(sql);
|
query.setParameter("id", id);
|
query.executeUpdate();
|
}
|
}
|
|
@Transactional
|
public void inspectionRecord_deleteAll() {
|
String sql = null;
|
Query query = null;
|
sql = "DELETE FROM tb_xunjianbaobiao";
|
cs.tb_caozuo("tb_xunjianbaobiao", 2);
|
query = this.em.createNativeQuery(sql);
|
query.executeUpdate();
|
}
|
|
@Transactional
|
public List<tb_xunjianbaobiao> getXunjianbaobiao(String tagid,String quyu) {
|
String sql = null;
|
Query query = null;
|
sql = "SELECT bianhao,intime FROM tb_xunjianbaobiao WHERE tagid=:tagid AND quyu=:quyu";
|
query = this.em.createNativeQuery(sql);
|
query.setParameter("tagid", tagid);
|
query.setParameter("quyu", quyu);
|
List resultList = query.getResultList();
|
List<tb_xunjianbaobiao> tb_xunjianbaobaioList = new ArrayList<tb_xunjianbaobiao>();
|
if (resultList.size() > 0) {
|
for (int i = 0; i < resultList.size(); i++) {
|
tb_xunjianbaobiao xunjianbaobiao = new tb_xunjianbaobiao();
|
Object[] obj = (Object[]) resultList.get(i);
|
xunjianbaobiao.setBianhao(obj[0] == null ? "" : obj[0].toString());
|
xunjianbaobiao.setIntime(obj[1] == null ? "" : obj[1].toString());
|
tb_xunjianbaobaioList.add(xunjianbaobiao);
|
}
|
}
|
return tb_xunjianbaobaioList;
|
}
|
|
@Transactional
|
public void xunjianbaobiao_add(tb_xunjianbaobiao xunjianbaobiao) {
|
String sql = null;
|
Query query = null;
|
sql = "INSERT tb_xunjianbaobiao (name,tagid,quyu,bianhao,intime,addtime) VALUES (:name,:tagid,:quyu,:bianhao,now(),now())";
|
cs.tb_caozuo("tb_xunjianbaobiao", 1);
|
query = this.em.createNativeQuery(sql);
|
query.setParameter("name", xunjianbaobiao.getName());
|
query.setParameter("tagid", xunjianbaobiao.getTagid());
|
query.setParameter("quyu", xunjianbaobiao.getQuyu());
|
query.setParameter("bianhao", xunjianbaobiao.getBianhao());
|
query.executeUpdate();
|
}
|
|
public List<tb_fence> searchFenceListid(int input) throws ParseException {
|
int id = input;
|
String sql = null;
|
Query query = null;
|
sql = "SELECT id,floor,type,bumen,`name`,zuobiao,shape,`start`,`stop`,addtime,color FROM tb_fence WHERE id = :id";
|
query = this.em.createNativeQuery(sql);
|
query.setParameter("id", id);
|
List resultList = query.getResultList();
|
List<tb_fence> tb_fenceList = new ArrayList<tb_fence>();
|
if (resultList.size() > 0) {
|
for (int i = 0; i < resultList.size(); i++) {
|
Object[] obj = (Object[]) resultList.get(i);
|
tb_fence fence = new tb_fence();
|
fence.setFloor(obj[1] == null ? "" : obj[1].toString());
|
fence.setType(obj[2] == null ? "" : obj[2].toString());
|
fence.setBumen(obj[3] == null ? "" : obj[3].toString());
|
fence.setName(obj[4] == null ? "" : obj[4].toString());
|
fence.setZuobiao(obj[5] == null ? "" : obj[5].toString());
|
fence.setShape(obj[6] == null ? "" : obj[6].toString());
|
// fence.setStart(new Time(new
|
// SimpleDateFormat("hh:mm:ss").parse(obj[7] == null ? "" :
|
// obj[7].toString()).getTime()));
|
// fence.setStop(new Time(new
|
// SimpleDateFormat("hh:mm:ss").parse(obj[8] == null ? "" :
|
// obj[8].toString()).getTime()));
|
fence.setStart(obj[7] == null ? "" : obj[7].toString());
|
fence.setStop(obj[8] == null ? "" : obj[8].toString());
|
fence.setAddtime(obj[9] == null ? "" : obj[9].toString());
|
fence.setColor(obj[10] == null ? "" : obj[10].toString());
|
tb_fenceList.add(fence);
|
}
|
}
|
return tb_fenceList;
|
}
|
|
}
|