Commit 7ed50136 authored by wangxl's avatar wangxl

111

parent 207ecc89
......@@ -17,8 +17,8 @@
</component>
<component name="JavacSettings">
<option name="ADDITIONAL_OPTIONS_OVERRIDE">
<module name="science-admin" options="" />
<module name="science-base" options="" />
<module name="science-admin" options="-parameters" />
<module name="science-base" options="-parameters" />
</option>
</component>
</project>
\ No newline at end of file
......@@ -5,5 +5,7 @@
<file url="file://$PROJECT_DIR$/science-base/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/../../maven325/mavendata/repository/com/yiboshi/arch/1.0.10-SNAPSHOT/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/../../maven325/mavendata/repository/com/yiboshi/arch/1.0.10-SNAPSHOT/src/main/resources" charset="UTF-8" />
</component>
</project>
\ No newline at end of file
package com.yiboshi.science.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yiboshi.science.base.BaseDAO;
import com.yiboshi.science.entity.ComProjectTogether;
import com.yiboshi.science.param.dto.ComProjectTogetherDTO;
import com.yiboshi.science.param.query.ComProjectTogetherQueryVO;
import java.util.List;
/**
* 合作单位表 DAO
*
* @author lkl
* @version 2021-08-26
*/
public interface ComProjectTogetherDAO extends BaseMapper<ComProjectTogether>, BaseDAO<ComProjectTogetherQueryVO,ComProjectTogetherDTO, ComProjectTogether> {
List<ComProjectTogetherDTO> getListByObjectId(String objectId);
}
\ No newline at end of file
......@@ -28,21 +28,131 @@ public class ComProjectBasic extends BaseEntity {
@Length(max=36, message = "Id不能大于36")
private String projId;
/** 单位名称 */
@ApiModelProperty(value = "单位名称", position = 12)
@ApiModelProperty(value = "单位名称", position = 1)
@Length(max=200, message = "单位名称不能大于200")
private String appUnitName;
/** 注册单位类型 */
@ApiModelProperty(value = "注册单位类型", position = 1)
@Length(max=36, message = "注册单位类型不能大于36")
private String unitType;
/** 组织机构代码/统一社会信用代码 */
@ApiModelProperty(value = "组织机构代码/统一社会信用代码", position = 1 )
@Length(max=50, message = "组织机构代码/统一社会信用代码不能大于50")
private String organizationCode;
/** 通讯地址 */
@ApiModelProperty(value = "通讯地址", position = 13)
@ApiModelProperty(value = "通讯地址", position = 1)
@Length(max=200, message = "通讯地址不能大于200")
private String address;
/** 注册所在地 */
@ApiModelProperty(value = "注册所在地", position = 1 )
@Length(max=50, message = "注册所在地不能大于50")
private String registeredAddress;
/** 邮编 */
@ApiModelProperty(value = "邮编", position = 3 )
@ApiModelProperty(value = "邮编", position = 1 )
@Length(max=10, message = "邮编不能大于10")
private String postCode;
/** 统一社会信用代码 */
@ApiModelProperty(value = "统一社会信用代码", position = 3 )
@Length(max=50, message = "统一社会信用代码不能大于50")
private String creditCode;
/** 法定代表人 */
@ApiModelProperty(value = "法定代表人", position = 1 )
@Length(max=50, message = "法定代表人不能大于50")
private String legalPerson;
/** 职工总数 */
@ApiModelProperty(value = "职工总数", position = 1 )
private Integer workforce;
/** 其中专科以上人员 */
@ApiModelProperty(value = "其中专科以上人员", position = 1 )
private Integer specializedPersonnel;
/** 研究开发人员 */
@ApiModelProperty(value = "研究开发人员", position = 1 )
private Integer researchPersonnel;
/** 开户银行 */
@ApiModelProperty(value = "开户银行", position = 1 )
@Length(max=100, message = "开户银行不能大于100")
private String depositBank;
/** 银行账号 */
@ApiModelProperty(value = "银行账号", position = 1 )
@Length(max=50, message = "银行账号不能大于50")
private String bankAccount;
/** 开户银行地址 */
@ApiModelProperty(value = "开户银行地址", position = 1 )
@Length(max=100, message = "开户银行地址不能大于100")
private String depositBankAddress;
/** 银行联行号 */
@ApiModelProperty(value = "银行联行号", position = 1 )
@Length(max=50, message = "银行联行号不能大于50")
private String bankInterbankNumber;
/** 上年度研发经费支出总额(单位:万元) */
@ApiModelProperty(value = "上年度研发经费支出总额(单位:万元)", position = 1 )
private BigDecimal researchTotal;
/** 上年度是否填报了研发活动情况 0 否 1 是 */
@ApiModelProperty(value = "上年度是否填报了研发活动情况", position = 1 )
private Integer isResearchActive;
/** 上一年度填报的研发投入总数(单位:万元) */
@ApiModelProperty(value = "上一年度填报的研发投入总数(单位:万元)", position = 1 )
private BigDecimal researchCount;
/** 上一年度填报的研发人员数 */
@ApiModelProperty(value = "上一年度填报的研发人员数", position = 1 )
private Integer researchPersonCount;
/** 项目所属二级学院/部门名称(牵头单位) */
@ApiModelProperty(value = "项目所属二级学院/部门名称(牵头单位)", position = 1 )
@Length(max=100, message = "项目所属二级学院/部门名称(牵头单位)不能大于100")
private String leadUnit;
/** 推荐部门 */
@ApiModelProperty(value = "推荐部门", position = 1 )
@Length(max=100, message = "推荐部门不能大于100")
private String recommendUnit;
/** 项目依托的科技创新基地 */
@ApiModelProperty(value = "项目依托的科技创新基地", position = 1 )
@Length(max=100, message = "项目依托的科技创新基地不能大于100")
private String technologyInnovationBase;
/** 项目总经费(万元) */
@ApiModelProperty(value = "项目总经费(万元)", position = 39)
private BigDecimal totalFunding;
/** 申请科技经费(万元) */
@ApiModelProperty(value = "申请科技经费(万元)", position = 40)
private BigDecimal govFunding;
/** 单位配套 */
@ApiModelProperty(value = "单位配套", position = 41)
private BigDecimal unitFunding;
/** 自筹 */
@ApiModelProperty(value = "自筹", position = 42)
private BigDecimal selfFunding;
/** 其他 */
@ApiModelProperty(value = "其他", position = 43)
private BigDecimal otherFunding;
/** 项目联系人姓名 */
@ApiModelProperty(value = "项目联系人姓名", position = 16)
@Length(max=100, message = "项目联系人姓名不能大于100")
private String linkName;
/** 工作单位(项目联系人) */
@ApiModelProperty(value = "工作单位(项目联系人)", position = 16)
@Length(max=200, message = "工作单位(项目联系人)不能大于200")
private String linkUnit;
/** 联系人手机 */
@ApiModelProperty(value = "联系人手机", position = 16)
@Length(max=50, message = "联系人手机不能大于50")
private String linkMobile;
/** 电子邮箱 */
@ApiModelProperty(value = "电子邮箱", position = 16)
@Length(max=100, message = "电子邮箱不能大于100")
private String linkEmail;
/** 注册单位类型 */
@ApiModelProperty(value = "注册单位类型", position = 12)
@Length(max=100, message = "注册单位类型不能大于100")
private String unitTypeName;
/** 单位性质 */
@ApiModelProperty(value = "单位性质", position = 1 )
@Length(max=36, message = "单位性质不能大于36")
......@@ -59,22 +169,7 @@ public class ComProjectBasic extends BaseEntity {
@ApiModelProperty(value = "电子邮件", position = 16)
@Length(max=200, message = "电子邮件不能大于200")
private String email;
/** 姓名(项目联系人) */
@ApiModelProperty(value = "姓名(项目联系人)", position = 16)
@Length(max=200, message = "姓名(项目联系人)不能大于200")
private String linkName;
/** 工作单位(项目联系人) */
@ApiModelProperty(value = "工作单位(项目联系人)", position = 16)
@Length(max=200, message = "工作单位(项目联系人)不能大于200")
private String linkUnit;
/** 手机号码(项目联系人) */
@ApiModelProperty(value = "手机号码(项目联系人)", position = 16)
@Length(max=200, message = "手机号码(项目联系人)不能大于200")
private String linkMobile;
/** 电子邮箱(项目联系人) */
@ApiModelProperty(value = "电子邮箱(项目联系人)", position = 16)
@Length(max=200, message = "电子邮箱(项目联系人)不能大于200")
private String linkEmail;
/** 所属技术领域 */
@ApiModelProperty(value = "所属技术领域", position = 12)
@Length(max=200, message = "系所属技术领域不能大于1000")
......@@ -95,21 +190,7 @@ public class ComProjectBasic extends BaseEntity {
@ApiModelProperty(value = "项目摘要", position = 13 )
@Length(max=600, message = "项目摘要不能大于300")
private String projAbstract;
/** 投资总额 */
@ApiModelProperty(value = "投资总额", position = 39)
private BigDecimal totalFunding;
/** 卫生健康委资助 */
@ApiModelProperty(value = "卫生健康委资助", position = 40)
private BigDecimal govFunding;
/** 单位配套 */
@ApiModelProperty(value = "单位配套", position = 41)
private BigDecimal unitFunding;
/** 自筹 */
@ApiModelProperty(value = "自筹", position = 42)
private BigDecimal selfFunding;
/** 其他 */
@ApiModelProperty(value = "其他", position = 43)
private BigDecimal otherFunding;
/** 国内外研究进展 */
@ApiModelProperty(value = "国内外研究进展", position = 30 )
@Length(max=2147483647, message = "国内外研究进展不能大于2147483647")
......
package com.yiboshi.science.entity;
import com.yiboshi.science.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
/**
* 合作单位表VO
*
* @author lkl
* @version 2021-08-26
*/
@Data
@EqualsAndHashCode(callSuper=true)
@ApiModel(description = "合作单位表VO")
public class ComProjectTogether extends BaseEntity {
/** 对象Id(项目Id/任务书Id) */
@ApiModelProperty(value = "对象Id(项目Id/任务书Id)", position = 1 )
@Length(max=36, message = "对象Id(项目Id/任务书Id)不能大于36")
private String objectId;
/** 单位名称 */
@ApiModelProperty(value = "单位名称", position = 2 )
@Length(max=200, message = "单位名称不能大于200")
private String unitName;
/** 地址 */
@ApiModelProperty(value = "地址", position = 3 )
@Length(max=200, message = "地址不能大于200")
private String unitAddress;
/** 在项目中的分工 */
@ApiModelProperty(value = "在项目中的分工", position = 4 )
@Length(max=300, message = "在项目中的分工不能大于300")
private String projectWork;
}
\ No newline at end of file
package com.yiboshi.science.param.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yiboshi.science.base.BaseDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 合作单位表DTO
*
* @author lkl
* @version 2021-08-26
*/
@Data
@EqualsAndHashCode(callSuper=true)
@ApiModel(description = "合作单位表DTO")
public class ComProjectTogetherDTO extends BaseDTO {
/** 对象Id(项目Id/任务书Id) */
@ApiModelProperty(value = "对象Id(项目Id/任务书Id)", position = 1)
private String objectId;
/** 单位名称 */
@ApiModelProperty(value = "单位名称", position = 2)
private String unitName;
/** 地址 */
@ApiModelProperty(value = "地址", position = 3)
private String unitAddress;
/** 在项目中的分工 */
@ApiModelProperty(value = "在项目中的分工", position = 4)
private String projectWork;
}
\ No newline at end of file
package com.yiboshi.science.param.query;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yiboshi.science.base.PaginationVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 查询合作单位表VO
*
* @author lkl
* @version 2021-08-26
*/
@Data
@EqualsAndHashCode(callSuper=true)
@ApiModel(description = "查询合作单位表VO")
public class ComProjectTogetherQueryVO extends PaginationVO{
/** Id */
@ApiModelProperty(value = "Id")
private String id;
/** 对象Id(项目Id/任务书Id) */
@ApiModelProperty(value = "对象Id(项目Id/任务书Id)", position = 1)
private String objectId;
/** 单位名称 */
@ApiModelProperty(value = "单位名称", position = 2)
private String unitName;
/** 地址 */
@ApiModelProperty(value = "地址", position = 3)
private String unitAddress;
/** 在项目中的分工 */
@ApiModelProperty(value = "在项目中的分工", position = 4)
private String projectWork;
}
\ No newline at end of file
package com.yiboshi.science.rest.v1;
import com.yiboshi.science.entity.ComProjectTogether;
import com.yiboshi.science.param.dto.ComProjectTogetherDTO;
import com.yiboshi.science.param.query.ComProjectTogetherQueryVO;
import com.yiboshi.science.rest.BaseController;
import com.yiboshi.science.service.ComProjectTogetherService;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 功能:合作单位表 接口
* @author lkl
* @version 2021-08-26
*/
@Api(tags = "com-project-together",description = "合作单位表")
@RestController
@RequestMapping("/v1/science-admin/com-project-together")
public class ComProjectTogetherController extends BaseController<ComProjectTogetherService, ComProjectTogetherQueryVO, ComProjectTogetherDTO, ComProjectTogether> {
}
\ No newline at end of file
package com.yiboshi.science.service;
import com.yiboshi.science.base.BaseService;
import com.yiboshi.science.entity.ComProjectTogether;
import com.yiboshi.science.param.dto.ComProjectTogetherDTO;
import com.yiboshi.science.param.query.ComProjectTogetherQueryVO;
import java.util.List;
/**
* 合作单位表 Service
*
* @author lkl
* @version 2021-08-26
*/
public interface ComProjectTogetherService extends BaseService<ComProjectTogetherQueryVO, ComProjectTogetherDTO,ComProjectTogether> {
/** 根据对象获取合作单位列表
*
* @param objectId
* @return
*/
List<ComProjectTogetherDTO> getListByObjectId(String objectId);
/** 插入合作单位
*
* @param togetherList
* @param objectId
*/
void insertTogetherList(List<ComProjectTogetherDTO> togetherList, String objectId);
}
\ No newline at end of file
package com.yiboshi.science.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yiboshi.science.base.BaseServiceImpl;
import com.yiboshi.science.dao.ComProjectTogetherDAO;
import com.yiboshi.science.entity.ComProjectTogether;
import com.yiboshi.science.param.dto.ComProjectTogetherDTO;
import com.yiboshi.science.param.query.ComProjectTogetherQueryVO;
import com.yiboshi.science.service.ComProjectTogetherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Objects;
/**
* 合作单位表 Service 实现类
*
* @author lkl
* @version 2021-08-26
*/
@Service
public class ComProjectTogetherServiceImpl extends BaseServiceImpl<ComProjectTogetherDAO,ComProjectTogetherQueryVO, ComProjectTogetherDTO,ComProjectTogether> implements ComProjectTogetherService {
@Autowired
private ComProjectTogetherDAO comProjectTogetherDAO;
@Override
protected void setCriteriaForQuery(ComProjectTogetherQueryVO vo, QueryWrapper<ComProjectTogetherQueryVO> criteria) {
if(Objects.nonNull(vo.getObjectId())){
criteria.eq("object_id", vo.getObjectId());
}
if(Objects.nonNull(vo.getUnitName())){
criteria.eq("unit_name", vo.getUnitName());
}
if(Objects.nonNull(vo.getUnitAddress())){
criteria.eq("unit_address", vo.getUnitAddress());
}
if(Objects.nonNull(vo.getProjectWork())){
criteria.eq("project_work", vo.getProjectWork());
}
}
@Override
public List<ComProjectTogetherDTO> getListByObjectId(String objectId)
{
return comProjectTogetherDAO.getListByObjectId(objectId);
}
@Override
public void insertTogetherList(List<ComProjectTogetherDTO> togetherList, String objectId) {
ComProjectTogether E =new ComProjectTogether();
E.setObjectId(objectId);
this.delete(E);
if (null != togetherList) {
togetherList.forEach(e -> e.setObjectId(objectId));
List<ComProjectTogether> list = convertDto2EntityList(togetherList);
this.insertBatch(list);
}
}
}
\ 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