Commit bc4fedb1 authored by chenzhao's avatar chenzhao

修改户用代码

parent 189f1773
......@@ -158,9 +158,15 @@ public class UserEmpowerInterceptor implements Interceptor {
//获取字段
String[] filed = userEmpower.dealerField();
if (filed.length < 1){
return invocation.proceed();
}
//获取字段条件表达式
String[] fileCondition = userEmpower.fieldConditions();
//获取 是否特殊
Boolean specific= userEmpower.specific();
//获取参数值,
StdUserEmpower dataAuthRule =(StdUserEmpower) redisUtils.get("Emp_"+RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken()));
String[] data = new String[]{String.join(",",dataAuthRule.getAmosOrgCode()),dataAuthRule.getAdminRegionalCompaniesCode(),dataAuthRule.getUserId(),dataAuthRule.getRegionalCompaniesCode()};
......@@ -173,10 +179,9 @@ public class UserEmpowerInterceptor implements Interceptor {
if (!ValidationUtil.isEmpty(dataAuthRule.getAdminRegionalCompaniesCode()) && fileds.size() >1) {
sq = selectSqlJXS(new String[]{fileds.get(0), fileds.get(1)}, fileCondition, list);
} else if (!ValidationUtil.isEmpty(dataAuthRule.getUserId())) {
list.remove(1);
sq = selectSqlJXS(new String[]{fileds.get(0),fileds.size()<3?fileds.get(0):fileds.get(2)},new String[]{fileCondition[0],fileCondition[2]} , list);
} else {
sq = selectSqlJXS(new String[]{fileds.get(0)}, fileCondition, list);
sq = selectSqlJXS(new String[]{fileds.get(0)}, fileCondition, specific?list:Arrays.asList(list.get(1)));
}
String sqldata = " ";
......
......@@ -7,6 +7,7 @@ import io.swagger.annotations.ApiModelProperty;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
import java.util.List;
......@@ -18,10 +19,10 @@ import java.util.List;
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value="MaintenanceDto", description="运维人员")
public class MaintenanceDto extends BaseDto {
@ApiModel(value = "MaintenanceDto", description = "运维人员")
public class MaintenanceDto extends BaseDto {
private static final long serialVersionUID = 1L;
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "运维人员类型名称")
......@@ -130,9 +131,8 @@ public class MaintenanceDto extends BaseDto {
private String permanentAddressName;
/**
*
* 基础人员表
* */
*/
private Long foundationId;
......@@ -141,12 +141,21 @@ public class MaintenanceDto extends BaseDto {
@ApiModelProperty(value = "身份证正面")
private List<Object> idCardFrontList;
private List<Object> idCardFrontList;
@ApiModelProperty(value = "身份证反面")
private List<Object> idCardOppositeList;
private List<Object> idCardOppositeList;
@ApiModelProperty(value = "是否签订安全协议")
private Integer isSignAnAgreement ;
private Integer isSignAnAgreement;
@ApiModelProperty(value = "审核意见")
private String notes;
@ApiModelProperty(value = "操作人")
private String operator;
@ApiModelProperty(value = "操作时间")
private Date operationTime;
}
......@@ -31,7 +31,7 @@ public interface JpStationMapper extends BaseMapper<JpStation> {
List<JpStation> getJpStationList(@Param("dto") JpStationDto reviewDto);
@UserEmpower(field ={"ORG_CODE"} ,dealerField ={"ORG_CODE"}, fieldConditions ={"eq","in","in"} ,relationship="and",specific=false)
@UserEmpower(field ={"ORG_CODE"} ,dealerField ={"ORG_CODE"}, fieldConditions ={"in","in"} ,relationship="and",specific=false)
List<DropDown> getRegion();
List<DropDown> getRegionAll();
......
......@@ -16,7 +16,6 @@ import java.util.List;
* @date 2023-07-07
*/
public interface PeasantHouseholdMapper extends BaseMapper<PeasantHousehold> {
@UserEmpower(field={},dealerField={"developer_code","regional_companies_code"} ,fieldConditions ={"eq","in"} ,relationship="and")
List<PeasantHousehold> selectPeasantHouseholdList(@Param("developerId") Long developerId,
@Param("regionalCompaniesSeq")Long regionalCompaniesSeq,
@Param("peasantHouseholdNo")String peasantHouseholdNo,
......
......@@ -26,9 +26,9 @@ public interface UnitInfoMapper extends BaseMapper<UnitInfo> {
List< Map<String,Object>> getuserList(@Param("userName") String userName,@Param("role") Long role,@Param("regionalCompaniesSeq") Long regionalCompaniesSeq,@Param("amosUnitId") Long amosUnitId);
List< Map<String,Object>> getuserListtelephone(@Param("userName") String userName,@Param("role") Long role,@Param("regionalCompaniesSeq") Long regionalCompaniesSeq,@Param("amosUnitId") Long amosUnitId);
@UserEmpower(field ={"hygf_unit_info.regional_companies_code"} ,dealerField ={"hygf_unit_info.amos_company_code","hygf_unit_info.regional_companies_code"} ,fieldConditions ={"eq","in"} ,relationship="and")
@UserEmpower(field ={"hygf_regional_companies.regional_companies_code"} ,dealerField ={} ,fieldConditions ={"in"} ,relationship="and")
List<UnitInfo> getlistUnitInfo();
@UserEmpower(field ={"hygf_unit_info.regional_companies_code"} ,dealerField ={"hygf_unit_info.amos_company_code","hygf_unit_info.regional_companies_code"} ,fieldConditions ={"eq","in"} ,relationship="and")
UnitInfo selectById( Long unitInfoId);
// @UserEmpower(field ={"hygf_unit_info.regional_companies_code"} ,dealerField ={} ,fieldConditions ={"in"} ,relationship="and")
// UnitInfo selectById( Long unitInfoId);
}
......@@ -764,7 +764,6 @@ public class UnitInfoController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET",value = "列表全部数据查询", notes = "列表全部数据查询")
@GetMapping(value = "/getPeasantHouseholdData")
@UserLimits
public ResponseModel<Page<PeasantHousehold>> getPeasantHouseholdData(
@RequestParam(required=false) Long unitInfoId,
@RequestParam(required=false) Long regionalCompaniesSeq,
......
......@@ -261,12 +261,17 @@ public class MaintenanceServiceImpl extends BaseService<MaintenanceDto,Maintenan
//详情
public Map<String,Object> selectOneById(Long sequenceNbr){
MaintenanceDto maintenanceDto= maintenanceMapper.selectOneById(sequenceNbr);
MaintenanceDto maintenanceDto= maintenanceMapper.selectOneById(sequenceNbr);
maintenanceDto.setIdCardFrontList(maintenanceDto.getIdCardFront()!=null?JSONArray.parseArray(maintenanceDto.getIdCardFront()):null);
maintenanceDto.setIdCardOppositeList(maintenanceDto.getIdCardFront()!=null?JSONArray.parseArray(maintenanceDto.getIdCardOpposite()):null);
//获取文档
MaintenanceLog maintenanceLog = maintenanceLogMapper.selectOne(new QueryWrapper<MaintenanceLog>().lambda().eq(MaintenanceLog::getMaintenanceId, sequenceNbr));
maintenanceDto.setNotes(maintenanceLog.getNotes());
maintenanceDto.setOperator(maintenanceLog.getOperator());
maintenanceDto.setOperationTime(maintenanceLog.getOperationTime());
//获取文档
List<MaintenanceFile> list= maintenanceFileMapper.selectList(
new QueryWrapper<MaintenanceFile>().lambda().eq(MaintenanceFile::getMaintenanceId, sequenceNbr)
);
......
......@@ -995,8 +995,8 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
String peasantHouseholdNo,
String ownersName,
String ids){
UnitInfo unitInfo=unitInfoMapper.selectById(unitInfoId);
PageHelper.startPage(pageNum, pageSize);
UnitInfo unitInfo=unitInfoMapper.selectById(unitInfoId);
List<PeasantHousehold> list=peasantHouseholdMapper.selectPeasantHouseholdList(unitInfo.getAmosCompanySeq(),regionalCompaniesSeq,peasantHouseholdNo,ownersName,ids);
PageInfo<PeasantHousehold> page = new PageInfo(list);
Page<PeasantHousehold> pagenew = new Page<PeasantHousehold>();
......
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