Commit ebd2952c authored by chenzhao's avatar chenzhao

修改投融审核代码

parent 1424b63d
package com.yeejoin.amos.boot.module.jxiop.api.dto;
package com.yeejoin.amos.boot.module.hygf.api.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
......
package com.yeejoin.amos.boot.module.jxiop.api.dto;
package com.yeejoin.amos.boot.module.hygf.api.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
......
package com.yeejoin.amos.boot.module.jxiop.api.entity;
package com.yeejoin.amos.boot.module.hygf.api.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
......
package com.yeejoin.amos.boot.module.jxiop.api.entity;
package com.yeejoin.amos.boot.module.hygf.api.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
......
......@@ -3,6 +3,9 @@ package com.yeejoin.amos.boot.module.hygf.api.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.hygf.api.entity.FileInformation;
import java.util.List;
import java.util.Map;
/**
* 业务文件 Mapper 接口
*
......@@ -11,4 +14,6 @@ import com.yeejoin.amos.boot.module.hygf.api.entity.FileInformation;
*/
public interface FileInformationMapper extends BaseMapper<FileInformation> {
List<Map<String,String>> getStationInfoList();
}
package com.yeejoin.amos.boot.module.jxiop.api.mapper;
package com.yeejoin.amos.boot.module.hygf.api.mapper;
import com.yeejoin.amos.boot.module.jxiop.api.entity.FinancingAuditing;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.hygf.api.entity.FinancingAuditing;
/**
* 投融审核表 Mapper 接口
......
package com.yeejoin.amos.boot.module.jxiop.api.mapper;
package com.yeejoin.amos.boot.module.hygf.api.mapper;
import com.yeejoin.amos.boot.module.jxiop.api.entity.FinancingInfo;
import com.yeejoin.amos.boot.module.hygf.api.entity.FinancingInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import java.util.List;
import java.util.Map;
/**
* Mapper 接口
*
......@@ -11,4 +14,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/
public interface FinancingInfoMapper extends BaseMapper<FinancingInfo> {
List<Map<String,String>> getStationFinancingInfoList();
}
package com.yeejoin.amos.boot.module.jxiop.api.service;
package com.yeejoin.amos.boot.module.hygf.api.service;
/**
......
package com.yeejoin.amos.boot.module.jxiop.api.service;
package com.yeejoin.amos.boot.module.hygf.api.service;
/**
......
<?xml version="1.0" encoding="UTF-8"?>
<!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.jxiop.api.mapper.FinancingInfoMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!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.FinancingInfoMapper">
<select id="getStationFinancingInfoList" resultType="java.util.Map">
SELECT
hph.sequence_nbr AS sequenceNbr,
hph.peasant_household_no peasantHouseholdNo,
hph.owners_name as ownersName,
hph.project_address as projectAddress,
hph.regional_companies_name as regionalCompaniesName,
IFNULL(info.`status`,'待推送') as status
FROM
`hygf_peasant_household` hph Left JOIN hygf_financing_info info on info.peasant_household_id = hph.sequence_nbr
WHERE
hph.construction_state= '验收完成'
</select>
</mapper>
package com.yeejoin.amos.boot.module.jxiop.biz.controller;
package com.yeejoin.amos.boot.module.hygf.biz.controller;
import com.yeejoin.amos.boot.module.hygf.api.dto.FinancingAuditingDto;
import com.yeejoin.amos.boot.module.hygf.biz.service.impl.FinancingAuditingServiceImpl;
import org.springframework.web.bind.annotation.RequestMapping;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RestController;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import java.util.List;
import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.FinancingAuditingServiceImpl;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import org.springframework.beans.factory.annotation.Autowired;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.jxiop.api.dto.FinancingAuditingDto;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
......@@ -29,7 +31,7 @@ import org.typroject.tyboot.core.foundation.enumeration.UserType;
public class FinancingAuditingController extends BaseController {
@Autowired
FinancingAuditingServiceImpl financingAuditingServiceImpl;
FinancingAuditingServiceImpl financingAuditingServiceImpl;
/**
* 新增投融审核表
......
package com.yeejoin.amos.boot.module.jxiop.biz.controller;
package com.yeejoin.amos.boot.module.hygf.biz.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import io.swagger.annotations.ApiOperation;
......@@ -6,14 +6,16 @@ import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RestController;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import java.util.List;
import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.FinancingInfoServiceImpl;
import java.util.Map;
import com.yeejoin.amos.boot.module.hygf.biz.service.impl.FinancingInfoServiceImpl;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import org.springframework.beans.factory.annotation.Autowired;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.jxiop.api.dto.FinancingInfoDto;
import com.yeejoin.amos.boot.module.hygf.api.dto.FinancingInfoDto;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
......@@ -40,7 +42,7 @@ public class FinancingInfoController extends BaseController {
@PostMapping(value = "/save")
@ApiOperation(httpMethod = "POST", value = "新增", notes = "新增")
public ResponseModel<FinancingInfoDto> save(@RequestBody FinancingInfoDto model) {
model = financingInfoServiceImpl.createWithModel(model);
model = financingInfoServiceImpl.saveModel(model);
return ResponseHelper.buildResponse(model);
}
......@@ -91,12 +93,12 @@ public class FinancingInfoController extends BaseController {
* @param current 每页大小
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@GetMapping(value = "/page")
@ApiOperation(httpMethod = "GET",value = "分页查询", notes = "分页查询")
public ResponseModel<Page<FinancingInfoDto>> queryForPage(@RequestParam(value = "current") int current,@RequestParam
public ResponseModel<Page<Map<String, String>>> queryForPage(@RequestParam(value = "current") int current,@RequestParam
(value = "size") int size) {
Page<FinancingInfoDto> page = new Page<FinancingInfoDto>();
Page<Map<String, String>> page = new Page<Map<String, String>>();
page.setCurrent(current);
page.setSize(size);
return ResponseHelper.buildResponse(financingInfoServiceImpl.queryForFinancingInfoPage(page));
......
package com.yeejoin.amos.boot.module.hygf.biz.service.impl;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.yeejoin.amos.boot.module.hygf.api.dto.FileInformationDto;
import com.yeejoin.amos.boot.module.hygf.api.entity.FileInformation;
import com.yeejoin.amos.boot.module.hygf.api.mapper.FileInformationMapper;
import com.yeejoin.amos.boot.module.hygf.api.mapper.FinancingInfoMapper;
import com.yeejoin.amos.boot.module.hygf.api.service.IFileInformationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import java.util.List;
import java.util.Map;
/**
* 业务文件服务实现类
......
package com.yeejoin.amos.boot.module.jxiop.biz.service.impl;
package com.yeejoin.amos.boot.module.hygf.biz.service.impl;
import com.yeejoin.amos.boot.module.jxiop.api.entity.FinancingAuditing;
import com.yeejoin.amos.boot.module.jxiop.api.mapper.FinancingAuditingMapper;
import com.yeejoin.amos.boot.module.jxiop.api.service.IFinancingAuditingService;
import com.yeejoin.amos.boot.module.jxiop.api.dto.FinancingAuditingDto;
import com.yeejoin.amos.boot.module.hygf.api.dto.FinancingAuditingDto;
import com.yeejoin.amos.boot.module.hygf.api.entity.FinancingAuditing;
import com.yeejoin.amos.boot.module.hygf.api.mapper.FinancingAuditingMapper;
import com.yeejoin.amos.boot.module.hygf.api.service.IFinancingAuditingService;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
......@@ -16,7 +17,7 @@ import java.util.List;
* @date 2024-04-01
*/
@Service
public class FinancingAuditingServiceImpl extends BaseService<FinancingAuditingDto,FinancingAuditing,FinancingAuditingMapper> implements IFinancingAuditingService {
public class FinancingAuditingServiceImpl extends BaseService<FinancingAuditingDto, FinancingAuditing, FinancingAuditingMapper> implements IFinancingAuditingService {
/**
* 分页查询
*/
......
package com.yeejoin.amos.boot.module.jxiop.biz.service.impl;
package com.yeejoin.amos.boot.module.hygf.biz.service.impl;
import com.yeejoin.amos.boot.module.jxiop.api.entity.FinancingInfo;
import com.yeejoin.amos.boot.module.jxiop.api.mapper.FinancingInfoMapper;
import com.yeejoin.amos.boot.module.jxiop.api.service.IFinancingInfoService;
import com.yeejoin.amos.boot.module.jxiop.api.dto.FinancingInfoDto;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.yeejoin.amos.boot.module.hygf.api.entity.BasicGridAcceptance;
import com.yeejoin.amos.boot.module.hygf.api.entity.FinancingInfo;
import com.yeejoin.amos.boot.module.hygf.api.mapper.FinancingInfoMapper;
import com.yeejoin.amos.boot.module.hygf.api.service.IFinancingInfoService;
import com.yeejoin.amos.boot.module.hygf.api.dto.FinancingInfoDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import java.util.List;
import java.util.Map;
/**
* 服务实现类
......@@ -20,8 +26,20 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto,Finan
/**
* 分页查询
*/
public Page<FinancingInfoDto> queryForFinancingInfoPage(Page<FinancingInfoDto> page) {
return this.queryForPage(page, null, false);
@Autowired
private FinancingInfoMapper financingInfoMapper;
@Autowired
private WorkflowImpl workflow;
public Page<Map<String, String>> queryForFinancingInfoPage(Page<Map<String, String>> page) {
PageHelper.startPage((int)page.getCurrent(),(int)page.getSize());
List<Map<String, String>> list = financingInfoMapper.getStationFinancingInfoList();
PageInfo<Map<String, String>> infos = new PageInfo<>(list);
page.setRecords(list);
page.setTotal(infos.getTotal());
return page;
}
/**
......@@ -30,4 +48,9 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto,Finan
public List<FinancingInfoDto> queryForFinancingInfoList() {
return this.queryForList("" , false);
}
public FinancingInfoDto saveModel(FinancingInfoDto model) {
this.createWithModel(model);
return null;
}
}
\ No newline at end of file
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