Commit d642228b authored by 徐俊's avatar 徐俊
parents 24e2bf8e 02e6375c
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Palette2">
<group name="Swing">
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
</item>
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
</item>
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.svg" removable="false" auto-create-binding="false" can-attach-label="true">
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
</item>
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
<initial-values>
<property name="text" value="Button" />
</initial-values>
</item>
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="RadioButton" />
</initial-values>
</item>
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="CheckBox" />
</initial-values>
</item>
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
<initial-values>
<property name="text" value="Label" />
</initial-values>
</item>
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
</item>
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
</item>
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
<preferred-size width="-1" height="20" />
</default-constraints>
</item>
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
</item>
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
</item>
</group>
</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.ComFile;
import com.yiboshi.science.entity.ComProjectManagementRule;
import com.yiboshi.science.param.dto.ComFileDTO;
import com.yiboshi.science.param.dto.ComProjectManagementRuleDTO;
import com.yiboshi.science.param.query.ComFileQueryVO;
import com.yiboshi.science.param.query.ComProjectManagementRuleQueryVO;
import java.util.List;
/**
* 单位科研项目及资金管理制度表 DAO
*
* @author lkl
* @version 2021-08-26
*/
public interface ComProjectManagementRuleDAO extends BaseMapper<ComProjectManagementRule>, BaseDAO<ComProjectManagementRuleQueryVO, ComProjectManagementRuleDTO, ComProjectManagementRule> {
List<ComProjectManagementRuleDTO> getListByObjectId(String objectId);
}
\ 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.ComFile;
import com.yiboshi.science.entity.ComProjectSub;
import com.yiboshi.science.param.dto.ComFileDTO;
import com.yiboshi.science.param.dto.ComProjectSubDTO;
import com.yiboshi.science.param.query.ComFileQueryVO;
import com.yiboshi.science.param.query.ComProjectSubQueryVO;
import java.util.List;
/**
* 附件目录表 DAO
*
* @author lkl
* @version 2021-08-26
*/
public interface ComProjectSubDAO extends BaseMapper<ComProjectSub>, BaseDAO<ComProjectSubQueryVO, ComProjectSubDTO, ComProjectSub> {
List<ComProjectSubDTO> getListByObjectId(String objectId);
}
\ No newline at end of file
......@@ -380,6 +380,10 @@ public class ComProjectDTO extends BaseDTO {
private List<ComProjectFundCompositionDTO> fundCompositions;
/** 经费表 */
private List<ComProjectBudgetDTO> budget;
/** 项目课颖设置表 */
private List<ComProjectSubDTO> projectSubList;
/** 单位科研项目及资金管理制度表 */
private List<ComProjectManagementRuleDTO> managementRuleList;
/** 设备仪器经费表 */
private List<ComProjectEquipmentDTO> equipments;
/** 附件列表 */
......
package com.yiboshi.science.param.dto;
import com.yiboshi.science.base.BaseDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import java.util.Date;
/**
* 单位科研项目及资金管理制度表 dto
*
* @author lkl
* @version 2021-08-26
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "单位科研项目及资金管理制度表 dto")
public class ComProjectManagementRuleDTO extends BaseDTO {
/** 对象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=100, message = "单位政策名称不能大于100")
private String policyName;
/** 出台日期 */
@ApiModelProperty(value = "出台日期", position = 2 )
private Date releaseDate;
/** 文号 */
@ApiModelProperty(value = "文号", position = 3 )
@Length(max=100, message = "文号不能大于100")
private String documentNumber;
/** 有效期 */
@ApiModelProperty(value = "有效期", position = 2 )
private Date validityPeriod;
/** 主要内容 */
@ApiModelProperty(value = "主要内容", position = 4 )
@Length(max=200, message = "在项目中的分工不能大于200")
private String mainContent;
/** 排序 */
@ApiModelProperty(value = "排序", position = 10 )
private Integer showIndex;
/** 附件Id */
@ApiModelProperty(value = "附件Id", position = 4 )
private String fileId;
/** 附件Id */
@ApiModelProperty(value = "附件Id", position = 1 )
@Length(max=36, message = "附件Id不能大于36")
private String downloadId;
/** 附件名 */
@ApiModelProperty(value = "附件名", position = 6)
private String fileName;
/** URL */
@ApiModelProperty(value = "URL", position = 7)
private String downloadUrl;
}
\ No newline at end of file
package com.yiboshi.science.param.dto;
import com.yiboshi.science.base.BaseDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import java.math.BigDecimal;
/**
* 项目课颖设置表DTO
*
* @author lkl
* @version 2021-08-26
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "项目课颖设置表DTO")
public class ComProjectSubDTO extends BaseDTO {
/** 对象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=100, message = "课题名称不能大于100")
private String projName;
/** 课题承担单位 */
@ApiModelProperty(value = "课题承担单位", position = 2 )
@Length(max=100, message = "单位国别不能大于100")
private String undertakingUnit;
/** 所在地 */
@ApiModelProperty(value = "所在地", position = 3 )
@Length(max=100, message = "所在地不能大于100")
private String address;
/** 课颖负责人 */
@ApiModelProperty(value = "课颖负责人", position = 2 )
@Length(max=50, message = "课颖负责人不能大于50")
private String director;
/** 课题预算总经费 */
@ApiModelProperty(value = "课题预算总经费", position = 4 )
private BigDecimal totalBudget;
/** 其中:省科技经费 */
@ApiModelProperty(value = "其中:省科技经费", position = 4 )
private BigDecimal govBudget;
/** 自筹经费 */
@ApiModelProperty(value = "自筹经费", position = 4 )
private BigDecimal selfBudget;
/** 合作单位 */
@ApiModelProperty(value = "合作单位", position = 4 )
@Length(max=100, message = "合作单位不能大于100")
private String cooperativeUnits;
/** 排序 */
@ApiModelProperty(value = "排序", position = 10 )
private Integer showIndex;
/** 附件Id */
@ApiModelProperty(value = "附件Id", position = 4 )
private String fileId;
/** 附件Id */
@ApiModelProperty(value = "附件Id", position = 1 )
@Length(max=36, message = "附件Id不能大于36")
private String downloadId;
/** 附件名 */
@ApiModelProperty(value = "附件名", position = 6)
private String fileName;
/** URL */
@ApiModelProperty(value = "URL", position = 7)
private String downloadUrl;
}
\ No newline at end of file
package com.yiboshi.science.param.query;
import com.yiboshi.science.base.PaginationVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import java.math.BigDecimal;
import java.util.Date;
/**
* 单位科研项目及资金管理制度表VO
*
* @author lkl
* @version 2021-08-26
*/
@Data
@EqualsAndHashCode(callSuper=true)
@ApiModel(description = "单位科研项目及资金管理制度表VO")
public class ComProjectManagementRuleQueryVO extends PaginationVO{
/** 对象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=100, message = "单位政策名称不能大于100")
private String policyName;
/** 出台日期 */
@ApiModelProperty(value = "出台日期", position = 2 )
private Date releaseDate;
/** 文号 */
@ApiModelProperty(value = "文号", position = 3 )
@Length(max=100, message = "文号不能大于100")
private String documentNumber;
/** 有效期 */
@ApiModelProperty(value = "有效期", position = 2 )
private Date validityPeriod;
/** 主要内容 */
@ApiModelProperty(value = "主要内容", position = 4 )
@Length(max=200, message = "在项目中的分工不能大于200")
private String mainContent;
/** 排序 */
@ApiModelProperty(value = "排序", position = 10 )
private Integer showIndex;
/** 附件Id */
@ApiModelProperty(value = "附件Id", position = 4 )
private String fileId;
}
\ No newline at end of file
package com.yiboshi.science.param.query;
import com.yiboshi.science.base.PaginationVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import java.math.BigDecimal;
/**
* 项目课颖设置表VO
*
* @author lkl
* @version 2021-08-26
*/
@Data
@EqualsAndHashCode(callSuper=true)
@ApiModel(description = "项目课颖设置表VO")
public class ComProjectSubQueryVO extends PaginationVO{
/** 对象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=100, message = "课题名称不能大于100")
private String projName;
/** 课题承担单位 */
@ApiModelProperty(value = "课题承担单位", position = 2 )
@Length(max=100, message = "单位国别不能大于100")
private String undertakingUnit;
/** 所在地 */
@ApiModelProperty(value = "所在地", position = 3 )
@Length(max=100, message = "所在地不能大于100")
private String address;
/** 课颖负责人 */
@ApiModelProperty(value = "课颖负责人", position = 2 )
@Length(max=50, message = "课颖负责人不能大于50")
private String director;
/** 课题预算总经费 */
@ApiModelProperty(value = "课题预算总经费", position = 4 )
private BigDecimal totalBudget;
/** 其中:省科技经费 */
@ApiModelProperty(value = "其中:省科技经费", position = 4 )
private BigDecimal govBudget;
/** 自筹经费 */
@ApiModelProperty(value = "自筹经费", position = 4 )
private BigDecimal selfBudget;
/** 合作单位 */
@ApiModelProperty(value = "合作单位", position = 4 )
@Length(max=100, message = "合作单位不能大于100")
private String cooperativeUnits;
/** 排序 */
@ApiModelProperty(value = "排序", position = 10 )
private Integer showIndex;
/** 附件Id */
@ApiModelProperty(value = "附件Id", position = 4 )
private String fileId;
}
\ No newline at end of file
package com.yiboshi.science.rest.v1;
import com.yiboshi.science.entity.ComFile;
import com.yiboshi.science.entity.ComProjectManagementRule;
import com.yiboshi.science.param.dto.ComFileDTO;
import com.yiboshi.science.param.dto.ComProjectManagementRuleDTO;
import com.yiboshi.science.param.query.ComFileQueryVO;
import com.yiboshi.science.param.query.ComProjectManagementRuleQueryVO;
import com.yiboshi.science.rest.BaseController;
import com.yiboshi.science.service.ComFileService;
import com.yiboshi.science.service.ComProjectManagementRuleService;
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-management-rule",description = "单位科研项目及资金管理制度表")
@RestController
@RequestMapping("/v1/science-admin/com-project-management-rule ")
public class ComProjectManagementRuleController extends BaseController<ComProjectManagementRuleService, ComProjectManagementRuleQueryVO, ComProjectManagementRuleDTO, ComProjectManagementRule> {
}
\ No newline at end of file
package com.yiboshi.science.rest.v1;
import com.yiboshi.science.entity.ComFile;
import com.yiboshi.science.entity.ComProjectSub;
import com.yiboshi.science.param.dto.ComFileDTO;
import com.yiboshi.science.param.dto.ComProjectSubDTO;
import com.yiboshi.science.param.query.ComFileQueryVO;
import com.yiboshi.science.param.query.ComProjectSubQueryVO;
import com.yiboshi.science.rest.BaseController;
import com.yiboshi.science.service.ComFileService;
import com.yiboshi.science.service.ComProjectSubService;
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-sub",description = "项目课颖设置表")
@RestController
@RequestMapping("/v1/science-admin/com-project-sub")
public class ComProjectSubController extends BaseController<ComProjectSubService, ComProjectSubQueryVO, ComProjectSubDTO, ComProjectSub> {
}
\ No newline at end of file
package com.yiboshi.science.service;
import com.yiboshi.science.base.BaseService;
import com.yiboshi.science.entity.ComFile;
import com.yiboshi.science.entity.ComProjectManagementRule;
import com.yiboshi.science.param.dto.ComFileDTO;
import com.yiboshi.science.param.dto.ComProjectManagementRuleDTO;
import com.yiboshi.science.param.query.ComFileQueryVO;
import com.yiboshi.science.param.query.ComProjectManagementRuleQueryVO;
import java.util.List;
/**
* 单位科研项目及资金管理制度表 Service
*
* @author lkl
* @version 2021-08-26
*/
public interface ComProjectManagementRuleService extends BaseService<ComProjectManagementRuleQueryVO, ComProjectManagementRuleDTO, ComProjectManagementRule> {
/** 获取列表
*
* @param objectId
* @return
*/
List<ComProjectManagementRuleDTO> getListByObjectId(String objectId);
/** 插入列表
*
* @param fileList
* @param objectId
*/
void insertList(List<ComProjectManagementRuleDTO> fileList, String objectId);
/** 删除对象列表
*
* @param objectId
*/
void deleteByObjectId(String objectId);
}
\ No newline at end of file
package com.yiboshi.science.service;
import com.yiboshi.science.base.BaseService;
import com.yiboshi.science.entity.ComFile;
import com.yiboshi.science.entity.ComProjectSub;
import com.yiboshi.science.param.dto.ComFileDTO;
import com.yiboshi.science.param.dto.ComProjectSubDTO;
import com.yiboshi.science.param.query.ComFileQueryVO;
import com.yiboshi.science.param.query.ComProjectSubQueryVO;
import java.util.List;
/**
* 项目课颖设置表 Service
*
* @author lkl
* @version 2021-08-26
*/
public interface ComProjectSubService extends BaseService<ComProjectSubQueryVO, ComProjectSubDTO, ComProjectSub> {
/** 获取列表
*
* @param objectId
* @return
*/
List<ComProjectSubDTO> getListByObjectId(String objectId);
/** 插入列表
*
* @param list
* @param objectId
*/
void insertList(List<ComProjectSubDTO> list, String objectId);
/** 删除对象列表
*
* @param objectId
*/
void deleteByObjectId(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.ComFileDAO;
import com.yiboshi.science.dao.ComProjectManagementRuleDAO;
import com.yiboshi.science.entity.ComFile;
import com.yiboshi.science.entity.ComProjectManagementRule;
import com.yiboshi.science.param.dto.ComFileDTO;
import com.yiboshi.science.param.dto.ComProjectManagementRuleDTO;
import com.yiboshi.science.param.query.ComFileQueryVO;
import com.yiboshi.science.param.query.ComProjectManagementRuleQueryVO;
import com.yiboshi.science.service.ComFileService;
import com.yiboshi.science.service.ComProjectManagementRuleService;
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 ComProjectManagementRuleServiceImpl extends BaseServiceImpl<ComProjectManagementRuleDAO, ComProjectManagementRuleQueryVO, ComProjectManagementRuleDTO, ComProjectManagementRule> implements ComProjectManagementRuleService {
@Autowired
private ComProjectManagementRuleDAO comProjectManagementRuleDAO;
protected void setCriteriaForQuery(ComProjectManagementRuleQueryVO vo, QueryWrapper<ComProjectManagementRuleQueryVO> criteria) {
}
@Override
public List<ComProjectManagementRuleDTO> getListByObjectId(String objectId) {
return comProjectManagementRuleDAO.getListByObjectId(objectId);
}
public void insertList(List<ComProjectManagementRuleDTO> list, String objectId) {
ComProjectManagementRule file = new ComProjectManagementRule();
file.setObjectId(objectId);
this.delete(file);
if (null != list) {
for (int i = 0; i < list.size(); i++) {
if (!isObjectNull(list.get(i))) {
list.get(i).setObjectId(objectId);
list.get(i).setShowIndex(i + 1);
ComProjectManagementRule comProjectManagementRule = convert2Entity(list.get(i));
this.insert(comProjectManagementRule);
}
}
}
}
public void deleteByObjectId(String objectId) {
ComProjectManagementRule E = new ComProjectManagementRule();
E.setObjectId(objectId);
this.delete(E);
}
}
\ 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.ComFileDAO;
import com.yiboshi.science.dao.ComProjectSubDAO;
import com.yiboshi.science.entity.ComFile;
import com.yiboshi.science.entity.ComProjectSub;
import com.yiboshi.science.param.dto.ComFileDTO;
import com.yiboshi.science.param.dto.ComProjectSubDTO;
import com.yiboshi.science.param.query.ComFileQueryVO;
import com.yiboshi.science.param.query.ComProjectSubQueryVO;
import com.yiboshi.science.service.ComFileService;
import com.yiboshi.science.service.ComProjectSubService;
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 ComProjectSubServiceImpl extends BaseServiceImpl<ComProjectSubDAO, ComProjectSubQueryVO, ComProjectSubDTO, ComProjectSub> implements ComProjectSubService {
@Autowired
private ComProjectSubDAO comProjectSubDAO;
protected void setCriteriaForQuery(ComProjectSubQueryVO vo, QueryWrapper<ComProjectSubQueryVO> criteria) {
}
@Override
public List<ComProjectSubDTO> getListByObjectId(String objectId) {
return comProjectSubDAO.getListByObjectId(objectId);
}
@Override
public void insertList(List<ComProjectSubDTO> list, String objectId) {
ComProjectSub file = new ComProjectSub();
file.setObjectId(objectId);
this.delete(file);
if (null != list) {
for (int i = 0; i < list.size(); i++) {
if (!isObjectNull(list.get(i))) {
list.get(i).setObjectId(objectId);
list.get(i).setShowIndex(i + 1);
ComProjectSub comProjectSub = convert2Entity(list.get(i));
this.insert(comProjectSub);
}
}
}
}
@Override
public void deleteByObjectId(String objectId) {
ComProjectSub E = new ComProjectSub();
E.setObjectId(objectId);
this.delete(E);
}
}
\ No newline at end of file
<?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.yiboshi.science.dao. ComProjectManagementRuleDAO">
<sql id="allColumns">
t.id as id, t.object_id as objectId, t.unit_name as unitName, t.unit_address as unitAddress, t.project_work as projectWork
</sql>
<select id="getListByObjectId" parameterType="java.lang.String" resultType="com.yiboshi.science.param.dto.ComProjectManagementRuleDTO">
SELECT
a.*
FROM com_project_management_rule a
where object_id=#{objectId} order by a.show_index asc
</select>
</mapper>
\ No newline at end of file
<?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.yiboshi.science.dao.ComProjectSubDAO">
<sql id="allColumns">
t.id as id, t.object_id as objectId, t.unit_name as unitName, t.unit_address as unitAddress, t.project_work as projectWork
</sql>
<select id="getListByObjectId" parameterType="java.lang.String" resultType="com.yiboshi.science.param.dto.ComProjectSubDTO">
SELECT
a.*
FROM com_project_sub a
where object_id=#{objectId} order by a.show_index asc
</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