Commit 4cbd91de authored by KeYong's avatar KeYong

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

parents 8a708e1d a856e68c
......@@ -15,23 +15,23 @@ public enum AcceptanceStatusEnum {
待投融验收("待投融验收", "2", "hygf_ys1","0"),
投融验收不通过("投融验收不通过", "3", "hygf_ys2","1"),
投融验收不通过("投融验收不通过", "3", "hygf_ys2","5"),
待法务验收("待法务验收", "4","hygf_ys2","0"),
法务验收不通过("法务验收不通过", "5", "hygf_ys3","1"),
法务验收不通过("法务验收不通过", "5", "hygf_ys3","5"),
待工程验收("待工程验收", "6", "hygf_ys3","0"),
工程验收不通过("工程验收不通过", "7", "hygf_ys4","1"),
工程验收不通过("工程验收不通过", "7", "hygf_ys4","5"),
是否线下验收("是否线下验收", "11", "hygf_ys4","0"),
待线下验收("待线下验收", "8", "hygf_ys5","0"),
线下验收不通过("线下验收不通过", "9", "hygf_ys6","1"),
线下验收不通过("线下验收不通过", "9", "hygf_ys6","5"),
验收完成("验收完成", "10", "hygf_ys5","1"),
验收完成("验收完成", "10", "hygf_ys5","5"),
线下验收完成("验收完成", "10", "hygf_ys6","0");
/**
......
......@@ -75,4 +75,11 @@ public class AcceptanceRectificationOrderDto extends BaseDto {
private String powerStationAddress;
private String rectificationPhotoStr;
@ApiModelProperty(value = "区域公司id")
private Long regionCompanyId;
}
......@@ -70,6 +70,10 @@ public class BasicGridAcceptanceDto extends BaseDto {
//并网日期
private Date gridConnectionTime;
private String regionalCompaniesName;
private String serviceAgent;
//并网登记id
......
......@@ -11,6 +11,10 @@ import lombok.Data;
@Data
public class PowerStationEngineeringInfoAllDto {
//并网验收审核记录
LoggerDto loggerDto;
//自审信息
ConstructionRecords constructionRecords;
......
......@@ -33,7 +33,7 @@
bga.next_executor_ids nextExecutorIds,
bga.next_node_key nextNodeKey,
hygf_work_order.region_company_id regionCompanyId,
ph.regional_companies_code AS regionalCompaniesCode,
ph.regional_companies_name AS regionalCompaniesName,
ifnull((
......
......@@ -9,6 +9,7 @@
ph.owners_name AS ownersName,
ph.project_address_name AS powerStationAddress,
aro.rectification_status AS rectificationStatus,
ph.regional_companies_seq regionCompanyId,
CASE aro.rectification_status
WHEN 1 THEN '待整改'
WHEN 2 THEN '整改未完成'
......
......@@ -23,6 +23,8 @@
hbga.instance_id instanceId,
hbga.next_executor_ids nextExecutorIds,
hbga.next_node_key nextNodeKey,
hph.developer_name as serviceAgent,
hph.regional_companies_name AS regionalCompaniesName,
hph.owners_name AS ownersName,
hph.peasant_household_no peasantHouseholdNo,
hph.project_address_name projectAddressName,
......
......@@ -44,8 +44,8 @@ import java.util.List;
public class AcceptanceRectificationOrderServiceImpl extends BaseService<AcceptanceRectificationOrderDto, AcceptanceRectificationOrder, AcceptanceRectificationOrderMapper> implements IAcceptanceRectificationOrderService {
@Autowired
private AcceptanceRectificationOrderMapper acceptanceRectificationOrderMapper;
@Value("${hygf.role.gc.roleSeq}")
private String hygfGcRoleSeq;
// @Value("${hygf.role.gc.roleSeq}")
// private String hygfGcRoleSeq;
@Autowired
private BasicGridAcceptanceMapper basicGridAcceptanceMapper;
@Autowired
......@@ -86,16 +86,17 @@ public class AcceptanceRectificationOrderServiceImpl extends BaseService<Accepta
* 查询负责人列表(经销商工程角色)
*/
public List<AgencyUserModel> queryDirectors(Long companyId) {
try {
FeignClientResult<List<AgencyUserModel>> response = Privilege.agencyUserClient.queryByCompanyRoles(companyId, hygfGcRoleSeq, null, "UNLOCK");
if (response.getStatus() == 200) {
return response.getResult();
} else {
throw new RuntimeException(response.getMessage());
}
} catch (RuntimeException e) {
throw new RuntimeException(e.getMessage());
}
// try {
// //FeignClientResult<List<AgencyUserModel>> response = Privilege.agencyUserClient.queryByCompanyRoles(companyId, hygfGcRoleSeq, null, "UNLOCK");
// if (response.getStatus() == 200) {
// return response.getResult();
// } else {
// throw new RuntimeException(response.getMessage());
// }
// } catch (RuntimeException e) {
// throw new RuntimeException(e.getMessage());
// }
return null;
}
/**
......@@ -109,12 +110,8 @@ public class AcceptanceRectificationOrderServiceImpl extends BaseService<Accepta
// 提交整改信息
AcceptanceRectificationOrder entity = new AcceptanceRectificationOrder();
BeanUtils.copyProperties(model, entity);
// 处理负责人姓名
FeignClientResult<AgencyUserModel> response = Privilege.agencyUserClient.queryByUserId(entity.getResponsibleUserId().toString());
if (response.getStatus() == 200) {
AgencyUserModel userModel = response.getResult();
entity.setResponsibleUserName(userModel.getRealName());
}
acceptanceRectificationOrderMapper.updateById(entity);
// 如果整改已完成则触发工作流
......@@ -127,21 +124,13 @@ public class AcceptanceRectificationOrderServiceImpl extends BaseService<Accepta
basicGridAcceptance.setAcceptanceStatus(String.valueOf(Integer.parseInt(basicGridAcceptance.getAcceptanceStatus()) - 1));
StandardDto standardDto = new StandardDto();
StandardDto standardDto=new StandardDto();
standardDto.setTaskId(basicGridAcceptance.getNextTaskId());
VariableDto variableDto = new VariableDto();
variableDto.setComment("approval");
variableDto.setOperator(reginParams.getUserModel().getUserId());
variableDto.setApprovalStatus("1");
variableDto.setOperationTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
standardDto.setResultCode("approvalStatus");
standardDto.setVariable(variableDto);
standardDto.setResult("1");
BasicGridAcceptance workBasicGridAcceptance = workflow.standard(basicGridAcceptance, standardDto, userId);
basicGridAcceptanceMapper.updateById(workBasicGridAcceptance);
workflow.standard(basicGridAcceptance,standardDto,userId);
basicGridAcceptanceMapper.updateById(basicGridAcceptance);
}
return model;
}
}
......@@ -44,7 +44,7 @@ public class BasicGridAcceptanceServiceImpl extends BaseService<BasicGridAccepta
AcceptanceRectificationOrderMapper acceptanceRectificationOrderMapper;
private final String OK ="0";
private final String PASS ="1";
private final String PASS ="5";
public Page<BasicGridAcceptanceDto> selectPage(Long regionCompanyId ,Long amosDealerId ,int current, int size, String projectAddress, String powerStationCode, String ownersName, String gridStatus, Date gridConnectionTime, String formType) {
PageHelper.startPage(current, size);
......@@ -159,12 +159,12 @@ public class BasicGridAcceptanceServiceImpl extends BaseService<BasicGridAccepta
basicGridAcceptanc.setGridStatus(GridStatusEnum.WTG.getCode());
}
// 投融/法务/工程/线下验收审核不通过
else if (PASS.equals(dto.getApprovalStatus()) && (
else if (
BasicGridAcceptancEnum.管理端投融审核.getCode().equals(nextNodeKey) ||
BasicGridAcceptancEnum.管理端法务审核.getCode().equals(nextNodeKey) ||
BasicGridAcceptancEnum.管理端工程审核.getCode().equals(nextNodeKey) ||
BasicGridAcceptancEnum.管理端工程是否线下.getCode().equals(nextNodeKey)
)) {
BasicGridAcceptancEnum.管理端工程线下验.getCode().equals(nextNodeKey)
) {
AcceptanceRectificationOrder rectificationOrder = new AcceptanceRectificationOrder();
try {
rectificationOrder.setRectificationOrderCode("ZGD" + DateUtil.formatDate(new Date(), DateUtil.YMDHM));
......@@ -202,27 +202,7 @@ public class BasicGridAcceptanceServiceImpl extends BaseService<BasicGridAccepta
standardDto.setVariable(variable);
BasicGridAcceptance workBasicGridAcceptance = workflow.standard(basicGridAcceptanc, standardDto, userId);
// if( BasicGridAcceptancEnum.管理端工程审核.getCode().equals(old)){
//
// //是否线下验收
// if(dto.getApprovalStatusxx().equals("0")){
// workBasicGridAcceptance.setAcceptanceStatus(AcceptanceStatusEnum.getNodeByKey(workBasicGridAcceptance.getNextNodeKey(),"0"));
// }else{
// workBasicGridAcceptance.setAcceptanceStatus(AcceptanceStatusEnum.getNodeByKey(workBasicGridAcceptance.getNextNodeKey(),"1"));
// }
// //执行工作流
// StandardDto standardDto1=new StandardDto();
// standardDto1.setComment(dto.getComment());
// standardDto1.setResult(dto.getApprovalStatusxx());
// standardDto1.setTaskId(workBasicGridAcceptance.getNextTaskId());
// VariableDto variable1=new VariableDto();
// variable1.setApprovalStatus(dto.getApprovalStatusxx());
// variable1.setComment(dto.getComment());
// variable1.setOperationTime(dto.getOperationTime());
// variable1.setOperator(dto.getOperator());
// standardDto1.setVariable(variable1);
// workBasicGridAcceptance = workflow.standard(workBasicGridAcceptance,standardDto,userId);
// }
basicGridAcceptanceMapper.updateById(workBasicGridAcceptance);
}
......
......@@ -15,6 +15,7 @@ import com.yeejoin.amos.boot.module.hygf.api.service.IPowerStationConstructionDa
import com.yeejoin.amos.boot.module.hygf.api.service.IWorkOrderService;
import com.yeejoin.amos.boot.module.hygf.api.util.BeanDtoUtils;
import com.yeejoin.amos.boot.module.hygf.api.util.NumberUtil;
import com.yeejoin.amos.boot.module.hygf.biz.feign.WorkflowFeignClient;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
......@@ -88,6 +89,10 @@ public class WorkOrderServiceImpl extends BaseService<WorkOrderDto,WorkOrder,Wor
@Autowired
BasicGridAcceptanceMapper basicGridAcceptanceMapper;
@Autowired
WorkflowFeignClient workflowFeignClient;
/**
* 分页查询
......@@ -680,6 +685,48 @@ public class WorkOrderServiceImpl extends BaseService<WorkOrderDto,WorkOrder,Wor
ConstructionRecords data=new ConstructionRecords();
data.setConstructionRecordsList(li);
surveyInfoAllDto.setConstructionRecords(data);
LambdaQueryWrapper<BasicGridAcceptance> quv=new LambdaQueryWrapper();
quv.eq(BasicGridAcceptance::getPeasantHouseholdId,peasantHouseholdId);
BasicGridAcceptance basicGridAcceptance= basicGridAcceptanceMapper.selectOne(quv);
//审核意见
if(!StringUtils.isEmpty(basicGridAcceptance.getInstanceId())){
try {
Map<String, Object> flowLoggerMap = workflowFeignClient.getFlowLogger(basicGridAcceptance.getInstanceId()).getResult();
List<LinkedHashMap> flowLogger = (List<LinkedHashMap>) flowLoggerMap.get("flowLogger");
if (flowLogger.size() > 0 ){
Collections.reverse(flowLogger);
}
List<LinkedHashMap> flowLoggernew =new ArrayList<>();
for (LinkedHashMap linkedHashMap : flowLogger) {
if(linkedHashMap.get("operateDate")!=null&&!linkedHashMap.get("operateDate").toString().isEmpty()){
LinkedHashMap linke=new LinkedHashMap();
linke.put("approvalStatue",linkedHashMap.get("approvalStatue").toString());
//审核意见
List<LinkedHashMap> approvalSuggestion = (List<LinkedHashMap>)linkedHashMap.get("approvalSuggestion");
if(approvalSuggestion!=null&&!approvalSuggestion.isEmpty()){
linke.put("approvalSuggestion",approvalSuggestion.get(0).get("message"));
}
linke.put("taskName",linkedHashMap.get("taskName").toString());
linke.put("operator",linkedHashMap.get("operator").toString());
linke.put("operateDate",linkedHashMap.get("operateDate").toString());
flowLoggernew.add(linke);
}
}
LoggerDto loggerDto =new LoggerDto();
loggerDto.setLogger(flowLoggernew);
surveyInfoAllDto.setLoggerDto(loggerDto);
} catch (Exception e){
e.printStackTrace();
}
}
return surveyInfoAllDto;
// LambdaQueryWrapper<PeasantHousehold> peasantHouseholdWrapper = new LambdaQueryWrapper<>();
// peasantHouseholdWrapper.eq(PeasantHousehold::getSequenceNbr, peasantHouseholdId);
......
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