Commit f41fd7c2 authored by tangwei's avatar tangwei

修改户用光伏注册验证

parent 61f08acd
...@@ -2,6 +2,9 @@ package com.yeejoin.amos.boot.module.hygf.api.mapper; ...@@ -2,6 +2,9 @@ package com.yeejoin.amos.boot.module.hygf.api.mapper;
import com.yeejoin.amos.boot.module.hygf.api.entity.CommerceInfo; import com.yeejoin.amos.boot.module.hygf.api.entity.CommerceInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/** /**
* 经销商单位信息 Mapper 接口 * 经销商单位信息 Mapper 接口
...@@ -11,4 +14,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; ...@@ -11,4 +14,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/ */
public interface CommerceInfoMapper extends BaseMapper<CommerceInfo> { public interface CommerceInfoMapper extends BaseMapper<CommerceInfo> {
List<CommerceInfo> selectListby(@Param("creditCode") String creditCode);
} }
...@@ -2,4 +2,23 @@ ...@@ -2,4 +2,23 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.amos.boot.module.hygf.api.mapper.CommerceInfoMapper"> <mapper namespace="com.yeejoin.amos.boot.module.hygf.api.mapper.CommerceInfoMapper">
<select id="selectListby" resultType="com.yeejoin.amos.boot.module.hygf.api.entity.CommerceInfo">
select
hygf_commerce_info.sequence_nbr sequenceNbr
from hygf_commerce_info LEFT JOIN hygf_unit_info
on hygf_unit_info.sequence_nbr=hygf_commerce_info.unit_seq
where hygf_commerce_info.is_delete=0 and hygf_commerce_info.credit_code=#{creditCode}
and hygf_unit_info.audit_status!=3
</select>
</mapper> </mapper>
...@@ -274,6 +274,7 @@ public class UnitInfoController extends BaseController { ...@@ -274,6 +274,7 @@ public class UnitInfoController extends BaseController {
LambdaQueryWrapper<UnitInfo> qudg=new LambdaQueryWrapper<>(); LambdaQueryWrapper<UnitInfo> qudg=new LambdaQueryWrapper<>();
qudg.eq(UnitInfo::getName,model.getUnitInfoDto().getName()); qudg.eq(UnitInfo::getName,model.getUnitInfoDto().getName());
qudg.eq(UnitInfo::getIsDelete,0); qudg.eq(UnitInfo::getIsDelete,0);
qudg.ne(UnitInfo::getAuditStatus,3);
List<UnitInfo> unitInfo= unitInfoMapper.selectList(qudg); List<UnitInfo> unitInfo= unitInfoMapper.selectList(qudg);
if(unitInfo!=null&&!unitInfo.isEmpty()){ if(unitInfo!=null&&!unitInfo.isEmpty()){
...@@ -282,10 +283,12 @@ public class UnitInfoController extends BaseController { ...@@ -282,10 +283,12 @@ public class UnitInfoController extends BaseController {
//判断公司统一信息用代码重复 //判断公司统一信息用代码重复
LambdaQueryWrapper<CommerceInfo> queryWrapper1 = new LambdaQueryWrapper<CommerceInfo>(); // LambdaQueryWrapper<CommerceInfo> queryWrapper1 = new LambdaQueryWrapper<CommerceInfo>();
queryWrapper1.eq(CommerceInfo::getCreditCode, model.getCommerceInfoDto().getCreditCode()); // queryWrapper1.eq(CommerceInfo::getCreditCode, model.getCommerceInfoDto().getCreditCode());
queryWrapper1.eq(CommerceInfo::getIsDelete,0); // queryWrapper1.eq(CommerceInfo::getIsDelete,0);
List<CommerceInfo> commerceInfo= commerceInfoMapper.selectList(queryWrapper1); // List<CommerceInfo> commerceInfo= commerceInfoMapper.selectList(queryWrapper1);
List<CommerceInfo> commerceInfo= commerceInfoMapper.selectListby( model.getCommerceInfoDto().getCreditCode());
if(commerceInfo!=null&&!commerceInfo.isEmpty()){ if(commerceInfo!=null&&!commerceInfo.isEmpty()){
throw new BadRequest("统一信用代码重复"); throw new BadRequest("统一信用代码重复");
...@@ -295,7 +298,8 @@ public class UnitInfoController extends BaseController { ...@@ -295,7 +298,8 @@ public class UnitInfoController extends BaseController {
LambdaQueryWrapper<UnitInfo> qudg1=new LambdaQueryWrapper<>(); LambdaQueryWrapper<UnitInfo> qudg1=new LambdaQueryWrapper<>();
qudg1.eq(UnitInfo::getAdminLoginName,model.getUnitInfoDto().getAdminLoginName()); qudg1.eq(UnitInfo::getAdminLoginName,model.getUnitInfoDto().getAdminLoginName());
qudg1.eq(UnitInfo::getIsDelete,0); qudg1.eq(UnitInfo::getIsDelete,0);
List<UnitInfo> unitInfo1= unitInfoMapper.selectList(qudg); qudg1.ne(UnitInfo::getAuditStatus,3);
List<UnitInfo> unitInfo1= unitInfoMapper.selectList(qudg1);
if(unitInfo1!=null&&!unitInfo1.isEmpty()){ if(unitInfo1!=null&&!unitInfo1.isEmpty()){
throw new BadRequest("管理员账户名重复,请更换"); throw new BadRequest("管理员账户名重复,请更换");
......
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