Commit 8a7c0997 authored by chenzhao's avatar chenzhao

投融资接口

parent 96508087
......@@ -23,4 +23,6 @@ public interface FinancingInfoMapper extends BaseMapper<FinancingInfo> {
List<Map<String,Object>> selectOrgList();
Map<String,Object> selectRZOrgInfo(Long id);
}
......@@ -11,10 +11,14 @@
hph.project_address_name AS projectAddress,
hph.regional_companies_name AS regionalCompaniesName,
IFNULL( info.`status`, '待推送' ) AS status,
(select count( hfro.sequence_nbr ) from hygf_financing_rectification_order hfro where hfro.peasant_household_id = hph.sequence_nbr )orderNum
(select count( hfro.sequence_nbr ) from hygf_financing_rectification_order hfro where hfro.peasant_household_id = hph.sequence_nbr )orderNum,
(select instance_id FROM hygf_financing_auditing WHERE hygf_financing_auditing.peasant_household_id = hph.sequence_nbr ORDER BY rec_date desc limit 1) instanceId,
hygf_unit_info.head_name responsibleUserName,
hygf_unit_info.head_phone responsibleUserPhone
FROM
`hygf_peasant_household` hph
LEFT JOIN hygf_financing_info info ON info.peasant_household_id = hph.sequence_nbr
LEFT JOIN hygf_unit_info on hph.developer_code = hygf_unit_info.amos_company_code
WHERE
hph.construction_state = '验收完成'
<if test="params.ownersName != null and params.ownersName !=''">
......@@ -60,4 +64,14 @@
where
PARENT_ID = (select SEQUENCE_NBR from privilege_company where COMPANY_NAME = '融资机构')
</select>
<select id="selectRZOrgInfo" resultType="java.util.Map">
select
*
from
privilege_company
where
SEQUENCE_NBR=#{id}
</select>
</mapper>
......@@ -158,7 +158,6 @@ public class FinancingInfoController extends BaseController {
@ApiOperation(httpMethod = "GET",value = "融资机构列表", notes = "融资机构列表")
@GetMapping(value = "/orgList")
public ResponseModel<List<Map<String,Object>>> orgList() {
return CommonResponseNewUtil.success(financingInfoServiceImpl.selectOrgList());
}
......
......@@ -25,6 +25,8 @@ public class FinancingAuditingServiceImpl extends BaseService<FinancingAuditingD
return this.queryForPage(page, null, false);
}
/**
* 列表查询 示例
*/
......
......@@ -108,9 +108,11 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto,Finan
ids= Arrays.asList(model.getPeasantHouseholdIds().split(","));
}else {
ids= Arrays.asList(new String[]{model.getPeasantHouseholdIds()});
}
Map<String, Object> orgInfo = this.getBaseMapper().selectRZOrgInfo(model.getFinancingCompaniesSeq());
model.setFinancingCompaniesCode(orgInfo.getOrDefault("ORG_CODE","").toString());
model.setFinancingCompaniesName(orgInfo.getOrDefault("COMPANY_NAME","").toString());
ids.stream().forEach(e->{
LambdaQueryWrapper<FinancingInfo> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(FinancingInfo::getPeasantHouseholdId,Long.valueOf(e));
......@@ -148,6 +150,7 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto,Finan
BeanUtils.copyProperties(workflowResultDto,financingAuditingDto);
financingAuditingDto.setPeasantHouseholdId(Long.valueOf(e));
financingAuditingDto.setPromoter(RequestContext.getExeUserId());
financingAuditingDto.setStatus("已提交");
financingAuditingService.createWithModel(financingAuditingDto);
});
......@@ -182,6 +185,7 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto,Finan
}
@Override
@Transactional
public void execueFlow(Map<String, Object> params) {
LambdaQueryWrapper<FinancingAuditing> query = new LambdaQueryWrapper<>();
query.eq(FinancingAuditing::getInstanceId,params.get("instanceId").toString());
......@@ -195,11 +199,15 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto,Finan
task.setTaskId(financingAuditing.getNextTaskId());
task.setComment(params.getOrDefault("comments","").toString());
HashMap<String, Object> map = new HashMap<>();
FinancingAuditingDto financingAuditingDto = new FinancingAuditingDto();
if (params.containsKey("isFlag")){
financingAuditingDto.setStatus(params.get("isFlag").equals("0")?"已退回":"");
task.setResultCode("isFlag");
map.put("isFlag",params.get("isFlag"));
}else {
task.setResultCode("approvalStatus");
financingAuditingDto.setStatus(params.get("approvalStatus").equals("0")?"已同意":"已驳回");
map.put("approvalStatus",params.get("approvalStatus"));
}
task.setVariable(map);
......@@ -207,13 +215,15 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto,Finan
ProcessTaskDTO processTaskDTO = workFlowService.complete(financingAuditing.getNextTaskId(), task);
List<WorkflowResultDto> workflowResultDtos = workFlowService.buildWorkFlowInfo(CollectionUtil.newArrayList(processTaskDTO));
WorkflowResultDto workflowResultDto = workflowResultDtos.get(0);
FinancingAuditingDto financingAuditingDto = new FinancingAuditingDto();
BeanUtils.copyProperties(workflowResultDto,financingAuditingDto);
financingAuditingDto.setPeasantHouseholdId(financingAuditing.getPeasantHouseholdId());
financingAuditingDto.setPromoter(financingAuditing.getPromoter());
if (null == financingAuditingDto.getInstanceId()){
financingAuditingDto.setInstanceId(financingAuditing.getInstanceId());
}
if (params.containsKey("isZG")) {
financingAuditingDto.setStatus("已提交");
}
financingAuditingService.createWithModel(financingAuditingDto);
String nameByCode = FinancingAuditEnum.getNameByCode(workflowResultDto.getNextNodeKey());
......@@ -248,6 +258,8 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto,Finan
financingRectificationOrder.setPeasantHouseholdName(params.getOrDefault("peasantHouseholdName","").toString());
financingRectificationOrder.setRectificationDescription(params.getOrDefault("rectificationDescription","").toString());
financingRectificationOrder.setPeasantHouseholdId(financingInfo.getPeasantHouseholdId() );
financingRectificationOrder.setResponsibleUserName(params.getOrDefault("responsibleUserName","").toString());
financingRectificationOrder.setResponsibleUserPhone(params.getOrDefault("responsibleUserPhone","").toString());
financingRectificationOrderService.save(financingRectificationOrder);
}
......
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