Commit 5e1dfd3f authored by chenzhao's avatar chenzhao

Merge remote-tracking branch 'origin/developer_bw' into developer_bw

parents a120e928 83cd2a2d
......@@ -16,7 +16,7 @@ public enum CommonEnum {
经销商代建("经销商代建","fzx","电站类型"),
平顶屋("平顶屋","pdw","屋顶类型"),
斜顶屋("斜顶屋","xdw","屋顶类型"),
庭院("ty","other","屋顶类型"),
庭院("庭院","ty","屋顶类型"),
别墅("别墅","bs","房屋整体情况"),
普通民房("普通民房","pymf","房屋整体情况"),
单门独院("单门独院","dmdy","房屋整体情况"),
......@@ -62,6 +62,8 @@ public enum CommonEnum {
SMC("SMC","smc","材质"),
不锈钢("不锈钢","bxg","材质"),
钢板喷塑("钢板喷塑","gbps","材质"),
单面("单面","dm","组件类型"),
双面("双面","sm","组件类型"),
其他("其他","other","公用");
/**
......@@ -80,7 +82,7 @@ public enum CommonEnum {
public static String getNameByCode(String code) {
String name = null;
String name = "";
for(CommonEnum obj: CommonEnum.values()) {
if (obj.getCode().equals(code)) {
name = obj.getName();
......
package com.yeejoin.amos.boot.module.hygf.api.dto;
import com.baomidou.mybatisplus.annotation.TableField;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "BusinessFieldDto", description = "业务字段Dto")
public class BusinessFieldDto extends BaseDto {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "字段名称")
private String fieldName;
@ApiModelProperty(value = "字段标识")
private String fieldFlag;
@ApiModelProperty(value = "业务类型")
private String businessType;
}
package com.yeejoin.amos.boot.module.hygf.api.dto;
import com.yeejoin.amos.boot.module.hygf.api.entity.HygfBusinessField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
import java.util.Map;
@Data
@ApiModel(value = "StationFieldDto", description = "电站字段Dto")
public class StationFieldDto {
@ApiModelProperty(value = "电站ID")
private List<String> stationIdList;
@ApiModelProperty(value = "业务字段主键")
private List<String> businessIdList;
@ApiModelProperty(value = "业务字段")
private List<HygfBusinessField> businessFieldList;
@ApiModelProperty(value = "导出页面Code")
private String exportPageCode;
@ApiModelProperty(value = "过滤条件")
private Map<String, Object> filters;
}
package com.yeejoin.amos.boot.module.hygf.api.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
@Data
@EqualsAndHashCode()
@Accessors(chain = true)
@TableName("hygf_business_field")
public class HygfBusinessField extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 字段名称
*/
@TableField("field_name")
private String fieldName;
/**
* 字段标识
*/
@TableField("field_flag")
private String fieldFlag;
/**
* 业务类型
*/
@TableField("business_type")
private String businessType;
/**
* 业务名称
*/
@TableField("business_name")
private String businessName;
}
package com.yeejoin.amos.boot.module.hygf.api.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.hygf.api.config.UserEmpower;
import com.yeejoin.amos.boot.module.hygf.api.dto.BasicGridRecordDto;
import com.yeejoin.amos.boot.module.hygf.api.dto.WorkOrderPage;
import com.yeejoin.amos.boot.module.hygf.api.entity.HygfBusinessField;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
public interface BusinessFieldMapper extends BaseMapper<HygfBusinessField> {
/**
* 获取电站的电站Id
* @return
*/
@UserEmpower(field = {"hph.regional_companies_code"}, dealerField = {"hph.regional_companies_code"}, fieldConditions = {"in"}, relationship = "and")
List<String> getDzStationIdByProcessStatus(@Param("map") Map<String, Object> map);
/**
* 获取投融的电站Id
* @return
*/
@UserEmpower(field = {"sta.regional_companies_code"},dealerField = {"sta.developer_code","sta.regional_companies_code"},fieldConditions = {"eq","in"},relationship = {"and"})
List<String> getTrStationIdByStatus(@Param(value = "params") Map<String,Object> params,@Param(value = "amosOrgCodes")List<String> amosOrgCodes);
/**
* 获取施工验收场站Id
* @param map
* @return
*/
@UserEmpower(field = {"region_code"}, dealerField = {"hygf_work_order.amos_dealer_org_code","hygf_work_order.region_code","hygf_peasant_household.developer_user_id"}, fieldConditions = {"in", "in", "in"}, relationship = "and")
List<String> getSgysStationId(@Param("dto") Map<String, Object> map);
/**
* 获取并网验收场站Id
* @param map
* @return
*/
@UserEmpower(field ={"hph.regional_companies_code"} ,dealerField={"hph.developer_code","hph.regional_companies_code","hph.developer_user_id"},fieldConditions ={"in","in","in"} ,relationship="and")
List<String> getBwysStationId(@Param("map") Map<String, Object> map);
/**
* 获取验收审核场站Id
* @param map
* @return
*/
@UserEmpower(field ={"hph.regional_companies_code"} ,dealerField={"hph.developer_code","hph.regional_companies_code","hph.developer_user_id"},fieldConditions ={"in","in","in"} ,relationship="and")
List<String> getYsshStationId(@Param("map") Map<String, Object> map);
/**
* 获取发货场站
* @param map
* @return
*/
@UserEmpower(field ={"regional_companies_code"} ,dealerField={"developer_code","regional_companies_code"} ,fieldConditions ={"eq","in"} ,relationship="and")
List<String> getFhStationId (@Param("map") Map<String, Object> map);
/**
* 获取基本信息
* @param stationIdList
* @return
*/
List<Map<String, Object>> getBasicInformation(@Param("list") List<String> stationIdList);
/**
* 获取勘察信息
* @param stationIdList
* @return
*/
List<Map<String, Object>> getSurveyInformation(@Param("list") List<String> stationIdList);
/**
* 获取设计信息
* @param stationIdList
* @return
*/
List<Map<String, Object>> getDesignInformation(@Param("list") List<String> stationIdList);
/**
* 获取商务信息
* @param stationIdList
* @return
*/
List<Map<String, Object>> getBusinessInformation(@Param("list") List<String> stationIdList);
/**
* 获取扩展信息
* @param stationIdList
* @return
*/
List<Map<String, Object>> getExtendedInformation(@Param("list") List<String> stationIdList);
/**
* 获取资料归档信息
* @param stationIdList
* @return
*/
List<Map<String, Object>> getArchivingInformation(@Param("list") List<String> stationIdList);
/**
* 获取工程信息
* @param stationIdList
* @return
*/
List<Map<String, Object>> getEngineeringInformation(@Param("list") List<String> stationIdList);
/**
* 获取并网信息
* @param stationIdList
* @return
*/
List<Map<String, Object>> getGridInformation(@Param("list") List<String> stationIdList);
/**
* 获取派工单信息
* @param stationIdList
* @return
*/
List<Map<String, Object>> getDispatchOrderInformation(@Param("list") List<String> stationIdList);
}
package com.yeejoin.amos.boot.module.hygf.api.service;
public interface IBusinessFieldService {
}
package com.yeejoin.amos.boot.module.hygf.biz.controller;
import com.yeejoin.amos.boot.module.hygf.api.dto.BasicGridRecordDto;
import com.yeejoin.amos.boot.module.hygf.api.dto.PowerStationTimeStatisticsBatchDto;
import com.yeejoin.amos.boot.module.hygf.api.dto.StationFieldDto;
import com.yeejoin.amos.boot.module.hygf.api.entity.HygfBusinessField;
import com.yeejoin.amos.boot.module.hygf.biz.service.impl.BusinessFieldServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
@RestController
@Api(tags = "业务字段Api")
@RequestMapping(value = "/businessField")
public class BusinessFieldController {
@Autowired
BusinessFieldServiceImpl businessFieldService;
/**
* 获取所有的字段
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/getAllField")
@ApiOperation(httpMethod = "GET",value = "获取所有的字段", notes = "获取所有的字段")
public ResponseModel<Map<String,List<HygfBusinessField>>> getAllField() {
return ResponseHelper.buildResponse(businessFieldService.getAllField());
}
/**
* 导出电站Excel
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/exportStationExcelByField")
@ApiOperation(httpMethod = "POST", value = "导出电站Excel根据字段", notes = "导出电站Excel根据字段")
public void exportStationExcelByField(@RequestBody StationFieldDto stationFieldDto, HttpServletResponse response) {
businessFieldService.exportStationExcelByField(stationFieldDto, response);
}
}
package com.yeejoin.amos.boot.module.hygf.biz.excel.Enum;
import lombok.AllArgsConstructor;
import lombok.Getter;
import java.util.Map;
@Getter
@AllArgsConstructor
public enum BusinessTypeEnum {
BASIC_INFORMATION("基本信息"),
SURVEY_INFORMATION("勘察信息"),
DESIGN_INFORMATION("设计信息"),
BUSINESS_INFORMATION("商务信息"),
EXTENDED_INFORMATION("扩展信息"),
ARCHIVING_INFORMATION("资料归档"),
ENGINEERING_INFORMATION("工程信息"),
GRID_INFORMATION("并网信息"),
DISPATCH_ORDER_INFORMATION("派工单信息"),
;
private String name;
public static BusinessTypeEnum getEnumByName(String name) {
for (BusinessTypeEnum businessTypeEnum : BusinessTypeEnum.values()) {
if (businessTypeEnum.getName().equals(name)) {
return businessTypeEnum;
}
}
return null;
}
}
package com.yeejoin.amos.boot.module.hygf.biz.excel.Enum;
import lombok.AllArgsConstructor;
import lombok.Getter;
@Getter
@AllArgsConstructor
public enum ExportPageEnum {
DZJXZ("0", "电站进行中"),
DZBTG("1", "电站不通过"),
DZWC("2", "电站完成"),
TRDTS("3", "投融待推送"),
TRWTG("4", "投融未通过"),
TRYFK("5", "投融已放款"),
TRDFK("6", "投融待放款"),
TRYTS("7", "投融已推送"),
RZDSH("8", "融资待审核"),
RZDFK("9", "融资待放款"),
RZYFK("10", "融资已放款"),
RZWTG("11", "融资未通过"),
SGYS("12", "施工验收"),
BWYS("13", "并网验收"),
YSSH("14", "验收审核"),
FHDFH("15", "发货待发货"),
FHYFH("16", "发货已发货"),
UN_KNOW("","未识别的类型")
;
private String code;
private String remark;
public static ExportPageEnum getEnumByCode(String code) {
for (ExportPageEnum exportPageEnum : ExportPageEnum.values()) {
if (exportPageEnum.getCode().equals(code)) {
return exportPageEnum;
}
}
return UN_KNOW;
}
}
package com.yeejoin.amos.boot.module.hygf.biz.excel.factory;
import com.yeejoin.amos.boot.module.hygf.biz.excel.Enum.ExportPageEnum;
import com.yeejoin.amos.boot.module.hygf.biz.excel.impl.*;
import com.yeejoin.amos.boot.module.hygf.biz.excel.service.IExportPageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
@Component
public class ExportPageFactory {
@Autowired
private DzjxzServiceImpl dzjxzService;
@Autowired
private DzbtgServiceImpl dzbtgService;
@Autowired
private DzwcServiceImpl dzwcService;
@Autowired
private TrdtsServiceImpl trdtsService;
@Autowired
private TrwtgServiceImpl trwtgService;
@Autowired
private TryfkServiceImpl tryfkService;
@Autowired
private TrdfkServiceImpl trdfkService;
@Autowired
private TrytsServiceImpl trytsService;
@Autowired
private RzdshServiceImpl rzdshService;
@Autowired
private RzdfkServiceImpl rzdfkService;
@Autowired
private RzyfkServiceImpl rzyfkService;
@Autowired
private RzwtgServiceImpl rzwtgService;
@Autowired
private SgysServiceImpl sgysService;
@Autowired
private BwysServiceImpl bwysService;
@Autowired
private YsshServiceImpl ysshService;
@Autowired
private FhdfhServiceImpl fhdfhService;
@Autowired
private FhyfhServiceImpl fhyfhService;
public IExportPageService getExportPage(ExportPageEnum dataType) {
switch (dataType) {
case DZJXZ:
return dzjxzService;
case DZBTG:
return dzbtgService;
case DZWC:
return dzwcService;
case TRDTS:
return trdtsService;
case TRWTG:
return trwtgService;
case TRYFK:
return tryfkService;
case TRDFK:
return trdfkService;
case TRYTS:
return trytsService;
case RZDSH:
return rzdshService;
case RZDFK:
return rzdfkService;
case RZYFK:
return rzyfkService;
case RZWTG:
return rzwtgService;
case SGYS:
return sgysService;
case BWYS:
return bwysService;
case YSSH:
return ysshService;
case FHDFH:
return fhdfhService;
case FHYFH:
return fhyfhService;
default:
throw new BadRequest("没有找到匹配的页面类型");
}
}
}
package com.yeejoin.amos.boot.module.hygf.biz.excel.impl;
import com.alibaba.fastjson.JSONObject;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.module.hygf.api.dto.WorkOrderPage;
import com.yeejoin.amos.boot.module.hygf.api.mapper.BusinessFieldMapper;
import com.yeejoin.amos.boot.module.hygf.biz.excel.service.IExportPageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import java.util.*;
@Service
public class BwysServiceImpl implements IExportPageService {
@Autowired
private BusinessFieldMapper businessFieldMapper;
@Autowired
private RedisUtils redisUtils;
@Value("${admin.engineering.roleId}")
Long engineeringId;
@Value("${admin.area.roleId}")
Long areaId;
@Value("${admin.design.roleId}")
Long designId;
@Value("${admin.delerAdmin.roleId}")
Long delerAdminId;
@Override
public List<String> getStationId(Map<String, Object> filters) {
ReginParams reginParams = JSONObject.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class);
List<String> basicGridNodes = new ArrayList<>();
List<Long> roleIds = new ArrayList<>();
for (Long aLong : reginParams.getUserModel().getOrgRoleSeqs().keySet()) {
List<Long> longs = reginParams.getUserModel().getOrgRoleSeqs().get(aLong);
roleIds.addAll(longs);
if (longs.contains(areaId)) {
basicGridNodes.add("bw-area");
}
if (longs.contains(engineeringId)) {
basicGridNodes.add("bw-engineering");
}
if (longs.contains(designId)) {
basicGridNodes.add("bw-design");
}
if (longs.contains(delerAdminId)) {
basicGridNodes.add("bw-design");
basicGridNodes.add("bw-engineering");
basicGridNodes.add("bw-area");
}
}
Map<String, Object> map = new HashMap<>();
map.put("basicGridNodes", basicGridNodes);
map.put("type", "1");
if (Objects.nonNull(filters)) {
map.putAll(filters);
}
return businessFieldMapper.getBwysStationId(map);
}
}
package com.yeejoin.amos.boot.module.hygf.biz.excel.impl;
import com.yeejoin.amos.boot.module.hygf.api.Enum.PowerStationProcessStateEnum;
import com.yeejoin.amos.boot.module.hygf.api.mapper.BusinessFieldMapper;
import com.yeejoin.amos.boot.module.hygf.biz.excel.service.IExportPageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
@Service
public class DzbtgServiceImpl implements IExportPageService {
@Autowired
private BusinessFieldMapper businessFieldMapper;
@Override
public List<String> getStationId(Map<String, Object> filters) {
Map<String, Object> map = new HashMap<>();
map.put("processStatus", PowerStationProcessStateEnum.不通过.getName());
if (Objects.nonNull(filters)) {
map.putAll(filters);
}
return businessFieldMapper.getDzStationIdByProcessStatus(map);
}
}
package com.yeejoin.amos.boot.module.hygf.biz.excel.impl;
import com.yeejoin.amos.boot.module.hygf.api.Enum.PowerStationProcessStateEnum;
import com.yeejoin.amos.boot.module.hygf.api.mapper.BusinessFieldMapper;
import com.yeejoin.amos.boot.module.hygf.biz.excel.service.IExportPageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.*;
@Service
public class DzjxzServiceImpl implements IExportPageService {
@Autowired
private BusinessFieldMapper businessFieldMapper;
@Override
public List<String> getStationId(Map<String, Object> filters) {
Map<String, Object> map = new HashMap<>();
map.put("processStatus", PowerStationProcessStateEnum.进行中.getName());
if (Objects.nonNull(filters)) {
map.putAll(filters);
}
return businessFieldMapper.getDzStationIdByProcessStatus(map);
}
}
package com.yeejoin.amos.boot.module.hygf.biz.excel.impl;
import com.yeejoin.amos.boot.module.hygf.api.Enum.PowerStationProcessStateEnum;
import com.yeejoin.amos.boot.module.hygf.api.mapper.BusinessFieldMapper;
import com.yeejoin.amos.boot.module.hygf.biz.excel.service.IExportPageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.*;
@Service
public class DzwcServiceImpl implements IExportPageService {
@Autowired
private BusinessFieldMapper businessFieldMapper;
@Override
public List<String> getStationId(Map<String, Object> filters) {
Map<String, Object> map = new HashMap<>();
map.put("processStatus", PowerStationProcessStateEnum.完成.getName());
if (Objects.nonNull(filters)) {
map.putAll(filters);
}
return businessFieldMapper.getDzStationIdByProcessStatus(map);
}
}
package com.yeejoin.amos.boot.module.hygf.biz.excel.impl;
import com.yeejoin.amos.boot.module.hygf.api.mapper.BusinessFieldMapper;
import com.yeejoin.amos.boot.module.hygf.biz.excel.service.IExportPageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
@Service
public class FhdfhServiceImpl implements IExportPageService {
@Autowired
private BusinessFieldMapper businessFieldMapper;
@Override
public List<String> getStationId(Map<String, Object> filters) {
Map<String, Object> map = new HashMap<>();
map.put("preparationMoneyState", "0");
if (Objects.nonNull(filters)) {
map.putAll(filters);
}
return businessFieldMapper.getFhStationId(map);
}
}
package com.yeejoin.amos.boot.module.hygf.biz.excel.impl;
import com.yeejoin.amos.boot.module.hygf.api.mapper.BusinessFieldMapper;
import com.yeejoin.amos.boot.module.hygf.biz.excel.service.IExportPageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
@Service
public class FhyfhServiceImpl implements IExportPageService {
@Autowired
private BusinessFieldMapper businessFieldMapper;
@Override
public List<String> getStationId(Map<String, Object> filters) {
Map<String, Object> map = new HashMap<>();
map.put("preparationMoneyState", "1");
if (Objects.nonNull(filters)) {
map.putAll(filters);
}
return businessFieldMapper.getFhStationId(map);
}
}
package com.yeejoin.amos.boot.module.hygf.biz.excel.impl;
import com.alibaba.fastjson.JSON;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.module.hygf.api.entity.StdUserEmpower;
import com.yeejoin.amos.boot.module.hygf.api.mapper.BusinessFieldMapper;
import com.yeejoin.amos.boot.module.hygf.biz.excel.service.IExportPageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import java.util.*;
@Service
public class RzdfkServiceImpl implements IExportPageService {
@Autowired
private BusinessFieldMapper businessFieldMapper;
@Autowired
private RedisUtils redisUtils;
@Override
public List<String> getStationId(Map<String, Object> filters) {
StdUserEmpower orgCode = (StdUserEmpower) redisUtils.get("Emp_" + RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken()));
List<String> amosOrgCodes = orgCode.getAmosOrgCode();
Map<String, Object> params = new HashMap<>();
String status="审核通过";
if (null != status ){
params.put("status", Arrays.asList(status.split(",")));
}
params.put("type", "2");
ReginParams reginParams = JSON.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class);
Long sequenceNbr = reginParams.getCompany().getSequenceNbr();
params.put("financingCompaniesSeq", String.valueOf(sequenceNbr));
if (Objects.nonNull(filters)) {
params.putAll(filters);
}
return businessFieldMapper.getTrStationIdByStatus(params,amosOrgCodes);
}
}
package com.yeejoin.amos.boot.module.hygf.biz.excel.impl;
import com.alibaba.fastjson.JSON;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.module.hygf.api.entity.StdUserEmpower;
import com.yeejoin.amos.boot.module.hygf.api.mapper.BusinessFieldMapper;
import com.yeejoin.amos.boot.module.hygf.biz.excel.service.IExportPageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import java.util.*;
@Service
public class RzdshServiceImpl implements IExportPageService {
@Autowired
private BusinessFieldMapper businessFieldMapper;
@Autowired
private RedisUtils redisUtils;
@Override
public List<String> getStationId(Map<String, Object> filters) {
StdUserEmpower orgCode = (StdUserEmpower) redisUtils.get("Emp_" + RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken()));
List<String> amosOrgCodes = orgCode.getAmosOrgCode();
Map<String, Object> params = new HashMap<>();
String status="待融资审核";
if (null != status ){
params.put("status", Arrays.asList(status.split(",")));
}
params.put("type", "2");
ReginParams reginParams = JSON.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class);
Long sequenceNbr = reginParams.getCompany().getSequenceNbr();
params.put("financingCompaniesSeq", String.valueOf(sequenceNbr));
if (Objects.nonNull(filters)) {
params.putAll(filters);
}
return businessFieldMapper.getTrStationIdByStatus(params,amosOrgCodes);
}
}
package com.yeejoin.amos.boot.module.hygf.biz.excel.impl;
import com.alibaba.fastjson.JSON;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.module.hygf.api.entity.StdUserEmpower;
import com.yeejoin.amos.boot.module.hygf.api.mapper.BusinessFieldMapper;
import com.yeejoin.amos.boot.module.hygf.biz.excel.service.IExportPageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import java.util.*;
@Service
public class RzwtgServiceImpl implements IExportPageService {
@Autowired
private BusinessFieldMapper businessFieldMapper;
@Autowired
private RedisUtils redisUtils;
@Override
public List<String> getStationId(Map<String, Object> filters) {
StdUserEmpower orgCode = (StdUserEmpower) redisUtils.get("Emp_" + RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken()));
List<String> amosOrgCodes = orgCode.getAmosOrgCode();
Map<String, Object> params = new HashMap<>();
String status="审核不通过,重新验收";
if (null != status ){
params.put("status", Arrays.asList(status.split(",")));
}
params.put("type", "2");
ReginParams reginParams = JSON.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class);
Long sequenceNbr = reginParams.getCompany().getSequenceNbr();
params.put("financingCompaniesSeq", String.valueOf(sequenceNbr));
if (Objects.nonNull(filters)) {
params.putAll(filters);
}
return businessFieldMapper.getTrStationIdByStatus(params,amosOrgCodes);
}
}
package com.yeejoin.amos.boot.module.hygf.biz.excel.impl;
import com.alibaba.fastjson.JSON;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.module.hygf.api.entity.StdUserEmpower;
import com.yeejoin.amos.boot.module.hygf.api.mapper.BusinessFieldMapper;
import com.yeejoin.amos.boot.module.hygf.biz.excel.service.IExportPageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import java.util.*;
@Service
public class RzyfkServiceImpl implements IExportPageService {
@Autowired
private BusinessFieldMapper businessFieldMapper;
@Autowired
private RedisUtils redisUtils;
@Override
public List<String> getStationId(Map<String, Object> filters) {
StdUserEmpower orgCode = (StdUserEmpower) redisUtils.get("Emp_" + RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken()));
List<String> amosOrgCodes = orgCode.getAmosOrgCode();
Map<String, Object> params = new HashMap<>();
String status="已放款,放款完成";
if (null != status ){
params.put("status", Arrays.asList(status.split(",")));
}
params.put("type", "2");
ReginParams reginParams = JSON.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class);
Long sequenceNbr = reginParams.getCompany().getSequenceNbr();
params.put("financingCompaniesSeq", String.valueOf(sequenceNbr));
if (Objects.nonNull(filters)) {
params.putAll(filters);
}
return businessFieldMapper.getTrStationIdByStatus(params,amosOrgCodes);
}
}
package com.yeejoin.amos.boot.module.hygf.biz.excel.impl;
import com.alibaba.fastjson.JSONObject;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.module.hygf.api.dto.WorkOrderPage;
import com.yeejoin.amos.boot.module.hygf.api.mapper.BusinessFieldMapper;
import com.yeejoin.amos.boot.module.hygf.biz.excel.service.IExportPageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import java.util.*;
@Service
public class SgysServiceImpl implements IExportPageService {
@Autowired
private BusinessFieldMapper businessFieldMapper;
@Autowired
private RedisUtils redisUtils;
@Value("${admin.engineering.roleId}")
Long engineeringId;
@Value("${admin.area.roleId}")
Long areaId;
@Value("${admin.design.roleId}")
Long designId;
@Value("${admin.delerAdmin.roleId}")
Long delerAdminId;
@Override
public List<String> getStationId(Map<String, Object> filters) {
ReginParams reginParams = JSONObject.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class);
List<String> workOrderPowerStationNodes = new ArrayList<>();
Map<String,Object> map =new HashMap<>();
List<Long> roleIds = new ArrayList<>();
for (Long aLong : reginParams.getUserModel().getOrgRoleSeqs().keySet()) {
List<Long> longs = reginParams.getUserModel().getOrgRoleSeqs().get(aLong);
if (longs.contains(areaId)) {
workOrderPowerStationNodes.add("area");
}
if (longs.contains(engineeringId)) {
workOrderPowerStationNodes.add("engineering");
}
if (longs.contains(designId)) {
workOrderPowerStationNodes.add("design");
}
if (longs.contains(delerAdminId)) {
workOrderPowerStationNodes.add("design");
workOrderPowerStationNodes.add("engineering");
workOrderPowerStationNodes.add("area");
}
roleIds.addAll(longs);
}
map.put("workOrderPowerStationNodes",workOrderPowerStationNodes);
if (Objects.nonNull(filters)) {
map.putAll(filters);
}
return businessFieldMapper.getSgysStationId(map);
}
}
package com.yeejoin.amos.boot.module.hygf.biz.excel.impl;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.module.hygf.api.entity.StdUserEmpower;
import com.yeejoin.amos.boot.module.hygf.api.mapper.BusinessFieldMapper;
import com.yeejoin.amos.boot.module.hygf.biz.excel.service.IExportPageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import java.util.*;
@Service
public class TrdfkServiceImpl implements IExportPageService {
@Autowired
private BusinessFieldMapper businessFieldMapper;
@Autowired
private RedisUtils redisUtils;
@Override
public List<String> getStationId(Map<String, Object> filters) {
StdUserEmpower orgCode = (StdUserEmpower) redisUtils.get("Emp_" + RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken()));
List<String> amosOrgCodes = orgCode.getAmosOrgCode();
Map<String, Object> params = new HashMap<>();
String status="审核通过";
if (null != status ){
params.put("status", Arrays.asList(status.split(",")));
}
params.put("type", "1");
if (Objects.nonNull(filters)) {
params.putAll(filters);
}
return businessFieldMapper.getTrStationIdByStatus(params,amosOrgCodes);
}
}
package com.yeejoin.amos.boot.module.hygf.biz.excel.impl;
import com.alibaba.fastjson.JSON;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.module.hygf.api.entity.StdUserEmpower;
import com.yeejoin.amos.boot.module.hygf.api.mapper.BusinessFieldMapper;
import com.yeejoin.amos.boot.module.hygf.biz.excel.service.IExportPageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import java.util.*;
@Service
public class TrdtsServiceImpl implements IExportPageService {
@Autowired
private BusinessFieldMapper businessFieldMapper;
@Autowired
private RedisUtils redisUtils;
@Override
public List<String> getStationId(Map<String, Object> filters) {
StdUserEmpower orgCode = (StdUserEmpower) redisUtils.get("Emp_" + RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken()));
List<String> amosOrgCodes = orgCode.getAmosOrgCode();
Map<String, Object> params = new HashMap<>();
String status="待推送";
if (null != status ){
params.put("status", Arrays.asList(status.split(",")));
}
params.put("type", "1");
if (Objects.nonNull(filters)) {
params.putAll(filters);
}
return businessFieldMapper.getTrStationIdByStatus(params,amosOrgCodes);
}
}
package com.yeejoin.amos.boot.module.hygf.biz.excel.impl;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.module.hygf.api.entity.StdUserEmpower;
import com.yeejoin.amos.boot.module.hygf.api.mapper.BusinessFieldMapper;
import com.yeejoin.amos.boot.module.hygf.biz.excel.service.IExportPageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import java.util.*;
@Service
public class TrwtgServiceImpl implements IExportPageService {
@Autowired
private BusinessFieldMapper businessFieldMapper;
@Autowired
private RedisUtils redisUtils;
@Override
public List<String> getStationId(Map<String, Object> filters) {
StdUserEmpower orgCode = (StdUserEmpower) redisUtils.get("Emp_" + RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken()));
List<String> amosOrgCodes = orgCode.getAmosOrgCode();
Map<String, Object> params = new HashMap<>();
String status="审核不通过,重新验收";
if (null != status ){
params.put("status", Arrays.asList(status.split(",")));
}
params.put("type", "1");
if (Objects.nonNull(filters)) {
params.putAll(filters);
}
return businessFieldMapper.getTrStationIdByStatus(params,amosOrgCodes);
}
}
package com.yeejoin.amos.boot.module.hygf.biz.excel.impl;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.module.hygf.api.entity.StdUserEmpower;
import com.yeejoin.amos.boot.module.hygf.api.mapper.BusinessFieldMapper;
import com.yeejoin.amos.boot.module.hygf.biz.excel.service.IExportPageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import java.util.*;
@Service
public class TryfkServiceImpl implements IExportPageService {
@Autowired
private BusinessFieldMapper businessFieldMapper;
@Autowired
private RedisUtils redisUtils;
@Override
public List<String> getStationId(Map<String, Object> filters) {
StdUserEmpower orgCode = (StdUserEmpower) redisUtils.get("Emp_" + RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken()));
List<String> amosOrgCodes = orgCode.getAmosOrgCode();
Map<String, Object> params = new HashMap<>();
String status="放款完成";
if (null != status ){
params.put("status", Arrays.asList(status.split(",")));
}
params.put("type", "1");
if (Objects.nonNull(filters)) {
params.putAll(filters);
}
return businessFieldMapper.getTrStationIdByStatus(params,amosOrgCodes);
}
}
package com.yeejoin.amos.boot.module.hygf.biz.excel.impl;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.module.hygf.api.entity.StdUserEmpower;
import com.yeejoin.amos.boot.module.hygf.api.mapper.BusinessFieldMapper;
import com.yeejoin.amos.boot.module.hygf.biz.excel.service.IExportPageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import java.util.*;
@Service
public class TrytsServiceImpl implements IExportPageService {
@Autowired
private BusinessFieldMapper businessFieldMapper;
@Autowired
private RedisUtils redisUtils;
@Override
public List<String> getStationId(Map<String, Object> filters) {
StdUserEmpower orgCode = (StdUserEmpower) redisUtils.get("Emp_" + RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken()));
List<String> amosOrgCodes = orgCode.getAmosOrgCode();
Map<String, Object> params = new HashMap<>();
String status="待融资审核";
if (null != status ){
params.put("status", Arrays.asList(status.split(",")));
}
params.put("type", "1");
if(Objects.nonNull(filters)){
params.putAll(filters);
}
return businessFieldMapper.getTrStationIdByStatus(params,amosOrgCodes);
}
}
package com.yeejoin.amos.boot.module.hygf.biz.excel.impl;
import com.alibaba.fastjson.JSONObject;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.module.hygf.api.mapper.BusinessFieldMapper;
import com.yeejoin.amos.boot.module.hygf.biz.excel.service.IExportPageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import java.util.*;
@Service
public class YsshServiceImpl implements IExportPageService {
@Autowired
private BusinessFieldMapper businessFieldMapper;
@Autowired
private RedisUtils redisUtils;
@Value("${admin.tourong.roleId}")
Long tourongId;
@Value("${admin.fawu.roleId}")
Long fawuId;
@Value("${admin.area.roleId}")
Long areaId;
@Value("${admin.zichan.roleId}")
Long zichanId;
@Value("${admin.delerAdmin.roleId}")
Long delerAdminId;
@Override
public List<String> getStationId(Map<String, Object> filters) {
ReginParams reginParams = JSONObject.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class);
List<String> basicGridNodes = new ArrayList<>();
List<Long> roleIds = new ArrayList<>();
for (Long aLong : reginParams.getUserModel().getOrgRoleSeqs().keySet()) {
List<Long> longs = reginParams.getUserModel().getOrgRoleSeqs().get(aLong);
roleIds.addAll(longs);
if (longs.contains(areaId)) {
basicGridNodes.add("ys-area");
}
if (longs.contains(tourongId)) {
basicGridNodes.add("ys-tourong");
}
if (longs.contains(fawuId)) {
basicGridNodes.add("ys-fawu");
}
if (longs.contains(zichanId)) {
basicGridNodes.add("ys-zichan");
}
if (longs.contains(delerAdminId)) {
basicGridNodes.add("ys-tourong");
basicGridNodes.add("ys-area");
basicGridNodes.add("ys-fawu");
basicGridNodes.add("ys-zichan");
}
}
Map<String, Object> map = new HashMap<>();
map.put("basicGridNodes",basicGridNodes);
map.put("type","1");
if(Objects.nonNull(filters)){
map.putAll(filters);
}
return businessFieldMapper.getYsshStationId(map);
}
}
package com.yeejoin.amos.boot.module.hygf.biz.excel.service;
import java.util.List;
import java.util.Map;
public interface IExportPageService {
/**
* 根据条件获取场站Id
* @param filters
* @return
*/
List<String> getStationId(Map<String, Object> filters);
}
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