Commit 8b6d12db authored by wanghao's avatar wanghao

1 基础信息维护下 的 天然气用户 和 液化石油气监管下的 液化气用户 由之前的两张表 合并成 一张表处理

parent 130ca818
......@@ -344,12 +344,19 @@ public class TDetectorUserController extends BaseController
if (osName.contains("windows")) {
String filePath = "importTemplate/燃气用户导出模版.xlsx";
if ("1".equals(tDetectorUser.getGasType())) {
filePath = "importTemplate/液化气用户导出模版.xlsx";
}
//用来读取resources下的文件
Resource resource = new ClassPathResource(filePath);
file = resource.getFile();
} else {
file = ResourceUtils.getFile("/data/java/baseversion/importTemplate/燃气用户导出模版.xlsx");
if ("1".equals(tDetectorUser.getGasType())) {
file = ResourceUtils.getFile("/data/java/baseversion/importTemplate/液化气用户导出模版.xlsx");
} else {
file = ResourceUtils.getFile("/data/java/baseversion/importTemplate/燃气用户导出模版.xlsx");
}
}
List<UserManageSafetyDeviceExportVo> userManageSafetyDeviceExportVoList = new ArrayList<>();
......@@ -397,8 +404,8 @@ public class TDetectorUserController extends BaseController
* @param response r
* @throws IOException i
*/
@GetMapping("/exportErrorData")
public void exportErrorData(HttpServletResponse response,String gasType) throws IOException {
@GetMapping("/exportErrorData/{gasType}")
public void exportErrorData(HttpServletResponse response,@PathVariable("gasType") String gasType) throws IOException {
//判断是否是 windows环境,
String osName = System.getProperty("os.name").toLowerCase();
......@@ -409,13 +416,24 @@ public class TDetectorUserController extends BaseController
//如果是本地或测试环境
if (osName.contains("windows")) {
String filePath = "importTemplate/燃气用户错误导入数据模版.xlsx";
String filePath;
if ("1".equals(gasType)) {
filePath = "importTemplate/液化气用户错误导入数据模版.xlsx";
} else {
filePath = "importTemplate/燃气用户错误导入数据模版.xlsx";
}
//用来读取resources下的文件
Resource resource = new ClassPathResource(filePath);
file = resource.getFile();
} else {
file = ResourceUtils.getFile("/data/java/baseversion/importTemplate/燃气用户错误导入数据模版.xlsx");
if("1".equals(gasType)) {
file = ResourceUtils.getFile("/data/java/baseversion/importTemplate/液化气用户错误导入数据模版.xlsx");
} else {
file = ResourceUtils.getFile("/data/java/baseversion/importTemplate/燃气用户错误导入数据模版.xlsx");
}
}
List<TDetectorUser> tDetectorUsers = tDetectorUserService.queryErrorDetectorUserList(gasType);
......@@ -432,7 +450,12 @@ public class TDetectorUserController extends BaseController
total.put("maplist",userManageGasUserExportVos);
Workbook workbook = ExcelExportUtil.exportExcel(params, total);
String fileName = "燃气用户错误导入数据模版.xlsx";
String fileName;
if("1".equals(gasType)) {
fileName = "天然气用户错误导入数据模版.xlsx";
} else {
fileName = "燃气用户错误导入数据模版.xlsx";
}
response.setContentType("application/vnd.ms-excel");
response.setCharacterEncoding("utf-8");
response.setHeader("Content-disposition", "attachment;filename=" + URLEncoder.encode(fileName, "UTF-8"));
......@@ -576,36 +599,59 @@ public class TDetectorUserController extends BaseController
return AjaxResult.success();
}
/**
* 自定义模版的多sheet导入
* @param file f
* @return r
* @throws Exception e
*/
@PostMapping("/moreSheetImportExcel")
public AjaxResult moreSheetImportExcel(MultipartFile file,boolean updateSupport) throws Exception {
// /**
// * 自定义模版的多sheet导入
// * @param file f
// * @return r
// * @throws Exception e
// */
// @PostMapping("/moreSheetImportExcel")
public AjaxResult moreSheetImportExcel(MultipartFile file,boolean updateSupport,String gasType) throws Exception {
String originalFilename = file.getOriginalFilename();
if (originalFilename != null && originalFilename.contains("错误")) {
List<UserManageGasUserExportVo> userManageGasUserobjects = ExcelUtil.moreSheetImportExcel(file, 1, 2, UserManageGasUserExportVo.class, 0);
tDetectorUserService.handleCustomMoreSheetImportData(userManageGasUserobjects,null,updateSupport,true);
tDetectorUserService.handleCustomMoreSheetImportData(userManageGasUserobjects,null,updateSupport,true,gasType);
return AjaxResult.success();
} else{
List<UserManageGasUserExportVo> userManageGasUserobjects = ExcelUtil.moreSheetImportExcel(file, 1, 2, UserManageGasUserExportVo.class, 0);
List<UserManageSafetyDeviceExportVo> userManageSafetyobjects = ExcelUtil.moreSheetImportExcel(file, 1, 2, UserManageSafetyDeviceExportVo.class, 1);
tDetectorUserService.handleCustomMoreSheetImportData(userManageGasUserobjects,userManageSafetyobjects,updateSupport,false);
tDetectorUserService.handleCustomMoreSheetImportData(userManageGasUserobjects,userManageSafetyobjects,updateSupport,false,gasType);
return AjaxResult.success();
}
}
/**
* 自定义模版的多sheet导入
* @param file f
* @return r
* @throws Exception e
*/
@PostMapping("/moreSheetImportExcel")
public AjaxResult moreSheetImportExcel(MultipartFile file,boolean updateSupport) throws Exception {
return moreSheetImportExcel(file,updateSupport,"0");
}
/**
* 自定义模版的多sheet导入 液化气有用户导入
* @param file f
* @return r
* @throws Exception e
*/
@PostMapping("/moreSheetImportExcelLpg")
public AjaxResult moreSheetImportExcelLpg(MultipartFile file,boolean updateSupport) throws Exception {
return moreSheetImportExcel(file,updateSupport,"1");
}
/**
* 查询当前用户导入 燃气用户错误的数据
* @return i
*/
@GetMapping("/countImportError")
public AjaxResult countImportError(String gasType)
@GetMapping("/countImportError/{gasType}")
public AjaxResult countImportError(@PathVariable("gasType") String gasType)
{
int i = tDetectorUserService.countByBeyondEnterpriseId(gasType);
return AjaxResult.success(i);
......@@ -615,8 +661,8 @@ public class TDetectorUserController extends BaseController
* 清除当前用户导入 燃气用户错误的数据
*/
@Log(title = "燃气用户错误导入记录", businessType = BusinessType.EXPORT)
@GetMapping("/clearImportError")
public AjaxResult clearImportError(String gasType)
@GetMapping("/clearImportError/{gasType}")
public AjaxResult clearImportError(@PathVariable("gasType") String gasType)
{
return AjaxResult.success(tDetectorUserService.clearImportErrorByEnterpriseId(gasType));
}
......
......@@ -26,7 +26,7 @@ spring:
# 国际化资源文件路径
basename: i18n/messages
profiles:
active: prd
active: test
# 文件上传
servlet:
multipart:
......
......@@ -3,6 +3,7 @@ package com.zehong.system.domain;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.zehong.system.domain.vo.UserManageSafetyDeviceExportVo;
......@@ -352,6 +353,19 @@ public class TDetectorUser extends BaseEntity
this.userManageSafetyDeviceExportVos = userManageSafetyDeviceExportVos;
}
@Override
public boolean equals(Object obj) {
if (this == obj) return true;
if (obj == null || getClass() != obj.getClass()) return false;
TDetectorUser detectorUser = (TDetectorUser) obj;
return Objects.equals(userOwnId,detectorUser.getUserOwnId());
}
@Override
public int hashCode() {
return Objects.hash(userOwnId);
}
@Override
public String toString() {
return "TDetectorUser{" +
......
package com.zehong.system.mapper;
import java.util.List;
import java.util.Map;
import com.zehong.system.domain.TDetectorUser;
import com.zehong.system.domain.TDetectorUserCount;
import com.zehong.system.domain.dto.UserLinkGasBottleIdDTO;
......@@ -12,6 +9,9 @@ import com.zehong.system.domain.vo.TDetectorUserVO;
import com.zehong.system.domain.vo.TDetectorUserVillageSafetyDeviceInfoVo;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
* 燃气用户Mapper接口
*
......@@ -101,6 +101,20 @@ public interface TDetectorUserMapper
public List<TDetectorUser> newSelectTDetectorUserList(TDetectorUser tDetectorUser);
public List<TDetectorUser> queryErrorDetectorUserList(@Param("depId") String depId,@Param("gasType") String gasType);
/**
* 根据 userOwnId list 和 enterpriseId 查询数据
* @param userOwnIds userOwnId list
* @param enterpriseId enterpriseId
* @return r
*/
public List<TDetectorUser> queryByUserOwnIdAndEnterpriseIdForThirdParty(@Param("userOwnIds") List<String> userOwnIds,@Param("enterpriseId") String enterpriseId);
/**
* 根据userOwnIds 和 enterpriseId 查询数据
* @param userOwnIds u
* @param enterpriseId e
* @return r
*/
public List<TDetectorUser> queryByUserOwnIdsAndEnterpriseId(@Param("userOwnIds") List<String> userOwnIds, @Param("enterpriseId") String enterpriseId);
public List<TDetectorUser> selectTDetectorListstatus(TDetectorUser tDetectorUser);
......@@ -112,6 +126,12 @@ public interface TDetectorUserMapper
*/
public int insertTDetectorUser(TDetectorUser tDetectorUser);
/**
* 提供给第三方接口调用时的批量插入
* @param tYehuaqiUsers r
* @return r
*/
public int insertBatchForThirdParty(@Param("list") List<TDetectorUser> tYehuaqiUsers);
/**
* 批量增加
......
......@@ -92,6 +92,8 @@ public interface TGasuserSafetyDeviceInfoMapper
public int deleteSafetyDeviceInfo(Long deviceId);
public int deleteBatchSafetyDeviceByUserIds(@Param("userIds") List<Long> userIds);
List<TGasuserSafetyDeviceInfo> selectSafetyDeviceDetailInfoList(Long userId);
/**
......
package com.zehong.system.service;
import java.util.List;
import java.util.Map;
import com.zehong.common.core.page.TableDataInfo;
import com.zehong.system.domain.TDetectorUser;
import com.zehong.system.domain.TDetectorUserCount;
import com.zehong.system.domain.TGasuserSafetyDeviceInfo;
import com.zehong.system.domain.TYehuaqiuserSafetyDeviceInfo;
import com.zehong.system.domain.vo.*;
import org.apache.ibatis.annotations.Param;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 燃气用户Service接口
......@@ -27,14 +29,6 @@ public interface ITDetectorUserService
*/
public List<TDetectorUserVO> massMarksDetectorUserList(TDetectorUser tDetectorUser);
/**
* 查询探测器用户列表 地图使用 massMarks 标注的方式
* @param tDetectorUser tDetectorUser
* @return r
*/
// public Map<String, List<TMassMarksDetectorUserVO>> massMarksDetectorUserList(TDetectorUser tDetectorUser);
/**
* 查询探测器用户列表 地图使用 labelsLayerMarks 标注的方式
* @param tDetectorUser tDetectorUser
......@@ -116,6 +110,21 @@ public interface ITDetectorUserService
*/
public List<TDetectorUser> queryErrorDetectorUserList(String gasType);
/**
* 根据 userOwnId list 和 enterpriseId 查询数据
* @param userOwnIds userOwnId list
* @param enterpriseId enterpriseId
* @return r
*/
public List<TDetectorUser> queryByUserOwnIdAndEnterpriseIdForThirdParty(List<String> userOwnIds,String enterpriseId);
/**
* 根据用户自有id 集合 和 企业id 查询数据
* @param userOwnIds u
* @param enterpriseId e
* @return r
*/
public List<TDetectorUser> queryByUserOwnIdsAndEnterpriseId(List<String> userOwnIds, String enterpriseId);
/**
* 查询燃气用户列表
*
......@@ -142,6 +151,18 @@ public interface ITDetectorUserService
*/
public int insertTDetectorUser(TDetectorUser tDetectorUser);
/**
* 批量插入 安全装置
* @param gasuserSafetyDeviceInfoList y
* @return r
*/
public int insertBatchSafetyDevice(List<TGasuserSafetyDeviceInfo> gasuserSafetyDeviceInfoList);
/**
* 提供给第三方接口调用时的批量插入
* @param tYehuaqiUsers r
* @return r
*/
public int insertBatchForThirdParty(List<TDetectorUser> tYehuaqiUsers);
/**
* 新增燃气用户和安全装置
* @param gasUserAndSafetyDeviceVo gas
......@@ -155,6 +176,19 @@ public interface ITDetectorUserService
* @return r
*/
public int updateUserAndSafetyDevice(GasUserAndSafetyDeviceVo gasUserAndSafetyDeviceVo);
/**
* 批量修改
* @param list l
* @return r
*/
public int updateBatch(List<TDetectorUser> list);
/**
* 根据 userId 集合批量删除
* @param userIds u
* @return r
*/
public int deleteBatchSafetyDeviceByUserIds(List<Long> userIds);
/**
* 修改燃气用户
......@@ -225,7 +259,7 @@ public interface ITDetectorUserService
*/
public void handleCustomMoreSheetImportData(List<UserManageGasUserExportVo> gasUserExportVos,
List<UserManageSafetyDeviceExportVo> safetyDeviceExportVos,
boolean updateSupport ,boolean reImportOfIncorrectDataFlag) ;
boolean updateSupport ,boolean reImportOfIncorrectDataFlag,String gasType) ;
/**
* 根据企业id统计错误数据
......
......@@ -816,6 +816,22 @@ public class TDetectorUserServiceImpl implements ITDetectorUserService
return tDetectorUserMapper.queryErrorDetectorUserList(deptId,gasType);
}
@Override
public List<TDetectorUser> queryByUserOwnIdAndEnterpriseIdForThirdParty(List<String> userOwnIds, String enterpriseId) {
return tDetectorUserMapper.queryByUserOwnIdAndEnterpriseIdForThirdParty(userOwnIds,enterpriseId);
}
/**
* 根据userOwnIds 和 enterpriseId 查询数据
* @param userOwnIds u
* @param enterpriseId e
* @return r
*/
@Override
public List<TDetectorUser> queryByUserOwnIdsAndEnterpriseId(List<String> userOwnIds, String enterpriseId) {
return tDetectorUserMapper.queryByUserOwnIdsAndEnterpriseId(userOwnIds,enterpriseId);
}
/**
* 查询燃气用户列表-new
*
......@@ -853,6 +869,21 @@ public class TDetectorUserServiceImpl implements ITDetectorUserService
return tDetectorUserMapper.insertTDetectorUser(tDetectorUser);
}
@Override
public int insertBatchSafetyDevice(List<TGasuserSafetyDeviceInfo> gasuserSafetyDeviceInfoList) {
return gasuserSafetyDeviceInfoMapper.insertBatch(gasuserSafetyDeviceInfoList);
}
/**
* 批量插入 第三方传输来的数据
* @param tYehuaqiUsers r
* @return r
*/
@Override
public int insertBatchForThirdParty(List<TDetectorUser> tYehuaqiUsers) {
return tDetectorUserMapper.insertBatchForThirdParty(tYehuaqiUsers);
}
/**
* 新增燃气用户 和 安全装置
* @param gasUserAndSafetyDeviceVo gas
......@@ -898,6 +929,26 @@ public class TDetectorUserServiceImpl implements ITDetectorUserService
return 1;
}
/**
* 批量修改
* @param list l
* @return r
*/
@Override
public int updateBatch(List<TDetectorUser> list) {
return tDetectorUserMapper.updateBatch(list);
}
/**
* 根据用户id 集合删除 安全装置
* @param userIds u
* @return
*/
@Override
public int deleteBatchSafetyDeviceByUserIds(List<Long> userIds) {
return gasuserSafetyDeviceInfoMapper.deleteBatchSafetyDeviceByUserIds(userIds);
}
/**
* 修改燃气用户
*
......@@ -1001,7 +1052,7 @@ public class TDetectorUserServiceImpl implements ITDetectorUserService
@Transactional(rollbackFor = Exception.class)
public void handleCustomMoreSheetImportData(List<UserManageGasUserExportVo> gasUserExportVos,
List<UserManageSafetyDeviceExportVo> safetyDeviceExportVos,
boolean updateSupport,boolean reImportOfIncorrectDataFlag) {
boolean updateSupport,boolean reImportOfIncorrectDataFlag,String gasType) {
List<TDetectorUser> successDataList = new ArrayList<>();
......@@ -1019,7 +1070,8 @@ public class TDetectorUserServiceImpl implements ITDetectorUserService
StringBuilder stringBuilder = new StringBuilder();
for (UserManageGasUserExportVo gasUserExportVo : gasUserExportVos) {
String userOwnId = gasUserExportVo.getUserOwnId();
String gasType = gasUserExportVo.getGasType();
// 2024-10-26 基本信息的天然气用户 和 液化气监管的 液化气用户 用一张表
gasUserExportVo.setGasType(gasType);
String userType = gasUserExportVo.getUserType();
String beyondEnterpriseName = gasUserExportVo.getBeyondEnterpriseName();
String villageName = gasUserExportVo.getVillageName();
......@@ -1031,12 +1083,6 @@ public class TDetectorUserServiceImpl implements ITDetectorUserService
}
}
if (StringUtils.isNotBlank(gasType)){
if (!"0".equals(gasType) && !"1".equals(gasType)) {
stringBuilder.append("燃气类型数据没按提示录入|");
}
}
if ((StringUtils.isNotBlank(userType))){
if (!"1".equals(userType) && !"2".equals(userType)&& !"3".equals(userType)&& !"4".equals(userType)) {
stringBuilder.append("用户类型数据没按提示录入|");
......
......@@ -25,6 +25,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="villageId" column="f_village_id" />
<result property="villageName" column="f_village_name" />
<result property="errorMsg" column="error_msg" />
<result property="userOwnId" column="user_own_id" />
</resultMap>
<resultMap type="TDetectorUser" id="TDetectorUserExportResult">
......@@ -48,6 +49,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="villageId" column="f_village_id" />
<result property="villageName" column="f_village_name" />
<result property="errorMsg" column="error_msg" />
<result property="userOwnId" column="user_own_id" />
<!-- collection 是用于建立一对多中集合属性的对应关系
ofType 用于指定集合元素的数据类型
-->
......@@ -82,11 +84,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectTDetectorUserVo">
select user_id, username, nick_name, user_type, gas_type,address, longitude, latitude, linkman, phone, email,
create_time, update_time, is_del, remarks,f_village_id,error_msg from t_detector_user
create_time, update_time, is_del, remarks,f_village_id,error_msg,user_own_id from t_detector_user
</sql>
<select id="queryErrorDetectorUserList" parameterType="string" resultMap="TDetectorUserResult">
select * from t_detector_user where error_msg is not null
select *,beyond_enterprise_name as enterprise_name from t_detector_user where error_msg is not null
<if test="depId != null and depId != '' and depId != '-2'">
and beyondEnterpriseId = #{depId}
</if>
......@@ -94,6 +96,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="gasType != null and gasType == 0"> and (gas_type =#{gasType} or gas_type is null)</if>
</select>
<select id="queryByUserOwnIdAndEnterpriseIdForThirdParty" resultMap="TDetectorUserResult">
<include refid="selectTDetectorUserVo"/>
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="queryByUserOwnIdsAndEnterpriseId" resultMap="TDetectorUserResult">
<include refid="selectTDetectorUserVo"/>
where beyond_enterprise_id = #{enterpriseId} and user_own_id in
<foreach collection="userOwnIds" close=")" separator="," open="(" item="item" index="i">
#{item}
</foreach>
</select>
<select id="selectForExportTDetectorUserList" parameterType="TDetectorUser" resultMap="TDetectorUserExportResult">
select a.user_id,
a.username,
......@@ -401,6 +418,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="remarks != null">remarks,</if>
<if test="villageId != null">f_village_id,</if>
<if test="errorMsg != null">error_msg,</if>
<if test="userOwnId != null">user_own_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="username != null">#{username},</if>
......@@ -418,12 +436,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="remarks != null">#{remarks},</if>
<if test="villageId != null">#{villageId},</if>
<if test="errorMsg != null">#{errorMsg},</if>
<if test="userOwnId != null">#{userOwnId},</if>
</trim>
</insert>
<insert id="insertBatchForThirdParty" parameterType="list" useGeneratedKeys="true" keyProperty="userId">
insert into t_detector_user (nick_name, beyond_enterprise_name,beyond_enterprise_id, user_type, gas_type, village_name,f_village_id,
address, linkman, phone, remarks, error_msg,user_own_id)
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.gasType,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}
)
</foreach>
</insert>
<insert id="insertBatch" parameterType="list" useGeneratedKeys="true" keyProperty="userId">
insert into t_detector_user (nick_name, beyond_enterprise_name,beyond_enterprise_id, user_type, gas_type, village_name,f_village_id,
address, linkman, phone, remarks, error_msg)
address, linkman, phone, remarks, error_msg,user_own_id)
values
<foreach collection="list" item="item" index="index" separator=",">
(
......@@ -431,7 +466,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{item.userType,jdbcType=VARCHAR}, #{item.gasType,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.remarks,jdbcType=VARCHAR}, #{item.errorMsg,jdbcType=VARCHAR},#{item.userOwnId,jdbcType=VARCHAR}
)
</foreach>
</insert>
......@@ -449,7 +484,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
linkman = #{item.linkman},
phone = #{item.phone},
remarks = #{item.remarks},
error_msg = null
error_msg = null,
user_own_id = #{item.userOwnId}
</set>
WHERE user_id = #{item.userId}
</foreach>
......@@ -475,6 +511,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="isDel != null">is_del = #{isDel},</if>
<if test="remarks != null">remarks = #{remarks},</if>
<if test="villageId != null">f_village_id = #{villageId},</if>
<if test="userOwnId != null">user_own_id = #{userOwnId},</if>
</trim>
where user_id = #{userId}
</update>
......
......@@ -146,6 +146,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{deviceId}
</foreach>
</update>
<update id="deleteBatchSafetyDeviceByUserIds">
update t_gasuser_safety_device_info set is_del='1' where f_relation_gasUser_id in
<foreach item="deviceId" collection="userIds" open="(" separator="," close=")">
#{deviceId}
</foreach>
</update>
<update id="deleteSafetyDeviceInfo">
update t_gasuser_safety_device_info set is_del='1' where f_gasUser_safety_device_id = #{deviceId}
</update>
......
......@@ -39,7 +39,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
yequser.nick_name as nickName
FROM
t_lpg_delivery_record delivery
left join t_yehuaqi_user yequser on delivery.user_id = yequser.user_id
left join t_detector_user yequser on delivery.user_id = yequser.user_id
</sql>
<select id="selectTLpgDeliveryRecordList" parameterType="TLpgDeliveryRecord" resultMap="TLpgDeliveryRecordResult">
......
......@@ -66,7 +66,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
record.is_del,
record.remark
from t_lpg_safe_check_record record
left join t_yehuaqi_user yhqser on record.user_id = yhqser.user_id
left join t_detector_user yhqser on record.user_id = yhqser.user_id
</sql>
<select id="selectTLpgSafeCheckRecordList" parameterType="TLpgSafeCheckRecord" resultMap="TLpgSafeCheckRecordResult">
......
......@@ -463,7 +463,7 @@ export default {
// 设置上传的请求头部
headers: { Authorization: "Bearer " + getToken() },
// 上传的地址
url: process.env.VUE_APP_BASE_API + "/system/yehuaqiUser/moreSheetImportExcel" // todo
url: process.env.VUE_APP_BASE_API + "/supervise/user/moreSheetImportExcelLpg" // todo
},
importError: null,
......@@ -758,7 +758,7 @@ export default {
this.$refs.upload.clearFiles();
// this.getDataList();
countImportError("gasType").then(response => {
countImportError("1").then(response => {
this.importError = response.data;
if(this.importError === 0) {
this.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "导入结果", { dangerouslyUseHTMLString: true });
......@@ -1039,8 +1039,8 @@ export default {
if (this.form.userId != null) {
var tDeviceInfon={
yehuaqiUser:this.form,
yehuaqiuserSafetyDeviceInfos:this.detailInfoList
detectorUser:this.form,
gasuserSafetyDeviceInfoList:this.detailInfoList
}
updateUserAndSafetyDevice(JSON.stringify(tDeviceInfon)).then(response => {
this.msgSuccess("修改成功");
......@@ -1050,8 +1050,8 @@ export default {
} else {
var tDeviceInfon={
yehuaqiUser:this.form,
yehuaqiuserSafetyDeviceInfos:this.detailInfoList
detectorUser:this.form,
gasuserSafetyDeviceInfoList:this.detailInfoList
}
addUserAndSafetyDevice(JSON.stringify(tDeviceInfon)).then(response => {
......
......@@ -397,7 +397,7 @@
:limit="1"
accept=".xlsx, .xls"
:headers="upload.headers"
:action="upload.url + '?updateSupport=' + upload.updateSupport"
:action="upload.url + '?updateSupport=' + upload.updateSupport"
:disabled="upload.isUploading"
:on-progress="handleFileUploadProgress"
:on-success="handleFileSuccess"
......
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