Commit 0f799cc3 authored by wanghao's avatar wanghao

1 基础信息维护-液化气用户新增-外部对接接口开发

parent 7cc5be28
...@@ -160,38 +160,152 @@ public class DESEncoder { ...@@ -160,38 +160,152 @@ public class DESEncoder {
String lpggasdata = "[\n" + String lpggasdata = "[\n" +
"\t{\n" + "\t{\n" +
"\t\t\"fVillageName\":\"村庄名称-接口来的-01\",\n" + "\t\t\"userOwnId\":\"用户自有编号-接口来的-01\",\n" +
"\t\t\"fTotalNumHouse\":\"49\",\n" + "\t\t\"nickName\":\"用户名称-接口来的-01\",\n" +
"\t\t\"countyCode\":\"130104\",\n" + "\t\t\"userType\":\"1\",\n" +
"\t\t\"fBottledGasUsers\":\"15\",\n" + "\t\t\"villageId\":\"3\",\n" +
"\t\t\"fPipeGasUsers\":\"14\",\n" + "\t\t\"address\":\"地址-接口来的-01\",\n" +
"\t\t\"longitude\":\"14.56\",\n" + "\t\t\"longitude\":\"14.56\",\n" +
"\t\t\"latitude\":\"18.96\",\n" + "\t\t\"latitude\":\"18.96\",\n" +
"\t\t\"remarks\":\"备注-接口来的-01\"\n" + "\t\t\"linkman\":\"联系人-接口来的-01\",\n" +
"\t\t\"phone\":\"电话-接口来的-01\",\n" +
"\t\t\"remarks\":\"备注-接口来的-01\",\n" +
"\t\t\"safetyDeviceList\":[\n" +
"\t\t\t{\n" +
"\t\t\t\t\"fDeviceName\":\"设备名称-接口来的-01-01\",\n" +
"\t\t\t\t\"fDeviceModel\":\"设备型号-接口来的-01-01\",\n" +
"\t\t\t\t\"fIotNo\":\"物联网编号-接口来的-01-01\",\n" +
"\t\t\t\t\"fRelationDeviceType\":\"设备类型-接口来的-01-01\",\n" +
"\t\t\t\t\"fDetectionMedium\":\"探测介质-接口来的-01-01\",\n" +
"\t\t\t\t\"fDeviceInstallTime\":\"2024-09-20\",\n" +
"\t\t\t\t\"fDeviceInstallPosition\":\"设备安装位置-接口来的-01-01\",\n" +
"\t\t\t\t\"fHead\":\"负责人-接口来的-01-01\",\n" +
"\t\t\t\t\"fPhone\":\"联系电话-接口来的-01-01\"\n" +
"\t\t\t},\n" +
"\t\t\t{\n" +
"\t\t\t\t\"fDeviceName\":\"设备名称-接口来的-01-02\",\n" +
"\t\t\t\t\"fDeviceModel\":\"设备型号-接口来的-01-02\",\n" +
"\t\t\t\t\"fIotNo\":\"物联网编号-接口来的-01-02\",\n" +
"\t\t\t\t\"fRelationDeviceType\":\"设备类型-接口来的-01-02\",\n" +
"\t\t\t\t\"fDetectionMedium\":\"探测介质-接口来的-01-02\",\n" +
"\t\t\t\t\"fDeviceInstallTime\":\"2024-09-20\",\n" +
"\t\t\t\t\"fDeviceInstallPosition\":\"设备安装位置-接口来的-01-02\",\n" +
"\t\t\t\t\"fHead\":\"负责人-接口来的-01-02\",\n" +
"\t\t\t\t\"fPhone\":\"联系电话-接口来的-01-02\"\n" +
"\t\t\t},\n" +
"\t\t\t{\n" +
"\n" +
"\t\t\t\t\"fDeviceName\":\"设备名称-接口来的-01-03\",\n" +
"\t\t\t\t\"fDeviceModel\":\"设备型号-接口来的-01-03\",\n" +
"\t\t\t\t\"fIotNo\":\"物联网编号-接口来的-01-03\",\n" +
"\t\t\t\t\"fRelationDeviceType\":\"设备类型-接口来的-01-03\",\n" +
"\t\t\t\t\"fDetectionMedium\":\"探测介质-接口来的-01-03\",\n" +
"\t\t\t\t\"fDeviceInstallTime\":\"2024-09-20\",\n" +
"\t\t\t\t\"fDeviceInstallPosition\":\"设备安装位置-接口来的-01-03\",\n" +
"\t\t\t\t\"fHead\":\"负责人-接口来的-01-03\",\n" +
"\t\t\t\t\"fPhone\":\"联系电话-接口来的-01-03\"\n" +
"\t\t\t}\n" +
"\t\t]\n" +
"\t},\n" + "\t},\n" +
"\t{\n" + "\t{\n" +
"\n" + "\n" +
"\t\t\"fVillageName\":\"村庄名称-接口来的-02\",\n" + "\t\t\"userOwnId\":\"用户自有编号-接口来的-02\",\n" +
"\t\t\"fTotalNumHouse\":\"49\",\n" + "\t\t\"nickName\":\"用户名称-接口来的-02\",\n" +
"\t\t\"countyCode\":\"130105\",\n" + "\t\t\"userType\":\"2\",\n" +
"\t\t\"fBottledGasUsers\":\"15\",\n" + "\t\t\"villageId\":\"\",\n" +
"\t\t\"fPipeGasUsers\":\"14\",\n" + "\t\t\"address\":\"地址-接口来的-02\",\n" +
"\t\t\"longitude\":\"14.56\",\n" + "\t\t\"longitude\":\"14.56\",\n" +
"\t\t\"latitude\":\"18.96\",\n" + "\t\t\"latitude\":\"18.96\",\n" +
"\t\t\"remarks\":\"备注-接口来的-01\"\n" + "\t\t\"linkman\":\"联系人-接口来的-02\",\n" +
"\t\t\"phone\":\"电话-接口来的-02\",\n" +
"\t\t\"remarks\":\"备注-接口来的-02\",\n" +
"\t\t\"safetyDeviceList\":[\n" +
"\t\t\t{\n" +
"\t\t\t\t\"fDeviceName\":\"设备名称-接口来的-02-01\",\n" +
"\t\t\t\t\"fDeviceModel\":\"设备型号-接口来的-02-01\",\n" +
"\t\t\t\t\"fIotNo\":\"物联网编号-接口来的-02-01\",\n" +
"\t\t\t\t\"fRelationDeviceType\":\"设备类型-接口来的-02-01\",\n" +
"\t\t\t\t\"fDetectionMedium\":\"探测介质-接口来的-02-01\",\n" +
"\t\t\t\t\"fDeviceInstallTime\":\"2024-09-21\",\n" +
"\t\t\t\t\"fDeviceInstallPosition\":\"设备安装位置-接口来的-02-01\",\n" +
"\t\t\t\t\"fHead\":\"负责人-接口来的-02-01\",\n" +
"\t\t\t\t\"fPhone\":\"联系电话-接口来的-02-01\"\n" +
"\t\t\t},\n" +
"\t\t\t{\n" +
"\t\t\t\t\"fDeviceName\":\"设备名称-接口来的-02-02\",\n" +
"\t\t\t\t\"fDeviceModel\":\"设备型号-接口来的-02-02\",\n" +
"\t\t\t\t\"fIotNo\":\"物联网编号-接口来的-02-02\",\n" +
"\t\t\t\t\"fRelationDeviceType\":\"设备类型-接口来的-02-02\",\n" +
"\t\t\t\t\"fDetectionMedium\":\"探测介质-接口来的-02-02\",\n" +
"\t\t\t\t\"fDeviceInstallTime\":\"2024-09-21\",\n" +
"\t\t\t\t\"fDeviceInstallPosition\":\"设备安装位置-接口来的-02-02\",\n" +
"\t\t\t\t\"fHead\":\"负责人-接口来的-02-02\",\n" +
"\t\t\t\t\"fPhone\":\"联系电话-接口来的-02-02\"\n" +
"\t\t\t},\n" +
"\t\t\t{\n" +
"\n" +
"\t\t\t\t\"fDeviceName\":\"设备名称-接口来的-02-03\",\n" +
"\t\t\t\t\"fDeviceModel\":\"设备型号-接口来的-02-03\",\n" +
"\t\t\t\t\"fIotNo\":\"物联网编号-接口来的-02-03\",\n" +
"\t\t\t\t\"fRelationDeviceType\":\"设备类型-接口来的-02-03\",\n" +
"\t\t\t\t\"fDetectionMedium\":\"探测介质-接口来的-02-03\",\n" +
"\t\t\t\t\"fDeviceInstallTime\":\"2024-09-21\",\n" +
"\t\t\t\t\"fDeviceInstallPosition\":\"设备安装位置-接口来的-02-03\",\n" +
"\t\t\t\t\"fHead\":\"负责人-接口来的-02-03\",\n" +
"\t\t\t\t\"fPhone\":\"联系电话-接口来的-02-03\"\n" +
"\t\t\t}\n" +
"\t\t]\n" +
"\t},\n" + "\t},\n" +
"\t{\n" + "\t{\n" +
"\n" + "\n" +
"\t\t\"fVillageName\":\"村庄名称-接口来的-02\",\n" + "\t\t\"userOwnId\":\"用户自有编号-接口来的-03\",\n" +
"\t\t\"fTotalNumHouse\":\"49\",\n" + "\t\t\"nickName\":\"用户名称-接口来的-03\",\n" +
"\t\t\"countyCode\":\"130107\",\n" + "\t\t\"userType\":\"4\",\n" +
"\t\t\"fBottledGasUsers\":\"15\",\n" + "\t\t\"villageId\":\"\",\n" +
"\t\t\"fPipeGasUsers\":\"14\",\n" + "\t\t\"address\":\"地址-接口来的-03\",\n" +
"\t\t\"longitude\":\"14.56\",\n" + "\t\t\"longitude\":\"14.56\",\n" +
"\t\t\"latitude\":\"18.96\",\n" + "\t\t\"latitude\":\"18.96\",\n" +
"\t\t\"remarks\":\"备注-接口来的-01\"\n" + "\t\t\"linkman\":\"联系人-接口来的-03\",\n" +
"\t\t\"phone\":\"电话-接口来的-03\",\n" +
"\t\t\"remarks\":\"备注-接口来的-03\",\n" +
"\t\t\"safetyDeviceList\":[\n" +
"\t\t\t{\n" +
"\t\t\t\t\"fDeviceName\":\"设备名称-接口来的-03-01\",\n" +
"\t\t\t\t\"fDeviceModel\":\"设备型号-接口来的-03-01\",\n" +
"\t\t\t\t\"fIotNo\":\"物联网编号-接口来的-03-01\",\n" +
"\t\t\t\t\"fRelationDeviceType\":\"设备类型-接口来的-03-01\",\n" +
"\t\t\t\t\"fDetectionMedium\":\"探测介质-接口来的-03-01\",\n" +
"\t\t\t\t\"fDeviceInstallTime\":\"2024-09-22\",\n" +
"\t\t\t\t\"fDeviceInstallPosition\":\"设备安装位置-接口来的-03-01\",\n" +
"\t\t\t\t\"fHead\":\"负责人-接口来的-03-01\",\n" +
"\t\t\t\t\"fPhone\":\"联系电话-接口来的-03-01\"\n" +
"\t\t\t},\n" +
"\t\t\t{\n" +
"\t\t\t\t\"fDeviceName\":\"设备名称-接口来的-03-02\",\n" +
"\t\t\t\t\"fDeviceModel\":\"设备型号-接口来的-03-02\",\n" +
"\t\t\t\t\"fIotNo\":\"物联网编号-接口来的-03-02\",\n" +
"\t\t\t\t\"fRelationDeviceType\":\"设备类型-接口来的-03-02\",\n" +
"\t\t\t\t\"fDetectionMedium\":\"探测介质-接口来的-03-02\",\n" +
"\t\t\t\t\"fDeviceInstallTime\":\"2024-09-22\",\n" +
"\t\t\t\t\"fDeviceInstallPosition\":\"设备安装位置-接口来的-03-02\",\n" +
"\t\t\t\t\"fHead\":\"负责人-接口来的-03-02\",\n" +
"\t\t\t\t\"fPhone\":\"联系电话-接口来的-03-02\"\n" +
"\t\t\t},\n" +
"\t\t\t{\n" +
"\n" +
"\t\t\t\t\"fDeviceName\":\"设备名称-接口来的-03-03\",\n" +
"\t\t\t\t\"fDeviceModel\":\"设备型号-接口来的-03-03\",\n" +
"\t\t\t\t\"fIotNo\":\"物联网编号-接口来的-03-03\",\n" +
"\t\t\t\t\"fRelationDeviceType\":\"设备类型-接口来的-03-03\",\n" +
"\t\t\t\t\"fDetectionMedium\":\"探测介质-接口来的-03-03\",\n" +
"\t\t\t\t\"fDeviceInstallTime\":\"2024-09-22\",\n" +
"\t\t\t\t\"fDeviceInstallPosition\":\"设备安装位置-接口来的-03-03\",\n" +
"\t\t\t\t\"fHead\":\"负责人-接口来的-03-03\",\n" +
"\t\t\t\t\"fPhone\":\"联系电话-接口来的-03-03\"\n" +
"\t\t\t}\n" +
"\t\t]\n" +
"\t}\n" + "\t}\n" +
"]"; "]\n";
JSONArray objects = JSON.parseArray(lpggasdata); JSONArray objects = JSON.parseArray(lpggasdata);
System.out.println(objects); System.out.println(objects);
......
...@@ -2,6 +2,7 @@ package com.zehong.system.domain; ...@@ -2,6 +2,7 @@ package com.zehong.system.domain;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.List; import java.util.List;
import java.util.Objects;
import com.zehong.system.domain.vo.UserManageSafetyDeviceExportVo; import com.zehong.system.domain.vo.UserManageSafetyDeviceExportVo;
import com.zehong.system.domain.vo.YeHuaqiUserManageSafetyDeviceExportVo; import com.zehong.system.domain.vo.YeHuaqiUserManageSafetyDeviceExportVo;
...@@ -287,6 +288,19 @@ public class TYehuaqiUser extends BaseEntity ...@@ -287,6 +288,19 @@ public class TYehuaqiUser extends BaseEntity
this.userOwnId = userOwnId; this.userOwnId = userOwnId;
} }
@Override
public boolean equals(Object obj) {
if (this == obj) return true;
if (obj == null || getClass() != obj.getClass()) return false;
TYehuaqiUser yehuaqiUser = (TYehuaqiUser) obj;
return Objects.equals(userOwnId,yehuaqiUser.getUserOwnId());
}
@Override
public int hashCode() {
return Objects.hash(userOwnId);
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
......
...@@ -4,6 +4,11 @@ import java.math.BigDecimal; ...@@ -4,6 +4,11 @@ import java.math.BigDecimal;
public class TUserManageVillageThirdPartyVo { public class TUserManageVillageThirdPartyVo {
/**
* id
*/
private Long fVillageId;
/** /**
* 名称 * 名称
*/ */
...@@ -36,6 +41,14 @@ public class TUserManageVillageThirdPartyVo { ...@@ -36,6 +41,14 @@ public class TUserManageVillageThirdPartyVo {
/** 备注 */ /** 备注 */
private String remarks; private String remarks;
public Long getfVillageId() {
return fVillageId;
}
public void setfVillageId(Long fVillageId) {
this.fVillageId = fVillageId;
}
public String getfVillageName() { public String getfVillageName() {
return fVillageName; return fVillageName;
} }
......
...@@ -48,6 +48,13 @@ public interface TUserManageVillageMapper ...@@ -48,6 +48,13 @@ public interface TUserManageVillageMapper
* @return r * @return r
*/ */
List<TUserManageVillage> queryByVillageNames(@Param("list") List<String> list); List<TUserManageVillage> queryByVillageNames(@Param("list") List<String> list);
/**
* 根据id集合查询
* @param villageIds s
* @return r
*/
List<TUserManageVillage> queryByVillageIds(@Param("list") List<Long> villageIds);
/** /**
* 新增基本信息维护-用户管理-居住区(村庄) * 新增基本信息维护-用户管理-居住区(村庄)
* *
......
...@@ -51,6 +51,14 @@ public interface TYehuaqiUserMapper ...@@ -51,6 +51,14 @@ public interface TYehuaqiUserMapper
* @return 燃气用户集合 * @return 燃气用户集合
*/ */
public List<TYehuaqiUser> selectTYehuaqiUserList(TYehuaqiUser tYehuaqiUser); public List<TYehuaqiUser> selectTYehuaqiUserList(TYehuaqiUser tYehuaqiUser);
/**
* 根据 userOwnId list 和 enterpriseId 查询数据
* @param userOwnIds userOwnId list
* @param enterpriseId enterpriseId
* @return r
*/
public List<TYehuaqiUser> queryByUserOwnIdAndEnterpriseIdForThirdParty(@Param("userOwnIds") List<String> userOwnIds,@Param("enterpriseId") String enterpriseId);
public List<TYehuaqiUser> selectTYehuaqiUserListTwo(TYehuaqiUser tYehuaqiUser); public List<TYehuaqiUser> selectTYehuaqiUserListTwo(TYehuaqiUser tYehuaqiUser);
...@@ -76,6 +84,13 @@ public interface TYehuaqiUserMapper ...@@ -76,6 +84,13 @@ public interface TYehuaqiUserMapper
*/ */
public int insertBatch(@Param("list") List<TYehuaqiUser> list); public int insertBatch(@Param("list") List<TYehuaqiUser> list);
/**
* 提供给第三方接口调用时的批量插入
* @param tYehuaqiUsers r
* @return r
*/
public int insertBatchForThirdParty(List<TYehuaqiUser> tYehuaqiUsers);
/** /**
* 查询燃气用户列表 - 导出使用 * 查询燃气用户列表 - 导出使用
* *
...@@ -101,6 +116,12 @@ public interface TYehuaqiUserMapper ...@@ -101,6 +116,12 @@ public interface TYehuaqiUserMapper
*/ */
public int updateTYehuaqiUser(TYehuaqiUser tYehuaqiUser); public int updateTYehuaqiUser(TYehuaqiUser tYehuaqiUser);
/**批量修改
* @param list list
* @return r
*/
public int updateBatch(@Param("list") List<TYehuaqiUser> list);
/** /**
* 删除燃气用户 * 删除燃气用户
* *
......
...@@ -51,6 +51,12 @@ public interface TYehuaqiuserSafetyDeviceInfoMapper ...@@ -51,6 +51,12 @@ public interface TYehuaqiuserSafetyDeviceInfoMapper
*/ */
public int insertBatch(@Param("list") List<TYehuaqiuserSafetyDeviceInfo> tYehuaqiuserSafetyDeviceInfos); public int insertBatch(@Param("list") List<TYehuaqiuserSafetyDeviceInfo> tYehuaqiuserSafetyDeviceInfos);
/**
* 批量删除
* @param list list
* @return r
*/
public int deleteBatchSafetyDeviceByUserIds(@Param("list") List<Long> list);
/** /**
* 根据 userid删除 数据 * 根据 userid删除 数据
......
...@@ -49,6 +49,13 @@ public interface ITUserManageVillageService ...@@ -49,6 +49,13 @@ public interface ITUserManageVillageService
* @return r * @return r
*/ */
public List<TUserManageVillage> queryByVillageNames(List<String> villageNames); public List<TUserManageVillage> queryByVillageNames(List<String> villageNames);
/**
* 根据 id集合查询
* @param villageIds v
* @return r
*/
public List<TUserManageVillage> queryByVillageIds(List<Long> villageIds);
/** /**
* 新增基本信息维护-用户管理-居住区(村庄) * 新增基本信息维护-用户管理-居住区(村庄)
* *
......
...@@ -4,6 +4,7 @@ import java.util.List; ...@@ -4,6 +4,7 @@ import java.util.List;
import com.zehong.system.domain.TDetectorUser; import com.zehong.system.domain.TDetectorUser;
import com.zehong.system.domain.TYehuaqiUser; import com.zehong.system.domain.TYehuaqiUser;
import com.zehong.system.domain.TYehuaqiuserSafetyDeviceInfo;
import com.zehong.system.domain.vo.*; import com.zehong.system.domain.vo.*;
/** /**
...@@ -32,6 +33,14 @@ public interface ITYehuaqiUserService ...@@ -32,6 +33,14 @@ public interface ITYehuaqiUserService
public List<TYehuaqiUser> selectAllUserList(TYehuaqiUser tYehuaqiUser); public List<TYehuaqiUser> selectAllUserList(TYehuaqiUser tYehuaqiUser);
/**
* 根据 userOwnId list 和 enterpriseId 查询数据
* @param userOwnIds userOwnId list
* @param enterpriseId enterpriseId
* @return r
*/
public List<TYehuaqiUser> queryByUserOwnIdAndEnterpriseIdForThirdParty(List<String> userOwnIds,String enterpriseId);
/** /**
* 根据企业id统计错误数据 * 根据企业id统计错误数据
* @return r * @return r
...@@ -65,6 +74,20 @@ public interface ITYehuaqiUserService ...@@ -65,6 +74,20 @@ public interface ITYehuaqiUserService
*/ */
public List<TYehuaqiUser> queryByUserOwnIdsAndEnterpriseId(List<String> userOwnIds,String enterpriseId); public List<TYehuaqiUser> queryByUserOwnIdsAndEnterpriseId(List<String> userOwnIds,String enterpriseId);
/**
* 批量插入 安全装置
* @param yehuaqiuserSafetyDeviceInfos y
* @return r
*/
public int insertBatchSafetyDevice(List<TYehuaqiuserSafetyDeviceInfo> yehuaqiuserSafetyDeviceInfos);
/**
* 根据 userId 集合批量删除
* @param userIds u
* @return r
*/
public int deleteBatchSafetyDeviceByUserIds(List<Long> userIds);
/** /**
* 查询导入的错误数据 * 查询导入的错误数据
* @return r * @return r
...@@ -79,6 +102,19 @@ public interface ITYehuaqiUserService ...@@ -79,6 +102,19 @@ public interface ITYehuaqiUserService
*/ */
public int insertTYehuaqiUser(TYehuaqiUser tYehuaqiUser); public int insertTYehuaqiUser(TYehuaqiUser tYehuaqiUser);
/**
* 批量插入
* @param tYehuaqiUsers t
* @return r
*/
public int insertBatch(List<TYehuaqiUser> tYehuaqiUsers);
/**
* 提供给第三方接口调用时的批量插入
* @param tYehuaqiUsers r
* @return r
*/
public int insertBatchForThirdParty(List<TYehuaqiUser> tYehuaqiUsers);
/** /**
* 修改燃气用户 * 修改燃气用户
* *
...@@ -87,6 +123,13 @@ public interface ITYehuaqiUserService ...@@ -87,6 +123,13 @@ public interface ITYehuaqiUserService
*/ */
public int updateTYehuaqiUser(TYehuaqiUser tYehuaqiUser); public int updateTYehuaqiUser(TYehuaqiUser tYehuaqiUser);
/**
* 批量修改
* @param tYehuaqiUsers t
* @return r
*/
public int updateBatch(List<TYehuaqiUser> tYehuaqiUsers);
/** /**
* 批量删除燃气用户 * 批量删除燃气用户
* *
......
...@@ -92,6 +92,16 @@ public class TUserManageVillageServiceImpl implements ITUserManageVillageService ...@@ -92,6 +92,16 @@ public class TUserManageVillageServiceImpl implements ITUserManageVillageService
return tUserManageVillageMapper.queryByVillageNames(villageNames); return tUserManageVillageMapper.queryByVillageNames(villageNames);
} }
/**
* 根据 id 集合查询
* @param villageIds v
* @return r
*/
@Override
public List<TUserManageVillage> queryByVillageIds(List<Long> villageIds) {
return tUserManageVillageMapper.queryByVillageIds(villageIds);
}
/** /**
* 新增基本信息维护-用户管理-居住区(村庄) * 新增基本信息维护-用户管理-居住区(村庄)
* *
......
...@@ -76,6 +76,18 @@ public class TYehuaqiUserServiceImpl implements ITYehuaqiUserService ...@@ -76,6 +76,18 @@ public class TYehuaqiUserServiceImpl implements ITYehuaqiUserService
{ {
return tYehuaqiUserMapper.selectTYehuaqiUserList(tYehuaqiUser); return tYehuaqiUserMapper.selectTYehuaqiUserList(tYehuaqiUser);
} }
/**
* 根据 userOwnId list 和 enterpriseId 查询数据
* @param userOwnIds userOwnId list
* @param enterpriseId enterpriseId
* @return r
*/
@Override
public List<TYehuaqiUser> queryByUserOwnIdAndEnterpriseIdForThirdParty(List<String> userOwnIds, String enterpriseId) {
return tYehuaqiUserMapper.queryByUserOwnIdAndEnterpriseIdForThirdParty(userOwnIds,enterpriseId);
}
@Override @Override
public List<TYehuaqiUser> selectAllUserList(TYehuaqiUser tYehuaqiUser) public List<TYehuaqiUser> selectAllUserList(TYehuaqiUser tYehuaqiUser)
{ {
...@@ -114,6 +126,25 @@ public class TYehuaqiUserServiceImpl implements ITYehuaqiUserService ...@@ -114,6 +126,25 @@ public class TYehuaqiUserServiceImpl implements ITYehuaqiUserService
return tYehuaqiUserMapper.insertTYehuaqiUser(tYehuaqiUser); return tYehuaqiUserMapper.insertTYehuaqiUser(tYehuaqiUser);
} }
/**
* 批量插入
* @param tYehuaqiUsers t
* @return r
*/
@Override
public int insertBatch(List<TYehuaqiUser> tYehuaqiUsers) {
return tYehuaqiUserMapper.insertBatch(tYehuaqiUsers);
}
/**
* 提供给第三方接口调用时的批量插入
* @param tYehuaqiUsers r
* @return r
*/
public int insertBatchForThirdParty(List<TYehuaqiUser> tYehuaqiUsers){
return tYehuaqiUserMapper.insertBatchForThirdParty(tYehuaqiUsers);
}
/** /**
* 修改燃气用户 * 修改燃气用户
* *
...@@ -127,6 +158,16 @@ public class TYehuaqiUserServiceImpl implements ITYehuaqiUserService ...@@ -127,6 +158,16 @@ public class TYehuaqiUserServiceImpl implements ITYehuaqiUserService
return tYehuaqiUserMapper.updateTYehuaqiUser(tYehuaqiUser); return tYehuaqiUserMapper.updateTYehuaqiUser(tYehuaqiUser);
} }
/**
* 批量修改
* @param tYehuaqiUsers t
* @return r
*/
@Override
public int updateBatch(List<TYehuaqiUser> tYehuaqiUsers) {
return tYehuaqiUserMapper.updateBatch(tYehuaqiUsers);
}
/** /**
* 批量删除燃气用户 * 批量删除燃气用户
* *
...@@ -219,6 +260,26 @@ public class TYehuaqiUserServiceImpl implements ITYehuaqiUserService ...@@ -219,6 +260,26 @@ public class TYehuaqiUserServiceImpl implements ITYehuaqiUserService
return tYehuaqiUserMapper.queryByUserOwnIdsAndEnterpriseId(userOwnIds,enterpriseId); return tYehuaqiUserMapper.queryByUserOwnIdsAndEnterpriseId(userOwnIds,enterpriseId);
} }
/**
* 批量插入 安全装置
* @param yehuaqiuserSafetyDeviceInfos y
* @return r
*/
@Override
public int insertBatchSafetyDevice(List<TYehuaqiuserSafetyDeviceInfo> yehuaqiuserSafetyDeviceInfos) {
return yehuaqiuserSafetyDeviceInfoMapper.insertBatch(yehuaqiuserSafetyDeviceInfos);
}
/**
* 根据 用户userId 集合删除数据
* @param userIds u
* @return r
*/
@Override
public int deleteBatchSafetyDeviceByUserIds(List<Long> userIds) {
return 0;
}
/** /**
* 处理解析好的 自定义模版的导入的数据 多sheet * 处理解析好的 自定义模版的导入的数据 多sheet
* @param gasUserExportVos d 燃气用户数据 * @param gasUserExportVos d 燃气用户数据
......
...@@ -19,6 +19,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -19,6 +19,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<resultMap type="TUserManageVillageThirdPartyVo" id="TUserManageVillageThirdPartyVoResult"> <resultMap type="TUserManageVillageThirdPartyVo" id="TUserManageVillageThirdPartyVoResult">
<result property="fVillageId" column="f_village_id" />
<result property="fVillageName" column="f_village_name" /> <result property="fVillageName" column="f_village_name" />
<result property="fRegionName" column="fRegionName" /> <result property="fRegionName" column="fRegionName" />
<result property="countyCode" column="countyCode" /> <result property="countyCode" column="countyCode" />
...@@ -121,6 +122,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -121,6 +122,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach> </foreach>
</select> </select>
<select id="queryByVillageIds" parameterType="list" resultMap="TUserManageVillageResult">
<include refid="selectTUserManageVillageVo"></include>
where village.f_village_id in
<foreach collection="list" index="i" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</select>
<select id="selectTUserManageVillageById" parameterType="Long" resultMap="TUserManageVillageResult"> <select id="selectTUserManageVillageById" parameterType="Long" resultMap="TUserManageVillageResult">
<include refid="selectTUserManageVillageVo"/> <include refid="selectTUserManageVillageVo"/>
where f_village_id = #{fVillageId} where f_village_id = #{fVillageId}
......
...@@ -75,6 +75,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -75,6 +75,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
phone, email, create_time, update_time, is_del, remarks ,f_village_id,error_msg,user_own_id from t_yehuaqi_user phone, email, create_time, update_time, is_del, remarks ,f_village_id,error_msg,user_own_id from t_yehuaqi_user
</sql> </sql>
<select id="queryByUserOwnIdAndEnterpriseIdForThirdParty" resultMap="TYehuaqiUserResult">
<include refid="selectTYehuaqiUserVo"/>
where beyond_enterprise_id = #{enterpriseId} and user_own_id in
<foreach collection="userOwnIds" index="i" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</select>
<select id="selectTYehuaqiUserList" parameterType="TYehuaqiUser" resultMap="TYehuaqiUserResult"> <select id="selectTYehuaqiUserList" parameterType="TYehuaqiUser" resultMap="TYehuaqiUserResult">
select a.user_id, select a.user_id,
...@@ -181,6 +189,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -181,6 +189,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
) )
</foreach> </foreach>
</insert> </insert>
<insert id="insertBatchForThirdParty" parameterType="list" useGeneratedKeys="true" keyProperty="userId">
insert into t_yehuaqi_user (nick_name, beyond_enterprise_name,beyond_enterprise_id, user_type, village_name,f_village_id,
address, linkman, phone, remarks, error_msg,user_own_id,longitude,latitude)
values
<foreach collection="list" item="item" index="index" separator=",">
(
#{item.nickName,jdbcType=VARCHAR}, #{item.beyondEnterpriseName,jdbcType=VARCHAR}, #{item.beyondEnterpriseId,jdbcType=VARCHAR},
#{item.userType,jdbcType=VARCHAR}, #{item.villageName,jdbcType=VARCHAR},#{item.villageId,jdbcType=DECIMAL},
#{item.address,jdbcType=VARCHAR}, #{item.linkman,jdbcType=VARCHAR}, #{item.phone,jdbcType=VARCHAR},
#{item.remarks,jdbcType=VARCHAR}, #{item.errorMsg,jdbcType=VARCHAR}, #{item.userOwnId,jdbcType=VARCHAR}, #{item.longitude}, #{item.latitude}
)
</foreach>
</insert>
<insert id="insertTYehuaqiUser" parameterType="TYehuaqiUser" useGeneratedKeys="true" keyProperty="userId"> <insert id="insertTYehuaqiUser" parameterType="TYehuaqiUser" useGeneratedKeys="true" keyProperty="userId">
insert into t_yehuaqi_user insert into t_yehuaqi_user
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
...@@ -219,6 +241,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -219,6 +241,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim> </trim>
</insert> </insert>
<update id="updateBatch" parameterType="list">
<foreach collection="list" item="item" index="index" separator=";">
UPDATE t_yehuaqi_user
<trim prefix="SET" suffixOverrides=",">
<if test="item.nickName != null">nick_name = #{item.nickName},</if>
<if test="item.userType != null">user_type = #{item.userType},</if>
<if test="item.villageId != null">f_village_id = #{item.villageId},</if>
<if test="item.address != null">address = #{item.address},</if>
<if test="item.longitude != null">longitude = #{item.longitude},</if>
<if test="item.latitude != null">latitude = #{item.latitude},</if>
<if test="item.linkman != null">linkman = #{item.linkman},</if>
<if test="item.phone != null">phone = #{item.phone},</if>
<if test="item.remarks != null">remarks = #{item.remarks},</if>
</trim>
WHERE user_id = #{item.userId}
</foreach>
</update>
<update id="updateTYehuaqiUser" parameterType="TYehuaqiUser"> <update id="updateTYehuaqiUser" parameterType="TYehuaqiUser">
update t_yehuaqi_user update t_yehuaqi_user
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
......
...@@ -93,6 +93,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -93,6 +93,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
) )
</foreach> </foreach>
</insert> </insert>
<delete id="deleteBatchSafetyDeviceByUserIds" parameterType="list">
delete from t_yehuaqiuser_safety_device_info where f_relation_user_id in
<foreach collection="list" close=")" separator="," open="(" item="item" index="i">
#{item}
</foreach>
</delete>
<update id="updateTYehuaqiuserSafetyDeviceInfo" parameterType="TYehuaqiuserSafetyDeviceInfo"> <update id="updateTYehuaqiuserSafetyDeviceInfo" parameterType="TYehuaqiuserSafetyDeviceInfo">
update t_yehuaqiuser_safety_device_info update t_yehuaqiuser_safety_device_info
......
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