import sqlite from './sqlite.js' module.exports = { dbName: 'dianji_chat', dbPath: '_doc/dianji_chat.db', // 创建所有表 createAllTable() { // 创建船舶基本信息 this.createShipInfoTable() // 创建船舶计划 this.createVoyageScheduleDataPadRespDTO() // 创建进出口航次信息 this.createVoyageScheduleDataDetailRespDTOList() // 创建工班基本信息 this.createShipmentBasicShiftList() // 创建人员信息 this.createMessageRespList() // 创建工班信息 this.createWorkMessageRespList() // 创建工班信息详细 this.createWorkMessageRespInfoList() // // 创建工班信息翻仓 this.createRetallyMessageRespList() // // 创建工班信息其他 this.createInfoRespList() // 创建系解缆 this.creatAttachUnmoorRespList() // 创建供给 this.createShipmentShipSupplyRespList() // 创建指导员作业布置 this.createShipmentAdviserLayoutRespList() // 创建船舶装卸通知书 this.createShipmentLoadUnloadNoticeRespList() // 创建质量意见征询 this.createShipmentQualityConsultationRespList() // 创建质量意见征询评价表 this.createEvaluateTable() // 创建异常情况 this.createAbnormalConditionRespList() // 创建mafi this.createMafiListRespList() // 创建安全巡检 this.createSafetyInspectionRespList() // 创建安全巡检图片上传地址 this.createSafetyInspectionRespUrlList() // 创建作业查询 this.createShipmentShipLoadPlansRespList() // 创建作业查询明细 this.createWorkQueryDetails() // 创建作业查询车架号明细 this.createVinCodeDetails() // 创建下拉数据 this.createShipOption() // 创建单证签名表 this.createWorkSignTable() }, // 创建船舶基本信息 shipInfoTable createShipInfoTable() { let sql = 'CREATE TABLE if not exists shipInfoTable ("webId" text NOT NULL,"vtpId" text,"agencyCname" text,"ctyCnname" text,"ctyCode" text,"dataVersion" text,"shipCname" text,"shipTypeName" text,"spmBoardCentrele" text,"spmBoardCentrerg" text,"spmBoardFrontle" text,"spmBoardFrontrg" text,"spmBoardLaterle" text,"spmBoardLaterrg" text,"spmCab" text,"spmCabinht" text,"spmCountrycd" text,"spmEdicd" text,"spmId" text,"spmLightWeight" text,"spmMadeTime" text,"spmMintide" text,"spmMmsi" text,"spmNationality" text,"spmPilot" text,"spmPilotName" text,"spmRemark" text,"spmShipSign" text,"spmShipType" text,"spmTotalCargo" text,"spmTrade" text,"spmTradeName" text,"tenantId" text,"termcd" text,"valid" text,"vslAudio" text,"vslBaynum" text,"vslBkbaynum" text,"vslBkendbay" text,"vslBkstartbay" text,"vslBksternnum" text,"vslBreadth" text,"vslCallid" text,"vslCallsign" text,"vslCd" text,"vslCnname" text,"vslCstAgency" text,"vslCstShippingline" text,"vslCtyCountrycd" text,"vslDeckmaxrows" text,"vslDeckmaxtiers" text,"vslDepth" text,"vslDerrickamount" text,"vslDraftload" text,"vslDraftunload" text,"vslEndlength" text,"vslEnname" text,"vslGton" text,"vslHatchamount" text,"vslHatchcoveramount" text,"vslHatchmaxrows" text,"vslHatchmaxtiers" text,"vslImono" text,"vslLcg" text,"vslLoa" text,"vslLoaddisargereq" text,"vslMadedt" text,"vslNetton" text,"vslOrigin" text,"vslPilotage" text,"vslRfsocket" text,"vslSailspeed" text,"vslSpoptp" text,"vslStdId" text,"vslStopsign" text,"vslStowagereq" text,"vslSummaryloading" text,"vslTcg" text,"vslTotallocation" text,"vslUncode" text,"vslVcg" text,"vslVtpcode" text,"webDate" text,"actualBerthingTime" text, PRIMARY KEY("webId"));' this.executeSql(sql) }, // 创建船舶计划信息 voyageScheduleDataPadRespDTO createVoyageScheduleDataPadRespDTO() { let sql = 'CREATE TABLE if not exists voyageScheduleDataPadRespDTO ("webId" text NOT NULL,"vtpId" text,"berthStatus" text,"confirmTime" text,"pamId" text,"planAnchoringTime" text,"planArrivePortTime" text,"planBerthage" text,"planBerthageName" text,"planBerthingTime" text,"planDeparturePortTime" text,"shipmentStatus" text,"spmId" text,"spmName" text, PRIMARY KEY("webId"));' this.executeSql(sql) }, // 创建航次信息 voyageScheduleDataDetailRespDTOList createVoyageScheduleDataDetailRespDTOList() { let sql = 'CREATE TABLE if not exists voyageScheduleDataDetailRespDTOList ("webId" text NOT NULL,"vtpId" text,"contactId" text,"importExportFlag" text,"importExportFlagName" text,"lcoId" text,"lcoName" text,"pamId" text,"planAmount" text,"planCarAmount" text,"planFinishTime" text,"planNum" text,"planOtherAmount" text,"planParts" text,"planRetallyAmount" text,"planStartTime" text,"planTunnage" text,"planVolume" text,"planWeight" text,"shipAgentId" text,"shipAgentName" text,"shipComId" text,"shipComName" text,"spmId" text,"spmName" text,"teamNum" text,"tradeType" text,"tradeTypeName" text,"vgdGoodName" text,"votId" text,"vvyId" text,"vvyName" text,PRIMARY KEY("webId"));' this.executeSql(sql) }, // 创建工班基础信息表 shipmentBasicShiftList createShipmentBasicShiftList() { let sql = 'CREATE TABLE if not exists shipmentBasicShiftList ("webId" text NOT NULL,"vtpId" text,"beginTime" text,"endTime" text,"pwcCode" text,"pwcType" text,"pwcTypeDesc" text, PRIMARY KEY("webId"));' this.executeSql(sql) }, // 创建人员信息 messageRespList createMessageRespList() { let sql = 'CREATE TABLE if not exists messageRespList ("pmeId" text NOT NULL,"vtpId" text,"bthId" text,"bthIdName" text,"jobStartTime" text,"jobEndTime" text,"shipPerson" text,"vvyId" text,"vvyName" text,"weatherType" text,"weatherTypeDesc" text,"workSuite" text,"importExportFlagName" text,"status" text,"webStatus" text,"webDate" text, PRIMARY KEY("pmeId"));' this.executeSql(sql) }, // 创建工班信息 workMessageRespList createWorkMessageRespList() { let sql = 'CREATE TABLE if not exists workMessageRespList ("webId" text NOT NULL,"vtpId" text,"contactId" text,"aId" text,"vvyId" text,"vvyName" text,"importExportFlagName" text,"loadType" text,"loadTypeName" text,"pwcType" text,"pwcTypeName" text,"workStartTime" text,"workEndTime" text,"status" text,"webStatus" text,"webDate" text, PRIMARY KEY("webId"));' this.executeSql(sql) }, // 创建工班信息详细 workMessageRespInfoList createWorkMessageRespInfoList() { let sql = 'CREATE TABLE if not exists workMessageRespInfoList ("webId" text NOT NULL,"vtpId" text,"contactId" text,"carType" text,"carTypeName" text,"goodsNumber" text,"loadingType" text,"loadingTypeName" text,"remark" text,"mnfBl" text,"weight" text,"volume" text,"lengthType" text,"pmtType" text,"webStatus" text,"webDate" text, PRIMARY KEY("webId"));' this.executeSql(sql) }, // 创建工班信息翻仓 retallyMessageRespList createRetallyMessageRespList() { let sql = 'CREATE TABLE if not exists retallyMessageRespList ("webId" text NOT NULL,"vtpId" text,"contactId" text,"aId" text,"reyVvyId" text,"vvyName" text,"retallyType" text,"retallyTypeName" text,"retallyOrigin" text,"retallyTerminus" text,"retallyStartTime" text,"retallyEndTime" text,"carType" text,"carTypeName" text,"goodsNumber" text,"goodsVolume" text,"goodsWeight" text,"mafiGroupNum" text,"mafiSize" text,"editStatus" text,"webStatus" text,"webDate" text, PRIMARY KEY("webId"));' this.executeSql(sql) }, // 创建工班信息其他 infoRespList createInfoRespList() { let sql = 'CREATE TABLE if not exists infoRespList ("webId" text NOT NULL,"vtpId" text,"contactId" text,"aId" text,"vvyId" text,"vvyName" text,"tecNum" text,"startTm" text,"endTm" text,"weight" text,"volume" text,"genNum" text,"startTmPt" text,"endTmPt" text,"weightPt" text,"volumePt" text,"auxRemark" text,"waitRemark" text,"workRemark" text,"webStatus" text,"webDate" text, PRIMARY KEY("webId"));' this.executeSql(sql) }, // 创建系解缆 attachUnmoorRespList creatAttachUnmoorRespList() { let sql = 'CREATE TABLE if not exists attachUnmoorRespList ("sauId" text NOT NULL,"vtpId" text,"shipDeadWeight" text,"vvyId" text,"vvyName" text,"importExportFlagName" text,"bthId" text,"bthIdName" text,"attachTime" text,"unmoorTime" text,"shiftingBerthTime" text,"noProductBerthStTime" text,"noProductBerthEdTime" text,"status" text,"webStatus" text,"webDate" text, PRIMARY KEY("sauId"));' this.executeSql(sql) }, // 创建供给 shipmentShipSupplyRespList createShipmentShipSupplyRespList() { let sql = 'CREATE TABLE if not exists shipmentShipSupplyRespList ("sssId" text NOT NULL,"vtpId" text,"vvyId" text,"vvyName" text,"importExportFlagName" text,"stopBerthage" text,"stopBerthageName" text,"supplyType" text,"supplyTypeNm" text,"supplyAmount" text,"supplyDate" text,"status" text,"webStatus" text,"webDate" text, PRIMARY KEY("sssId"));' this.executeSql(sql) }, // 创建指导员作业布置 shipmentAdviserLayoutRespList createShipmentAdviserLayoutRespList() { let sql = 'CREATE TABLE if not exists shipmentAdviserLayoutRespList ("altId" text NOT NULL,"vtpId" text,"vvyId" text,"vvyName" text,"importExportFlagName" text,"bthId" text,"bthIdName" text,"pwcType" text,"pwcTypeName" text,"personNumber" text,"loaderType" text,"loaderTypeName" text,"vehicleSize" text,"sparePart" text,"workTime" text,"startTime" text,"endTime" text,"webStatus" text,"webDate" text, PRIMARY KEY("altId"));' this.executeSql(sql) }, // 创建船舶装卸通知书 shipmentLoadUnloadNoticeRespList createShipmentLoadUnloadNoticeRespList() { let sql = 'CREATE TABLE if not exists shipmentLoadUnloadNoticeRespList ("sluId" text NOT NULL,"vtpId" text,"vvyId" text,"vvyName" text,"importExportFlagName" text,"workDate" text,"webStatus" text,"webDate" text, PRIMARY KEY("sluId"));' this.executeSql(sql) }, // 创建质量意见征询 shipmentQualityConsultationRespList createShipmentQualityConsultationRespList() { let sql = 'CREATE TABLE if not exists shipmentQualityConsultationRespList ("vqcId" text NOT NULL,"vtpId" text,"vvyId" text,"vvyName" text,"importExportFlagName" text,"bthId" text,"bthIdName" text,"handlingType" text,"handlingName" text,"vehiclesNumber" text,"spareNumber" text,"operationDate" text,"webStatus" text,"webDate" text,"vehiclesNumberDe" text,"spareNumberDe" text, PRIMARY KEY("vqcId"));' this.executeSql(sql) }, // 创建质量意见征询评价表 evaluateTable createEvaluateTable() { let sql = 'CREATE TABLE if not exists evaluateTable ("webId" text NOT NULL,"vtpId" text,"signId" text,"evaluate" text,"evaluate2" text,"evaluate3" text,"evaluate4" text,"remake" text,"webStatus" text,"webDate" text, PRIMARY KEY("webId"));' this.executeSql(sql) }, // 创建异常情况 abnormalConditionRespList createAbnormalConditionRespList() { let sql = 'CREATE TABLE if not exists abnormalConditionRespList ("vacId" text NOT NULL,"vtpId" text,"vvyId" text,"vvyName" text,"importExportFlagName" text,"type" text,"remark" text,"operationDate" text,"webStatus" text,"webDate" text, PRIMARY KEY("vacId"));' this.executeSql(sql) }, // 创建mafi mafiListRespList createMafiListRespList() { let sql = 'CREATE TABLE if not exists mafiListRespList ("smlId" text NOT NULL,"vtpId" text,"vvyId" text,"vvyName" text,"importExportFlagName" text,"loaderTypeId" text,"loadType" text,"typeId" text,"type" text,"size" text,"mafiBarcode" text,"workDate" text,"status" text,"webStatus" text,"webDate" text, PRIMARY KEY("smlId"));' this.executeSql(sql) }, // 创建安全巡检 safetyInspectionRespList createSafetyInspectionRespList() { let sql = 'CREATE TABLE if not exists safetyInspectionRespList ("webId" text NOT NULL,"vtpId" text,"vvyId" text,"vvyName" text,"type" text,"remark" text,"tradeTypeName" text,"importExportFlagName" text,"spmName" text,"webStatus" text,"webDate" text, PRIMARY KEY("webId"));' this.executeSql(sql) }, // 创建安全巡检图片上传地址 safetyInspectionRespUrlList createSafetyInspectionRespUrlList() { let sql = 'CREATE TABLE if not exists safetyInspectionRespUrlList ("webId" text NOT NULL,"vtpId" text,"contactId" text,"url" text,"webStatus" text,"webDate" text, PRIMARY KEY("webId"));' this.executeSql(sql) }, // 创建作业查询 shipmentShipLoadPlansRespList createShipmentShipLoadPlansRespList() { let sql = 'CREATE TABLE if not exists shipmentShipLoadPlansRespList ("webId" text NOT NULL,"vtpId" text,"agentId" text,"agentName" text,"amount" text,"brdId" text,"brdName" text,"bvdId" text,"bvdName" text,"bvmId" text,"bvmName" text,"carHeight" text,"carLength" text,"carWidth" text,"consignee" text,"customsDeclareNo" text,"customsDeclareStatus" text,"ieFg" text,"ieFgNm" text,"mnfBl" text,"model" text,"potId" text,"potName" text,"sourceType" text,"sourceTypeNm" text,"spmId" text,"telephone" text,"ticketGtpks" text,"ticketVolume" text,"ticketWeight" text,"tradeType" text,"tradeTypeNm" text,"volume" text,"vslCnname" text,"vvyId" text,"vvyName" text,"weight" text,"yardPos" text,"webStatus" text,"webDate" text, PRIMARY KEY("webId"));' this.executeSql(sql) }, // 创建作业查询明细 workQueryDetails createWorkQueryDetails() { let sql = 'CREATE TABLE if not exists workQueryDetails ("webId" text NOT NULL,"vtpId" text,"contactId" text,"agentId" text,"agentName" text,"amount" text,"brdId" text,"brdName" text,"bvdId" text,"bvdName" text,"bvmId" text,"bvmName" text,"carHeight" text,"carLength" text,"carWidth" text,"consignee" text,"customsDeclareNo" text,"customsDeclareStatus" text,"ieFg" text,"ieFgNm" text,"mnfBl" text,"model" text,"potId" text,"potName" text,"sourceType" text,"sourceTypeNm" text,"spmId" text,"telephone" text,"ticketGtpks" text,"ticketVolume" text,"ticketWeight" text,"tradeType" text,"tradeTypeNm" text,"volume" text,"vslCnname" text,"vvyId" text,"vvyName" text,"weight" text,"yardPos" text,"webStatus" text,"webDate" text, PRIMARY KEY("webId"));' this.executeSql(sql) }, // 创建作业查询车架号明细 createVinCodeDetails() { let sql = 'CREATE TABLE if not exists vinCodeDetails ("webId" text NOT NULL,"vtpId" text,"contactId" text,"godId" text,"storeArea" text,"storeLine" text,"storeSeat" text,"vinCode" text,"yacId" text,"yardId" text,"yardName" text,"yardPos" text,"webStatus" text,"webDate" text, PRIMARY KEY("webId"));' this.executeSql(sql) }, // 创建下拉数据 shipOption createShipOption() { let sql = 'CREATE TABLE if not exists shipOption ("dictionariesName" text,"ptrCode" text,"ptrDesc" text,"ptrEnDesc" text,"webId" text NOT NULL,"vtpId" text,"webStatus" text,"webDate" text, PRIMARY KEY("webId"));' this.executeSql(sql) }, // 创建单证签名表 workSignTable createWorkSignTable() { let sql = 'CREATE TABLE if not exists workSignTable ("webId" text,"vtpId" text,"bizId" text,"signFile" text,"bizType" text,"sort" text,"vvyId" text,"webDate" text, PRIMARY KEY("webId"));' this.executeSql(sql) }, executeSql(sql) { sqlite.executeSqlCeshi(sql).then((value) => { // 在resolve时执行的回调函数 console.log(value); }).catch((error) => { // 在reject时执行的回调函数 console.error(error); }); }, }