Merge remote-tracking branch 'origin/master'
| | |
| | | import com.ruoyi.common.config.RuoYiConfig; |
| | | import com.ruoyi.common.constant.HttpStatus; |
| | | import com.ruoyi.common.exception.ServiceException; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.project.domain.FunddetailReqVo; |
| | | import com.ruoyi.project.domain.ServiceFund; |
| | | import freemarker.template.Configuration; |
| | | import freemarker.template.Template; |
| | | import freemarker.template.TemplateException; |
| | | import io.lettuce.core.dynamic.annotation.Param; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | |
| | | @Api("è´¹ç¨ç³è¯·æç»") |
| | | @RestController |
| | | @RequestMapping("/project/funddetail") |
| | | public class ServiceFunddetailController extends BaseController |
| | | { |
| | | public class ServiceFunddetailController extends BaseController { |
| | | @Autowired |
| | | private IServiceFunddetailService serviceFunddetailService; |
| | | |
| | |
| | | @ApiOperation("æ¥è¯¢è´¹ç¨ç³è¯·æç»å表") |
| | | //@PreAuthorize("@ss.hasPermi('project:funddetail:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(ServiceFunddetail serviceFunddetail) |
| | | { |
| | | public TableDataInfo list(ServiceFunddetail serviceFunddetail) { |
| | | startPage(); |
| | | //List<ServiceFunddetail> list = serviceFunddetailService.queryList(serviceFunddetail); |
| | | List<ServiceFunddetail> list = serviceFunddetailService.selectServiceFunddetailList(serviceFunddetail); |
| | |
| | | //@PreAuthorize("@ss.hasPermi('project:funddetail:export')") |
| | | @Log(title = "è´¹ç¨ç³è¯·æç»", businessType = BusinessType.EXPORT) |
| | | @GetMapping("/export") |
| | | public AjaxResult export(ServiceFunddetail serviceFunddetail) |
| | | { |
| | | public AjaxResult export(ServiceFunddetail serviceFunddetail) { |
| | | List<ServiceFunddetail> list = serviceFunddetailService.queryList(serviceFunddetail); |
| | | ExcelUtil<ServiceFunddetail> util = new ExcelUtil<ServiceFunddetail>(ServiceFunddetail.class); |
| | | return util.exportExcel(list, "è´¹ç¨ç³è¯·æç»æ°æ®"); |
| | |
| | | @ApiOperation("è·åè´¹ç¨ç³è¯·æç»è¯¦ç»ä¿¡æ¯") |
| | | //@PreAuthorize("@ss.hasPermi('project:funddetail:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) |
| | | { |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) { |
| | | return AjaxResult.success(serviceFunddetailService.getById(id)); |
| | | } |
| | | |
| | |
| | | @Log(title = "è´¹ç¨ç³è¯·æç»", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | @RepeatSubmit |
| | | public AjaxResult add(@RequestBody ServiceFunddetail serviceFunddetail) |
| | | { |
| | | public AjaxResult add(@RequestBody ServiceFunddetail serviceFunddetail) { |
| | | return toAjax(serviceFunddetailService.save(serviceFunddetail)); |
| | | } |
| | | |
| | |
| | | @Log(title = "è´¹ç¨ç³è¯·æç»", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | @RepeatSubmit |
| | | public AjaxResult edit(@RequestBody ServiceFunddetail serviceFunddetail) |
| | | { |
| | | public AjaxResult edit(@RequestBody ServiceFunddetail serviceFunddetail) { |
| | | return toAjax(serviceFunddetailService.updateById(serviceFunddetail)); |
| | | } |
| | | |
| | |
| | | //@PreAuthorize("@ss.hasPermi('project:funddetail:remove')") |
| | | @Log(title = "è´¹ç¨ç³è¯·æç»", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | | { |
| | | public AjaxResult remove(@PathVariable Long[] ids) { |
| | | return toAjax(serviceFunddetailService.removeByIds(Arrays.asList(ids))); |
| | | } |
| | | |
| | |
| | | @ApiOperation("å 餿¥éç³è¯·æç»å¹¶ä¿®æ¹éé¢") |
| | | @Log(title = "æ¥éç³è¯·æç»", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/deleteDetail/{id}") |
| | | public AjaxResult deleteDetail(@PathVariable Long id) |
| | | { |
| | | public AjaxResult deleteDetail(@PathVariable Long id) { |
| | | return AjaxResult.success(serviceFunddetailService.deleteDetail(id)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æ ¹æ®åç人ç¼å·è·åè´¹ç¨ç³è¯·æç»ä¿¡æ¯ |
| | | */ |
| | | @ApiOperation("æ ¹æ®åç人ç¼å·è·åè´¹ç¨ç³è¯·æç»ä¿¡æ¯") |
| | | @PostMapping("/getDataBybeneficiaryNo") |
| | | public AjaxResult getDataBybeneficiaryNo(@RequestBody FunddetailReqVo funddetailReqVo) { |
| | | // if (StringUtils.isEmpty(funddetailReqVo.getBeneficiaryNo())) { |
| | | // return AjaxResult.error("åç人ç¼å·ä¸è½ä¸ºç©º"); |
| | | // } |
| | | List<ServiceFunddetail> dataBybeneficiaryNo = serviceFunddetailService.getDataBybeneficiaryNo(funddetailReqVo); |
| | | return AjaxResult.success(dataBybeneficiaryNo); |
| | | } |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.project.domain; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.common.annotation.Excel; |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * è´¹ç¨ç³è¯·æ¥è¯¢VO |
| | | * |
| | | * @author ls |
| | | * @date 2023-05-30 |
| | | */ |
| | | @Data |
| | | @ApiModel("è´¹ç¨ç³è¯·æç»") |
| | | public class FunddetailReqVo extends BaseEntity { |
| | | |
| | | |
| | | /** |
| | | * æå¡å¯¹è±¡åç§° |
| | | */ |
| | | @ApiModelProperty("åç人ç¼å·") |
| | | private String beneficiaryNo; |
| | | |
| | | /** |
| | | * ç³è¯·å¼å§æ¶é´ |
| | | */ |
| | | @ApiModelProperty("ç³è¯·å¼å§æ¶é´") |
| | | private String starttime; |
| | | |
| | | |
| | | /** |
| | | * ç³è¯·å¼å§æ¶é´ |
| | | */ |
| | | @ApiModelProperty("ç³è¯·ç»ææ¶é´") |
| | | private String endtime; |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import java.util.List; |
| | | |
| | | import com.ruoyi.project.domain.FunddetailReqVo; |
| | | import com.ruoyi.project.domain.ServiceFunddetail; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | |
| | | List<ServiceFunddetail> getAllDetailsByFDIDLWF(Long id); |
| | | |
| | | int countItem(@Param("fundid") Long fundid, @Param("itemid") Long itemid); |
| | | |
| | | public List<ServiceFunddetail> getDataBybeneficiaryNo(FunddetailReqVo funddetailReqVo); |
| | | } |
| | |
| | | |
| | | import java.util.List; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.project.domain.FunddetailReqVo; |
| | | import com.ruoyi.project.domain.ServiceFunddetail; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | |
| | | /** |
| | | * è´¹ç¨ç³è¯·æç»Serviceæ¥å£ |
| | |
| | | * @param serviceFunddetail è´¹ç¨ç³è¯·æç» |
| | | * @return è´¹ç¨ç³è¯·æç»éå |
| | | */ |
| | | public List<ServiceFunddetail> queryList(ServiceFunddetail serviceFunddetail); |
| | | List<ServiceFunddetail> queryList(ServiceFunddetail serviceFunddetail); |
| | | |
| | | /** |
| | | * æ ¹æ®åç人ç¼å·è·åè´¹ç¨ç³è¯·æç»ä¿¡æ¯ |
| | | */ |
| | | List<ServiceFunddetail> getDataBybeneficiaryNo(FunddetailReqVo funddetailReqVo); |
| | | |
| | | List<ServiceFunddetail> getAllDetailsByFDIDLW(Long id); |
| | | |
| | |
| | | package com.ruoyi.project.service.impl; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.time.temporal.TemporalAdjusters; |
| | | import java.util.List; |
| | | |
| | | import com.ruoyi.project.domain.ServiceFund; |
| | | import com.ruoyi.project.domain.ServiceReimbursement; |
| | | import com.ruoyi.project.domain.ServiceReimbursementdetail; |
| | | import com.ruoyi.project.domain.*; |
| | | import com.ruoyi.project.mapper.ServiceFundMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.project.mapper.ServiceFunddetailMapper; |
| | | import com.ruoyi.project.domain.ServiceFunddetail; |
| | | import com.ruoyi.project.service.IServiceFunddetailService; |
| | | |
| | | /** |
| | |
| | | * @date 2022-01-25 |
| | | */ |
| | | @Service |
| | | public class ServiceFunddetailServiceImpl extends ServiceImpl<ServiceFunddetailMapper, ServiceFunddetail> implements IServiceFunddetailService |
| | | { |
| | | public class ServiceFunddetailServiceImpl extends ServiceImpl<ServiceFunddetailMapper, ServiceFunddetail> implements IServiceFunddetailService { |
| | | |
| | | @Autowired |
| | | ServiceFunddetailMapper serviceFunddetailMapper; |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<ServiceFunddetail> getDataBybeneficiaryNo(FunddetailReqVo funddetailReqVo) { |
| | | if (StringUtils.isEmpty(funddetailReqVo.getStarttime())) { |
| | | // è·åå½æç¬¬ä¸å¤©æ¥æ |
| | | funddetailReqVo.setStarttime(LocalDate.now().with(TemporalAdjusters.firstDayOfMonth()).toString()); |
| | | } |
| | | if (StringUtils.isEmpty(funddetailReqVo.getEndtime())) { |
| | | // è·å彿æåä¸å¤©æ¥æ |
| | | funddetailReqVo.setEndtime(LocalDate.now().with(TemporalAdjusters.lastDayOfMonth()).toString()); |
| | | } |
| | | List<ServiceFunddetail> dataBybeneficiaryNo = serviceFunddetailMapper.getDataBybeneficiaryNo(funddetailReqVo); |
| | | |
| | | return dataBybeneficiaryNo; |
| | | } |
| | | |
| | | @Override |
| | | public List<ServiceFunddetail> getAllDetailsByFDIDLW(Long id) { |
| | | return serviceFunddetailMapper.getAllDetailsByFDIDLW(id); |
| | | } |
| | |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.project.mapper.ServiceFunddetailMapper"> |
| | | |
| | | <resultMap type="ServiceFunddetail" id="ServiceFunddetailResult"> |
| | | <resultMap type="com.ruoyi.project.domain.ServiceFunddetail" id="ServiceFunddetailResult"> |
| | | <result property="id" column="ID" /> |
| | | <result property="fundid" column="fundID" /> |
| | | <result property="beneficiaryname" column="BeneficiaryName" /> |
| | |
| | | </resultMap> |
| | | |
| | | <sql id="selectServiceFunddetailVo"> |
| | | select ID, fundID, InfoId, DonorNo, DonorName, BeneficiaryName, BeneficiaryNo, UnitName, UnitNo, UnitUserNo, Title, OrderNo, ItemCode, IDCardType, IDCardNo, Sex, FamilyRelations, Phone, DepositBank, BankCardNo, BranchBankName, AnnexBankCard, AnnexRegistForm, ApplyType,ApplyTypeName, ItemID, ItemName, ItemType, Amount, PrepaidAmount, TaxAmount, InvoiceCount, TaxedAmount, AttachCount, Quantity, Price, Remark, RecordStatus, del_flag, create_by, create_time, update_by, update_time, uploadflag, uploadtime,SERVICESSCOPE,SERVICESSCOPENAME,SERVICETYPE,SERVICETYPENAME from service_funddetail |
| | | select ID, |
| | | fundID, |
| | | InfoId, |
| | | DonorNo, |
| | | DonorName, |
| | | BeneficiaryName, |
| | | BeneficiaryNo, |
| | | UnitName, |
| | | UnitNo, |
| | | UnitUserNo, |
| | | Title, |
| | | OrderNo, |
| | | ItemCode, |
| | | IDCardType, |
| | | IDCardNo, |
| | | Sex, |
| | | FamilyRelations, |
| | | Phone, |
| | | DepositBank, |
| | | BankCardNo, |
| | | BranchBankName, |
| | | AnnexBankCard, |
| | | AnnexRegistForm, |
| | | ApplyType, |
| | | ApplyTypeName, |
| | | ItemID, |
| | | ItemName, |
| | | ItemType, |
| | | Amount, |
| | | PrepaidAmount, |
| | | TaxAmount, |
| | | InvoiceCount, |
| | | TaxedAmount, |
| | | AttachCount, |
| | | Quantity, |
| | | Price, |
| | | Remark, |
| | | RecordStatus, |
| | | del_flag, |
| | | create_by, |
| | | create_time, |
| | | update_by, |
| | | update_time, |
| | | uploadflag, |
| | | uploadtime, |
| | | SERVICESSCOPE, |
| | | SERVICESSCOPENAME, |
| | | SERVICETYPE, |
| | | SERVICETYPENAME |
| | | from service_funddetail |
| | | </sql> |
| | | |
| | | <select id="selectServiceFunddetailList" parameterType="ServiceFunddetail" resultMap="ServiceFunddetailResult"> |
| | | <select id="selectServiceFunddetailList" parameterType="com.ruoyi.project.domain.ServiceFunddetail" |
| | | resultMap="ServiceFunddetailResult"> |
| | | <include refid="selectServiceFunddetailVo"/> |
| | | <where> |
| | | del_flag = '0' |
| | | <if test="beneficiaryname != null and beneficiaryname != ''"> and BeneficiaryName like concat('%', #{beneficiaryname}, '%')</if> |
| | | <if test="beneficiaryname != null and beneficiaryname != ''">and BeneficiaryName like concat('%', |
| | | #{beneficiaryname}, '%') |
| | | </if> |
| | | <if test="unitname != null and unitname != ''"> and UnitName like concat('%', #{unitname}, '%')</if> |
| | | <if test="applytype != null and applytype != ''"> and ApplyType = #{applytype}</if> |
| | | <if test="itemname != null and itemname != ''"> and ItemName like concat('%', #{itemname}, '%')</if> |
| | |
| | | where fundID = #{id} and ItemType = "12" |
| | | </select> |
| | | <select id="countItem" resultType="java.lang.Integer"> |
| | | select count(*) from service_funddetail |
| | | where ItemID = #{itemid} and fundID = #{fundid} and del_flag = '0' |
| | | select count(*) |
| | | from service_funddetail |
| | | where ItemID = #{itemid} |
| | | and fundID = #{fundid} |
| | | and del_flag = '0' |
| | | </select> |
| | | |
| | | <select id="getDataBybeneficiaryNo" parameterType="com.ruoyi.project.domain.FunddetailReqVo" |
| | | resultMap="ServiceFunddetailResult"> |
| | | select a.ID, |
| | | a.fundID, |
| | | a.InfoId, |
| | | a.DonorNo, |
| | | a.DonorName, |
| | | a.BeneficiaryName, |
| | | a.BeneficiaryNo, |
| | | a.UnitName, |
| | | a.UnitNo, |
| | | a.UnitUserNo, |
| | | a.Title, |
| | | a.OrderNo, |
| | | a.ItemCode, |
| | | a.IDCardType, |
| | | a.IDCardNo, |
| | | a.Sex, |
| | | a.FamilyRelations, |
| | | a.Phone, |
| | | a.DepositBank, |
| | | a.BankCardNo, |
| | | a.BranchBankName, |
| | | a.AnnexBankCard, |
| | | a.AnnexRegistForm, |
| | | a.ApplyType, |
| | | a.ApplyTypeName, |
| | | a.ItemID, |
| | | a.ItemName, |
| | | a.ItemType, |
| | | a.Amount, |
| | | a.PrepaidAmount, |
| | | a.TaxAmount, |
| | | a.InvoiceCount, |
| | | a.TaxedAmount, |
| | | a.AttachCount, |
| | | a.Quantity, |
| | | a.Price, |
| | | a.Remark, |
| | | a.RecordStatus, |
| | | a.del_flag, |
| | | a.create_by, |
| | | a.create_time, |
| | | a.update_by, |
| | | a.update_time, |
| | | a.uploadflag, |
| | | a.uploadtime, |
| | | a.SERVICESSCOPE, |
| | | a.SERVICESSCOPENAME, |
| | | a.SERVICETYPE, |
| | | a.SERVICETYPENAME |
| | | from service_funddetail a, |
| | | service_fund b |
| | | where a.del_flag = '0' |
| | | and a.fundID = b.id |
| | | <if test="beneficiaryNo != null and beneficiaryNo != '' ">and a.beneficiaryNo = #{beneficiaryNo}</if> |
| | | and b.create_time >= #{starttime} |
| | | and b.create_time <= #{endtime} |
| | | |
| | | </select> |
| | | |
| | | |
| | | </mapper> |