Commit 61546bca authored by 祁正's avatar 祁正

项目费用报销-列表

parent 7d660b49
package com.ruoyi.controller;
import com.ruoyi.common.annotation.Anonymous;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.domain.dto.FyglProjectCostReimbursementDTO;
import com.ruoyi.service.IFyglProjectCostReimbursementService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
//项目费用报销申请
@RestController
@RequestMapping("/fyglprojectCostReimbursement")
public class FyglProjectCostReimbursementController extends BaseController {
@Autowired
private IFyglProjectCostReimbursementService reimbursementService;
@Anonymous
@GetMapping("/getList")
public TableDataInfo list() {
startPage();
List<FyglProjectCostReimbursementDTO> list = reimbursementService.getList();
return getDataTable(list);
}
}
package com.ruoyi.domain.dto;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper = true)
@Data
public class FyglProjectCostReimbursementDTO extends BaseEntity {
private Integer id;
private String serialNumber;
private String projectName;
private String projectType;
private String timeOfExpense;
private String costType;
private Double actualAmount;
private Integer reimbursmentApproveStatus;
}
package com.ruoyi.mapper;
import com.ruoyi.domain.dto.FyglProjectCostReimbursementDTO;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper
public interface FyglProjectCostReimbursementMapper {
//列表
List<FyglProjectCostReimbursementDTO> getList();
}
package com.ruoyi.service;
import com.ruoyi.domain.dto.FyglProjectCostReimbursementDTO;
import java.util.List;
public interface IFyglProjectCostReimbursementService {
List<FyglProjectCostReimbursementDTO> getList();
}
package com.ruoyi.service.impl;
import com.ruoyi.domain.dto.FyglProjectCostReimbursementDTO;
import com.ruoyi.mapper.FyglProjectCostReimbursementMapper;
import com.ruoyi.service.IFyglProjectCostReimbursementService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class IFyglProjectCostReimbursementServiceImpl implements IFyglProjectCostReimbursementService {
@Autowired
private FyglProjectCostReimbursementMapper reimbursementMapper;
@Override
public List<FyglProjectCostReimbursementDTO> getList() {
return reimbursementMapper.getList();
}
}
<?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.ruoyi.mapper.FyglProjectCostReimbursementMapper">
<resultMap type="com.ruoyi.domain.dto.FyglProjectCostReimbursementDTO" id="listDTO">
<result property="id" column="id" />
<result property="serialNumber" column="serial_number" />
<result property="createTime" column="create_time" />
<result property="projectName" column="project_name" />
<result property="projectType" column="project_type" />
<result property="timeOfExpense" column="time_of_expense" />
<result property="costType" column="cost_type" />
<result property="actualAmount" column="actual_amount" />
<result property="reimbursmentApproveStatus" column="reimbursment_approve_status" />
</resultMap>
<select id="getList" resultMap="listDTO">
SELECT
r1.id,
r1.create_time,
r1.serial_number,
p.project_name,
p.project_type,
r2.time_of_expense,
r2.cost_type,
r1.actual_amount,
r1.reimbursment_approve_status
FROM
fygl_project_cost_reimbursement r1
LEFT JOIN fygl_project_cost_request r2 ON r2.id = r1.rid
LEFT JOIN project_manage p ON p.id = r2.project_id
</select>
</mapper>
\ 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