Commit f71f6cbd authored by wanghao's avatar wanghao

1 液化石油气监管-充装记录-导入和外部对接接口加上 企业信息涉及到功能模块调整。

parent 32ca5b5e
......@@ -18,6 +18,17 @@ public class TLpgAirChargeFiles extends BaseEntity
/** id */
private Long gasAirChargeId;
/**
* 燃气企业ID
*/
private String enterpriseId;
/**
* 燃气企业名称
*/
@Excel(name = "燃气企业")
private String enterpriseName;
/** 充装记录编号 */
@Excel(name = "充装记录编号")
private Long gzId;
......@@ -182,6 +193,22 @@ public class TLpgAirChargeFiles extends BaseEntity
this.oprateName = oprateName;
}
public String getEnterpriseId() {
return enterpriseId;
}
public void setEnterpriseId(String enterpriseId) {
this.enterpriseId = enterpriseId;
}
public String getEnterpriseName() {
return enterpriseName;
}
public void setEnterpriseName(String enterpriseName) {
this.enterpriseName = enterpriseName;
}
@Override
public String toString() {
return "TLpgAirChargeFiles{" +
......
......@@ -83,4 +83,10 @@ public interface ITLpgAirChargeFilesService
*/
public Map<String,Object> importLpgAirChargeFileInfo(List<TLpgAirChargeFiles> xmbhList, boolean updateSupport, HttpServletResponse response);
/**
* 第三方对接 接收到的数据
* @param list list
* @return r
*/
public int externalDockingCreateLpgAirChargeFileInfo(List<TLpgAirChargeFiles> list);
}
......@@ -86,4 +86,11 @@ public interface ITLpgGasBottleFilesService
* @return r
*/
public int externalDockingCreateLpgGasBottleFiles(List<TLpgGasBottleFiles> list);
/**
* 根据 气瓶条码集合 查询 气瓶集合
* @param list l
* @return r
*/
public List<TLpgGasBottleFiles> queryALlByQrcodeList(List<String> list);
}
......@@ -7,7 +7,9 @@ import java.util.Map;
import java.util.stream.Collectors;
import com.zehong.common.utils.StringUtils;
import com.zehong.system.domain.TEnterpriseInfo;
import com.zehong.system.domain.TLpgGasBottleFiles;
import com.zehong.system.mapper.TEnterpriseInfoMapper;
import com.zehong.system.mapper.TLpgGasBottleFilesMapper;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TLpgAirChargeFilesMapper;
......@@ -32,6 +34,9 @@ public class TLpgAirChargeFilesServiceImpl implements ITLpgAirChargeFilesService
@Resource
private TLpgGasBottleFilesMapper tLpgGasBottleFilesMapper;
@Resource
private TEnterpriseInfoMapper enterpriseInfoMapper;
/**
* 查询液化石油气-充装记录
*
......@@ -143,18 +148,29 @@ public class TLpgAirChargeFilesServiceImpl implements ITLpgAirChargeFilesService
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());
// 2024-09-14 调整 ,燃气企业也得有
List<TLpgAirChargeFiles> havaBarCodeList = xmbhList.stream()
.filter(item -> StringUtils.isNotBlank(item.getBarCode()) &&
StringUtils.isNotBlank(item.getEnterpriseName()))
.collect(Collectors.toList());
// 气瓶条码集合
List<String> collect = havaBarCodeList.stream().map(item -> item.getBarCode()).collect(Collectors.toList());
List<String> collect = havaBarCodeList.stream().map(TLpgAirChargeFiles::getBarCode).collect(Collectors.toList());
// 燃气企业结合
List<String> collectEnterprise = havaBarCodeList.stream().map(TLpgAirChargeFiles::getEnterpriseName).collect(Collectors.toList());
// 这是 上面气瓶条码 有的气瓶数据
List<TLpgGasBottleFiles> tLpgGasBottleFiles2 = tLpgGasBottleFilesMapper.queryAllByFQRcodeList(collect);
// 按照 气瓶条码 分组
Map<String, List<TLpgGasBottleFiles>> collect1 = tLpgGasBottleFiles2.stream().collect(Collectors.groupingBy(TLpgGasBottleFiles::getQrcode));
errorNum += noBarCodeList.size();
// 燃气企业结合
List<TEnterpriseInfo> tEnterpriseInfos = enterpriseInfoMapper.queryAllByEnterpriseNameList(collectEnterprise);
// 按照企业名称分组
Map<String, List<TEnterpriseInfo>> collect2 = tEnterpriseInfos.stream().collect(Collectors.groupingBy(TEnterpriseInfo::getEnterpriseName));
errorNum += (xmbhList.size() - havaBarCodeList.size());
for (TLpgAirChargeFiles tLpgAirChargeFiles : havaBarCodeList) {
......@@ -163,6 +179,11 @@ public class TLpgAirChargeFilesServiceImpl implements ITLpgAirChargeFilesService
errorNum++;
continue;
}
List<TEnterpriseInfo> tEnterpriseInfos1 = collect2.get(tLpgAirChargeFiles.getEnterpriseName());
if (tEnterpriseInfos1 == null || tEnterpriseInfos1.size() == 0) {
errorNum++;
continue;
}
successList.add(tLpgAirChargeFiles);
successNum++;
}
......@@ -182,4 +203,14 @@ public class TLpgAirChargeFilesServiceImpl implements ITLpgAirChargeFilesService
return map;
}
/**
* 第三方对接 接收到的数据
* @param list list
* @return r
*/
@Override
public int externalDockingCreateLpgAirChargeFileInfo(List<TLpgAirChargeFiles> list) {
return tLpgAirChargeFilesMapper.insertBatch(list);
}
}
......@@ -181,4 +181,14 @@ public class TLpgGasBottleFilesServiceImpl implements ITLpgGasBottleFilesService
return tLpgGasBottleFilesMapper.insertBatch(list);
}
/**
* 根据气瓶条码集合 查询 气瓶集合
* @param list l
* @return r
*/
@Override
public List<TLpgGasBottleFiles> queryALlByQrcodeList(List<String> list) {
return tLpgGasBottleFilesMapper.queryAllByFQRcodeList(list);
}
}
......@@ -19,10 +19,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="bottleWeight" column="f_bottle_weight" />
<result property="wtGross" column="f_wt_gross" />
<result property="oprateName" column="f_oprate_name" />
<result property="enterpriseId" column="enterprise_id" />
<result property="enterpriseName" column="enterpriseName" />
</resultMap>
<sql id="selectTLpgAirChargeFilesVo">
select f_gas_air_charge_id, 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 from t_lpg_air_charge_files
select files.f_gas_air_charge_id, files.f_gz_id, files.f_station_name, files.f_bar_code, files.f_vase_code, files.f_scale_num,
files.f_fill_statr_time, files.f_fill_end_time, files.f_set_weight, files.f_wt_net, files.f_set_bottle_weight,
files.f_bottle_weight, files.f_wt_gross, files.f_oprate_name, info.enterprise_name as enterpriseName
from t_lpg_air_charge_files files
left join t_enterprise_info info on files.enterprise_id = info.enterprise_id
</sql>
<select id="selectTLpgAirChargeFilesList" parameterType="TLpgAirChargeFiles" resultMap="TLpgAirChargeFilesResult">
......@@ -53,7 +59,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
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)
f_bottle_weight, f_wt_gross, f_oprate_name,enterprise_id)
values
<foreach collection="list" item="item" index="index" separator=",">
(
......@@ -61,7 +67,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{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}
#{item.bottleWeight,jdbcType=VARCHAR}, #{item.wtGross,jdbcType=VARCHAR}, #{item.oprateName,jdbcType=VARCHAR},
#{item.enterpriseId,jdbcType=VARCHAR}
)
</foreach>
</insert>
......@@ -82,6 +89,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="bottleWeight != null">f_bottle_weight,</if>
<if test="wtGross != null">f_wt_gross,</if>
<if test="oprateName != null">f_oprate_name,</if>
<if test="enterpriseId != null">enterprise_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="gzId != null">#{gzId},</if>
......@@ -97,6 +105,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="sottleWeight != null">#{sottleWeight},</if>
<if test="wtGross != null">#{wtGross},</if>
<if test="oprateName != null">#{oprateName},</if>
<if test="enterpriseId != null">#{enterpriseId},</if>
</trim>
</insert>
......@@ -116,6 +125,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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>
<if test="enterpriseId != null">enterprise_id = #{enterpriseId},</if>
</trim>
where f_gas_air_charge_id = #{fGasAirChargeId}
</update>
......
......@@ -4,6 +4,13 @@
<el-form label-width="180px">
<el-row class="el-row-table">
<el-col :span="12">
<el-form-item label="燃气企业">
<span v-if="detailInfo.enterpriseName">{{ detailInfo.enterpriseName }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="充装记录编号">
<span v-if="detailInfo.gzId">{{ detailInfo.gzId }}</span>
......
......@@ -50,6 +50,7 @@
<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="enterpriseName" :show-overflow-tooltip="true" />
<el-table-column label="充装记录编号" align="center" prop="gzId" />
<el-table-column label="充装单位" align="center" prop="stationName" />
<el-table-column label="气瓶条码" align="center" prop="barCode" />
......
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