Commit a40e906b authored by wanghao's avatar wanghao

1 液化石油气监管-充装记录导入-功能开发, 涉及到实体类解析报错问题处理,及大数据量查询 气瓶档案 数据优化

 2 大屏端 场站 和 调压箱 部分点位展示 不准确问题修复。
parent 65ae33b4
package com.zehong.web.controller.lpgRegulation; package com.zehong.web.controller.lpgRegulation;
import java.util.List; import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
...@@ -123,8 +124,8 @@ public class TLpgAirChargeFilesController extends BaseController ...@@ -123,8 +124,8 @@ public class TLpgAirChargeFilesController extends BaseController
ExcelUtil<TLpgAirChargeFiles> util = new ExcelUtil<>(TLpgAirChargeFiles.class); ExcelUtil<TLpgAirChargeFiles> util = new ExcelUtil<>(TLpgAirChargeFiles.class);
List<TLpgAirChargeFiles> XmbhList = util.importExcel(file.getInputStream()); List<TLpgAirChargeFiles> XmbhList = util.importExcel(file.getInputStream());
tLpgAirChargeFilesService.importLpgAirChargeFileInfo(XmbhList, updateSupport, response); Map<String, Object> map = tLpgAirChargeFilesService.importLpgAirChargeFileInfo(XmbhList, updateSupport, response);
return AjaxResult.success(); return AjaxResult.success(map);
} }
} }
...@@ -232,19 +232,19 @@ public class TimeTasksController { ...@@ -232,19 +232,19 @@ public class TimeTasksController {
for(int i = startNum; i < data.size(); i++){ for(int i = startNum; i < data.size(); i++){
JSONObject jsonObject = data.getJSONObject(i); JSONObject jsonObject = data.getJSONObject(i);
TLpgAirChargeFiles tLpgAirChargeFile = new TLpgAirChargeFiles(); TLpgAirChargeFiles tLpgAirChargeFile = new TLpgAirChargeFiles();
tLpgAirChargeFile.setfGzId(jsonObject.getLong("gzId")); tLpgAirChargeFile.setGzId(jsonObject.getLong("gzId"));
tLpgAirChargeFile.setfStationName(jsonObject.getString("stationName")); tLpgAirChargeFile.setStationName(jsonObject.getString("stationName"));
tLpgAirChargeFile.setfBarCode(jsonObject.getString("barCode")); tLpgAirChargeFile.setBarCode(jsonObject.getString("barCode"));
tLpgAirChargeFile.setfVaseCode(jsonObject.getString("vaseCode")); tLpgAirChargeFile.setVaseCode(jsonObject.getString("vaseCode"));
tLpgAirChargeFile.setfScaleNum(jsonObject.getString("scaleNum")); tLpgAirChargeFile.setScaleNum(jsonObject.getString("scaleNum"));
tLpgAirChargeFile.setfFillStatrTime(jsonObject.getString("fillStatrTime")); tLpgAirChargeFile.setFillStatrTime(jsonObject.getString("fillStatrTime"));
tLpgAirChargeFile.setfFillEndTime(jsonObject.getString("fillEndTime")); tLpgAirChargeFile.setFillEndTime(jsonObject.getString("fillEndTime"));
tLpgAirChargeFile.setfSetWeight(jsonObject.getString("setWeight")); tLpgAirChargeFile.setSetWeight(jsonObject.getString("setWeight"));
tLpgAirChargeFile.setfWtNet(jsonObject.getString("wtNet")); tLpgAirChargeFile.setWtNet(jsonObject.getString("wtNet"));
tLpgAirChargeFile.setfSetBottleWeight(jsonObject.getString("setBottleWeight")); tLpgAirChargeFile.setSetBottleWeight(jsonObject.getString("setBottleWeight"));
tLpgAirChargeFile.setfBottleWeight(jsonObject.getString("bottleWeight")); tLpgAirChargeFile.setBottleWeight(jsonObject.getString("bottleWeight"));
tLpgAirChargeFile.setfWtGross(jsonObject.getString("wtGross")); tLpgAirChargeFile.setWtGross(jsonObject.getString("wtGross"));
tLpgAirChargeFile.setfOprateName(jsonObject.getString("oprateName")); tLpgAirChargeFile.setOprateName(jsonObject.getString("oprateName"));
tLpgAirChargeFilesService.insertTLpgAirChargeFiles(tLpgAirChargeFile); tLpgAirChargeFilesService.insertTLpgAirChargeFiles(tLpgAirChargeFile);
} }
if(data.size()==100){ if(data.size()==100){
......
...@@ -16,189 +16,189 @@ public class TLpgAirChargeFiles extends BaseEntity ...@@ -16,189 +16,189 @@ public class TLpgAirChargeFiles extends BaseEntity
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** id */ /** id */
private Long fGasAirChargeId; private Long gasAirChargeId;
/** 充装记录编号 */ /** 充装记录编号 */
@Excel(name = "充装记录编号") @Excel(name = "充装记录编号")
private Long fGzId; private Long gzId;
/** 充装单位 */ /** 充装单位 */
@Excel(name = "充装单位") @Excel(name = "充装单位")
private String fStationName; private String stationName;
/** 气瓶条码 */ /** 气瓶条码 */
@Excel(name = "气瓶条码") @Excel(name = "气瓶条码")
private String fBarCode; private String barCode;
/** 钢印号 */ /** 钢印号 */
@Excel(name = "钢印号") @Excel(name = "钢印号")
private String fVaseCode; private String vaseCode;
/** 秤号 */ /** 秤号 */
@Excel(name = "秤号") @Excel(name = "秤号")
private String fScaleNum; private String scaleNum;
/** 充装开始时间 */ /** 充装开始时间 */
@Excel(name = "充装开始时间") @Excel(name = "充装开始时间")
private String fFillStatrTime; private String fillStatrTime;
/** 充装结束时间 */ /** 充装结束时间 */
@Excel(name = "充装结束时间") @Excel(name = "充装结束时间")
private String fFillEndTime; private String fillEndTime;
/** 设定净重 */ /** 设定净重 */
@Excel(name = "设定净重") @Excel(name = "设定净重")
private String fSetWeight; private String setWeight;
/** 实际净重 */ /** 实际净重 */
@Excel(name = "实际净重") @Excel(name = "实际净重")
private String fWtNet; private String wtNet;
/** 设定瓶重 */ /** 设定瓶重 */
@Excel(name = "设定瓶重") @Excel(name = "设定瓶重")
private String fSetBottleWeight; private String setBottleWeight;
/** 实际瓶重 */ /** 实际瓶重 */
@Excel(name = "实际瓶重") @Excel(name = "实际瓶重")
private String fBottleWeight; private String bottleWeight;
/** 实际总重 */ /** 实际总重 */
@Excel(name = "实际总重") @Excel(name = "实际总重")
private String fWtGross; private String wtGross;
/** 充装工 */ /** 充装工 */
@Excel(name = "充装工") @Excel(name = "充装工")
private String fOprateName; private String oprateName;
public Long getfGasAirChargeId() { public Long getGasAirChargeId() {
return fGasAirChargeId; return gasAirChargeId;
} }
public void setfGasAirChargeId(Long fGasAirChargeId) { public void setGasAirChargeId(Long gasAirChargeId) {
this.fGasAirChargeId = fGasAirChargeId; this.gasAirChargeId = gasAirChargeId;
} }
public Long getfGzId() { public Long getGzId() {
return fGzId; return gzId;
} }
public void setfGzId(Long fGzId) { public void setGzId(Long gzId) {
this.fGzId = fGzId; this.gzId = gzId;
} }
public String getfStationName() { public String getStationName() {
return fStationName; return stationName;
} }
public void setfStationName(String fStationName) { public void setStationName(String stationName) {
this.fStationName = fStationName; this.stationName = stationName;
} }
public String getfBarCode() { public String getBarCode() {
return fBarCode; return barCode;
} }
public void setfBarCode(String fBarCode) { public void setBarCode(String barCode) {
this.fBarCode = fBarCode; this.barCode = barCode;
} }
public String getfVaseCode() { public String getVaseCode() {
return fVaseCode; return vaseCode;
} }
public void setfVaseCode(String fVaseCode) { public void setVaseCode(String vaseCode) {
this.fVaseCode = fVaseCode; this.vaseCode = vaseCode;
} }
public String getfScaleNum() { public String getScaleNum() {
return fScaleNum; return scaleNum;
} }
public void setfScaleNum(String fScaleNum) { public void setScaleNum(String scaleNum) {
this.fScaleNum = fScaleNum; this.scaleNum = scaleNum;
} }
public String getfFillStatrTime() { public String getFillStatrTime() {
return fFillStatrTime; return fillStatrTime;
} }
public void setfFillStatrTime(String fFillStatrTime) { public void setFillStatrTime(String fillStatrTime) {
this.fFillStatrTime = fFillStatrTime; this.fillStatrTime = fillStatrTime;
} }
public String getfFillEndTime() { public String getFillEndTime() {
return fFillEndTime; return fillEndTime;
} }
public void setfFillEndTime(String fFillEndTime) { public void setFillEndTime(String fillEndTime) {
this.fFillEndTime = fFillEndTime; this.fillEndTime = fillEndTime;
} }
public String getfSetWeight() { public String getSetWeight() {
return fSetWeight; return setWeight;
} }
public void setfSetWeight(String fSetWeight) { public void setSetWeight(String setWeight) {
this.fSetWeight = fSetWeight; this.setWeight = setWeight;
} }
public String getfWtNet() { public String getWtNet() {
return fWtNet; return wtNet;
} }
public void setfWtNet(String fWtNet) { public void setWtNet(String wtNet) {
this.fWtNet = fWtNet; this.wtNet = wtNet;
} }
public String getfSetBottleWeight() { public String getSetBottleWeight() {
return fSetBottleWeight; return setBottleWeight;
} }
public void setfSetBottleWeight(String fSetBottleWeight) { public void setSetBottleWeight(String setBottleWeight) {
this.fSetBottleWeight = fSetBottleWeight; this.setBottleWeight = setBottleWeight;
} }
public String getfBottleWeight() { public String getBottleWeight() {
return fBottleWeight; return bottleWeight;
} }
public void setfBottleWeight(String fBottleWeight) { public void setBottleWeight(String bottleWeight) {
this.fBottleWeight = fBottleWeight; this.bottleWeight = bottleWeight;
} }
public String getfWtGross() { public String getWtGross() {
return fWtGross; return wtGross;
} }
public void setfWtGross(String fWtGross) { public void setWtGross(String wtGross) {
this.fWtGross = fWtGross; this.wtGross = wtGross;
} }
public String getfOprateName() { public String getOprateName() {
return fOprateName; return oprateName;
} }
public void setfOprateName(String fOprateName) { public void setOprateName(String oprateName) {
this.fOprateName = fOprateName; this.oprateName = oprateName;
} }
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return "TLpgAirChargeFiles{" +
.append("fGasAirChargeId", getfGasAirChargeId()) "gasAirChargeId=" + gasAirChargeId +
.append("fGzId", getfGzId()) ", gzId=" + gzId +
.append("fStationName", getfStationName()) ", stationName='" + stationName + '\'' +
.append("fBarCode", getfBarCode()) ", barCode='" + barCode + '\'' +
.append("fVaseCode", getfVaseCode()) ", vaseCode='" + vaseCode + '\'' +
.append("fScaleNum", getfScaleNum()) ", scaleNum='" + scaleNum + '\'' +
.append("fFillStatrTime", getfFillStatrTime()) ", fillStatrTime='" + fillStatrTime + '\'' +
.append("fFillEndTime", getfFillEndTime()) ", fillEndTime='" + fillEndTime + '\'' +
.append("fSetWeight", getfSetWeight()) ", setWeight='" + setWeight + '\'' +
.append("fWtNet", getfWtNet()) ", wtNet='" + wtNet + '\'' +
.append("fSetBottleWeight", getfSetBottleWeight()) ", setBottleWeight='" + setBottleWeight + '\'' +
.append("fBottleWeight", getfBottleWeight()) ", bottleWeight='" + bottleWeight + '\'' +
.append("fWtGross", getfWtGross()) ", wtGross='" + wtGross + '\'' +
.append("fOprateName", getfOprateName()) ", oprateName='" + oprateName + '\'' +
.toString(); '}';
} }
} }
...@@ -2,6 +2,7 @@ package com.zehong.system.mapper; ...@@ -2,6 +2,7 @@ package com.zehong.system.mapper;
import java.util.List; import java.util.List;
import com.zehong.system.domain.TLpgAirChargeFiles; import com.zehong.system.domain.TLpgAirChargeFiles;
import org.apache.ibatis.annotations.Param;
/** /**
* 液化石油气-充装记录Mapper接口 * 液化石油气-充装记录Mapper接口
...@@ -14,10 +15,10 @@ public interface TLpgAirChargeFilesMapper ...@@ -14,10 +15,10 @@ public interface TLpgAirChargeFilesMapper
/** /**
* 查询液化石油气-充装记录 * 查询液化石油气-充装记录
* *
* @param fGasAirChargeId 液化石油气-充装记录ID * @param gasAirChargeId 液化石油气-充装记录ID
* @return 液化石油气-充装记录 * @return 液化石油气-充装记录
*/ */
public TLpgAirChargeFiles selectTLpgAirChargeFilesById(Long fGasAirChargeId); public TLpgAirChargeFiles selectTLpgAirChargeFilesById(Long gasAirChargeId);
public Integer selectTLpgAirChargeFilesTotal(); public Integer selectTLpgAirChargeFilesTotal();
...@@ -44,6 +45,13 @@ public interface TLpgAirChargeFilesMapper ...@@ -44,6 +45,13 @@ public interface TLpgAirChargeFilesMapper
*/ */
public int insertTLpgAirChargeFiles(TLpgAirChargeFiles tLpgAirChargeFiles); public int insertTLpgAirChargeFiles(TLpgAirChargeFiles tLpgAirChargeFiles);
/**
* 批量插入
* @param list l
* @return r
*/
public int insertBatch(@Param("list") List<TLpgAirChargeFiles> list);
/** /**
* 修改液化石油气-充装记录 * 修改液化石油气-充装记录
* *
...@@ -55,10 +63,10 @@ public interface TLpgAirChargeFilesMapper ...@@ -55,10 +63,10 @@ public interface TLpgAirChargeFilesMapper
/** /**
* 删除液化石油气-充装记录 * 删除液化石油气-充装记录
* *
* @param fGasAirChargeId 液化石油气-充装记录ID * @param gasAirChargeId 液化石油气-充装记录ID
* @return 结果 * @return 结果
*/ */
public int deleteTLpgAirChargeFilesById(Long fGasAirChargeId); public int deleteTLpgAirChargeFilesById(Long gasAirChargeId);
/** /**
* 批量删除液化石油气-充装记录 * 批量删除液化石油气-充装记录
......
...@@ -2,6 +2,7 @@ package com.zehong.system.mapper; ...@@ -2,6 +2,7 @@ package com.zehong.system.mapper;
import java.util.List; import java.util.List;
import com.zehong.system.domain.TLpgGasBottleFiles; import com.zehong.system.domain.TLpgGasBottleFiles;
import org.apache.ibatis.annotations.Param;
/** /**
* 液化石油气-气瓶档案Mapper接口 * 液化石油气-气瓶档案Mapper接口
...@@ -27,6 +28,13 @@ public interface TLpgGasBottleFilesMapper ...@@ -27,6 +28,13 @@ public interface TLpgGasBottleFilesMapper
*/ */
public List<TLpgGasBottleFiles> selectTLpgGasBottleFilesList(TLpgGasBottleFiles tLpgGasBottleFiles); public List<TLpgGasBottleFiles> selectTLpgGasBottleFilesList(TLpgGasBottleFiles tLpgGasBottleFiles);
/**
* 根据 气瓶条码 集合查询数据
* @param codeList codelist
* @return r
*/
public List<TLpgGasBottleFiles> queryAllByFQRcodeList(@Param("codeList") List<String> codeList);
/** /**
* 新增液化石油气-气瓶档案 * 新增液化石油气-气瓶档案
* *
......
package com.zehong.system.service.impl; package com.zehong.system.service.impl;
import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors;
import org.springframework.beans.factory.annotation.Autowired; import com.zehong.common.utils.StringUtils;
import com.zehong.system.domain.TLpgGasBottleFiles;
import com.zehong.system.mapper.TLpgGasBottleFilesMapper;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TLpgAirChargeFilesMapper; import com.zehong.system.mapper.TLpgAirChargeFilesMapper;
import com.zehong.system.domain.TLpgAirChargeFiles; import com.zehong.system.domain.TLpgAirChargeFiles;
import com.zehong.system.service.ITLpgAirChargeFilesService; import com.zehong.system.service.ITLpgAirChargeFilesService;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
/** /**
...@@ -21,9 +26,12 @@ import javax.servlet.http.HttpServletResponse; ...@@ -21,9 +26,12 @@ import javax.servlet.http.HttpServletResponse;
@Service @Service
public class TLpgAirChargeFilesServiceImpl implements ITLpgAirChargeFilesService public class TLpgAirChargeFilesServiceImpl implements ITLpgAirChargeFilesService
{ {
@Autowired @Resource
private TLpgAirChargeFilesMapper tLpgAirChargeFilesMapper; private TLpgAirChargeFilesMapper tLpgAirChargeFilesMapper;
@Resource
private TLpgGasBottleFilesMapper tLpgGasBottleFilesMapper;
/** /**
* 查询液化石油气-充装记录 * 查询液化石油气-充装记录
* *
...@@ -124,10 +132,53 @@ public class TLpgAirChargeFilesServiceImpl implements ITLpgAirChargeFilesService ...@@ -124,10 +132,53 @@ public class TLpgAirChargeFilesServiceImpl implements ITLpgAirChargeFilesService
Map<String ,Object> map = new HashMap<>(); Map<String ,Object> map = new HashMap<>();
for (TLpgAirChargeFiles tLpgAirChargeFiles : xmbhList) { int errorNum = 0;
System.out.println(tLpgAirChargeFiles.getfBarCode()); int successNum = 0;
}
List<TLpgAirChargeFiles> successList = new ArrayList<>();
if (xmbhList != null && xmbhList.size() > 0) {
if (xmbhList.size() > 500) {
map.put("errorMsg","导入数据不允许超过500条");
return map;
}
List<TLpgAirChargeFiles> noBarCodeList = xmbhList.stream().filter(item -> StringUtils.isBlank(item.getBarCode())).collect(Collectors.toList());
List<TLpgAirChargeFiles> havaBarCodeList = xmbhList.stream().filter(item -> StringUtils.isNotBlank(item.getBarCode())).collect(Collectors.toList());
// 气瓶条码集合
List<String> collect = havaBarCodeList.stream().map(item -> item.getBarCode()).collect(Collectors.toList());
// 这是 上面气瓶条码 有的气瓶数据
List<TLpgGasBottleFiles> tLpgGasBottleFiles2 = tLpgGasBottleFilesMapper.queryAllByFQRcodeList(collect);
// 按照 气瓶条码 分组
Map<String, List<TLpgGasBottleFiles>> collect1 = tLpgGasBottleFiles2.stream().collect(Collectors.groupingBy(TLpgGasBottleFiles::getfQRcode));
errorNum += noBarCodeList.size();
for (TLpgAirChargeFiles tLpgAirChargeFiles : havaBarCodeList) {
List<TLpgGasBottleFiles> tLpgGasBottleFiles = collect1.get(tLpgAirChargeFiles.getBarCode());
if (tLpgGasBottleFiles == null || tLpgGasBottleFiles.size() == 0) {
errorNum++;
continue;
}
successList.add(tLpgAirChargeFiles);
successNum++;
}
if (successList.size() > 0) {
tLpgAirChargeFilesMapper.insertBatch(successList);
}
map.put("errorNum",errorNum);
map.put("successNum",successNum);
} else {
map.put("errorNum",errorNum);
map.put("successNum",successNum);
}
return map; return map;
} }
......
...@@ -78,6 +78,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -78,6 +78,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="fState != null "> and f_state = #{fState}</if> <if test="fState != null "> and f_state = #{fState}</if>
</where> </where>
</select> </select>
<select id="queryAllByFQRcodeList" resultMap="TLpgGasBottleFilesResult">
<include refid="selectTLpgGasBottleFilesVo"/>
where f_q_rcode in
<foreach collection="codeList" close=")" index="i" item="item" open="(" separator=",">
#{item}
</foreach>
</select>
<select id="selectTLpgGasBottleFilesById" parameterType="Long" resultMap="TLpgGasBottleFilesResult"> <select id="selectTLpgGasBottleFilesById" parameterType="Long" resultMap="TLpgGasBottleFilesResult">
<include refid="selectTLpgGasBottleFilesVo"/> <include refid="selectTLpgGasBottleFilesVo"/>
......
...@@ -798,15 +798,15 @@ export class EditorMap { ...@@ -798,15 +798,15 @@ export class EditorMap {
mapData.forEach((item) => { mapData.forEach((item) => {
let longitude = item.longitude; let longitude = item.longitude;
let latitude = item.latitude; let latitude = item.latitude;
var userId = item.userId; var siteStationId = item.siteStationId;
icon.userId = userId; icon.siteStationId = siteStationId;
var curData = { var curData = {
position: [longitude, latitude], position: [longitude, latitude],
icon: icon, icon: icon,
rank: 1, //避让优先级 rank: 1, //避让优先级
}; };
hashMap.set(JSON.stringify(userId), item); hashMap.set(JSON.stringify(siteStationId), item);
//创建 LabelMarker //创建 LabelMarker
const labelMarker = new AMap.LabelMarker(curData); const labelMarker = new AMap.LabelMarker(curData);
// var marker = new AMap.Marker(curData); // var marker = new AMap.Marker(curData);
...@@ -815,8 +815,8 @@ export class EditorMap { ...@@ -815,8 +815,8 @@ export class EditorMap {
labelMarker.on("click", (e) => { labelMarker.on("click", (e) => {
var opts = JSON.stringify(e.data.opts); var opts = JSON.stringify(e.data.opts);
var optsObj = JSON.parse(opts); var optsObj = JSON.parse(opts);
var userId = JSON.stringify(optsObj.icon.userId); var siteStationId = JSON.stringify(optsObj.icon.siteStationId);
var extData = hashMap.get(userId); var extData = hashMap.get(siteStationId);
// 如果control==0就是默认值,没有使用123功能,就显示infowindow // 如果control==0就是默认值,没有使用123功能,就显示infowindow
this.massMarksMarkerClick(extData, compontent); this.massMarksMarkerClick(extData, compontent);
}); });
...@@ -937,15 +937,15 @@ export class EditorMap { ...@@ -937,15 +937,15 @@ export class EditorMap {
mapData.forEach((item) => { mapData.forEach((item) => {
let longitude = item.longitude; let longitude = item.longitude;
let latitude = item.latitude; let latitude = item.latitude;
var userId = item.userId; var deviceId = item.deviceId;
icon.userId = userId; icon.deviceId = deviceId;
var curData = { var curData = {
position: [longitude, latitude], position: [longitude, latitude],
icon: icon, icon: icon,
rank: 1, //避让优先级 rank: 1, //避让优先级
}; };
hashMap.set(JSON.stringify(userId), item); hashMap.set(JSON.stringify(deviceId), item);
//创建 LabelMarker //创建 LabelMarker
const labelMarker = new AMap.LabelMarker(curData); const labelMarker = new AMap.LabelMarker(curData);
// var marker = new AMap.Marker(curData); // var marker = new AMap.Marker(curData);
...@@ -954,8 +954,8 @@ export class EditorMap { ...@@ -954,8 +954,8 @@ export class EditorMap {
labelMarker.on("click", (e) => { labelMarker.on("click", (e) => {
var opts = JSON.stringify(e.data.opts); var opts = JSON.stringify(e.data.opts);
var optsObj = JSON.parse(opts); var optsObj = JSON.parse(opts);
var userId = JSON.stringify(optsObj.icon.userId); var deviceId = JSON.stringify(optsObj.icon.deviceId);
var extData = hashMap.get(userId); var extData = hashMap.get(deviceId);
// 如果control==0就是默认值,没有使用123功能,就显示infowindow // 如果control==0就是默认值,没有使用123功能,就显示infowindow
this.massMarksMarkerClick(extData, compontent); this.massMarksMarkerClick(extData, compontent);
}); });
......
...@@ -6,86 +6,86 @@ ...@@ -6,86 +6,86 @@
<el-row class="el-row-table"> <el-row class="el-row-table">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="充装记录编号"> <el-form-item label="充装记录编号">
<span v-if="detailInfo.fGzId">{{ detailInfo.fGzId }}</span> <span v-if="detailInfo.gzId">{{ detailInfo.gzId }}</span>
<span v-else>-</span> <span v-else>-</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="充装单位"> <el-form-item label="充装单位">
<span v-if="detailInfo.fStationName">{{ detailInfo.fStationName }}</span> <span v-if="detailInfo.stationName">{{ detailInfo.stationName }}</span>
<span v-else>-</span> <span v-else>-</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="气瓶条码"> <el-form-item label="气瓶条码">
<span v-if="detailInfo.fBarCode">{{ detailInfo.fBarCode }}</span> <span v-if="detailInfo.barCode">{{ detailInfo.barCode }}</span>
<span v-else>-</span> <span v-else>-</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="钢印号"> <el-form-item label="钢印号">
<span v-if="detailInfo.fVaseCode">{{ detailInfo.fVaseCode }}</span> <span v-if="detailInfo.vaseCode">{{ detailInfo.vaseCode }}</span>
<span v-else>-</span> <span v-else>-</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="秤号"> <el-form-item label="秤号">
<span v-if="detailInfo.fScaleNum">{{ detailInfo.fScaleNum }}</span> <span v-if="detailInfo.scaleNum">{{ detailInfo.scaleNum }}</span>
<span v-else>-</span> <span v-else>-</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="充装开始时间"> <el-form-item label="充装开始时间">
<span v-if="detailInfo.fFillStatrTime">{{ detailInfo.fFillStatrTime }}</span> <span v-if="detailInfo.fillStatrTime">{{ detailInfo.fillStatrTime }}</span>
<span v-else>-</span> <span v-else>-</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="充装结束时间"> <el-form-item label="充装结束时间">
<span v-if="detailInfo.fFillEndTime">{{ detailInfo.fFillEndTime }}</span> <span v-if="detailInfo.fillEndTime">{{ detailInfo.fillEndTime }}</span>
<span v-else>-</span> <span v-else>-</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="设定净重"> <el-form-item label="设定净重">
<span v-if="detailInfo.fSetWeight">{{ detailInfo.fSetWeight}}</span> <span v-if="detailInfo.setWeight">{{ detailInfo.setWeight}}</span>
<span v-else>-</span> <span v-else>-</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="实际净重"> <el-form-item label="实际净重">
<span v-if="detailInfo.fWtNet">{{ detailInfo.fWtNet}}</span> <span v-if="detailInfo.wtNet">{{ detailInfo.wtNet}}</span>
<span v-else>-</span> <span v-else>-</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="设定瓶重"> <el-form-item label="设定瓶重">
<span v-if="detailInfo.fSetBottleWeight">{{ detailInfo.fSetBottleWeight}}</span> <span v-if="detailInfo.setBottleWeight">{{ detailInfo.setBottleWeight}}</span>
<span v-else>-</span> <span v-else>-</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="实际瓶重"> <el-form-item label="实际瓶重">
<span v-if="detailInfo.fBottleWeight">{{ detailInfo.fBottleWeight }}</span> <span v-if="detailInfo.bottleWeight">{{ detailInfo.bottleWeight }}</span>
<span v-else>-</span> <span v-else>-</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="实际总重"> <el-form-item label="实际总重">
<span v-if="detailInfo.fWtGross">{{ detailInfo.fWtGross }}</span> <span v-if="detailInfo.wtGross">{{ detailInfo.wtGross }}</span>
<span v-else>-</span> <span v-else>-</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="充装工"> <el-form-item label="充装工">
<span v-if="detailInfo.fOprateName">{{ detailInfo.fOprateName }}</span> <span v-if="detailInfo.oprateName">{{ detailInfo.oprateName }}</span>
<span v-else>-</span> <span v-else>-</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
......
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="钢印号" prop="fVaseCode"> <el-form-item label="钢印号" prop="vaseCode">
<el-input <el-input
v-model="queryParams.fVaseCode" v-model="queryParams.vaseCode"
placeholder="请输入钢印号" placeholder="请输入钢印号"
clearable clearable
size="small" size="small"
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="气瓶条码" prop="fBarCode"> <el-form-item label="气瓶条码" prop="barCode">
<el-input <el-input
v-model="queryParams.fBarCode" v-model="queryParams.barCode"
placeholder="请输入气瓶条码" placeholder="请输入气瓶条码"
clearable clearable
size="small" size="small"
...@@ -50,11 +50,11 @@ ...@@ -50,11 +50,11 @@
<el-table v-loading="loading" :data="filesList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="filesList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="充装记录编号" align="center" prop="fGzId" /> <el-table-column label="充装记录编号" align="center" prop="gzId" />
<el-table-column label="充装单位" align="center" prop="fStationName" /> <el-table-column label="充装单位" align="center" prop="stationName" />
<el-table-column label="气瓶条码" align="center" prop="fBarCode" /> <el-table-column label="气瓶条码" align="center" prop="barCode" />
<el-table-column label="钢印号" align="center" prop="fVaseCode" /> <el-table-column label="钢印号" align="center" prop="vaseCode" />
<el-table-column label="秤号" align="center" prop="fScaleNum" /> <el-table-column label="秤号" align="center" prop="scaleNum" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
...@@ -163,7 +163,7 @@ export default { ...@@ -163,7 +163,7 @@ export default {
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
fVaseCode: null, vaseCode: null,
}, },
// 表单参数 // 表单参数
form: {}, form: {},
...@@ -192,6 +192,7 @@ export default { ...@@ -192,6 +192,7 @@ export default {
// 文件上传处理中 // 文件上传处理中
handleFileUploadProgress(event,file,fileList) { handleFileUploadProgress(event,file,fileList) {
this.upload.isUploading = true; this.upload.isUploading = true;
this.$showLoading.show();
}, },
// 文件上传成功处理 // 文件上传成功处理
...@@ -199,8 +200,17 @@ export default { ...@@ -199,8 +200,17 @@ export default {
this.upload.open = false; this.upload.open = false;
this.upload.isUploading = false; this.upload.isUploading = false;
this.$refs.upload.clearFiles(); this.$refs.upload.clearFiles();
this.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "导入结果", { dangerouslyUseHTMLString: true }); if (response.data != null) {
if (response.data.errorMsg != null && response.data.errorMsg !== "") {
this.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.data.errorMsg + "</div>", "导入结果", { dangerouslyUseHTMLString: true });
}else{
this.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + "成功:" + response.data.successNum + "条,失败:" + response.data.errorNum + "条" + "</div>", "导入结果", { dangerouslyUseHTMLString: true });
}
} else {
this.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "导入结果", { dangerouslyUseHTMLString: true });
}
this.getList(); this.getList();
this.$showLoading.hide();
}, },
// 提交上传文件 // 提交上传文件
...@@ -225,20 +235,20 @@ export default { ...@@ -225,20 +235,20 @@ export default {
// 表单重置 // 表单重置
reset() { reset() {
this.form = { this.form = {
fGasAirChargeId: null, gasAirChargeId: null,
fGzId: null, gzId: null,
fStationName: null, stationName: null,
fBarCode: null, barCode: null,
fVaseCode: null, vaseCode: null,
fScaleNum: null, scaleNum: null,
fFillStatrTime: null, fillStatrTime: null,
fFillEndTime: null, fillEndTime: null,
fSetWeight: null, setWeight: null,
fWtNet: null, wtNet: null,
fSetBottleWeight: null, setBottleWeight: null,
fBottleWeight: null, bottleWeight: null,
fWtGross: null, wtGross: null,
fOprateName: null oprateName: null
}; };
this.resetForm("form"); this.resetForm("form");
}, },
...@@ -255,11 +265,11 @@ export default { ...@@ -255,11 +265,11 @@ export default {
//详情 //详情
handleDetail(row){ handleDetail(row){
this.$refs.detail.getDetailInfo(row.fGasAirChargeId); this.$refs.detail.getDetailInfo(row.gasAirChargeId);
}, },
// 多选框选中数据 // 多选框选中数据
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.fGasAirChargeId) this.ids = selection.map(item => item.gasAirChargeId)
this.single = selection.length!==1 this.single = selection.length!==1
this.multiple = !selection.length this.multiple = !selection.length
}, },
......
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