Commit 9a5b46db authored by wanghao's avatar wanghao

1 液化石油气监管-车辆信息-外部对接接口开发。

2 液化石油气监管- 气瓶档案,充装记录,车辆信息 外部对接接口在已有基础上增加 字段级别校验 和 数据存在时更新处理,具体设计到 长度 和 类型校验,以及接收到的正确数据去重处理。
3 外部对接接口 避免 之后开发人员出现 两方数据可能对不上的问题,数据库建表开发接口 实时记录和维护 从外部接口接收的数据 。
parent 9bfb0294
......@@ -159,36 +159,80 @@ public class DESEncoder {
String lpggasdata = "[\n" +
" {\n" +
" \"barCode\": \"12121212\",\n" +
" \"gzId\": \"充装记录编号-接口来的-01\",\n" +
" \"stationName\": \"充装单位-接口来的-01\",\n" +
" \"vaseCode\": \"钢印号-接口来的-01\",\n" +
" \"scaleNum\": \"称号\",\n" +
" \"fillStatrTime\": \"2024-12-16\",\n" +
" \"fillEndTime\": \"2024-12-17\",\n" +
" \"setWeight\": \"15.63\",\n" +
" \"wtNet\": \"15.98\",\n" +
" \"setBottleWeight\": \"14.56\",\n" +
" \"bottleWeight\": \"45.69\",\n" +
" \"wtGross\": \"56.69\",\n" +
" \"oprateName\": \"充装工-01\"\n" +
" \"nchkDate\": \"2024-12-18\",\n" +
" \"discardDate\": \"2024-12-20\",\n" +
" \"wpressure\": \"15.96\",\n" +
" \"thickness\": \"15.46\",\n" +
" \"holeCode\": \"孔洞码-接口来的-01\",\n" +
" \"qrcode\": \"111111\",\n" +
" \"regCode\": \"登记证号-接口来的-01\",\n" +
" \"selfWeight\": \"15.98\",\n" +
" \"medium\": \"充装介质-接口来的-01\",\n" +
" \"bottleStorageType\": \"存储类型(气相/液相)-接口来的-01\",\n" +
" \"pchkDate\": \"2024-12-17\",\n" +
" \"batchImage\": \"一串base64数据\",\n" +
" \"safeJudgeDate\": \"2024-12-21\",\n" +
" \"checkImage\": \"一串base64数据\",\n" +
" \"appId\": \"电子标签-接口来的-01\",\n" +
" \"makeInfo\": \"生产(制造单位)\",\n" +
" \"gpressure\": \"12.56\",\n" +
" \"makeDate\": \"2024-12-16\",\n" +
" \"botSpecName\": \"钢瓶规格名称-接口来的-01\",\n" +
" \"payImage\": \"一串base64数据\",\n" +
" \"equType\": \"设备类型-接口来的-01\",\n" +
" \"inspectionLabel\": \"检验标牌(有/无)-接口来的-01\",\n" +
" \"botImage\": \"一串base64数据\",\n" +
" \"buildUser\": \"使用单位-接口来的-01\",\n" +
" \"pressure\": \"12.5\",\n" +
" \"productDate\": \"2024-12-19\",\n" +
" \"equNo\": \"产品编号-接口来的-01\",\n" +
" \"permitNo\": \"气瓶许可证号-接口来的-01\",\n" +
" \"volume\": \"30.6\",\n" +
" \"inspectedTimes\": \"14\",\n" +
" \"valveManuFacturer\": \"阀厂家-接口来的-01\",\n" +
" \"thirdPartyLabel\": \"第三方标签-接口来的-01\",\n" +
" \"valveName\": \"阀类型名称-接口来的-01\",\n" +
" \"deviceImage\": \"一串base64数据\",\n" +
" \"selfId\": \"单位内编号-接口来的-01\"\n" +
" },\n" +
" {\n" +
" \"barCode\": \"01199101071\",\n" +
" \"gzId\": \"充装记录编号-接口来的-02\",\n" +
" \"stationName\": \"充装单位-接口来的-02\",\n" +
" \"vaseCode\": \"钢印号-接口来的-02\",\n" +
" \"scaleNum\": \"称号\",\n" +
" \"fillStatrTime\": \"2024-12-16\",\n" +
" \"fillEndTime\": \"2024-12-17\",\n" +
" \"setWeight\": \"15.63\",\n" +
" \"wtNet\": \"15.98\",\n" +
" \"setBottleWeight\": \"14.56\",\n" +
" \"bottleWeight\": \"45.69\",\n" +
" \"wtGross\": \"56.69\",\n" +
" \"oprateName\": \"充装工-02\"\n" +
" \"nchkDate\": \"2024-12-23\",\n" +
" \"discardDate\": \"2024-12-25\",\n" +
" \"wpressure\": \"15.96\",\n" +
" \"thickness\": \"15.46\",\n" +
" \"holeCode\": \"孔洞码-接口来的-02\",\n" +
" \"qrcode\": \"222222\",\n" +
" \"regCode\": \"登记证号-接口来的-02\",\n" +
" \"selfWeight\": \"15.98\",\n" +
" \"medium\": \"充装介质-接口来的-02\",\n" +
" \"bottleStorageType\": \"存储类型(气相/液相)-接口来的-02\",\n" +
" \"pchkDate\": \"2024-12-22\",\n" +
" \"batchImage\": \"一串base64数据\",\n" +
" \"safeJudgeDate\": \"2024-12-26\",\n" +
" \"checkImage\": \"一串base64数据\",\n" +
" \"appId\": \"电子标签-接口来的-02\",\n" +
" \"makeInfo\": \"生产(制造单位)\",\n" +
" \"gpressure\": \"14.56\",\n" +
" \"makeDate\": \"2024-12-21\",\n" +
" \"botSpecName\": \"钢瓶规格名称-接口来的-02\",\n" +
" \"payImage\": \"一串base64数据\",\n" +
" \"equType\": \"设备类型-接口来的-02\",\n" +
" \"inspectionLabel\": \"检验标牌(有/无)-接口来的-02\",\n" +
" \"botImage\": \"一串base64数据\",\n" +
" \"buildUser\": \"使用单位-接口来的-02\",\n" +
" \"pressure\": \"12.5\",\n" +
" \"productDate\": \"2024-12-24\",\n" +
" \"equNo\": \"产品编号-接口来的-02\",\n" +
" \"permitNo\": \"气瓶许可证号-接口来的-02\",\n" +
" \"volume\": \"30.6\",\n" +
" \"inspectedTimes\": \"14\",\n" +
" \"valveManuFacturer\": \"阀厂家-接口来的-02\",\n" +
" \"thirdPartyLabel\": \"第三方标签-接口来的-02\",\n" +
" \"valveName\": \"阀类型名称-接口来的-02\",\n" +
" \"deviceImage\": \"一串base64数据\",\n" +
" \"selfId\": \"单位内编号-接口来的-02\"\n" +
" }\n" +
"]";
"]\n";
JSONArray objects = JSON.parseArray(lpggasdata);
System.out.println(objects);
......
package com.zehong.system.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.zehong.common.annotation.Excel;
import com.zehong.common.core.domain.BaseEntity;
import java.util.Objects;
/**
* 液化石油气-充装记录对象 t_lpg_air_charge_files
*
......@@ -209,6 +209,19 @@ public class TLpgAirChargeFiles extends BaseEntity
this.enterpriseName = enterpriseName;
}
@Override
public boolean equals(Object obj) {
if (this == obj) return true;
if (obj == null || getClass() != obj.getClass()) return false;
TLpgAirChargeFiles lpgAirChargeFiles = (TLpgAirChargeFiles) obj;
return Objects.equals(barCode,lpgAirChargeFiles.getBarCode()) && Objects.equals(gzId,lpgAirChargeFiles.getGzId());
}
@Override
public int hashCode() {
return Objects.hash(barCode,gzId);
}
@Override
public String toString() {
return "TLpgAirChargeFiles{" +
......
......@@ -2,6 +2,8 @@ package com.zehong.system.domain;
import java.math.BigDecimal;
import java.util.Date;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.zehong.common.annotation.Excel;
import com.zehong.common.core.domain.BaseEntity;
......@@ -594,6 +596,19 @@ public class TLpgGasBottleFiles extends BaseEntity
this.enterpriseName = enterpriseName;
}
@Override
public boolean equals(Object obj) {
if(this == obj) return true;
if (obj == null || getClass() != obj.getClass()) return false;
TLpgGasBottleFiles tLpgGasBottleFiles = (TLpgGasBottleFiles) obj;
return Objects.equals(qrcode, tLpgGasBottleFiles.getQrcode());
}
@Override
public int hashCode() {
return Objects.hash(qrcode);
}
@Override
public String toString() {
return "TLpgGasBottleFiles{" +
......
package com.zehong.system.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.zehong.common.annotation.Excel;
import com.zehong.common.core.domain.BaseEntity;
/**
* 液化气第三方对接接口记录对象 t_lpg_third_party_docking_interface_record
*
* @author zehong
* @date 2024-09-18
*/
public class TLpgThirdPartyDockingInterfaceRecord extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** id */
private Long recordId;
/** 接口名称 */
private String interfaceName;
/** 状态0-成功,1-失败 */
private String state;
/** 接收的数据 */
private String receiveData;
/** 返回的数据 */
private String returnData;
/** 失败原因 */
private String failureReason;
/** 记录的时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date receiveDate;
private String qybm;
public void setRecordId(Long recordId)
{
this.recordId = recordId;
}
public Long getRecordId()
{
return recordId;
}
public void setInterfaceName(String interfaceName)
{
this.interfaceName = interfaceName;
}
public String getInterfaceName()
{
return interfaceName;
}
public void setState(String state)
{
this.state = state;
}
public String getState()
{
return state;
}
public void setReceiveData(String receiveData)
{
this.receiveData = receiveData;
}
public String getReceiveData()
{
return receiveData;
}
public void setReturnData(String returnData)
{
this.returnData = returnData;
}
public String getReturnData()
{
return returnData;
}
public void setFailureReason(String failureReason)
{
this.failureReason = failureReason;
}
public String getFailureReason()
{
return failureReason;
}
public void setReceiveDate(Date receiveDate)
{
this.receiveDate = receiveDate;
}
public String getQybm() {
return qybm;
}
public void setQybm(String qybm) {
this.qybm = qybm;
}
public Date getReceiveDate()
{
return receiveDate;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("recordId", getRecordId())
.append("interfaceName", getInterfaceName())
.append("state", getState())
.append("receiveData", getReceiveData())
.append("returnData", getReturnData())
.append("failureReason", getFailureReason())
.append("receiveDate", getReceiveDate())
.toString();
}
}
......@@ -37,6 +37,13 @@ public interface TLpgAirChargeFilesMapper
*/
public List<TLpgAirChargeFiles> queryAllForExport(TLpgAirChargeFiles tLpgAirChargeFiles);
/**
* 根据 集合 里面的 气瓶条码 和 充装记录编号 查询 数据
* @param tLpgAirChargeFiles s
* @return r
*/
public List<TLpgAirChargeFiles> queryALlByBarcodeAndGizId(@Param("list") List<TLpgAirChargeFiles> tLpgAirChargeFiles);
/**
* 新增液化石油气-充装记录
*
......@@ -52,6 +59,13 @@ public interface TLpgAirChargeFilesMapper
*/
public int insertBatch(@Param("list") List<TLpgAirChargeFiles> list);
/**
* 批量修改
* @param list l
* @return r
*/
public int updateBatch(@Param("list") List<TLpgAirChargeFiles> list);
/**
* 修改液化石油气-充装记录
*
......
......@@ -42,6 +42,14 @@ public interface TLpgGasBottleFilesMapper
*/
public List<TLpgGasBottleFiles> queryAllByFQRcodeList(@Param("codeList") List<String> codeList);
/**
* 根据 气瓶集合 和 企业id 查询数据
* @param list list
* @param enterpriseId e
* @return r
*/
public List<TLpgGasBottleFiles> queryAllByQrcodeAndEnterpriseList(@Param("list") List<String> list, @Param("enterpriseId") String enterpriseId);
/**
* 新增液化石油气-气瓶档案
*
......@@ -55,7 +63,14 @@ public interface TLpgGasBottleFilesMapper
* @param list list
* @return r
*/
public int insertBatch(List<TLpgGasBottleFiles> list);
public int insertBatch(@Param("list") List<TLpgGasBottleFiles> list);
/**
* 批量修改
* @param list l
* @return r
*/
public int updateBatch(@Param("list") List<TLpgGasBottleFiles> list);
/**
* 修改液化石油气-气瓶档案
......
package com.zehong.system.mapper;
import java.util.List;
import com.zehong.system.domain.TLpgThirdPartyDockingInterfaceRecord;
import org.apache.ibatis.annotations.Param;
/**
* 液化气第三方对接接口记录Mapper接口
*
* @author zehong
* @date 2024-09-18
*/
public interface TLpgThirdPartyDockingInterfaceRecordMapper
{
/**
* 查询液化气第三方对接接口记录
*
* @param recordId 液化气第三方对接接口记录ID
* @return 液化气第三方对接接口记录
*/
public TLpgThirdPartyDockingInterfaceRecord selectTLpgThirdPartyDockingInterfaceRecordById(Long recordId);
/**
* 查询液化气第三方对接接口记录列表
*
* @param tLpgThirdPartyDockingInterfaceRecord 液化气第三方对接接口记录
* @return 液化气第三方对接接口记录集合
*/
public List<TLpgThirdPartyDockingInterfaceRecord> selectTLpgThirdPartyDockingInterfaceRecordList(TLpgThirdPartyDockingInterfaceRecord tLpgThirdPartyDockingInterfaceRecord);
/**
* 新增液化气第三方对接接口记录
*
* @param tLpgThirdPartyDockingInterfaceRecord 液化气第三方对接接口记录
* @return 结果
*/
public int insertTLpgThirdPartyDockingInterfaceRecord(TLpgThirdPartyDockingInterfaceRecord tLpgThirdPartyDockingInterfaceRecord);
/**
* 批量插入
* @param list list
* @return r
*/
public int insertBatch(@Param("list") List<TLpgThirdPartyDockingInterfaceRecord> list);
/**
* 修改液化气第三方对接接口记录
*
* @param tLpgThirdPartyDockingInterfaceRecord 液化气第三方对接接口记录
* @return 结果
*/
public int updateTLpgThirdPartyDockingInterfaceRecord(TLpgThirdPartyDockingInterfaceRecord tLpgThirdPartyDockingInterfaceRecord);
/**
* 删除液化气第三方对接接口记录
*
* @param recordId 液化气第三方对接接口记录ID
* @return 结果
*/
public int deleteTLpgThirdPartyDockingInterfaceRecordById(Long recordId);
/**
* 批量删除液化气第三方对接接口记录
*
* @param recordIds 需要删除的数据ID
* @return 结果
*/
public int deleteTLpgThirdPartyDockingInterfaceRecordByIds(Long[] recordIds);
}
......@@ -29,6 +29,14 @@ public interface TLpgVehicleInfoMapper
*/
public List<TLpgVehicleInfo> selectTLpgVehicleInfoList(TLpgVehicleInfo tLpgVehicleInfo);
/**
* 查询这个企业下 车牌号是否重复
* @param carNums c
* @param enterpriseId e
* @return r
*/
public List<TLpgVehicleInfo> queryByCarNumsAndEnterpriseId(@Param("carNums") List<String> carNums,@Param("enterpriseId") String enterpriseId);
/**
* 新增液化石油车辆信息
*
......@@ -59,6 +67,13 @@ public interface TLpgVehicleInfoMapper
* @return r
*/
public int insertBatch(@Param("list") List<TLpgVehicleInfo> list);
/**
* 批量更新
* @param list list
* @return r
*/
public int updateBatch(@Param("list") List<TLpgVehicleInfo> list);
/**
* 批量删除液化石油车辆信息
*
......
......@@ -5,6 +5,7 @@ import java.util.Map;
import com.zehong.system.domain.TLpgAirChargeFiles;
import com.zehong.system.domain.TLpgVehicleInfo;
import org.apache.ibatis.annotations.Param;
import javax.servlet.http.HttpServletResponse;
......@@ -34,6 +35,12 @@ public interface ITLpgAirChargeFilesService
*/
public List<TLpgAirChargeFiles> selectTLpgAirChargeFilesList(TLpgAirChargeFiles tLpgAirChargeFiles);
/**
* 根据 集合 里面的 气瓶条码 和 充装记录编号 查询 数据
* @param tLpgAirChargeFiles s
* @return r
*/
public List<TLpgAirChargeFiles> queryALlByBarcodeAndGizId(@Param("list") List<TLpgAirChargeFiles> tLpgAirChargeFiles);
/**
* 2024-09-12 wh 查询数据为了导出用 限制导出数量
......@@ -89,4 +96,11 @@ public interface ITLpgAirChargeFilesService
* @return r
*/
public int externalDockingCreateLpgAirChargeFileInfo(List<TLpgAirChargeFiles> list);
/**
* 修改
* @param list list
* @return r
*/
public int externalDockingUpdateLpgAirChargeFileInfo(List<TLpgAirChargeFiles> list);
}
......@@ -5,6 +5,8 @@ import java.util.Map;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.system.domain.TLpgGasBottleFiles;
import org.apache.ibatis.annotations.Param;
import org.springframework.security.core.parameters.P;
import javax.servlet.http.HttpServletResponse;
......@@ -87,10 +89,25 @@ public interface ITLpgGasBottleFilesService
*/
public int externalDockingCreateLpgGasBottleFiles(List<TLpgGasBottleFiles> list);
/**
* 第三方对接 修改数据
* @param list list
* @return r
*/
public int externalDockingUpdateLpgGasBottleFiles(List<TLpgGasBottleFiles> list);
/**
* 根据 气瓶条码集合 查询 气瓶集合
* @param list l
* @return r
*/
public List<TLpgGasBottleFiles> queryALlByQrcodeList(List<String> list);
/**
* 根据 气瓶集合 和 企业id 查询数据
* @param list list
* @param enterpriseId e
* @return r
*/
public List<TLpgGasBottleFiles> queryAllByQrcodeAndEnterpriseList(@Param("list") List<String> list, @Param("enterpriseId") String enterpriseId);
}
package com.zehong.system.service;
import java.util.List;
import com.zehong.system.domain.TLpgThirdPartyDockingInterfaceRecord;
/**
* 液化气第三方对接接口记录Service接口
*
* @author zehong
* @date 2024-09-18
*/
public interface ITLpgThirdPartyDockingInterfaceRecordService
{
/**
* 查询液化气第三方对接接口记录
*
* @param recordId 液化气第三方对接接口记录ID
* @return 液化气第三方对接接口记录
*/
public TLpgThirdPartyDockingInterfaceRecord selectTLpgThirdPartyDockingInterfaceRecordById(Long recordId);
/**
* 查询液化气第三方对接接口记录列表
*
* @param tLpgThirdPartyDockingInterfaceRecord 液化气第三方对接接口记录
* @return 液化气第三方对接接口记录集合
*/
public List<TLpgThirdPartyDockingInterfaceRecord> selectTLpgThirdPartyDockingInterfaceRecordList(TLpgThirdPartyDockingInterfaceRecord tLpgThirdPartyDockingInterfaceRecord);
/**
* 新增液化气第三方对接接口记录
*
* @param tLpgThirdPartyDockingInterfaceRecord 液化气第三方对接接口记录
* @return 结果
*/
public int insertTLpgThirdPartyDockingInterfaceRecord(TLpgThirdPartyDockingInterfaceRecord tLpgThirdPartyDockingInterfaceRecord);
/**
* 批量插入
* @param list list
* @return r
*/
public int insertBatch(List<TLpgThirdPartyDockingInterfaceRecord> list);
/**
* 修改液化气第三方对接接口记录
*
* @param tLpgThirdPartyDockingInterfaceRecord 液化气第三方对接接口记录
* @return 结果
*/
public int updateTLpgThirdPartyDockingInterfaceRecord(TLpgThirdPartyDockingInterfaceRecord tLpgThirdPartyDockingInterfaceRecord);
/**
* 批量删除液化气第三方对接接口记录
*
* @param recordIds 需要删除的液化气第三方对接接口记录ID
* @return 结果
*/
public int deleteTLpgThirdPartyDockingInterfaceRecordByIds(Long[] recordIds);
/**
* 删除液化气第三方对接接口记录信息
*
* @param recordId 液化气第三方对接接口记录ID
* @return 结果
*/
public int deleteTLpgThirdPartyDockingInterfaceRecordById(Long recordId);
}
......@@ -6,6 +6,7 @@ import java.util.List;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.system.domain.TLpgVehicleInfo;
import com.zehong.system.domain.vo.TLpgSafeCheckRecordImportVo;
import org.apache.ibatis.annotations.Param;
import javax.servlet.http.HttpServletResponse;
......@@ -33,6 +34,14 @@ public interface ITLpgVehicleInfoService
*/
public List<TLpgVehicleInfo> selectTLpgVehicleInfoList(TLpgVehicleInfo tLpgVehicleInfo);
/**
* 查询这个企业下 车牌号是否重复
* @param carNums c
* @param enterpriseId e
* @return r
*/
public List<TLpgVehicleInfo> queryByCarNumsAndEnterpriseId(List<String> carNums,String enterpriseId);
/**
* 新增液化石油车辆信息
*
......@@ -49,6 +58,19 @@ public interface ITLpgVehicleInfoService
*/
public int updateTLpgVehicleInfo(TLpgVehicleInfo tLpgVehicleInfo);
/**
* 批量增加
* @param list list
* @return r
*/
public int insertBatch(List<TLpgVehicleInfo> list);
/**
* 批量修改
* @param list list
* @return r
*/
public int updateBatch(List<TLpgVehicleInfo> list);
/**
* 批量删除液化石油车辆信息
*
......
......@@ -68,6 +68,11 @@ public class TLpgAirChargeFilesServiceImpl implements ITLpgAirChargeFilesService
return tLpgAirChargeFilesMapper.selectTLpgAirChargeFilesList(tLpgAirChargeFiles);
}
@Override
public List<TLpgAirChargeFiles> queryALlByBarcodeAndGizId(List<TLpgAirChargeFiles> tLpgAirChargeFiles) {
return tLpgAirChargeFilesMapper.queryALlByBarcodeAndGizId(tLpgAirChargeFiles);
}
/**
* 2024-09-12 wh 查询数据为了导出用 限制导出数量
* @param tLpgAirChargeFiles t
......@@ -213,4 +218,14 @@ public class TLpgAirChargeFilesServiceImpl implements ITLpgAirChargeFilesService
public int externalDockingCreateLpgAirChargeFileInfo(List<TLpgAirChargeFiles> list) {
return tLpgAirChargeFilesMapper.insertBatch(list);
}
/**
* 修改
* @param list list
* @return r
*/
@Override
public int externalDockingUpdateLpgAirChargeFileInfo(List<TLpgAirChargeFiles> list) {
return tLpgAirChargeFilesMapper.updateBatch(list);
}
}
......@@ -182,6 +182,16 @@ public class TLpgGasBottleFilesServiceImpl implements ITLpgGasBottleFilesService
return tLpgGasBottleFilesMapper.insertBatch(list);
}
/**
* 第三方对接 修改数据
* @param list list
* @return r
*/
@Override
public int externalDockingUpdateLpgGasBottleFiles(List<TLpgGasBottleFiles> list) {
return tLpgGasBottleFilesMapper.updateBatch(list);
}
/**
* 根据气瓶条码集合 查询 气瓶集合
* @param list l
......@@ -191,4 +201,9 @@ public class TLpgGasBottleFilesServiceImpl implements ITLpgGasBottleFilesService
public List<TLpgGasBottleFiles> queryALlByQrcodeList(List<String> list) {
return tLpgGasBottleFilesMapper.queryAllByFQRcodeList(list);
}
@Override
public List<TLpgGasBottleFiles> queryAllByQrcodeAndEnterpriseList(List<String> list, String enterpriseId) {
return tLpgGasBottleFilesMapper.queryAllByQrcodeAndEnterpriseList(list,enterpriseId);
}
}
package com.zehong.system.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TLpgThirdPartyDockingInterfaceRecordMapper;
import com.zehong.system.domain.TLpgThirdPartyDockingInterfaceRecord;
import com.zehong.system.service.ITLpgThirdPartyDockingInterfaceRecordService;
import javax.annotation.Resource;
/**
* 液化气第三方对接接口记录Service业务层处理
*
* @author zehong
* @date 2024-09-18
*/
@Service
public class TLpgThirdPartyDockingInterfaceRecordServiceImpl implements ITLpgThirdPartyDockingInterfaceRecordService
{
@Resource
private TLpgThirdPartyDockingInterfaceRecordMapper tLpgThirdPartyDockingInterfaceRecordMapper;
/**
* 查询液化气第三方对接接口记录
*
* @param recordId 液化气第三方对接接口记录ID
* @return 液化气第三方对接接口记录
*/
@Override
public TLpgThirdPartyDockingInterfaceRecord selectTLpgThirdPartyDockingInterfaceRecordById(Long recordId)
{
return tLpgThirdPartyDockingInterfaceRecordMapper.selectTLpgThirdPartyDockingInterfaceRecordById(recordId);
}
/**
* 查询液化气第三方对接接口记录列表
*
* @param tLpgThirdPartyDockingInterfaceRecord 液化气第三方对接接口记录
* @return 液化气第三方对接接口记录
*/
@Override
public List<TLpgThirdPartyDockingInterfaceRecord> selectTLpgThirdPartyDockingInterfaceRecordList(TLpgThirdPartyDockingInterfaceRecord tLpgThirdPartyDockingInterfaceRecord)
{
return tLpgThirdPartyDockingInterfaceRecordMapper.selectTLpgThirdPartyDockingInterfaceRecordList(tLpgThirdPartyDockingInterfaceRecord);
}
/**
* 新增液化气第三方对接接口记录
*
* @param tLpgThirdPartyDockingInterfaceRecord 液化气第三方对接接口记录
* @return 结果
*/
@Override
public int insertTLpgThirdPartyDockingInterfaceRecord(TLpgThirdPartyDockingInterfaceRecord tLpgThirdPartyDockingInterfaceRecord)
{
return tLpgThirdPartyDockingInterfaceRecordMapper.insertTLpgThirdPartyDockingInterfaceRecord(tLpgThirdPartyDockingInterfaceRecord);
}
/**
* 批量插入
* @param list list
* @return r
*/
@Override
public int insertBatch(List<TLpgThirdPartyDockingInterfaceRecord> list) {
return tLpgThirdPartyDockingInterfaceRecordMapper.insertBatch(list);
}
/**
* 修改液化气第三方对接接口记录
*
* @param tLpgThirdPartyDockingInterfaceRecord 液化气第三方对接接口记录
* @return 结果
*/
@Override
public int updateTLpgThirdPartyDockingInterfaceRecord(TLpgThirdPartyDockingInterfaceRecord tLpgThirdPartyDockingInterfaceRecord)
{
return tLpgThirdPartyDockingInterfaceRecordMapper.updateTLpgThirdPartyDockingInterfaceRecord(tLpgThirdPartyDockingInterfaceRecord);
}
/**
* 批量删除液化气第三方对接接口记录
*
* @param recordIds 需要删除的液化气第三方对接接口记录ID
* @return 结果
*/
@Override
public int deleteTLpgThirdPartyDockingInterfaceRecordByIds(Long[] recordIds)
{
return tLpgThirdPartyDockingInterfaceRecordMapper.deleteTLpgThirdPartyDockingInterfaceRecordByIds(recordIds);
}
/**
* 删除液化气第三方对接接口记录信息
*
* @param recordId 液化气第三方对接接口记录ID
* @return 结果
*/
@Override
public int deleteTLpgThirdPartyDockingInterfaceRecordById(Long recordId)
{
return tLpgThirdPartyDockingInterfaceRecordMapper.deleteTLpgThirdPartyDockingInterfaceRecordById(recordId);
}
}
......@@ -58,6 +58,17 @@ public class TLpgVehicleInfoServiceImpl implements ITLpgVehicleInfoService
return tLpgVehicleInfoMapper.selectTLpgVehicleInfoList(tLpgVehicleInfo);
}
/**
* 查询这个企业下车牌号是否重复
* @param carNums c
* @param enterpriseId e
* @return r
*/
@Override
public List<TLpgVehicleInfo> queryByCarNumsAndEnterpriseId(List<String> carNums, String enterpriseId) {
return tLpgVehicleInfoMapper.queryByCarNumsAndEnterpriseId(carNums,enterpriseId);
}
/**
* 新增液化石油车辆信息
*
......@@ -82,6 +93,26 @@ public class TLpgVehicleInfoServiceImpl implements ITLpgVehicleInfoService
return tLpgVehicleInfoMapper.updateTLpgVehicleInfo(tLpgVehicleInfo);
}
/**
* 批量插入
* @param list list
* @return r
*/
@Override
public int insertBatch(List<TLpgVehicleInfo> list) {
return tLpgVehicleInfoMapper.insertBatch(list);
}
/**
* 批量更新
* @param list list
* @return r
*/
@Override
public int updateBatch(List<TLpgVehicleInfo> list) {
return tLpgVehicleInfoMapper.updateBatch(list);
}
/**
* 批量删除液化石油车辆信息
*
......
......@@ -116,7 +116,7 @@
<!--查询管道数据列表-->
<select id="selectPipeData" parameterType="PipeDate" resultMap="PipeDateResult">
select format(pipe_length,2)pipe_length,pipe_pressure,beyond_enterprise_id,pipe_id,pipe_diameter,pipe_material,buried_depth,pipe_trend,build_date,pipe_addr,coordinates,remarks,build_unit,beyond_enterprise_name from t_pipe_info
select format(pipe_length,2)pipe_length,pipe_name,pipe_pressure,beyond_enterprise_id,pipe_id,pipe_diameter,pipe_material,buried_depth,pipe_trend,build_date,pipe_addr,coordinates,remarks,build_unit,beyond_enterprise_name from t_pipe_info
where is_del='0'
<if test="enterId != null and enterId != 0">
and beyond_enterprise_id=#{enterId}
......
......@@ -46,6 +46,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
limit 1000
</select>
<select id="queryALlByBarcodeAndGizId" resultMap="TLpgAirChargeFilesResult">
<include refid="selectTLpgAirChargeFilesVo"/>
WHERE (f_bar_code, f_gz_id) IN
<foreach collection="list" item="item" separator="," open="(" close=")">
(#{item.barCode}, #{item.gzId})
</foreach>
</select>
<select id="selectTLpgAirChargeFilesById" parameterType="Long" resultMap="TLpgAirChargeFilesResult">
<include refid="selectTLpgAirChargeFilesVo"/>
where f_gas_air_charge_id = #{gasAirChargeId}
......@@ -72,6 +79,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
)
</foreach>
</insert>
<update id="updateBatch" parameterType="list">
<foreach collection="list" item="item" index="index" separator=";">
UPDATE t_lpg_air_charge_files
<set>
f_station_name = #{item.stationName},
f_vase_code = #{item.vehicleCode},
f_scale_num = #{item.brandModel},
f_fill_statr_time = #{item.vehicleType},
f_fill_end_time = #{item.vehicleLoad},
f_set_weight = #{item.vehicleSize},
f_wt_net = #{item.vehicleLimt},
f_set_bottle_weight = #{item.vehicleInspect},
f_bottle_weight = #{item.bottleWeight},
f_wt_gross = #{item.onState},
f_oprate_name = #{item.vehicleUser},
</set>
WHERE f_bar_code = #{item.barCode} and f_gz_id = #{item.gzId} and enterprise_id = #{item.enterpriseId}
</foreach>
</update>
<insert id="insertTLpgAirChargeFiles" parameterType="TLpgAirChargeFiles" useGeneratedKeys="true" keyProperty="fGasAirChargeId">
insert into t_lpg_air_charge_files
......
......@@ -51,7 +51,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="holeCode" column="f_hole_code" />
<result property="bottleStorageType" column="f_bottle_storage_type" />
<result property="rowVersion" column="f_row_version" />
<result property="rowVersion" column="f_row_version" />
<result property="enterpriseId" column="enterprise_id" />
<result property="enterpriseName" column="enterpriseName" />
</resultMap>
......@@ -65,7 +64,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
( CASE files.f_is_specialized WHEN '1' THEN '专用' WHEN '2' THEN '托管' ELSE '-' END ) AS f_is_specialized,
files.f_valve_manu_facturer, files.f_inspection_label, files.f_third_party_label, files.f_hole_code, files.f_bottle_storage_type,
( CASE files.f_state WHEN '1' THEN '新增' WHEN '2' THEN '修改' WHEN '-1' THEN '删除' ELSE '-' END ) AS f_state,
files.f_opt_name, files.f_add_time, files.f_up_time, files.f_up_opt_name, files.f_row_version,enterprise.enterprise_name as enterpriseName
files.f_opt_name, files.f_add_time, files.f_up_time, files.f_up_opt_name, files.f_row_version,files.enterprise_id,
enterprise.enterprise_name as enterpriseName
from t_lpg_gas_bottle_files files
left join t_enterprise_info enterprise on files.enterprise_id = enterprise.enterprise_id
</sql>
......@@ -126,18 +126,74 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{item}
</foreach>
</select>
<select id="queryAllByQrcodeAndEnterpriseList" resultMap="TLpgGasBottleFilesResult">
<include refid="selectTLpgGasBottleFilesVo"/>
where files.enterprise_id = #{enterpriseId} and files.f_q_rcode in
<foreach collection="list" close=")" index="i" item="item" open="(" separator=",">
#{item}
</foreach>
</select>
<select id="selectTLpgGasBottleFilesById" parameterType="Long" resultMap="TLpgGasBottleFilesResult">
<include refid="selectTLpgGasBottleFilesVo"/>
where f_gas_bottle_files_id = #{fGasBottleFilesId}
</select>
<update id="updateBatch" parameterType="list">
<foreach collection="list" item="item" index="index" separator=";">
UPDATE t_lpg_gas_bottle_files
<set>
f_reg_code = #{item.regCode},
f_equ_no = #{item.equNo},
f_equ_type = #{item.equType},
f_medium = #{item.medium},
f_make_date = #{item.makeDate},
f_make_info = #{item.makeInfo},
f_self_id = #{item.selfId},
f_pressure = #{item.pressure},
f_volume = #{item.volume},
f_app_id = #{item.appId},
f_build_user = #{item.buildUser},
f_p_chk_date = #{item.pchkDate},
f_n_chk_date = #{item.nchkDate},
f_product_date = #{item.productDate},
f_discard_date = #{item.discardDate},
f_safe_judge_date = #{item.safeJudgeDate},
f_g_pressure = #{item.gpressure},
f_w_pressure = #{item.wpressure},
f_self_weight = #{item.selfWeight},
f_thickness = #{item.thickness},
f_permit_no = #{item.permitNo},
f_valve_name = #{item.valveName},
f_bot_spec_name = #{item.botSpecName},
f_bottle_type = #{item.bottleType},
f_inspected_times = #{item.inspectedTimes},
f_is_specialized = #{item.isSpecialized},
f_valve_manu_facturer = #{item.valveManuFacturer},
f_inspection_label = #{item.inspectionLabel},
f_third_party_label = #{item.thirdPartyLabel},
f_hole_code = #{item.holeCode},
f_bottle_storage_type = #{item.bottleStorageType},
f_pay_image = #{item.payImage},
f_batch_image = #{item.batchImage},
f_device_image = #{item.deviceImage},
f_check_image = #{item.checkImage},
f_bot_image = #{item.botImage},
</set>
WHERE f_gas_bottle_files_id = #{item.gasBottleFilesId}
</foreach>
</update>
<insert id="insertBatch" parameterType="list">
insert into t_lpg_gas_bottle_files (f_reg_code, f_equ_no,f_equ_type,f_medium,f_make_date,f_make_info,
f_self_id,f_pressure,f_volume,f_app_id,f_q_rcode,f_build_user,f_p_chk_date,f_n_chk_date,f_product_date,
f_discard_date,f_safe_judge_date,f_g_pressure,f_w_pressure,f_self_weight,f_thickness,f_permit_no,
f_valve_name,f_bot_spec_name,f_bottle_type,f_inspected_times,f_is_specialized,f_valve_manu_facturer,
f_inspection_label, f_third_party_label,f_hole_code,f_bottle_storage_type,f_state,f_opt_name,f_add_time,
f_up_time,f_up_opt_name,f_row_version,enterprise_id)
f_up_time,f_up_opt_name,f_row_version,enterprise_id,f_pay_image,f_batch_image,f_device_image,f_check_image,f_bot_image)
values
<foreach collection="list" item="item" index="index" separator=",">
(#{item.regCode,jdbcType=VARCHAR}, #{item.equNo}, #{item.equType,jdbcType=VARCHAR},
......@@ -150,7 +206,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{item.inspectedTimes},#{item.isSpecialized},#{item.valveManuFacturer},#{item.inspectionLabel},#{item.thirdPartyLabel},
#{item.holeCode,jdbcType=VARCHAR}, #{item.bottleStorageType}, #{item.state,jdbcType=VARCHAR},
#{item.optName,jdbcType=VARCHAR}, #{item.addTime}, #{item.upTime},
#{item.upOptName},#{item.rowVersion},#{item.enterpriseId})
#{item.upOptName},#{item.rowVersion},#{item.enterpriseId},#{item.payImage},#{item.batchImage},#{item.deviceImage},
#{item.checkImage},#{item.botImage})
</foreach>
</insert>
......
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zehong.system.mapper.TLpgThirdPartyDockingInterfaceRecordMapper">
<resultMap type="TLpgThirdPartyDockingInterfaceRecord" id="TLpgThirdPartyDockingInterfaceRecordResult">
<result property="recordId" column="record_id" />
<result property="interfaceName" column="interface_name" />
<result property="state" column="state" />
<result property="receiveData" column="receive_data" />
<result property="returnData" column="return_data" />
<result property="failureReason" column="failure_reason" />
<result property="receiveDate" column="receive_date" />
<result property="qybm" column="qybm" />
</resultMap>
<sql id="selectTLpgThirdPartyDockingInterfaceRecordVo">
select record_id, interface_name, state, receive_data, return_data, failure_reason, receive_date ,qybm from t_lpg_third_party_docking_interface_record
</sql>
<select id="selectTLpgThirdPartyDockingInterfaceRecordList" parameterType="TLpgThirdPartyDockingInterfaceRecord" resultMap="TLpgThirdPartyDockingInterfaceRecordResult">
<include refid="selectTLpgThirdPartyDockingInterfaceRecordVo"/>
<where>
<if test="interfaceName != null and interfaceName != ''"> and interface_name like concat('%', #{interfaceName}, '%')</if>
<if test="state != null and state != ''"> and state = #{state}</if>
<if test="receiveData != null and receiveData != ''"> and receive_data = #{receiveData}</if>
<if test="returnData != null and returnData != ''"> and return_data = #{returnData}</if>
<if test="failureReason != null and failureReason != ''"> and failure_reason = #{failureReason}</if>
<if test="receiveDate != null "> and receive_date = #{receiveDate}</if>
</where>
</select>
<select id="selectTLpgThirdPartyDockingInterfaceRecordById" parameterType="Long" resultMap="TLpgThirdPartyDockingInterfaceRecordResult">
<include refid="selectTLpgThirdPartyDockingInterfaceRecordVo"/>
where record_id = #{recordId}
</select>
<insert id="insertBatch" parameterType="list">
insert into t_lpg_third_party_docking_interface_record (interface_name, state,receive_data, return_data, failure_reason,
receive_date,qybm)
values
<foreach collection="list" item="item" index="index" separator=",">
(
#{item.interfaceName,jdbcType=VARCHAR}, #{item.state,jdbcType=VARCHAR}, #{item.receiveData,jdbcType=VARCHAR},
#{item.returnData,jdbcType=VARCHAR}, #{item.failureReason,jdbcType=VARCHAR},#{item.receiveDate},#{item.qybm}
)
</foreach>
</insert>
<insert id="insertTLpgThirdPartyDockingInterfaceRecord" parameterType="TLpgThirdPartyDockingInterfaceRecord" useGeneratedKeys="true" keyProperty="recordId">
insert into t_lpg_third_party_docking_interface_record
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="interfaceName != null">interface_name,</if>
<if test="state != null">state,</if>
<if test="receiveData != null">receive_data,</if>
<if test="returnData != null">return_data,</if>
<if test="failureReason != null">failure_reason,</if>
<if test="receiveDate != null">receive_date,</if>
<if test="qybm != null">qybm,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="interfaceName != null">#{interfaceName},</if>
<if test="state != null">#{state},</if>
<if test="receiveData != null">#{receiveData},</if>
<if test="returnData != null">#{returnData},</if>
<if test="failureReason != null">#{failureReason},</if>
<if test="receiveDate != null">#{receiveDate},</if>
<if test="qybm != null">#{qybm},</if>
</trim>
</insert>
<update id="updateTLpgThirdPartyDockingInterfaceRecord" parameterType="TLpgThirdPartyDockingInterfaceRecord">
update t_lpg_third_party_docking_interface_record
<trim prefix="SET" suffixOverrides=",">
<if test="interfaceName != null">interface_name = #{interfaceName},</if>
<if test="state != null">state = #{state},</if>
<if test="receiveData != null">receive_data = #{receiveData},</if>
<if test="returnData != null">return_data = #{returnData},</if>
<if test="failureReason != null">failure_reason = #{failureReason},</if>
<if test="receiveDate != null">receive_date = #{receiveDate},</if>
</trim>
where record_id = #{recordId}
</update>
<delete id="deleteTLpgThirdPartyDockingInterfaceRecordById" parameterType="Long">
delete from t_lpg_third_party_docking_interface_record where record_id = #{recordId}
</delete>
<delete id="deleteTLpgThirdPartyDockingInterfaceRecordByIds" parameterType="String">
delete from t_lpg_third_party_docking_interface_record where record_id in
<foreach item="recordId" collection="array" open="(" separator="," close=")">
#{recordId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
......@@ -58,6 +58,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
</select>
<select id="queryByCarNumsAndEnterpriseId" resultMap="TLpgVehicleInfoResult">
<include refid="selectTLpgVehicleInfoVo"/>
where enterprise_id = #{enterpriseId} and carNum in
<foreach collection="carNums" index="i" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</select>
<select id="selectTLpgVehicleInfoById" parameterType="Long" resultMap="TLpgVehicleInfoResult">
<include refid="selectTLpgVehicleInfoVo"/>
where vehicle_id = #{vehicleId}
......@@ -77,6 +85,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
</insert>
<update id="updateBatch" parameterType="list">
<foreach collection="list" item="item" index="index" separator=";">
UPDATE t_lpg_vehicle_info
<set>
station_name = #{item.stationName},
car_number = #{item.carNumber},
vehicle_code = #{item.vehicleCode},
brand_model = #{item.brandModel},
vehicle_type = #{item.vehicleType},
vehicle_load = #{item.vehicleLoad},
vehicle_size = #{item.vehicleSize},
vehicle_limt = #{item.vehicleLimt},
vehicle_inspect = #{item.vehicleInspect},
person_liable = #{item.personLiable},
on_state = #{item.onState},
vehicle_user = #{item.vehicleUser},
phone = #{item.phone},
remarks = #{item.remarks}
</set>
WHERE car_num = #{item.carNum} and enterprise_id = #{item.enterpriseId}
</foreach>
</update>
<insert id="insertTLpgVehicleInfo" parameterType="TLpgVehicleInfo" useGeneratedKeys="true" keyProperty="vehicleId">
insert into t_lpg_vehicle_info
<trim prefix="(" suffix=")" suffixOverrides=",">
......
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