25 changed files with 1278 additions and 3 deletions
@ -0,0 +1,76 @@ |
|||
package com.research.web.controller.client.achievement; |
|||
|
|||
import com.github.pagehelper.PageHelper; |
|||
import com.github.pagehelper.PageInfo; |
|||
import com.research.common.core.domain.BaseDto; |
|||
import com.research.common.core.domain.JsonResponse; |
|||
import com.research.system.domain.dto.CommonDto; |
|||
import com.research.system.domain.dto.OutcomeDto; |
|||
import com.research.system.domain.vo.OutcomeVo; |
|||
import com.research.system.service.OutcomeService; |
|||
import io.swagger.annotations.Api; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import javax.annotation.Resource; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author zzc |
|||
* @Package com.research.web.controller.client.project |
|||
* @Date 2025/8/12 14:10 |
|||
* @description: |
|||
*/ |
|||
@Slf4j |
|||
@Api(tags = "科研成果") |
|||
@RestController |
|||
@RequestMapping("/outcome") |
|||
public class OutcomeController { |
|||
|
|||
@Resource |
|||
private OutcomeService outcomeService; |
|||
|
|||
@PostMapping("/query") |
|||
public JsonResponse<PageInfo<OutcomeVo.Result>> queryList(BaseDto<OutcomeDto.Query> query) { |
|||
if (query.getPageNum() > 0) { |
|||
PageHelper.startPage(query.getPageNum(), query.getPageSize()); |
|||
} |
|||
return JsonResponse.ok(new PageInfo<>(outcomeService.queryList(query.getParam()))); |
|||
} |
|||
|
|||
@PostMapping("/add") |
|||
public JsonResponse<Integer> add(OutcomeDto.Add dto) { |
|||
outcomeService.add(dto); |
|||
return JsonResponse.ok(); |
|||
} |
|||
|
|||
@PostMapping("/del") |
|||
public JsonResponse<Integer> del(CommonDto.DelDto dto) { |
|||
outcomeService.del(dto); |
|||
return JsonResponse.ok(); |
|||
} |
|||
|
|||
@PostMapping("/classify/query") |
|||
public JsonResponse<PageInfo<OutcomeVo.CategoryResult>> queryCategoryList(@RequestBody @Validated BaseDto<OutcomeDto.QueryCategory> query) { |
|||
if (query.getPageNum() > 0) { |
|||
PageHelper.startPage(query.getPageNum(), query.getPageSize()); |
|||
} |
|||
return JsonResponse.ok(new PageInfo<>(outcomeService.queryCategoryList(query.getParam()))); |
|||
} |
|||
|
|||
@PostMapping("/classify/add") |
|||
public JsonResponse<Integer> addCategory(@RequestBody @Validated OutcomeDto.AddCategory dto) { |
|||
outcomeService.addCategory(dto); |
|||
return JsonResponse.ok(); |
|||
} |
|||
|
|||
@PostMapping("/classify/del") |
|||
public JsonResponse<Integer> delCategory(@RequestBody @Validated CommonDto.DelDto dto) { |
|||
outcomeService.delCategory(dto); |
|||
return JsonResponse.ok(); |
|||
} |
|||
} |
@ -0,0 +1,13 @@ |
|||
package com.research.web.controller.client.funding; |
|||
|
|||
/** |
|||
* @Author zzc |
|||
* @Package com.research.web.controller.client.funding |
|||
* @Date 2025/8/12 16:28 |
|||
* @description: |
|||
*/ |
|||
public class FundingController { |
|||
|
|||
|
|||
|
|||
} |
@ -1,10 +1,77 @@ |
|||
package com.research.web.controller.client.project; |
|||
|
|||
import com.github.pagehelper.PageHelper; |
|||
import com.github.pagehelper.PageInfo; |
|||
import com.research.common.core.domain.BaseDto; |
|||
import com.research.common.core.domain.JsonResponse; |
|||
import com.research.system.domain.dto.CommonDto; |
|||
import com.research.system.domain.dto.GroupDto; |
|||
import com.research.system.domain.vo.GroupVO; |
|||
import com.research.system.service.KtsGroupService; |
|||
import io.swagger.annotations.Api; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import javax.annotation.Resource; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author zzc |
|||
* @Package com.research.web.controller.tenant |
|||
* @Date 2025/8/11 15:44 |
|||
* @description: |
|||
*/ |
|||
@Slf4j |
|||
@Api(tags = "课题组") |
|||
@RestController |
|||
@RequestMapping("/group") |
|||
public class GroupController { |
|||
|
|||
@Resource |
|||
private KtsGroupService ktsGroupService; |
|||
|
|||
@PostMapping("/query") |
|||
public JsonResponse<PageInfo<GroupVO.Result>> queryGroupList(@RequestBody @Validated BaseDto<GroupDto.Query> query){ |
|||
if (query.getPageNum() > 0) { |
|||
PageHelper.startPage(query.getPageNum(), query.getPageSize()); |
|||
} |
|||
return JsonResponse.ok(new PageInfo<>(ktsGroupService.queryGroupList(query.getParam()))); |
|||
} |
|||
@PostMapping("/add") |
|||
public JsonResponse<Integer> add(@RequestBody @Validated GroupDto.Add dto){ |
|||
ktsGroupService.add(dto); |
|||
return JsonResponse.ok(); |
|||
} |
|||
@PostMapping("/del") |
|||
public JsonResponse<Integer> del(@RequestBody @Validated CommonDto.DelDto dto){ |
|||
ktsGroupService.del(dto); |
|||
return JsonResponse.ok(); |
|||
} |
|||
@PostMapping("/status") |
|||
public JsonResponse<Integer> status(@RequestBody @Validated CommonDto.StatusDto dto){ |
|||
ktsGroupService.status(dto); |
|||
return JsonResponse.ok(); |
|||
} |
|||
@PostMapping("/member/query") |
|||
public JsonResponse<PageInfo<GroupVO.MemberResult>> queryMemberList(@RequestBody @Validated BaseDto<GroupDto.MemberQuery> query){ |
|||
if (query.getPageNum() > 0) { |
|||
PageHelper.startPage(query.getPageNum(), query.getPageSize()); |
|||
} |
|||
return JsonResponse.ok(new PageInfo<>(ktsGroupService.queryMemberList(query.getParam()))); |
|||
} |
|||
@PostMapping("/member/add") |
|||
public JsonResponse<Integer> addMember(@RequestBody @Validated GroupDto.AddMember dto){ |
|||
ktsGroupService.addMember(dto); |
|||
return JsonResponse.ok(); |
|||
} |
|||
|
|||
@PostMapping("/member/del") |
|||
public JsonResponse<Integer> delMember(@RequestBody @Validated CommonDto.DelDto dto){ |
|||
ktsGroupService.delMember(dto); |
|||
return JsonResponse.ok(); |
|||
} |
|||
} |
|||
|
@ -0,0 +1,59 @@ |
|||
package com.research.system.domain.dto; |
|||
|
|||
import com.research.system.domain.po.FudFundRecord; |
|||
import lombok.Data; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* @Author zzc |
|||
* @Package com.research.system.domain.dto |
|||
* @Date 2025/8/12 16:29 |
|||
* @description: |
|||
*/ |
|||
public class FundingDto { |
|||
|
|||
@Data |
|||
public static class Query { |
|||
private String projOrgid;//合作单位id',
|
|||
private String ktgroupid;//课题组id',
|
|||
private String paytype;//经费类型:0-收入,1-支出',
|
|||
} |
|||
|
|||
@Data |
|||
public static class Add { |
|||
private Long id; |
|||
|
|||
private Long projId; |
|||
|
|||
private Long projOrgId; |
|||
|
|||
private Long ktGroupId; |
|||
|
|||
private Byte payType; |
|||
|
|||
private String paySource; |
|||
|
|||
private String paySubject; |
|||
|
|||
private String payAbstract; |
|||
|
|||
private Date payTime; |
|||
|
|||
private BigDecimal incomeAmount; |
|||
|
|||
private BigDecimal payAmount; |
|||
|
|||
private String jsr; |
|||
|
|||
private String spr; |
|||
|
|||
private String pzh; |
|||
|
|||
private String pzhUrl; |
|||
|
|||
private String remark; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,103 @@ |
|||
package com.research.system.domain.dto; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.research.system.domain.po.KtsKtGroupMember; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* @Author zzc |
|||
* @Package com.research.system.domain.dto |
|||
* @Date 2025/8/12 9:02 |
|||
* @description: |
|||
*/ |
|||
public class GroupDto { |
|||
|
|||
@Data |
|||
public static class Query { |
|||
@ApiModelProperty("合作单位id") |
|||
private Long projOrgId; |
|||
@ApiModelProperty("课题组状态:0-正常,1禁用") |
|||
private Byte ktGroupStatus; |
|||
@ApiModelProperty("课题组名称") |
|||
private String ktGroupName; |
|||
} |
|||
|
|||
@Data |
|||
public static class MemberQuery { |
|||
@ApiModelProperty("课题组id") |
|||
private Long ktGroupId; |
|||
@ApiModelProperty("姓名") |
|||
private String memberName; |
|||
@ApiModelProperty("电话") |
|||
private String memberPhone; |
|||
@ApiModelProperty("成员类型:0-课题组负责人,1-课题组成员") |
|||
private Byte type; |
|||
@ApiModelProperty("审核状态:0-待审核,1-拒绝,2-通过") |
|||
private Byte auditStatus; |
|||
private Byte category; |
|||
@ApiModelProperty("成员状态:0-正常,1禁用") |
|||
private Byte memberStatus; |
|||
} |
|||
|
|||
@Data |
|||
public static class Add { |
|||
private Long id; |
|||
|
|||
private Long projId; |
|||
|
|||
private Long projOrgId; |
|||
|
|||
private Long parentKtId; |
|||
|
|||
private String ktGroupName; |
|||
|
|||
private Integer sort; |
|||
|
|||
private String intro; |
|||
|
|||
private Byte ktGroupStatus; |
|||
} |
|||
|
|||
@Data |
|||
public static class AddMember { |
|||
private Long id; |
|||
|
|||
private Long userId; |
|||
|
|||
private Long ktGroupId; |
|||
|
|||
private String parentMemberId; |
|||
|
|||
private String memberName; |
|||
|
|||
private String memberPhone; |
|||
|
|||
private String memberEmail; |
|||
|
|||
private Byte memberGender; |
|||
|
|||
@JsonFormat(pattern = "yyyy-MM-dd") |
|||
private Date memberBirth; |
|||
|
|||
private Byte type; |
|||
|
|||
private Byte category; |
|||
|
|||
private Integer qualification; |
|||
|
|||
private Integer title; |
|||
|
|||
private Integer sort; |
|||
|
|||
private String intro; |
|||
|
|||
private Byte auditStatus; |
|||
|
|||
private Byte memberStatus; |
|||
@ApiModelProperty("0不确认,如用户表已有该手机号信息,则报错提示 1确认添加") |
|||
private Byte confirm; |
|||
} |
|||
} |
@ -0,0 +1,104 @@ |
|||
package com.research.system.domain.dto; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.research.system.domain.po.AchAchievement; |
|||
import com.research.system.domain.po.AchAchievementCategory; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* @Author zzc |
|||
* @Package com.research.system.domain.dto |
|||
* @Date 2025/8/12 14:12 |
|||
* @description: |
|||
*/ |
|||
public class OutcomeDto { |
|||
|
|||
@Data |
|||
public static class Query{ |
|||
private Long projOrgId; |
|||
private Long ktGroupId; |
|||
private String title; |
|||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
|||
private Date applyDate; |
|||
private Long categoryId1; |
|||
private Long categoryId2; |
|||
private Byte achType; |
|||
} |
|||
|
|||
@Data |
|||
public static class QueryCategory { |
|||
private String categoryName; |
|||
private String categoryCode; |
|||
} |
|||
|
|||
@Data |
|||
public static class Add { |
|||
private Long id; |
|||
|
|||
private Long projId; |
|||
|
|||
private Long projOrgId; |
|||
|
|||
private Long ktGroupId; |
|||
|
|||
private Long categoryId1; |
|||
|
|||
private Long categoryId2; |
|||
|
|||
private String title; |
|||
|
|||
private String no; |
|||
|
|||
private String authors; |
|||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
|||
private Date applyDate; |
|||
|
|||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
|||
private Date publishDate; |
|||
|
|||
private String place; |
|||
|
|||
private Byte achType; |
|||
|
|||
private String source; |
|||
|
|||
private Byte paperSourceType; |
|||
|
|||
private String ysktXmfzr; |
|||
|
|||
private String ysktFunds; |
|||
|
|||
private String ysktLxpzwh; |
|||
|
|||
private Byte ysktStatus; |
|||
|
|||
private String abstracts; |
|||
|
|||
private String keywords; |
|||
|
|||
private String paperLink; |
|||
|
|||
private String pdfDownloadUrl; |
|||
|
|||
private String commitmentLetterUrl; |
|||
} |
|||
|
|||
@Data |
|||
public static class AddCategory { |
|||
private Long id; |
|||
|
|||
private Long projId; |
|||
|
|||
private Long parentId; |
|||
|
|||
private String categoryCode; |
|||
|
|||
private String categoryName; |
|||
|
|||
private Integer sort; |
|||
|
|||
private String remark; |
|||
} |
|||
} |
@ -0,0 +1,55 @@ |
|||
package com.research.system.domain.vo; |
|||
|
|||
import com.research.system.domain.po.FudFundRecord; |
|||
import lombok.Data; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* @Author zzc |
|||
* @Package com.research.system.domain.vo |
|||
* @Date 2025/8/12 16:30 |
|||
* @description: |
|||
*/ |
|||
public class FundingVo { |
|||
|
|||
@Data |
|||
public static class Result { |
|||
private Long id; |
|||
|
|||
private Long projId; |
|||
|
|||
private Long projOrgId; |
|||
|
|||
private Long ktGroupId; |
|||
|
|||
private Byte payType; |
|||
|
|||
private String paySource; |
|||
|
|||
private String paySubject; |
|||
|
|||
private String payAbstract; |
|||
|
|||
private Date payTime; |
|||
|
|||
private BigDecimal incomeAmount; |
|||
|
|||
private BigDecimal payAmount; |
|||
|
|||
private String jsr; |
|||
|
|||
private String spr; |
|||
|
|||
private String pzh; |
|||
|
|||
private String pzhUrl; |
|||
|
|||
private String remark; |
|||
|
|||
private String createBy; |
|||
|
|||
private Date createTime; |
|||
} |
|||
} |
@ -0,0 +1,91 @@ |
|||
package com.research.system.domain.vo; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.research.system.domain.po.KtsKtGroup; |
|||
import com.research.system.domain.po.KtsKtGroupMember; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* @Author zzc |
|||
* @Package com.research.system.domain.vo |
|||
* @Date 2025/8/12 8:58 |
|||
* @description: |
|||
*/ |
|||
public class GroupVO { |
|||
|
|||
@Data |
|||
public static class Result{ |
|||
private Long id; |
|||
|
|||
private Long projId; |
|||
|
|||
private Long projOrgId; |
|||
|
|||
private Long parentKtId; |
|||
|
|||
private String ktGroupName; |
|||
|
|||
private Integer sort; |
|||
|
|||
private String intro; |
|||
|
|||
private Byte ktGroupStatus; |
|||
|
|||
private String createBy; |
|||
|
|||
private Date createTime; |
|||
private String projOrgName; |
|||
} |
|||
|
|||
@Data |
|||
public static class MemberResult { |
|||
private Long id; |
|||
|
|||
private Long userId; |
|||
|
|||
private Long ktGroupId; |
|||
|
|||
private String parentMemberId; |
|||
|
|||
private String memberName; |
|||
|
|||
private String memberPhone; |
|||
|
|||
private String memberEmail; |
|||
|
|||
private Byte memberGender; |
|||
|
|||
@JsonFormat(pattern = "yyyy-MM-dd") |
|||
private Date memberBirth; |
|||
|
|||
private Byte type; |
|||
|
|||
private Byte category; |
|||
|
|||
private Integer qualification; |
|||
|
|||
private Integer title; |
|||
|
|||
private Integer sort; |
|||
|
|||
private String intro; |
|||
|
|||
private Byte auditStatus; |
|||
|
|||
private Byte memberStatus; |
|||
|
|||
private String createBy; |
|||
|
|||
private Date createTime; |
|||
@ApiModelProperty("课题组名称") |
|||
private String ktGroupName; |
|||
|
|||
private String qualificationName; |
|||
|
|||
private String titleName; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,101 @@ |
|||
package com.research.system.domain.vo; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.research.system.domain.po.AchAchievement; |
|||
import com.research.system.domain.po.AchAchievementCategory; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author zzc |
|||
* @Package com.research.system.domain.vo |
|||
* @Date 2025/8/12 14:15 |
|||
* @description: |
|||
*/ |
|||
public class OutcomeVo { |
|||
|
|||
@Data |
|||
public static class Result { |
|||
private Long id; |
|||
|
|||
private Long projId; |
|||
|
|||
private Long projOrgId; |
|||
|
|||
private Long ktGroupId; |
|||
|
|||
private Long categoryId1; |
|||
|
|||
private Long categoryId2; |
|||
|
|||
private String title; |
|||
|
|||
private String no; |
|||
|
|||
private String authors; |
|||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
|||
private Date applyDate; |
|||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
|||
private Date publishDate; |
|||
|
|||
private String place; |
|||
|
|||
private Byte achType; |
|||
|
|||
private String source; |
|||
|
|||
private Byte paperSourceType; |
|||
|
|||
private String ysktXmfzr; |
|||
|
|||
private String ysktFunds; |
|||
|
|||
private String ysktLxpzwh; |
|||
|
|||
private Byte ysktStatus; |
|||
|
|||
private String abstracts; |
|||
|
|||
private String keywords; |
|||
|
|||
private String paperLink; |
|||
|
|||
private String pdfDownloadUrl; |
|||
|
|||
private String commitmentLetterUrl; |
|||
|
|||
private String createBy; |
|||
|
|||
private Date createTime; |
|||
} |
|||
|
|||
@Data |
|||
public static class CategoryResult { |
|||
private Long id; |
|||
|
|||
private Long projId; |
|||
|
|||
private Long parentId; |
|||
|
|||
private String categoryCode; |
|||
|
|||
private String categoryName; |
|||
|
|||
private Integer sort; |
|||
|
|||
private String remark; |
|||
|
|||
private Byte delFlag; |
|||
|
|||
private String createBy; |
|||
|
|||
private Date createTime; |
|||
private Integer num; |
|||
private List<CategoryResult> childList; |
|||
} |
|||
|
|||
|
|||
|
|||
} |
@ -0,0 +1,22 @@ |
|||
package com.research.system.persist.dao; |
|||
|
|||
import com.research.system.domain.dto.CommonDto; |
|||
import com.research.system.domain.dto.GroupDto; |
|||
import com.research.system.domain.vo.GroupVO; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author zzc |
|||
* @Package com.research.system.persist.dao |
|||
* @Date 2025/8/12 10:41 |
|||
* @description: |
|||
*/ |
|||
public interface KtsGroupDao { |
|||
|
|||
List<GroupVO.Result> queryGroupList(@Param("dto") GroupDto.Query dto); |
|||
|
|||
List<GroupVO.MemberResult> queryMemberList(@Param("dto") GroupDto.MemberQuery dto); |
|||
|
|||
} |
@ -0,0 +1,22 @@ |
|||
package com.research.system.persist.dao; |
|||
|
|||
import com.research.system.domain.dto.OutcomeDto; |
|||
import com.research.system.domain.vo.OutcomeVo; |
|||
import org.apache.ibatis.annotations.Param; |
|||
import org.springframework.security.core.parameters.P; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author zzc |
|||
* @Package com.research.system.persist.dao |
|||
* @Date 2025/8/12 14:51 |
|||
* @description: |
|||
*/ |
|||
public interface OutcomeDao { |
|||
|
|||
List<OutcomeVo.Result> queryList(@Param("dto") OutcomeDto.Query query); |
|||
|
|||
List<OutcomeVo.CategoryResult> queryCategoryList(@Param("dto") OutcomeDto.QueryCategory dto); |
|||
|
|||
} |
@ -0,0 +1,23 @@ |
|||
package com.research.system.service; |
|||
|
|||
import com.research.system.domain.dto.CommonDto; |
|||
import com.research.system.domain.dto.FundingDto; |
|||
import com.research.system.domain.vo.FundingVo; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author zzc |
|||
* @Package com.research.system.service |
|||
* @Date 2025/8/12 16:28 |
|||
* @description: |
|||
*/ |
|||
public interface FundingService { |
|||
|
|||
List<FundingVo.Result> queryList(FundingDto.Query query); |
|||
|
|||
void add(FundingDto.Add dto); |
|||
|
|||
void del(CommonDto.DelDto dto); |
|||
|
|||
} |
@ -0,0 +1,32 @@ |
|||
package com.research.system.service; |
|||
|
|||
import com.research.common.core.domain.JsonResponse; |
|||
import com.research.system.domain.dto.CommonDto; |
|||
import com.research.system.domain.dto.GroupDto; |
|||
import com.research.system.domain.vo.GroupVO; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author zzc |
|||
* @Package com.research.system.service |
|||
* @Date 2025/8/12 9:00 |
|||
* @description: |
|||
*/ |
|||
public interface KtsGroupService { |
|||
|
|||
List<GroupVO.Result> queryGroupList(GroupDto.Query query); |
|||
|
|||
void add(GroupDto.Add dto); |
|||
|
|||
void del(CommonDto.DelDto dto); |
|||
|
|||
void status(CommonDto.StatusDto dto); |
|||
|
|||
List<GroupVO.MemberResult> queryMemberList(GroupDto.MemberQuery query); |
|||
|
|||
JsonResponse<Integer> addMember(GroupDto.AddMember dto); |
|||
|
|||
void delMember(CommonDto.DelDto dto); |
|||
|
|||
} |
@ -0,0 +1,28 @@ |
|||
package com.research.system.service; |
|||
|
|||
import com.research.system.domain.dto.CommonDto; |
|||
import com.research.system.domain.dto.OutcomeDto; |
|||
import com.research.system.domain.vo.OutcomeVo; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author zzc |
|||
* @Package com.research.system.service |
|||
* @Date 2025/8/12 14:11 |
|||
* @description: |
|||
*/ |
|||
public interface OutcomeService { |
|||
|
|||
List<OutcomeVo.Result> queryList(OutcomeDto.Query query); |
|||
|
|||
void add(OutcomeDto.Add dto); |
|||
|
|||
void del(CommonDto.DelDto dto); |
|||
|
|||
List<OutcomeVo.CategoryResult> queryCategoryList(OutcomeDto.QueryCategory query); |
|||
|
|||
void addCategory(OutcomeDto.AddCategory dto); |
|||
|
|||
void delCategory(CommonDto.DelDto dto); |
|||
} |
@ -0,0 +1,39 @@ |
|||
package com.research.system.service.impl; |
|||
|
|||
import com.research.system.domain.dto.CommonDto; |
|||
import com.research.system.domain.dto.FundingDto; |
|||
import com.research.system.domain.vo.FundingVo; |
|||
import com.research.system.persist.mapper.FudFundRecordMapper; |
|||
import com.research.system.service.FundingService; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import javax.annotation.Resource; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author zzc |
|||
* @Package com.research.system.service.impl |
|||
* @Date 2025/8/12 16:34 |
|||
* @description: |
|||
*/ |
|||
@Service |
|||
public class FundingServiceImpl implements FundingService { |
|||
|
|||
@Resource |
|||
private FudFundRecordMapper fudFundRecordMapper; |
|||
|
|||
@Override |
|||
public List<FundingVo.Result> queryList(FundingDto.Query query) { |
|||
return null; |
|||
} |
|||
|
|||
@Override |
|||
public void add(FundingDto.Add dto) { |
|||
|
|||
} |
|||
|
|||
@Override |
|||
public void del(CommonDto.DelDto dto) { |
|||
|
|||
} |
|||
} |
@ -0,0 +1,149 @@ |
|||
package com.research.system.service.impl; |
|||
|
|||
import cn.hutool.core.bean.BeanUtil; |
|||
import cn.hutool.core.util.IdUtil; |
|||
import com.research.common.constant.UserConstants; |
|||
import com.research.common.core.domain.JsonResponse; |
|||
import com.research.common.core.domain.entity.SysUser; |
|||
import com.research.common.exception.base.BaseException; |
|||
import com.research.common.utils.SecurityUtils; |
|||
import com.research.system.domain.dto.CommonDto; |
|||
import com.research.system.domain.dto.GroupDto; |
|||
import com.research.system.domain.po.*; |
|||
import com.research.system.domain.vo.GroupVO; |
|||
import com.research.system.persist.dao.KtsGroupDao; |
|||
import com.research.system.persist.mapper.KtsKtGroupMapper; |
|||
import com.research.system.persist.mapper.KtsKtGroupMemberMapper; |
|||
import com.research.system.service.ClientPrjProjInfoService; |
|||
import com.research.system.service.ISysUserService; |
|||
import com.research.system.service.KtsGroupService; |
|||
import org.springframework.context.annotation.Bean; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import javax.annotation.Resource; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author zzc |
|||
* @Package com.research.system.service.impl |
|||
* @Date 2025/8/12 9:17 |
|||
* @description: |
|||
*/ |
|||
@Service |
|||
public class KtsGroupServiceImpl implements KtsGroupService { |
|||
|
|||
@Resource |
|||
private KtsKtGroupMapper ktsKtGroupMapper; |
|||
@Resource |
|||
private KtsKtGroupMemberMapper ktsKtGroupMemberMapper; |
|||
@Resource |
|||
private ClientPrjProjInfoService clientPrjProjInfoService; |
|||
@Resource |
|||
private ISysUserService sysUserService; |
|||
@Resource |
|||
private KtsGroupDao ktsGroupDao; |
|||
|
|||
@Override |
|||
public List<GroupVO.Result> queryGroupList(GroupDto.Query query) { |
|||
return ktsGroupDao.queryGroupList(query); |
|||
} |
|||
|
|||
@Override |
|||
public void add(GroupDto.Add dto) { |
|||
//根据登录账号查询项目
|
|||
PrjProjInfo proInfoByTenantId = clientPrjProjInfoService.getProInfoByTenantId(SecurityUtils.getTenantId()); |
|||
if (proInfoByTenantId == null) { |
|||
throw new BaseException("未查询到项目"); |
|||
} |
|||
KtsKtGroup ktsKtGroup = BeanUtil.copyProperties(dto, KtsKtGroup.class); |
|||
if (dto.getId() == null) { |
|||
ktsKtGroup.setId(IdUtil.getSnowflakeNextId()); |
|||
ktsKtGroup.setCreateBy(SecurityUtils.getUsername()); |
|||
ktsKtGroup.setKtGroupStatus((byte) 0); |
|||
ktsKtGroup.setCreateTime(new Date()); |
|||
ktsKtGroup.setDelFlag((byte) 0); |
|||
ktsKtGroup.setProjId(proInfoByTenantId.getId()); |
|||
ktsKtGroupMapper.insertSelective(ktsKtGroup); |
|||
} else { |
|||
ktsKtGroup.setUpdateBy(SecurityUtils.getUsername()); |
|||
ktsKtGroup.setUpdateTime(new Date()); |
|||
ktsKtGroupMapper.updateByPrimaryKeySelective(ktsKtGroup); |
|||
} |
|||
} |
|||
|
|||
@Override |
|||
public void del(CommonDto.DelDto dto) { |
|||
KtsKtGroupExample ktsKtGroupExample = new KtsKtGroupExample(); |
|||
ktsKtGroupExample.createCriteria().andIdIn(dto.getIdList()); |
|||
KtsKtGroup ktsKtGroup = new KtsKtGroup(); |
|||
ktsKtGroup.setDelFlag((byte) 1); |
|||
ktsKtGroupMapper.updateByExampleSelective(ktsKtGroup, ktsKtGroupExample); |
|||
} |
|||
|
|||
@Override |
|||
public void status(CommonDto.StatusDto dto) { |
|||
KtsKtGroup ktsKtGroup = ktsKtGroupMapper.selectByPrimaryKey(dto.getId()); |
|||
if (ktsKtGroup == null || ktsKtGroup.getDelFlag() == 1) { |
|||
throw new BaseException("未查询到数据"); |
|||
} |
|||
ktsKtGroup.setKtGroupStatus(dto.getStatus()); |
|||
ktsKtGroupMapper.updateByPrimaryKeySelective(ktsKtGroup); |
|||
} |
|||
|
|||
@Override |
|||
public List<GroupVO.MemberResult> queryMemberList(GroupDto.MemberQuery query) { |
|||
return ktsGroupDao.queryMemberList(query); |
|||
} |
|||
|
|||
@Override |
|||
public JsonResponse<Integer> addMember(GroupDto.AddMember dto) { |
|||
KtsKtGroupMember ktsKtGroupMember = BeanUtil.copyProperties(dto, KtsKtGroupMember.class); |
|||
if (dto.getId() == null) { |
|||
//查询手机号是否已有用户
|
|||
SysUser sysUser = sysUserService.selectUserByUserName(dto.getMemberPhone()); |
|||
if (sysUser != null && "0".equals(sysUser.getDelFlag()) && dto.getConfirm() == 0) { |
|||
return JsonResponse.ok().fail(201, "手机号已存在,请确认是否添加该用户!"); |
|||
} |
|||
ktsKtGroupMember.setId(IdUtil.getSnowflakeNextId()); |
|||
ktsKtGroupMember.setCreateBy(SecurityUtils.getUsername()); |
|||
ktsKtGroupMember.setMemberStatus((byte) 0); |
|||
ktsKtGroupMember.setAuditStatus((byte) 0); |
|||
ktsKtGroupMember.setCreateTime(new Date()); |
|||
ktsKtGroupMember.setDelFlag((byte) 0); |
|||
if (sysUser == null) { |
|||
sysUser = new SysUser(); |
|||
sysUser.setUserId(IdUtil.getSnowflakeNextId()); |
|||
sysUser.setNickName(dto.getMemberName()); |
|||
sysUser.setUserName(dto.getMemberPhone()); |
|||
sysUser.setPassword(SecurityUtils.encryptPassword(UserConstants.DEFALT_PASSWORD)); |
|||
sysUser.setStatus(UserConstants.NORMAL); |
|||
sysUser.setCreateBy(SecurityUtils.getUsername()); |
|||
sysUser.setEmail(dto.getMemberEmail()); |
|||
sysUser.setPhonenumber(dto.getMemberPhone()); |
|||
sysUser.setCreateTime(new Date()); |
|||
sysUserService.insertUser(sysUser); |
|||
|
|||
} |
|||
ktsKtGroupMember.setUserId(sysUser.getUserId()); |
|||
|
|||
ktsKtGroupMemberMapper.insertSelective(ktsKtGroupMember); |
|||
return JsonResponse.ok(); |
|||
} else { |
|||
ktsKtGroupMember.setUpdateBy(SecurityUtils.getUsername()); |
|||
ktsKtGroupMember.setUpdateTime(new Date()); |
|||
ktsKtGroupMemberMapper.updateByPrimaryKeySelective(ktsKtGroupMember); |
|||
return JsonResponse.ok(); |
|||
} |
|||
} |
|||
|
|||
@Override |
|||
public void delMember(CommonDto.DelDto dto) { |
|||
KtsKtGroupMemberExample ktsKtGroupMemberExample = new KtsKtGroupMemberExample(); |
|||
ktsKtGroupMemberExample.createCriteria().andIdIn(dto.getIdList()); |
|||
KtsKtGroupMember ktsKtGroupMember = new KtsKtGroupMember(); |
|||
ktsKtGroupMember.setDelFlag((byte) 1); |
|||
ktsKtGroupMemberMapper.updateByExampleSelective(ktsKtGroupMember, ktsKtGroupMemberExample); |
|||
|
|||
} |
|||
} |
@ -0,0 +1,97 @@ |
|||
package com.research.system.service.impl; |
|||
|
|||
import cn.hutool.core.bean.BeanUtil; |
|||
import cn.hutool.core.util.IdUtil; |
|||
import com.research.common.utils.SecurityUtils; |
|||
import com.research.system.domain.dto.CommonDto; |
|||
import com.research.system.domain.dto.OutcomeDto; |
|||
import com.research.system.domain.po.AchAchievement; |
|||
import com.research.system.domain.po.AchAchievementCategory; |
|||
import com.research.system.domain.po.AchAchievementCategoryExample; |
|||
import com.research.system.domain.po.AchAchievementExample; |
|||
import com.research.system.domain.vo.OutcomeVo; |
|||
import com.research.system.persist.dao.OutcomeDao; |
|||
import com.research.system.persist.mapper.AchAchievementCategoryMapper; |
|||
import com.research.system.persist.mapper.AchAchievementMapper; |
|||
import com.research.system.service.OutcomeService; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import javax.annotation.Resource; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author zzc |
|||
* @Package com.research.system.service.impl |
|||
* @Date 2025/8/12 14:53 |
|||
* @description: |
|||
*/ |
|||
@Service |
|||
public class OutcomeServiceImpl implements OutcomeService { |
|||
//https://www.erciyan.com/book/95146757/409170406_2.html
|
|||
@Resource |
|||
private OutcomeDao outcomeDao; |
|||
@Resource |
|||
private AchAchievementMapper achAchievementMapper; |
|||
@Resource |
|||
private AchAchievementCategoryMapper achAchievementCategoryMapper; |
|||
|
|||
@Override |
|||
public List<OutcomeVo.Result> queryList(OutcomeDto.Query query) { |
|||
return outcomeDao.queryList(query); |
|||
} |
|||
|
|||
@Override |
|||
public void add(OutcomeDto.Add dto) { |
|||
AchAchievement achAchievement = BeanUtil.copyProperties(dto, AchAchievement.class); |
|||
if (achAchievement.getId() == null) { |
|||
achAchievement.setId(IdUtil.getSnowflakeNextId()); |
|||
achAchievement.setCreateBy(SecurityUtils.getUsername()); |
|||
achAchievement.setCreateTime(new Date()); |
|||
achAchievement.setDelFlag((byte) 0); |
|||
achAchievementMapper.insertSelective(achAchievement); |
|||
}else { |
|||
achAchievement.setUpdateBy(SecurityUtils.getUsername()); |
|||
achAchievement.setUpdateTime(new Date()); |
|||
achAchievementMapper.updateByPrimaryKeySelective(achAchievement); |
|||
} |
|||
} |
|||
|
|||
@Override |
|||
public void del(CommonDto.DelDto dto) { |
|||
AchAchievementExample achAchievementExample = new AchAchievementExample(); |
|||
achAchievementExample.createCriteria().andIdIn(dto.getIdList()); |
|||
AchAchievement achAchievement = new AchAchievement(); |
|||
achAchievement.setDelFlag((byte) 1); |
|||
achAchievementMapper.updateByExampleSelective(achAchievement, achAchievementExample); |
|||
} |
|||
|
|||
@Override |
|||
public List<OutcomeVo.CategoryResult> queryCategoryList(OutcomeDto.QueryCategory query) { |
|||
return outcomeDao.queryCategoryList(query); |
|||
} |
|||
|
|||
@Override |
|||
public void addCategory(OutcomeDto.AddCategory dto) { |
|||
AchAchievementCategory achAchievementCategory = BeanUtil.copyProperties(dto, AchAchievementCategory.class); |
|||
if (achAchievementCategory.getId() == null) { |
|||
achAchievementCategory.setId(IdUtil.getSnowflakeNextId()); |
|||
achAchievementCategory.setCreateBy(SecurityUtils.getUsername()); |
|||
achAchievementCategory.setCreateTime(new Date()); |
|||
achAchievementCategoryMapper.insertSelective(achAchievementCategory); |
|||
}else { |
|||
achAchievementCategory.setUpdateBy(SecurityUtils.getUsername()); |
|||
achAchievementCategory.setUpdateTime(new Date()); |
|||
achAchievementCategoryMapper.updateByPrimaryKeySelective(achAchievementCategory); |
|||
} |
|||
} |
|||
|
|||
@Override |
|||
public void delCategory(CommonDto.DelDto dto) { |
|||
AchAchievementCategoryExample achAchievementCategoryExample = new AchAchievementCategoryExample(); |
|||
achAchievementCategoryExample.createCriteria().andIdIn(dto.getIdList()); |
|||
AchAchievementCategory achAchievementCategory = new AchAchievementCategory(); |
|||
achAchievementCategory.setDelFlag((byte) 1); |
|||
achAchievementCategoryMapper.updateByExampleSelective(achAchievementCategory, achAchievementCategoryExample); |
|||
} |
|||
} |
@ -0,0 +1,90 @@ |
|||
<?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.research.system.persist.dao.KtsGroupDao"> |
|||
|
|||
<select id="queryGroupList" resultType="com.research.system.domain.vo.GroupVO$Result"> |
|||
select |
|||
g.id, |
|||
g.proj_id as projId, |
|||
g.proj_org_id as projOrgId, |
|||
g.parent_kt_id as parentKtId, |
|||
g.kt_group_name as ktGroupName, |
|||
g.sort, |
|||
g.intro, |
|||
g.kt_group_status as ktGroupStatus, |
|||
g.create_by as createBy, |
|||
g.create_time as createTime, |
|||
o.org_name as projOrgName |
|||
from kts_kt_group g |
|||
left join |
|||
prj_proj_org o on g.proj_org_id = o.id |
|||
where 1=1 |
|||
and g.del_flag = 0 |
|||
<if test="dto.projOrgId != null"> |
|||
and g.proj_org_id = #{dto.projOrgId} |
|||
</if> |
|||
<if test="dto.ktGroupStatus != null"> |
|||
and g.kt_group_status = #{dto.ktGroupStatus} |
|||
</if> |
|||
<if test="dto.ktGroupName != null and dto.ktGroupName != ''"> |
|||
and g.kt_group_name like concat('%',#{dto.ktGroupName},'%') |
|||
</if> |
|||
order by g.id desc |
|||
</select> |
|||
|
|||
<select id="queryMemberList" resultType="com.research.system.domain.vo.GroupVO$MemberResult"> |
|||
select |
|||
m.id, |
|||
m.user_id as userId, |
|||
m.kt_group_id as ktGroupId, |
|||
m.parent_member_id as parentMemberId, |
|||
m.member_name as memberName, |
|||
m.member_phone as memberPhone, |
|||
m.member_email as memberEmail, |
|||
m.member_gender as memberGender, |
|||
m.member_birth as memberBirth, |
|||
m.type, |
|||
m.category, |
|||
m.qualification, |
|||
m.title, |
|||
m.sort, |
|||
m.intro, |
|||
m.audit_status as auditStatus, |
|||
m.member_status as memberStatus, |
|||
m.create_by as createBy, |
|||
m.create_time as createTime, |
|||
g.kt_group_name as ktGroupName, |
|||
d1.dict_label as qualificationName, |
|||
d2.dict_label as titleName |
|||
from |
|||
kts_kt_group_member m |
|||
left join |
|||
kts_kt_group g on m.kt_group_id = g.id |
|||
left join sys_dict_data d1 on d1.dict_value = m.qualification and d1.dict_type = 'qualification' |
|||
left join sys_dict_data d2 on d2.dict_value = m.title and d2.dict_type = 'title' |
|||
where 1=1 |
|||
and m.del_flag = 0 |
|||
<if test="dto.ktGroupId != null"> |
|||
and m.kt_group_id = #{dto.ktGroupId} |
|||
</if> |
|||
<if test="dto.memberName != null and dto.memberName != ''"> |
|||
and m.member_name like concat('%',#{dto.memberName},'%') |
|||
</if> |
|||
<if test="dto.memberPhone != null and dto.memberPhone != ''"> |
|||
and m.member_phone like concat('%',#{dto.memberPhone},'%') |
|||
</if> |
|||
<if test="dto.type != null"> |
|||
and m.type = #{dto.type} |
|||
</if> |
|||
<if test="dto.auditStatus != null"> |
|||
and m.audit_status = #{dto.auditStatus} |
|||
</if> |
|||
<if test="dto.memberStatus != null"> |
|||
and m.member_status = #{dto.memberStatus} |
|||
</if> |
|||
<if test="dto.category != null"> |
|||
and m.category = #{dto.category} |
|||
</if> |
|||
order by m.id desc |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,91 @@ |
|||
<?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.research.system.persist.dao.OutcomeDao"> |
|||
|
|||
<resultMap id="categoryResultMap" type="com.research.system.domain.vo.OutcomeVo$CategoryResult"> |
|||
<id property="id" column="id"/> |
|||
<result property="projId" column="proj_id"/> |
|||
<result property="parentId" column="parent_id"/> |
|||
<result property="categoryCode" column="category_code"/> |
|||
<result property="categoryName" column="category_name"/> |
|||
<result property="sort" column="sort"/> |
|||
<result property="remark" column="remark"/> |
|||
<result property="delFlag" column="del_flag"/> |
|||
<result property="createBy" column="create_by"/> |
|||
<result property="createTime" column="create_time"/> |
|||
<!-- 递归映射子分类 --> |
|||
<collection property="childList" ofType="com.research.system.domain.vo.OutcomeVo$CategoryResult" |
|||
select="selectByParentId" column="id"/> |
|||
</resultMap> |
|||
|
|||
<select id="queryList" resultType="com.research.system.domain.vo.OutcomeVo$Result"> |
|||
SELECT |
|||
id, |
|||
proj_id as projId, |
|||
proj_org_id as projOrgId, |
|||
kt_group_id as ktGroupId, |
|||
category_id_1 as categoryId1, |
|||
category_id_2 as categoryId2, |
|||
title, |
|||
no, |
|||
authors, |
|||
apply_date as applyDate, |
|||
publish_date as publishDate, |
|||
place, |
|||
ach_type as achType, |
|||
source, |
|||
paper_source_type as paperSourceType, |
|||
yskt_xmfzr as ysktXmfzr, |
|||
yskt_funds as ysktFunds, |
|||
yskt_lxpzwh as ysktLxpzwh, |
|||
yskt_status as ysktStatus, |
|||
abstracts, |
|||
keywords, |
|||
paper_link as paperLink, |
|||
pdf_download_url as pdfDownloadUrl, |
|||
commitment_letter_url as commitmentLetterUrl, |
|||
remark, |
|||
create_by as createBy, |
|||
create_time as createTime |
|||
FROM ach_achievement |
|||
WHERE del_flag = 0 AND proj_id = #{dto.projId} |
|||
<if test="dto.title != null and dto.title != ''"> |
|||
AND title LIKE CONCAT('%', #{dto.title}, '%') |
|||
</if> |
|||
<if test="dto.applyDate != null"> |
|||
AND apply_date = #{dto.applyDate} |
|||
</if> |
|||
<if test="dto.projOrgId != null"> |
|||
AND proj_org_id = #{dto.projOrgId} |
|||
</if> |
|||
<if test="dto.categoryId1 != null"> |
|||
AND category_id1 = #{dto.categoryId1} |
|||
</if> |
|||
<if test="dto.categoryId2 != null"> |
|||
AND category_id2 = #{dto.categoryId2} |
|||
</if> |
|||
<if test="dto.achType != null"> |
|||
AND ach_type = #{dto.achType} |
|||
</if> |
|||
</select> |
|||
|
|||
<!-- 查询树形结构 --> |
|||
<select id="queryCategoryList" resultMap="categoryResultMap"> |
|||
SELECT * FROM ach_achievement_category |
|||
WHERE del_flag = 0 AND (parent_id IS NULL OR parent_id = 0) |
|||
<if test="dto.categoryCode != null and dto.categoryCode != ''"> |
|||
AND category_code LIKE CONCAT('%', #{dto.categoryCode}, '%') |
|||
</if> |
|||
<if test="dto.categoryName != null and dto.categoryName != ''"> |
|||
AND category_name LIKE CONCAT('%', #{dto.categoryName}, '%') |
|||
</if> |
|||
ORDER BY sort ASC |
|||
</select> |
|||
|
|||
<!-- 查询子分类 --> |
|||
<select id="selectByParentId" resultMap="categoryResultMap"> |
|||
SELECT * FROM ach_achievement_category |
|||
WHERE del_flag = 0 AND parent_id = #{parentId} |
|||
ORDER BY sort ASC |
|||
</select> |
|||
</mapper> |
Loading…
Reference in new issue