Commit a40e906b authored by wanghao's avatar wanghao

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

 2 大屏端 场站 和 调压箱 部分点位展示 不准确问题修复。
parent 65ae33b4
package com.zehong.web.controller.lpgRegulation;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
......@@ -123,8 +124,8 @@ public class TLpgAirChargeFilesController extends BaseController
ExcelUtil<TLpgAirChargeFiles> util = new ExcelUtil<>(TLpgAirChargeFiles.class);
List<TLpgAirChargeFiles> XmbhList = util.importExcel(file.getInputStream());
tLpgAirChargeFilesService.importLpgAirChargeFileInfo(XmbhList, updateSupport, response);
return AjaxResult.success();
Map<String, Object> map = tLpgAirChargeFilesService.importLpgAirChargeFileInfo(XmbhList, updateSupport, response);
return AjaxResult.success(map);
}
}
......@@ -232,19 +232,19 @@ public class TimeTasksController {
for(int i = startNum; i < data.size(); i++){
JSONObject jsonObject = data.getJSONObject(i);
TLpgAirChargeFiles tLpgAirChargeFile = new TLpgAirChargeFiles();
tLpgAirChargeFile.setfGzId(jsonObject.getLong("gzId"));
tLpgAirChargeFile.setfStationName(jsonObject.getString("stationName"));
tLpgAirChargeFile.setfBarCode(jsonObject.getString("barCode"));
tLpgAirChargeFile.setfVaseCode(jsonObject.getString("vaseCode"));
tLpgAirChargeFile.setfScaleNum(jsonObject.getString("scaleNum"));
tLpgAirChargeFile.setfFillStatrTime(jsonObject.getString("fillStatrTime"));
tLpgAirChargeFile.setfFillEndTime(jsonObject.getString("fillEndTime"));
tLpgAirChargeFile.setfSetWeight(jsonObject.getString("setWeight"));
tLpgAirChargeFile.setfWtNet(jsonObject.getString("wtNet"));
tLpgAirChargeFile.setfSetBottleWeight(jsonObject.getString("setBottleWeight"));
tLpgAirChargeFile.setfBottleWeight(jsonObject.getString("bottleWeight"));
tLpgAirChargeFile.setfWtGross(jsonObject.getString("wtGross"));
tLpgAirChargeFile.setfOprateName(jsonObject.getString("oprateName"));
tLpgAirChargeFile.setGzId(jsonObject.getLong("gzId"));
tLpgAirChargeFile.setStationName(jsonObject.getString("stationName"));
tLpgAirChargeFile.setBarCode(jsonObject.getString("barCode"));
tLpgAirChargeFile.setVaseCode(jsonObject.getString("vaseCode"));
tLpgAirChargeFile.setScaleNum(jsonObject.getString("scaleNum"));
tLpgAirChargeFile.setFillStatrTime(jsonObject.getString("fillStatrTime"));
tLpgAirChargeFile.setFillEndTime(jsonObject.getString("fillEndTime"));
tLpgAirChargeFile.setSetWeight(jsonObject.getString("setWeight"));
tLpgAirChargeFile.setWtNet(jsonObject.getString("wtNet"));
tLpgAirChargeFile.setSetBottleWeight(jsonObject.getString("setBottleWeight"));
tLpgAirChargeFile.setBottleWeight(jsonObject.getString("bottleWeight"));
tLpgAirChargeFile.setWtGross(jsonObject.getString("wtGross"));
tLpgAirChargeFile.setOprateName(jsonObject.getString("oprateName"));
tLpgAirChargeFilesService.insertTLpgAirChargeFiles(tLpgAirChargeFile);
}
if(data.size()==100){
......
......@@ -16,189 +16,189 @@ public class TLpgAirChargeFiles extends BaseEntity
private static final long serialVersionUID = 1L;
/** id */
private Long fGasAirChargeId;
private Long gasAirChargeId;
/** 充装记录编号 */
@Excel(name = "充装记录编号")
private Long fGzId;
private Long gzId;
/** 充装单位 */
@Excel(name = "充装单位")
private String fStationName;
private String stationName;
/** 气瓶条码 */
@Excel(name = "气瓶条码")
private String fBarCode;
private String barCode;
/** 钢印号 */
@Excel(name = "钢印号")
private String fVaseCode;
private String vaseCode;
/** 秤号 */
@Excel(name = "秤号")
private String fScaleNum;
private String scaleNum;
/** 充装开始时间 */
@Excel(name = "充装开始时间")
private String fFillStatrTime;
private String fillStatrTime;
/** 充装结束时间 */
@Excel(name = "充装结束时间")
private String fFillEndTime;
private String fillEndTime;
/** 设定净重 */
@Excel(name = "设定净重")
private String fSetWeight;
private String setWeight;
/** 实际净重 */
@Excel(name = "实际净重")
private String fWtNet;
private String wtNet;
/** 设定瓶重 */
@Excel(name = "设定瓶重")
private String fSetBottleWeight;
private String setBottleWeight;
/** 实际瓶重 */
@Excel(name = "实际瓶重")
private String fBottleWeight;
private String bottleWeight;
/** 实际总重 */
@Excel(name = "实际总重")
private String fWtGross;
private String wtGross;
/** 充装工 */
@Excel(name = "充装工")
private String fOprateName;
private String oprateName;
public Long getfGasAirChargeId() {
return fGasAirChargeId;
public Long getGasAirChargeId() {
return gasAirChargeId;
}
public void setfGasAirChargeId(Long fGasAirChargeId) {
this.fGasAirChargeId = fGasAirChargeId;
public void setGasAirChargeId(Long gasAirChargeId) {
this.gasAirChargeId = gasAirChargeId;
}
public Long getfGzId() {
return fGzId;
public Long getGzId() {
return gzId;
}
public void setfGzId(Long fGzId) {
this.fGzId = fGzId;
public void setGzId(Long gzId) {
this.gzId = gzId;
}
public String getfStationName() {
return fStationName;
public String getStationName() {
return stationName;
}
public void setfStationName(String fStationName) {
this.fStationName = fStationName;
public void setStationName(String stationName) {
this.stationName = stationName;
}
public String getfBarCode() {
return fBarCode;
public String getBarCode() {
return barCode;
}
public void setfBarCode(String fBarCode) {
this.fBarCode = fBarCode;
public void setBarCode(String barCode) {
this.barCode = barCode;
}
public String getfVaseCode() {
return fVaseCode;
public String getVaseCode() {
return vaseCode;
}
public void setfVaseCode(String fVaseCode) {
this.fVaseCode = fVaseCode;
public void setVaseCode(String vaseCode) {
this.vaseCode = vaseCode;
}
public String getfScaleNum() {
return fScaleNum;
public String getScaleNum() {
return scaleNum;
}
public void setfScaleNum(String fScaleNum) {
this.fScaleNum = fScaleNum;
public void setScaleNum(String scaleNum) {
this.scaleNum = scaleNum;
}
public String getfFillStatrTime() {
return fFillStatrTime;
public String getFillStatrTime() {
return fillStatrTime;
}
public void setfFillStatrTime(String fFillStatrTime) {
this.fFillStatrTime = fFillStatrTime;
public void setFillStatrTime(String fillStatrTime) {
this.fillStatrTime = fillStatrTime;
}
public String getfFillEndTime() {
return fFillEndTime;
public String getFillEndTime() {
return fillEndTime;
}
public void setfFillEndTime(String fFillEndTime) {
this.fFillEndTime = fFillEndTime;
public void setFillEndTime(String fillEndTime) {
this.fillEndTime = fillEndTime;
}
public String getfSetWeight() {
return fSetWeight;
public String getSetWeight() {
return setWeight;
}
public void setfSetWeight(String fSetWeight) {
this.fSetWeight = fSetWeight;
public void setSetWeight(String setWeight) {
this.setWeight = setWeight;
}
public String getfWtNet() {
return fWtNet;
public String getWtNet() {
return wtNet;
}
public void setfWtNet(String fWtNet) {
this.fWtNet = fWtNet;
public void setWtNet(String wtNet) {
this.wtNet = wtNet;
}
public String getfSetBottleWeight() {
return fSetBottleWeight;
public String getSetBottleWeight() {
return setBottleWeight;
}
public void setfSetBottleWeight(String fSetBottleWeight) {
this.fSetBottleWeight = fSetBottleWeight;
public void setSetBottleWeight(String setBottleWeight) {
this.setBottleWeight = setBottleWeight;
}
public String getfBottleWeight() {
return fBottleWeight;
public String getBottleWeight() {
return bottleWeight;
}
public void setfBottleWeight(String fBottleWeight) {
this.fBottleWeight = fBottleWeight;
public void setBottleWeight(String bottleWeight) {
this.bottleWeight = bottleWeight;
}
public String getfWtGross() {
return fWtGross;
public String getWtGross() {
return wtGross;
}
public void setfWtGross(String fWtGross) {
this.fWtGross = fWtGross;
public void setWtGross(String wtGross) {
this.wtGross = wtGross;
}
public String getfOprateName() {
return fOprateName;
public String getOprateName() {
return oprateName;
}
public void setfOprateName(String fOprateName) {
this.fOprateName = fOprateName;
public void setOprateName(String oprateName) {
this.oprateName = oprateName;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("fGasAirChargeId", getfGasAirChargeId())
.append("fGzId", getfGzId())
.append("fStationName", getfStationName())
.append("fBarCode", getfBarCode())
.append("fVaseCode", getfVaseCode())
.append("fScaleNum", getfScaleNum())
.append("fFillStatrTime", getfFillStatrTime())
.append("fFillEndTime", getfFillEndTime())
.append("fSetWeight", getfSetWeight())
.append("fWtNet", getfWtNet())
.append("fSetBottleWeight", getfSetBottleWeight())
.append("fBottleWeight", getfBottleWeight())
.append("fWtGross", getfWtGross())
.append("fOprateName", getfOprateName())
.toString();
return "TLpgAirChargeFiles{" +
"gasAirChargeId=" + gasAirChargeId +
", gzId=" + gzId +
", stationName='" + stationName + '\'' +
", barCode='" + barCode + '\'' +
", vaseCode='" + vaseCode + '\'' +
", scaleNum='" + scaleNum + '\'' +
", fillStatrTime='" + fillStatrTime + '\'' +
", fillEndTime='" + fillEndTime + '\'' +
", setWeight='" + setWeight + '\'' +
", wtNet='" + wtNet + '\'' +
", setBottleWeight='" + setBottleWeight + '\'' +
", bottleWeight='" + bottleWeight + '\'' +
", wtGross='" + wtGross + '\'' +
", oprateName='" + oprateName + '\'' +
'}';
}
}
......@@ -2,6 +2,7 @@ package com.zehong.system.mapper;
import java.util.List;
import com.zehong.system.domain.TLpgAirChargeFiles;
import org.apache.ibatis.annotations.Param;
/**
* 液化石油气-充装记录Mapper接口
......@@ -14,10 +15,10 @@ public interface TLpgAirChargeFilesMapper
/**
* 查询液化石油气-充装记录
*
* @param fGasAirChargeId 液化石油气-充装记录ID
* @param gasAirChargeId 液化石油气-充装记录ID
* @return 液化石油气-充装记录
*/
public TLpgAirChargeFiles selectTLpgAirChargeFilesById(Long fGasAirChargeId);
public TLpgAirChargeFiles selectTLpgAirChargeFilesById(Long gasAirChargeId);
public Integer selectTLpgAirChargeFilesTotal();
......@@ -44,6 +45,13 @@ public interface TLpgAirChargeFilesMapper
*/
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
/**
* 删除液化石油气-充装记录
*
* @param fGasAirChargeId 液化石油气-充装记录ID
* @param gasAirChargeId 液化石油气-充装记录ID
* @return 结果
*/
public int deleteTLpgAirChargeFilesById(Long fGasAirChargeId);
public int deleteTLpgAirChargeFilesById(Long gasAirChargeId);
/**
* 批量删除液化石油气-充装记录
......
......@@ -2,6 +2,7 @@ package com.zehong.system.mapper;
import java.util.List;
import com.zehong.system.domain.TLpgGasBottleFiles;
import org.apache.ibatis.annotations.Param;
/**
* 液化石油气-气瓶档案Mapper接口
......@@ -27,6 +28,13 @@ public interface TLpgGasBottleFilesMapper
*/
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;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
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 com.zehong.system.mapper.TLpgAirChargeFilesMapper;
import com.zehong.system.domain.TLpgAirChargeFiles;
import com.zehong.system.service.ITLpgAirChargeFilesService;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
/**
......@@ -21,9 +26,12 @@ import javax.servlet.http.HttpServletResponse;
@Service
public class TLpgAirChargeFilesServiceImpl implements ITLpgAirChargeFilesService
{
@Autowired
@Resource
private TLpgAirChargeFilesMapper tLpgAirChargeFilesMapper;
@Resource
private TLpgGasBottleFilesMapper tLpgGasBottleFilesMapper;
/**
* 查询液化石油气-充装记录
*
......@@ -124,10 +132,53 @@ public class TLpgAirChargeFilesServiceImpl implements ITLpgAirChargeFilesService
Map<String ,Object> map = new HashMap<>();
for (TLpgAirChargeFiles tLpgAirChargeFiles : xmbhList) {
System.out.println(tLpgAirChargeFiles.getfBarCode());
}
int errorNum = 0;
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;
}
......
......@@ -5,20 +5,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<mapper namespace="com.zehong.system.mapper.TLpgAirChargeFilesMapper">
<resultMap type="TLpgAirChargeFiles" id="TLpgAirChargeFilesResult">
<result property="fGasAirChargeId" column="f_gas_air_charge_id" />
<result property="fGzId" column="f_gz_id" />
<result property="fStationName" column="f_station_name" />
<result property="fBarCode" column="f_bar_code" />
<result property="fVaseCode" column="f_vase_code" />
<result property="fScaleNum" column="f_scale_num" />
<result property="fFillStatrTime" column="f_fill_statr_time" />
<result property="fFillEndTime" column="f_fill_end_time" />
<result property="fSetWeight" column="f_set_weight" />
<result property="fWtNet" column="f_wt_net" />
<result property="fSetBottleWeight" column="f_set_bottle_weight" />
<result property="fBottleWeight" column="f_bottle_weight" />
<result property="fWtGross" column="f_wt_gross" />
<result property="fOprateName" column="f_oprate_name" />
<result property="gasAirChargeId" column="f_gas_air_charge_id" />
<result property="gzId" column="f_gz_id" />
<result property="stationName" column="f_station_name" />
<result property="barCode" column="f_bar_code" />
<result property="vaseCode" column="f_vase_code" />
<result property="scaleNum" column="f_scale_num" />
<result property="fillStatrTime" column="f_fill_statr_time" />
<result property="fillEndTime" column="f_fill_end_time" />
<result property="setWeight" column="f_set_weight" />
<result property="wtNet" column="f_wt_net" />
<result property="setBottleWeight" column="f_set_bottle_weight" />
<result property="bottleWeight" column="f_bottle_weight" />
<result property="wtGross" column="f_wt_gross" />
<result property="oprateName" column="f_oprate_name" />
</resultMap>
<sql id="selectTLpgAirChargeFilesVo">
......@@ -28,83 +28,100 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectTLpgAirChargeFilesList" parameterType="TLpgAirChargeFiles" resultMap="TLpgAirChargeFilesResult">
<include refid="selectTLpgAirChargeFilesVo"/>
<where>
<if test="fVaseCode != null and fVaseCode != ''"> and f_vase_code like concat('%', #{fVaseCode}, '%') </if>
<if test="fBarCode != null and fBarCode != ''"> and f_bar_code like concat('%', #{fBarCode}, '%') </if>
<if test="vaseCode != null and vaseCode != ''"> and f_vase_code like concat('%', #{vaseCode}, '%') </if>
<if test="barCode != null and barCode != ''"> and f_bar_code like concat('%', #{barCode}, '%') </if>
</where>
</select>
<select id="queryAllForExport" resultMap="TLpgAirChargeFilesResult">
<include refid="selectTLpgAirChargeFilesVo"/>
<where>
<if test="fVaseCode != null and fVaseCode != ''"> and f_vase_code like concat('%', #{fVaseCode}, '%') </if>
<if test="fBarCode != null and fBarCode != ''"> and f_bar_code like concat('%', #{fBarCode}, '%') </if>
<if test="vaseCode != null and vaseCode != ''"> and f_vase_code like concat('%', #{vaseCode}, '%') </if>
<if test="barCode != null and barCode != ''"> and f_bar_code like concat('%', #{barCode}, '%') </if>
</where>
limit 1000
</select>
<select id="selectTLpgAirChargeFilesById" parameterType="Long" resultMap="TLpgAirChargeFilesResult">
<include refid="selectTLpgAirChargeFilesVo"/>
where f_gas_air_charge_id = #{fGasAirChargeId}
where f_gas_air_charge_id = #{gasAirChargeId}
</select>
<select id="selectTLpgAirChargeFilesTotal" resultType="int">
SELECT COUNT(*) FROM t_lpg_air_charge_files
</select>
<insert id="insertBatch" parameterType="list">
insert into t_lpg_air_charge_files (f_gz_id, f_station_name, f_bar_code, f_vase_code, f_scale_num,
f_fill_statr_time, f_fill_end_time, f_set_weight, f_wt_net, f_set_bottle_weight,
f_bottle_weight, f_wt_gross, f_oprate_name)
values
<foreach collection="list" item="item" index="index" separator=",">
(
#{item.gzId}, #{item.stationName,jdbcType=VARCHAR}, #{item.barCode,jdbcType=VARCHAR},
#{item.vaseCode,jdbcType=VARCHAR}, #{item.scaleNum,jdbcType=VARCHAR}, #{item.fillStatrTime},
#{item.fillEndTime},
#{item.setWeight,jdbcType=VARCHAR}, #{item.wtNet,jdbcType=VARCHAR}, #{item.setBottleWeight,jdbcType=VARCHAR},
#{item.bottleWeight,jdbcType=VARCHAR}, #{item.wtGross,jdbcType=VARCHAR}, #{item.oprateName,jdbcType=VARCHAR}
)
</foreach>
</insert>
<insert id="insertTLpgAirChargeFiles" parameterType="TLpgAirChargeFiles" useGeneratedKeys="true" keyProperty="fGasAirChargeId">
insert into t_lpg_air_charge_files
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="fGzId != null">f_gz_id,</if>
<if test="fStationName != null">f_station_name,</if>
<if test="fBarCode != null">f_bar_code,</if>
<if test="fVaseCode != null">f_vase_code,</if>
<if test="fScaleNum != null">f_scale_num,</if>
<if test="fFillStatrTime != null">f_fill_statr_time,</if>
<if test="fFillEndTime != null">f_fill_end_time,</if>
<if test="fSetWeight != null">f_set_weight,</if>
<if test="fWtNet != null">f_wt_net,</if>
<if test="fSetBottleWeight != null">f_set_bottle_weight,</if>
<if test="fBottleWeight != null">f_bottle_weight,</if>
<if test="fWtGross != null">f_wt_gross,</if>
<if test="fOprateName != null">f_oprate_name,</if>
<if test="gzId != null">f_gz_id,</if>
<if test="stationName != null">f_station_name,</if>
<if test="barCode != null">f_bar_code,</if>
<if test="vaseCode != null">f_vase_code,</if>
<if test="scaleNum != null">f_scale_num,</if>
<if test="fillStatrTime != null">f_fill_statr_time,</if>
<if test="fillEndTime != null">f_fill_end_time,</if>
<if test="setWeight != null">f_set_weight,</if>
<if test="wtNet != null">f_wt_net,</if>
<if test="setBottleWeight != null">f_set_bottle_weight,</if>
<if test="bottleWeight != null">f_bottle_weight,</if>
<if test="wtGross != null">f_wt_gross,</if>
<if test="oprateName != null">f_oprate_name,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="fGzId != null">#{fGzId},</if>
<if test="fStationName != null">#{fStationName},</if>
<if test="fBarCode != null">#{fBarCode},</if>
<if test="fVaseCode != null">#{fVaseCode},</if>
<if test="fScaleNum != null">#{fScaleNum},</if>
<if test="fFillStatrTime != null">#{fFillStatrTime},</if>
<if test="fFillEndTime != null">#{fFillEndTime},</if>
<if test="fSetWeight != null">#{fSetWeight},</if>
<if test="fWtNet != null">#{fWtNet},</if>
<if test="fSetBottleWeight != null">#{fSetBottleWeight},</if>
<if test="fBottleWeight != null">#{fBottleWeight},</if>
<if test="fWtGross != null">#{fWtGross},</if>
<if test="fOprateName != null">#{fOprateName},</if>
<if test="gzId != null">#{gzId},</if>
<if test="stationName != null">#{stationName},</if>
<if test="barCode != null">#{barCode},</if>
<if test="vaseCode != null">#{vaseCode},</if>
<if test="scaleNum != null">#{scaleNum},</if>
<if test="fillStatrTime != null">#{fillStatrTime},</if>
<if test="fillEndTime != null">#{fillEndTime},</if>
<if test="setWeight != null">#{setWeight},</if>
<if test="wtNet != null">#{wtNet},</if>
<if test="setBottleWeight != null">#{setBottleWeight},</if>
<if test="sottleWeight != null">#{sottleWeight},</if>
<if test="wtGross != null">#{wtGross},</if>
<if test="oprateName != null">#{oprateName},</if>
</trim>
</insert>
<update id="updateTLpgAirChargeFiles" parameterType="TLpgAirChargeFiles">
update t_lpg_air_charge_files
<trim prefix="SET" suffixOverrides=",">
<if test="fGzId != null">f_gz_id = #{fGzId},</if>
<if test="fStationName != null">f_station_name = #{fStationName},</if>
<if test="fBarCode != null">f_bar_code = #{fBarCode},</if>
<if test="fVaseCode != null">f_vase_code = #{fVaseCode},</if>
<if test="fScaleNum != null">f_scale_num = #{fScaleNum},</if>
<if test="fFillStatrTime != null">f_fill_statr_time = #{fFillStatrTime},</if>
<if test="fFillEndTime != null">f_fill_end_time = #{fFillEndTime},</if>
<if test="fSetWeight != null">f_set_weight = #{fSetWeight},</if>
<if test="fWtNet != null">f_wt_net = #{fWtNet},</if>
<if test="fSetBottleWeight != null">f_set_bottle_weight = #{fSetBottleWeight},</if>
<if test="fBottleWeight != null">f_bottle_weight = #{fBottleWeight},</if>
<if test="fWtGross != null">f_wt_gross = #{fWtGross},</if>
<if test="fOprateName != null">f_oprate_name = #{fOprateName},</if>
<if test="gzId != null">f_gz_id = #{gzId},</if>
<if test="stationName != null">f_station_name = #{stationName},</if>
<if test="barCode != null">f_bar_code = #{barCode},</if>
<if test="vaseCode != null">f_vase_code = #{vaseCode},</if>
<if test="scaleNum != null">f_scale_num = #{scaleNum},</if>
<if test="fillStatrTime != null">f_fill_statr_time = #{fillStatrTime},</if>
<if test="fillEndTime != null">f_fill_end_time = #{fillEndTime},</if>
<if test="setWeight != null">f_set_weight = #{setWeight},</if>
<if test="wtNet != null">f_wt_net = #{wtNet},</if>
<if test="setBottleWeight != null">f_set_bottle_weight = #{setBottleWeight},</if>
<if test="sottleWeight != null">f_bottle_weight = #{sottleWeight},</if>
<if test="wtGross != null">f_wt_gross = #{wtGross},</if>
<if test="oprateName != null">f_oprate_name = #{oprateName},</if>
</trim>
where f_gas_air_charge_id = #{fGasAirChargeId}
</update>
<delete id="deleteTLpgAirChargeFilesById" parameterType="Long">
delete from t_lpg_air_charge_files where f_gas_air_charge_id = #{fGasAirChargeId}
delete from t_lpg_air_charge_files where f_gas_air_charge_id = #{gasAirChargeId}
</delete>
<delete id="deleteTLpgAirChargeFilesByIds" parameterType="String">
......
......@@ -78,6 +78,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="fState != null "> and f_state = #{fState}</if>
</where>
</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">
<include refid="selectTLpgGasBottleFilesVo"/>
......
......@@ -798,15 +798,15 @@ export class EditorMap {
mapData.forEach((item) => {
let longitude = item.longitude;
let latitude = item.latitude;
var userId = item.userId;
icon.userId = userId;
var siteStationId = item.siteStationId;
icon.siteStationId = siteStationId;
var curData = {
position: [longitude, latitude],
icon: icon,
rank: 1, //避让优先级
};
hashMap.set(JSON.stringify(userId), item);
hashMap.set(JSON.stringify(siteStationId), item);
//创建 LabelMarker
const labelMarker = new AMap.LabelMarker(curData);
// var marker = new AMap.Marker(curData);
......@@ -815,8 +815,8 @@ export class EditorMap {
labelMarker.on("click", (e) => {
var opts = JSON.stringify(e.data.opts);
var optsObj = JSON.parse(opts);
var userId = JSON.stringify(optsObj.icon.userId);
var extData = hashMap.get(userId);
var siteStationId = JSON.stringify(optsObj.icon.siteStationId);
var extData = hashMap.get(siteStationId);
// 如果control==0就是默认值,没有使用123功能,就显示infowindow
this.massMarksMarkerClick(extData, compontent);
});
......@@ -937,15 +937,15 @@ export class EditorMap {
mapData.forEach((item) => {
let longitude = item.longitude;
let latitude = item.latitude;
var userId = item.userId;
icon.userId = userId;
var deviceId = item.deviceId;
icon.deviceId = deviceId;
var curData = {
position: [longitude, latitude],
icon: icon,
rank: 1, //避让优先级
};
hashMap.set(JSON.stringify(userId), item);
hashMap.set(JSON.stringify(deviceId), item);
//创建 LabelMarker
const labelMarker = new AMap.LabelMarker(curData);
// var marker = new AMap.Marker(curData);
......@@ -954,8 +954,8 @@ export class EditorMap {
labelMarker.on("click", (e) => {
var opts = JSON.stringify(e.data.opts);
var optsObj = JSON.parse(opts);
var userId = JSON.stringify(optsObj.icon.userId);
var extData = hashMap.get(userId);
var deviceId = JSON.stringify(optsObj.icon.deviceId);
var extData = hashMap.get(deviceId);
// 如果control==0就是默认值,没有使用123功能,就显示infowindow
this.massMarksMarkerClick(extData, compontent);
});
......
......@@ -6,86 +6,86 @@
<el-row class="el-row-table">
<el-col :span="12">
<el-form-item label="充装记录编号">
<span v-if="detailInfo.fGzId">{{ detailInfo.fGzId }}</span>
<span v-if="detailInfo.gzId">{{ detailInfo.gzId }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="充装单位">
<span v-if="detailInfo.fStationName">{{ detailInfo.fStationName }}</span>
<span v-if="detailInfo.stationName">{{ detailInfo.stationName }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="气瓶条码">
<span v-if="detailInfo.fBarCode">{{ detailInfo.fBarCode }}</span>
<span v-if="detailInfo.barCode">{{ detailInfo.barCode }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="钢印号">
<span v-if="detailInfo.fVaseCode">{{ detailInfo.fVaseCode }}</span>
<span v-if="detailInfo.vaseCode">{{ detailInfo.vaseCode }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="秤号">
<span v-if="detailInfo.fScaleNum">{{ detailInfo.fScaleNum }}</span>
<span v-if="detailInfo.scaleNum">{{ detailInfo.scaleNum }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="充装开始时间">
<span v-if="detailInfo.fFillStatrTime">{{ detailInfo.fFillStatrTime }}</span>
<span v-if="detailInfo.fillStatrTime">{{ detailInfo.fillStatrTime }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="充装结束时间">
<span v-if="detailInfo.fFillEndTime">{{ detailInfo.fFillEndTime }}</span>
<span v-if="detailInfo.fillEndTime">{{ detailInfo.fillEndTime }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="设定净重">
<span v-if="detailInfo.fSetWeight">{{ detailInfo.fSetWeight}}</span>
<span v-if="detailInfo.setWeight">{{ detailInfo.setWeight}}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="实际净重">
<span v-if="detailInfo.fWtNet">{{ detailInfo.fWtNet}}</span>
<span v-if="detailInfo.wtNet">{{ detailInfo.wtNet}}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="设定瓶重">
<span v-if="detailInfo.fSetBottleWeight">{{ detailInfo.fSetBottleWeight}}</span>
<span v-if="detailInfo.setBottleWeight">{{ detailInfo.setBottleWeight}}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="实际瓶重">
<span v-if="detailInfo.fBottleWeight">{{ detailInfo.fBottleWeight }}</span>
<span v-if="detailInfo.bottleWeight">{{ detailInfo.bottleWeight }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="实际总重">
<span v-if="detailInfo.fWtGross">{{ detailInfo.fWtGross }}</span>
<span v-if="detailInfo.wtGross">{{ detailInfo.wtGross }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="充装工">
<span v-if="detailInfo.fOprateName">{{ detailInfo.fOprateName }}</span>
<span v-if="detailInfo.oprateName">{{ detailInfo.oprateName }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
......
<template>
<div class="app-container">
<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
v-model="queryParams.fVaseCode"
v-model="queryParams.vaseCode"
placeholder="请输入钢印号"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="气瓶条码" prop="fBarCode">
<el-form-item label="气瓶条码" prop="barCode">
<el-input
v-model="queryParams.fBarCode"
v-model="queryParams.barCode"
placeholder="请输入气瓶条码"
clearable
size="small"
......@@ -50,11 +50,11 @@
<el-table v-loading="loading" :data="filesList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="充装记录编号" align="center" prop="fGzId" />
<el-table-column label="充装单位" align="center" prop="fStationName" />
<el-table-column label="气瓶条码" align="center" prop="fBarCode" />
<el-table-column label="钢印号" align="center" prop="fVaseCode" />
<el-table-column label="秤号" align="center" prop="fScaleNum" />
<el-table-column label="充装记录编号" align="center" prop="gzId" />
<el-table-column label="充装单位" align="center" prop="stationName" />
<el-table-column label="气瓶条码" align="center" prop="barCode" />
<el-table-column label="钢印号" align="center" prop="vaseCode" />
<el-table-column label="秤号" align="center" prop="scaleNum" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
......@@ -163,7 +163,7 @@ export default {
queryParams: {
pageNum: 1,
pageSize: 10,
fVaseCode: null,
vaseCode: null,
},
// 表单参数
form: {},
......@@ -192,6 +192,7 @@ export default {
// 文件上传处理中
handleFileUploadProgress(event,file,fileList) {
this.upload.isUploading = true;
this.$showLoading.show();
},
// 文件上传成功处理
......@@ -199,8 +200,17 @@ export default {
this.upload.open = false;
this.upload.isUploading = false;
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.$showLoading.hide();
},
// 提交上传文件
......@@ -225,20 +235,20 @@ export default {
// 表单重置
reset() {
this.form = {
fGasAirChargeId: null,
fGzId: null,
fStationName: null,
fBarCode: null,
fVaseCode: null,
fScaleNum: null,
fFillStatrTime: null,
fFillEndTime: null,
fSetWeight: null,
fWtNet: null,
fSetBottleWeight: null,
fBottleWeight: null,
fWtGross: null,
fOprateName: null
gasAirChargeId: null,
gzId: null,
stationName: null,
barCode: null,
vaseCode: null,
scaleNum: null,
fillStatrTime: null,
fillEndTime: null,
setWeight: null,
wtNet: null,
setBottleWeight: null,
bottleWeight: null,
wtGross: null,
oprateName: null
};
this.resetForm("form");
},
......@@ -255,11 +265,11 @@ export default {
//详情
handleDetail(row){
this.$refs.detail.getDetailInfo(row.fGasAirChargeId);
this.$refs.detail.getDetailInfo(row.gasAirChargeId);
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.fGasAirChargeId)
this.ids = selection.map(item => item.gasAirChargeId)
this.single = selection.length!==1
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