| | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import org.apache.ibatis.annotations.Delete; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | |
| | | @GetMapping("byCondition") |
| | | @ApiOperation(notes = "项目过程管理",value = "项目过程管理-条件查询") |
| | | public Response<List<ProjectManage>> searchByCondition(@ApiParam(value = "申报日期 格式 2021/01/28",required = true) @RequestParam Date proCreatedate, |
| | | @ApiParam(value = "项目类型",required = true)@RequestParam int proSort, |
| | | @ApiParam(value = "项目类型",required = true)@RequestParam String proSort, |
| | | @ApiParam(value = "项目状态",required = true)@RequestParam int proState, |
| | | @ApiParam(value = "项目编号",required = true)@RequestParam String proNum) { |
| | | ProjectManage projectManage = new ProjectManage(); |
| | |
| | | |
| | | |
| | | @GetMapping("managesState") |
| | | @ApiOperation(notes = "项目管理-己确认阶段", value = "项目管理-己确认阶段查询") |
| | | @ApiOperation(notes = "", value = "项目管理-己确认/未确认阶段查询") |
| | | public Response<Object> searchManageStateByCondition(@ApiParam(value = "项目编号", required = true) @RequestParam String proNum, |
| | | @ApiParam(value = "项目名称代码", required = true) @RequestParam String proNameCode) { |
| | | ProjectManage projectManage = new ProjectManage(); |
| | |
| | | |
| | | |
| | | /** |
| | | * 项目进度确认 pro_progress |
| | | * 项目进度确认 pro_progress,未归档可以修改更新,归档后不能修改 |
| | | * @return |
| | | */ |
| | | @PutMapping("updateManageState") |
| | | @ApiOperation(notes = "项目管理-己确认阶段",value = "项目管理-己确认阶段更新") |
| | | @ApiOperation(notes = "项目进度确认1-6 对应 立项-审批-研究-结题-验收-归档",value = "项目管理-未确认阶段更新") |
| | | public Response updateManageState(@ApiParam(value = "项目编号", required = true) @RequestParam String proNum, |
| | | @ApiParam(value = "项目名称代码", required = true) @RequestParam String proNameCode, |
| | | @ApiParam(value = "项目进度确认0-6",required = true)@RequestParam int proProgress, |
| | | @ApiParam(value = "项目进度确认1-6",required = true)@RequestParam int proProgress, |
| | | @ApiParam(value = "文档上传保存地址(如果无传空字符串)",required = true)@RequestParam String proFilePath) { |
| | | ProjectManage projectManage = new ProjectManage(); |
| | | projectManage.setProNum(proNum); |
| | |
| | | } |
| | | |
| | | |
| | | @PutMapping("searchDoc") |
| | | @ApiOperation(notes = "项目管理-己确认阶段",value = "文档材料查询") |
| | | @GetMapping("searchDoc") |
| | | @ApiOperation(notes = "项目过程管理-项目管理",value = "文档材料查询") |
| | | public Response searchDocumentation(@ApiParam(value = "项目编号", required = true) @RequestParam String proNum, |
| | | @ApiParam(value = "项目名称代码", required = true) @RequestParam String proNameCode){ |
| | | ProjectArchiveManage projectArchiveManage = new ProjectArchiveManage(); |
| | |
| | | |
| | | } |
| | | |
| | | @PutMapping("delDoc") |
| | | @ApiOperation(notes = "项目管理-己确认阶段",value = "文档材料删除") |
| | | @Delete("delDoc") |
| | | @ApiOperation(notes = "项目过程管理-项目管理-己确认阶段",value = "文档材料删除") |
| | | public Response delDocumentation(@ApiParam(value = "项目编号", required = true) @RequestParam String proNum, |
| | | @ApiParam(value = "项目名称代码", required = true) @RequestParam String proNameCode, |
| | | @ApiParam(value = "文档路径", required = true) @RequestParam String proFilePath){ |
| | |
| | | @ApiOperation(value = "项目归档管理-查询所有") |
| | | public Response<List<ProjectManage>> searchArchiveAll() { |
| | | |
| | | return archiveManageService.searchAll(); |
| | | return archiveManageService.searchArchiveAll(); |
| | | } |
| | | @GetMapping("archiveByCondition") |
| | | @ApiOperation(value = "项目归档管理-条件查询") |
| | | public Response searchArchiveByCondition(@ApiParam(value = "开始日期 格式 2021/01/28",required = true) @RequestParam Date gainDate, |
| | | @ApiParam(value = "归档日期",required = true)@RequestParam Date proArchiveDate, |
| | | @ApiParam(value = "项目类型",required = true)@RequestParam int proSort, |
| | | public Response searchArchiveByCondition(@ApiParam(value = "开始日期 格式 2021/03/27",required = true) @RequestParam Date proExecutionDate, |
| | | @ApiParam(value = "归档日期 格式 2021/03/27",required = true)@RequestParam Date proArchiveDate, |
| | | @ApiParam(value = "项目类型",required = true)@RequestParam String proSort, |
| | | @ApiParam(value = "项目编号",required = true)@RequestParam String proNum) { |
| | | |
| | | ProjectArchiveManage pam = new ProjectArchiveManage(); |
| | | pam.setGainDate(gainDate); |
| | | pam.setProArchiveDate(proArchiveDate); |
| | | pam.setProSort(proSort); |
| | | pam.setProNum(proNum); |
| | | ProjectManage pm = new ProjectManage(); |
| | | pm.setProExecutionDate(proExecutionDate); |
| | | pm.setProArchiveDate(proArchiveDate); |
| | | pm.setProSort(proSort); |
| | | pm.setProNum(proNum); |
| | | |
| | | return archiveManageService.searchArchiveByCondition(pam); |
| | | return archiveManageService.searchArchiveByCondition(pm); |
| | | } |
| | | |
| | | @GetMapping("archiveProjectInfo") |
| | | @ApiOperation(value = "项目归档管理-项目概况信息") |
| | | public Response searchArchiveProjectInfo(@ApiParam(value = "项目名称代码", required = true) @RequestParam String proNameCode, |
| | | @ApiParam(value = "项目编号", required = true) @RequestParam String proNum) { |
| | | |
| | | ProjectManage pm = new ProjectManage(); |
| | | pm.setProNameCode(proNameCode); |
| | | pm.setProNum(proNum); |
| | | |
| | | return archiveManageService.searchArchiveProjectInfo(pm); |
| | | } |
| | | |
| | | /** |
| | | * @param proNameCode |
| | | * @param proNum |
| | | * @return 文档格式、文档名称、归档日期、下载路径 |
| | | */ |
| | | @GetMapping("archiveDocManager") |
| | | @ApiOperation(value = "项目归档管理-文档管理") |
| | | public Response searchProjectDocByCondition(@ApiParam(value = "项目名称代码", required = true) @RequestParam String proNameCode, |
| | | @ApiParam(value = "项目编号", required = true) @RequestParam String proNum) { |
| | | ProjectArchiveManage pam = new ProjectArchiveManage(); |
| | | pam.setProNum(proNum); |
| | | pam.setProNameCode(proNameCode); |
| | | |
| | | return archiveManageService.searchProjectDocByCondition(pam); |
| | | } |
| | | |
| | | /** |
| | | * @param proNameCode |
| | | * @param proNum |
| | | * @return 实验名称、上传日期、归档日期 (操作TODO) |
| | | */ |
| | | @GetMapping("archiveExperimentData") |
| | | @ApiOperation(notes = "(操作TODO)",value = "项目归档管理-试验数据") |
| | | public Response searchArchiveExperimentData(@ApiParam(value = "项目名称代码", required = true) @RequestParam String proNameCode, |
| | | @ApiParam(value = "项目编号", required = true) @RequestParam String proNum) { |
| | | ProjectArchiveManage pam = new ProjectArchiveManage(); |
| | | pam.setProNum(proNum); |
| | | pam.setProNameCode(proNameCode); |
| | | return archiveManageService.searchArchiveExperimentData(pam); |
| | | } |
| | | |
| | | @GetMapping("archiveTechnologicalAchievements") |
| | | @ApiOperation(notes = "(操作TODO)", value = "项目归档管理-科技成果") |
| | | public Response searchArchiveTechnologicalAchievements(@ApiParam(value = "项目名称代码", required = true) @RequestParam String proNameCode, |
| | | @ApiParam(value = "项目编号", required = true) @RequestParam String proNum) { |
| | | ProjectArchiveManage pam = new ProjectArchiveManage(); |
| | | pam.setProNum(proNum); |
| | | pam.setProNameCode(proNameCode); |
| | | return archiveManageService.searchArchiveTechnologicalAchievements(pam); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 文件上传 |
New file |
| | |
| | | package com.whyc.mapper; |
| | | |
| | | |
| | | import com.whyc.pojo.ProjectArchiveExperiment; |
| | | |
| | | public interface ProjectArchiveExperimentMapper { |
| | | int deleteByPrimaryKey(Integer num); |
| | | |
| | | int insert(ProjectArchiveExperiment record); |
| | | |
| | | int insertSelective(ProjectArchiveExperiment record); |
| | | |
| | | ProjectArchiveExperiment selectByPrimaryKey(Integer num); |
| | | |
| | | int updateByPrimaryKeySelective(ProjectArchiveExperiment record); |
| | | |
| | | int updateByPrimaryKey(ProjectArchiveExperiment record); |
| | | } |
| | |
| | | package com.whyc.mapper; |
| | | |
| | | import com.whyc.pojo.ProjectArchiveExperiment; |
| | | import com.whyc.pojo.ProjectArchiveManage; |
| | | import com.whyc.pojo.ProjectManage; |
| | | |
| | |
| | | List<ProjectArchiveManage> searchByCondition(ProjectArchiveManage projectArchiveManage); |
| | | |
| | | int delDocumentation(ProjectArchiveManage projectArchiveManage); |
| | | |
| | | |
| | | List<ProjectArchiveManage> searchByConditionDocumentPath(ProjectManage projectManage); |
| | | |
| | | //文档管理 |
| | | List<ProjectArchiveManage> searchProjectDocByCondition(ProjectArchiveManage projectArchiveManage); |
| | | |
| | | //试验数据 |
| | | List<ProjectArchiveExperiment> searchArchiveExperimentData(ProjectArchiveManage pam); |
| | | |
| | | //科技成果 |
| | | List<ProjectArchiveManage> searchArchiveTechnologicalAchievements(ProjectArchiveManage projectArchiveManage); |
| | | |
| | | } |
| | |
| | | List<ProjectManage> searchByCondition(ProjectManage projectManage); |
| | | |
| | | //项目管理/己确认、未确认阶段 管理-显示 |
| | | List<ProjectManage> searchManageStateByCondition(ProjectManage projectManage); |
| | | ProjectManage searchManageStateByCondition(ProjectManage projectManage); |
| | | |
| | | //项目管理/己确认、未确认阶段 管理-更新 |
| | | int updateManageState(ProjectManage projectManage); |
| | | |
| | | //项目名称 唯一标识符 |
| | | Integer checkUniqueId(ProjectManage pm); |
| | | |
| | | List<ProjectManage> searchArchiveAll(); |
| | | |
| | | List<ProjectManage> searchArchiveByCondition(ProjectManage projectManage); |
| | | |
| | | //项目概况信息 |
| | | ProjectManage searchArchiveProjectInfo(ProjectManage pm); |
| | | |
| | | } |
New file |
| | |
| | | package com.whyc.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | import org.apache.ibatis.type.Alias; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * tb_project_archive_experiment |
| | | * @author |
| | | */ |
| | | @Alias("ProjectArchiveExperiment") |
| | | @TableName(schema = "db_experiment",value = "tb_project_archive_experiment") |
| | | public class ProjectArchiveExperiment implements Serializable { |
| | | private Integer num; |
| | | |
| | | /** |
| | | * 项目编号/对应多个文件 |
| | | */ |
| | | private String proNum; |
| | | |
| | | /** |
| | | * 项目名称 |
| | | */ |
| | | private String proName; |
| | | |
| | | /** |
| | | * 项目名称唯一识别码(200001010101 年月日时分秒 |
| | | */ |
| | | private String proNameCode; |
| | | |
| | | /** |
| | | * 试验名称 3.5WM |
| | | */ |
| | | private String proName2; |
| | | |
| | | /** |
| | | * 试验名称 3.5WM 唯一标识UUID |
| | | */ |
| | | private String proNameCode2; |
| | | |
| | | /** |
| | | * 文档上传日期 |
| | | */ |
| | | private Date proUploadDate; |
| | | |
| | | /** |
| | | * 归档日期 |
| | | */ |
| | | private Date proArchiveDate; |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | public Integer getNum() { |
| | | return num; |
| | | } |
| | | |
| | | public void setNum(Integer num) { |
| | | this.num = num; |
| | | } |
| | | |
| | | public String getProNum() { |
| | | return proNum; |
| | | } |
| | | |
| | | public void setProNum(String proNum) { |
| | | this.proNum = proNum; |
| | | } |
| | | |
| | | public String getProName() { |
| | | return proName; |
| | | } |
| | | |
| | | public void setProName(String proName) { |
| | | this.proName = proName; |
| | | } |
| | | |
| | | public String getProNameCode() { |
| | | return proNameCode; |
| | | } |
| | | |
| | | public void setProNameCode(String proNameCode) { |
| | | this.proNameCode = proNameCode; |
| | | } |
| | | |
| | | public String getProName2() { |
| | | return proName2; |
| | | } |
| | | |
| | | public void setProName2(String proName2) { |
| | | this.proName2 = proName2; |
| | | } |
| | | |
| | | public String getProNameCode2() { |
| | | return proNameCode2; |
| | | } |
| | | |
| | | public void setProNameCode2(String proNameCode2) { |
| | | this.proNameCode2 = proNameCode2; |
| | | } |
| | | |
| | | public Date getProUploadDate() { |
| | | return proUploadDate; |
| | | } |
| | | |
| | | public void setProUploadDate(Date proUploadDate) { |
| | | this.proUploadDate = proUploadDate; |
| | | } |
| | | |
| | | public Date getProArchiveDate() { |
| | | return proArchiveDate; |
| | | } |
| | | |
| | | public void setProArchiveDate(Date proArchiveDate) { |
| | | this.proArchiveDate = proArchiveDate; |
| | | } |
| | | } |
| | |
| | | /** |
| | | * 项目类型 |
| | | */ |
| | | private Integer proSort; |
| | | private String proSort; |
| | | |
| | | /** |
| | | * 立项材料/文档材料地址 |
| | | */ |
| | | private String proFilePath; |
| | | |
| | | |
| | | /** |
| | | * 文档上传日期 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd",timezone = "Asia/Shanghai") |
| | | private Date proUploadDate; |
| | | |
| | | /** |
| | | * 归档日期 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd",timezone = "Asia/Shanghai") |
| | | private Date proArchiveDate; |
| | | |
| | | /** |
| | | * 预览文件名地址 |
| | |
| | | private String proDocumentFormat; |
| | | |
| | | /** |
| | | * 归档日期 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd",timezone = "Asia/Shanghai") |
| | | private Date proArchiveDate; |
| | | |
| | | /** |
| | | * 成果名称 |
| | | */ |
| | | private String achievementName; |
| | |
| | | private String achievementType; |
| | | |
| | | /** |
| | | * 取得/发表日期 |
| | | * 取得/发达日期 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd",timezone = "Asia/Shanghai") |
| | | private Date gainDate; |
| | |
| | | this.proNameCode = proNameCode; |
| | | } |
| | | |
| | | public Integer getProSort() { |
| | | public String getProSort() { |
| | | return proSort; |
| | | } |
| | | |
| | | public void setProSort(Integer proSort) { |
| | | public void setProSort(String proSort) { |
| | | this.proSort = proSort; |
| | | } |
| | | |
| | |
| | | |
| | | public void setProUploadDate(Date proUploadDate) { |
| | | this.proUploadDate = proUploadDate; |
| | | } |
| | | |
| | | public Date getProArchiveDate() { |
| | | return proArchiveDate; |
| | | } |
| | | |
| | | public void setProArchiveDate(Date proArchiveDate) { |
| | | this.proArchiveDate = proArchiveDate; |
| | | } |
| | | |
| | | public String getProPdfFilePath() { |
| | |
| | | |
| | | public void setProDocumentFormat(String proDocumentFormat) { |
| | | this.proDocumentFormat = proDocumentFormat; |
| | | } |
| | | |
| | | public Date getProArchiveDate() { |
| | | return proArchiveDate; |
| | | } |
| | | |
| | | public void setProArchiveDate(Date proArchiveDate) { |
| | | this.proArchiveDate = proArchiveDate; |
| | | } |
| | | |
| | | public String getAchievementName() { |
| | |
| | | /** |
| | | * 项目名称唯一识别码(200001010101 年月日时分秒 |
| | | */ |
| | | @NotNull |
| | | private String proNameCode; |
| | | |
| | | /** |
| | | * 项目类型 |
| | | * 项目类型/类别 |
| | | */ |
| | | private Integer proSort; |
| | | private String proSort; |
| | | |
| | | /** |
| | | * 项目负责人 |
| | | */ |
| | | private String proAdmin; |
| | | |
| | | /** |
| | | * 所在部门 |
| | | */ |
| | | private String proDepartment; |
| | | |
| | | /** |
| | | * 联系方式 |
| | |
| | | private Date proExecutionDate1; |
| | | |
| | | /** |
| | | * 归档日期 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd",timezone = "Asia/Shanghai") |
| | | private Date proArchiveDate; |
| | | |
| | | /** |
| | | * 参与人员 |
| | | */ |
| | | private String proPerson; |
| | |
| | | private String proContent; |
| | | |
| | | /** |
| | | * 项目状态/进行中0-4,己结束5,己归档6 |
| | | * 项目状态/进行中1-4,己结束5,己归档6 |
| | | */ |
| | | private Integer proState; |
| | | |
| | | /** |
| | | * 项目进度(0-6 立项、审批、研究、结题、验收、归档) |
| | | * 项目进度(1-6 立项、审批、研究、结题、验收、归档) |
| | | */ |
| | | private Integer proProgress; |
| | | |
| | |
| | | this.proNameCode = proNameCode; |
| | | } |
| | | |
| | | public Integer getProSort() { |
| | | public String getProSort() { |
| | | return proSort; |
| | | } |
| | | |
| | | public void setProSort(Integer proSort) { |
| | | public void setProSort(String proSort) { |
| | | this.proSort = proSort; |
| | | } |
| | | |
| | |
| | | |
| | | public void setProAdmin(String proAdmin) { |
| | | this.proAdmin = proAdmin; |
| | | } |
| | | |
| | | public String getProDepartment() { |
| | | return proDepartment; |
| | | } |
| | | |
| | | public void setProDepartment(String proDepartment) { |
| | | this.proDepartment = proDepartment; |
| | | } |
| | | |
| | | public String getProTel() { |
| | |
| | | this.proExecutionDate1 = proExecutionDate1; |
| | | } |
| | | |
| | | public Date getProArchiveDate() { |
| | | return proArchiveDate; |
| | | } |
| | | |
| | | public void setProArchiveDate(Date proArchiveDate) { |
| | | this.proArchiveDate = proArchiveDate; |
| | | } |
| | | |
| | | public String getProPerson() { |
| | | return proPerson; |
| | | } |
| | |
| | | |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.mapper.ProjectArchiveManageMapper; |
| | | import com.whyc.mapper.ProjectManageMapper; |
| | | import com.whyc.pojo.ProjectArchiveExperiment; |
| | | import com.whyc.pojo.ProjectArchiveManage; |
| | | import com.whyc.pojo.ProjectManage; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.File; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | |
| | | @Service |
| | | public class ProjectArchiveManageService { |
| | |
| | | @Resource |
| | | private ProjectArchiveManageMapper projectArchiveManageMapper; |
| | | |
| | | @Resource |
| | | private ProjectManageMapper projectManageMapper; |
| | | |
| | | public Response searchDocumentation(ProjectArchiveManage pam) { |
| | | |
| | |
| | | return response; |
| | | } |
| | | |
| | | public Response<List<ProjectManage>> searchAll() { |
| | | public Response searchArchiveAll() { |
| | | |
| | | Response<Object> response = new Response<>(); |
| | | try { |
| | | List<ProjectManage> projectManages = projectManageMapper.searchArchiveAll(); |
| | | |
| | | return null; |
| | | response.setMsg(1, "查询成功"); |
| | | response.setData(projectManages); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return response.setMsg(0, "查询失败"); |
| | | } |
| | | return response; |
| | | } |
| | | |
| | | public Response searchArchiveByCondition(ProjectArchiveManage projectArchiveManage) { |
| | | public Response searchArchiveByCondition(ProjectManage projectManage) { |
| | | Response<Object> response = new Response<>(); |
| | | |
| | | return null; |
| | | try { |
| | | List<ProjectManage> lists = projectManageMapper.searchArchiveByCondition(projectManage); |
| | | |
| | | response.setMsg(1,"查询成功"); |
| | | response.setData(lists); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return response.setMsg(0,"查询失败"); |
| | | } |
| | | return response; |
| | | } |
| | | |
| | | /** |
| | | * 文档管理 |
| | | * |
| | | * @param projectArchiveManage |
| | | * @return |
| | | */ |
| | | public Response searchProjectDocByCondition(ProjectArchiveManage projectArchiveManage) { |
| | | Response<Object> response = new Response<>(); |
| | | |
| | | try { |
| | | List<ProjectArchiveManage> lists = projectArchiveManageMapper.searchProjectDocByCondition(projectArchiveManage); |
| | | ArrayList<Object> last = new ArrayList<>(); |
| | | if (null!=lists){ |
| | | for (int i = 0; i < lists.size(); i++) { |
| | | ProjectArchiveManage pam = lists.get(i); |
| | | HashMap<Object, Object> map = new HashMap<>(); |
| | | map.put("文档名称",pam.getProDocumentName()); |
| | | map.put("文档格式",pam.getProDocumentFormat()); |
| | | Date proArchiveDate = pam.getProArchiveDate(); |
| | | String format = ""; |
| | | if (null != proArchiveDate) { |
| | | format = new SimpleDateFormat("yyyy-MM-dd").format(proArchiveDate); |
| | | } |
| | | map.put("归档日期", format); |
| | | map.put("下载地址",pam.getProFilePath()); |
| | | last.add(map); |
| | | } |
| | | } |
| | | response.setMsg(1, "查询成功"); |
| | | response.setData(last); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return response.setMsg(0, "查询失败"); |
| | | } |
| | | return response; |
| | | } |
| | | |
| | | /** |
| | | * 项目归档管理-项目概况信息 |
| | | * @param pm |
| | | * @return |
| | | */ |
| | | public Response searchArchiveProjectInfo(ProjectManage pm) { |
| | | Response<Object> response = new Response<>(); |
| | | |
| | | try { |
| | | ProjectManage projectManage = projectManageMapper.searchArchiveProjectInfo(pm); |
| | | |
| | | response.setMsg(1,"查询成功"); |
| | | response.setData(projectManage); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return response.setMsg(0,"查询失败"); |
| | | } |
| | | return response; |
| | | } |
| | | |
| | | /** |
| | | * 项目归档管理-试验数据 |
| | | * |
| | | * @param pam |
| | | * @return |
| | | */ |
| | | public Response searchArchiveExperimentData(ProjectArchiveManage pam) { |
| | | Response<Object> response = new Response<>(); |
| | | List<ProjectArchiveExperiment> lists = projectArchiveManageMapper.searchArchiveExperimentData(pam); |
| | | ArrayList<Object> last = new ArrayList<>(); |
| | | try { |
| | | if (null != lists) { |
| | | for (int i = 0; i < lists.size(); i++) { |
| | | ProjectArchiveExperiment pae = lists.get(i); |
| | | HashMap<Object, Object> map = new HashMap<>(); |
| | | map.put("试验名称", pae.getProName2()); |
| | | Date proUploadDate = pae.getProUploadDate(); |
| | | String format1 = null; |
| | | if (null != proUploadDate) { |
| | | format1 = new SimpleDateFormat("yyyy-MM-dd").format(proUploadDate); |
| | | } |
| | | map.put("上传日期", format1); |
| | | Date proArchiveDate = pae.getProArchiveDate(); |
| | | String format = null; |
| | | if (null != proArchiveDate) { |
| | | format = new SimpleDateFormat("yyyy-MM-dd").format(proArchiveDate); |
| | | } |
| | | map.put("归档日期", format); |
| | | // map.put("下载地址",pam.getProFilePath()); |
| | | last.add(map); |
| | | } |
| | | } |
| | | response.setMsg(1, "查询成功"); |
| | | response.setData(last); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return response.setMsg(0, "查询失败"); |
| | | } |
| | | return response; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 科技成果 |
| | | * @param projectArchiveManage |
| | | * @return |
| | | */ |
| | | public Response searchArchiveTechnologicalAchievements(ProjectArchiveManage projectArchiveManage) { |
| | | Response<Object> response = new Response<>(); |
| | | List<ProjectArchiveManage> lists = projectArchiveManageMapper.searchArchiveTechnologicalAchievements(projectArchiveManage); |
| | | ArrayList<Object> last = new ArrayList<>(); |
| | | try { |
| | | if (null != lists) { |
| | | for (int i = 0; i < lists.size(); i++) { |
| | | ProjectArchiveManage pam = lists.get(i); |
| | | HashMap<Object, Object> map = new HashMap<>(); |
| | | map.put("成果名称", pam.getAchievementName()); |
| | | map.put("成果类型",pam.getAchievementType()); |
| | | Date gainDate = pam.getGainDate(); |
| | | String str1 = null; |
| | | if(null!=gainDate){ |
| | | str1 = new SimpleDateFormat("yyyy-MM-dd").format(gainDate); |
| | | } |
| | | map.put("取得/发表日期",str1); |
| | | |
| | | Date proArchiveDate = pam.getProArchiveDate(); |
| | | String str2 = null; |
| | | if(null!=proArchiveDate){ |
| | | str2 = new SimpleDateFormat("yyyy-MM-dd").format(proArchiveDate); |
| | | } |
| | | map.put("归档日期",str2); |
| | | last.add(map); |
| | | } |
| | | } |
| | | response.setMsg(1, "查询成功"); |
| | | response.setData(last); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return response.setMsg(0, "查询失败"); |
| | | } |
| | | return response; |
| | | } |
| | | } |
| | |
| | | import org.springframework.transaction.TransactionStatus; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | |
| | | @Service |
| | |
| | | pam.setProDocumentName(split[1].substring(0, rexIdex)); |
| | | pam.setProDocumentFormat(split[1].substring(rexIdex + 1)); |
| | | pam.setProUploadDate(new Date()); |
| | | pam.setGainDate(new Date()); |
| | | projectArchiveManageMapper.insert(pam); |
| | | } |
| | | } |
| | |
| | | |
| | | |
| | | /** |
| | | * 项目管理 |
| | | * 项目过程管理/己确认、未确认阶段 |
| | | * @param projectManage |
| | | * @return |
| | | */ |
| | |
| | | Response response = new Response<>(); |
| | | |
| | | try { |
| | | List<ProjectManage> projectManages = projectManageMapper.searchManageStateByCondition(projectManage); |
| | | ProjectManage pm = projectManageMapper.searchManageStateByCondition(projectManage); |
| | | List<ProjectArchiveManage> pams = projectArchiveManageMapper.searchByConditionDocumentPath(projectManage); |
| | | HashMap<Object, Object> map = new HashMap<>(); |
| | | map.put("项目管理", pm); |
| | | ArrayList<Object> list = new ArrayList<>(); |
| | | if (null != pams) { |
| | | for (int i = 0; i < pams.size(); i++) { |
| | | ProjectArchiveManage pam = pams.get(i); |
| | | HashMap<Object, Object> mapDoc = new HashMap<>(); |
| | | mapDoc.put("文件名", pam.getProDocumentName()); |
| | | mapDoc.put("文件路径", pam.getProFilePath()); |
| | | list.add(mapDoc); |
| | | } |
| | | } |
| | | map.put("文档材料", list); |
| | | response.setCode(1); |
| | | response.setMsg(1,"查询成功"); |
| | | response.setData(projectManages); |
| | | response.setMsg(1, "查询成功"); |
| | | response.setData(map); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return response.setMsg(0,"查询失败"); |
| | | return response.setMsg(0, "查询失败"); |
| | | } |
| | | return response; |
| | | } |
| | |
| | | |
| | | /** |
| | | * 项目进度确认 |
| | | * |
| | | *未归档可以修改更新,归档后不能修改 |
| | | * @param pm |
| | | * @return |
| | | */ |
New 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.whyc.mapper.ProjectArchiveExperimentMapper"> |
| | | <resultMap id="BaseResultMap" type="com.whyc.pojo.ProjectArchiveExperiment"> |
| | | <id column="num" jdbcType="INTEGER" property="num" /> |
| | | <result column="pro_num" jdbcType="VARCHAR" property="proNum" /> |
| | | <result column="pro_name" jdbcType="VARCHAR" property="proName" /> |
| | | <result column="pro_name_code" jdbcType="VARCHAR" property="proNameCode" /> |
| | | <result column="pro_name2" jdbcType="VARCHAR" property="proName2" /> |
| | | <result column="pro_name_code2" jdbcType="VARCHAR" property="proNameCode2" /> |
| | | <result column="pro_upload_date" jdbcType="DATE" property="proUploadDate" /> |
| | | <result column="pro_archive_date" jdbcType="DATE" property="proArchiveDate" /> |
| | | </resultMap> |
| | | <sql id="Base_Column_List"> |
| | | num, pro_num, pro_name, pro_name_code, pro_name2, pro_name_code2, pro_upload_date, |
| | | pro_archive_date |
| | | </sql> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from tb_project_archive_experiment |
| | | where num = #{num,jdbcType=INTEGER} |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer"> |
| | | delete from tb_project_archive_experiment |
| | | where num = #{num,jdbcType=INTEGER} |
| | | </delete> |
| | | <insert id="insert" keyColumn="num" keyProperty="num" parameterType="com.whyc.pojo.ProjectArchiveExperiment" useGeneratedKeys="true"> |
| | | insert into tb_project_archive_experiment (pro_num, pro_name, pro_name_code, |
| | | pro_name2, pro_name_code2, pro_upload_date, |
| | | pro_archive_date) |
| | | values (#{proNum,jdbcType=VARCHAR}, #{proName,jdbcType=VARCHAR}, #{proNameCode,jdbcType=VARCHAR}, |
| | | #{proName2,jdbcType=VARCHAR}, #{proNameCode2,jdbcType=VARCHAR}, #{proUploadDate,jdbcType=DATE}, |
| | | #{proArchiveDate,jdbcType=DATE}) |
| | | </insert> |
| | | <insert id="insertSelective" keyColumn="num" keyProperty="num" parameterType="com.whyc.pojo.ProjectArchiveExperiment" useGeneratedKeys="true"> |
| | | insert into tb_project_archive_experiment |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="proNum != null"> |
| | | pro_num, |
| | | </if> |
| | | <if test="proName != null"> |
| | | pro_name, |
| | | </if> |
| | | <if test="proNameCode != null"> |
| | | pro_name_code, |
| | | </if> |
| | | <if test="proName2 != null"> |
| | | pro_name2, |
| | | </if> |
| | | <if test="proNameCode2 != null"> |
| | | pro_name_code2, |
| | | </if> |
| | | <if test="proUploadDate != null"> |
| | | pro_upload_date, |
| | | </if> |
| | | <if test="proArchiveDate != null"> |
| | | pro_archive_date, |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="proNum != null"> |
| | | #{proNum,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="proName != null"> |
| | | #{proName,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="proNameCode != null"> |
| | | #{proNameCode,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="proName2 != null"> |
| | | #{proName2,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="proNameCode2 != null"> |
| | | #{proNameCode2,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="proUploadDate != null"> |
| | | #{proUploadDate,jdbcType=DATE}, |
| | | </if> |
| | | <if test="proArchiveDate != null"> |
| | | #{proArchiveDate,jdbcType=DATE}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.whyc.pojo.ProjectArchiveExperiment"> |
| | | update tb_project_archive_experiment |
| | | <set> |
| | | <if test="proNum != null"> |
| | | pro_num = #{proNum,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="proName != null"> |
| | | pro_name = #{proName,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="proNameCode != null"> |
| | | pro_name_code = #{proNameCode,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="proName2 != null"> |
| | | pro_name2 = #{proName2,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="proNameCode2 != null"> |
| | | pro_name_code2 = #{proNameCode2,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="proUploadDate != null"> |
| | | pro_upload_date = #{proUploadDate,jdbcType=DATE}, |
| | | </if> |
| | | <if test="proArchiveDate != null"> |
| | | pro_archive_date = #{proArchiveDate,jdbcType=DATE}, |
| | | </if> |
| | | </set> |
| | | where num = #{num,jdbcType=INTEGER} |
| | | </update> |
| | | <update id="updateByPrimaryKey" parameterType="com.whyc.pojo.ProjectArchiveExperiment"> |
| | | update tb_project_archive_experiment |
| | | set pro_num = #{proNum,jdbcType=VARCHAR}, |
| | | pro_name = #{proName,jdbcType=VARCHAR}, |
| | | pro_name_code = #{proNameCode,jdbcType=VARCHAR}, |
| | | pro_name2 = #{proName2,jdbcType=VARCHAR}, |
| | | pro_name_code2 = #{proNameCode2,jdbcType=VARCHAR}, |
| | | pro_upload_date = #{proUploadDate,jdbcType=DATE}, |
| | | pro_archive_date = #{proArchiveDate,jdbcType=DATE} |
| | | where num = #{num,jdbcType=INTEGER} |
| | | </update> |
| | | </mapper> |
| | |
| | | delete from tb_project_archive_manage |
| | | where num = #{num,jdbcType=INTEGER} |
| | | </delete> |
| | | <insert id="insert" keyColumn="num" keyProperty="num" parameterType="com.whyc.pojo.ProjectArchiveManage" useGeneratedKeys="true"> |
| | | insert into tb_project_archive_manage (pro_num, pro_name, pro_name_code, |
| | | pro_sort, pro_file_path,pro_upload_date, pro_pdf_file_path, |
| | | pro_document_name, pro_document_format, pro_archive_date, |
| | | achievement_name, achievement_type, gain_date, |
| | | note) |
| | | values (#{proNum,jdbcType=INTEGER}, #{proName,jdbcType=VARCHAR}, #{proNameCode,jdbcType=VARCHAR}, |
| | | #{proSort,jdbcType=INTEGER}, #{proFilePath,jdbcType=VARCHAR},#{proUploadDate,jdbcType=DATE} ,#{proPdfFilePath,jdbcType=VARCHAR}, |
| | | #{proDocumentName,jdbcType=VARCHAR}, #{proDocumentFormat,jdbcType=VARCHAR}, #{proArchiveDate,jdbcType=DATE}, |
| | | #{achievementName,jdbcType=VARCHAR}, #{achievementType,jdbcType=VARCHAR}, #{gainDate,jdbcType=DATE}, |
| | | #{note,jdbcType=VARCHAR}) |
| | | |
| | | <insert id="insert" keyColumn="num" keyProperty="num" parameterType="com.whyc.pojo.ProjectArchiveManage" |
| | | useGeneratedKeys="true"> |
| | | insert into tb_project_archive_manage (pro_num, pro_name, pro_name_code, |
| | | pro_sort, pro_file_path, pro_upload_date, |
| | | pro_archive_date, pro_pdf_file_path, pro_document_name, |
| | | pro_document_format, achievement_name, achievement_type, |
| | | gain_date, note) |
| | | values (#{proNum,jdbcType=VARCHAR}, #{proName,jdbcType=VARCHAR}, #{proNameCode,jdbcType=VARCHAR}, |
| | | #{proSort,jdbcType=VARCHAR}, #{proFilePath,jdbcType=VARCHAR}, #{proUploadDate,jdbcType=DATE}, |
| | | #{proArchiveDate,jdbcType=DATE}, #{proPdfFilePath,jdbcType=VARCHAR}, #{proDocumentName,jdbcType=VARCHAR}, |
| | | #{proDocumentFormat,jdbcType=VARCHAR}, #{achievementName,jdbcType=VARCHAR}, |
| | | #{achievementType,jdbcType=VARCHAR}, |
| | | #{gainDate,jdbcType=DATE}, #{note,jdbcType=VARCHAR}) |
| | | </insert> |
| | | |
| | | <insert id="insertSelective" keyColumn="num" keyProperty="num" parameterType="com.whyc.pojo.ProjectArchiveManage" useGeneratedKeys="true"> |
| | | insert into tb_project_archive_manage |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | |
| | | WHERE pro_num = #{proNum} |
| | | and pro_name_code = #{proNameCode} |
| | | </select> |
| | | <select id="searchByConditionDocumentPath" resultType="com.whyc.pojo.ProjectArchiveManage"> |
| | | SELECT pro_document_name, pro_file_path |
| | | FROM db_experiment.tb_project_archive_manage |
| | | WHERE pro_num = #{proNum} |
| | | and pro_name_code = #{proNameCode} |
| | | </select> |
| | | |
| | | <select id="searchProjectDocByCondition" resultType="com.whyc.pojo.ProjectArchiveManage"> |
| | | SELECT pro_document_name, pro_document_format, pro_archive_date, pro_file_path |
| | | FROM db_experiment.tb_project_archive_manage |
| | | WHERE pro_num = #{proNum} |
| | | and pro_name_code = #{proNameCode} |
| | | </select> |
| | | |
| | | <select id="searchArchiveExperimentData" resultType="com.whyc.pojo.ProjectArchiveExperiment"> |
| | | SELECT pro_name2, pro_upload_date, pro_archive_date |
| | | FROM db_experiment.tb_project_archive_experiment |
| | | WHERE pro_num = #{proNum} |
| | | and pro_name_code = #{proNameCode} |
| | | </select> |
| | | |
| | | <select id="searchArchiveTechnologicalAchievements" resultType="com.whyc.pojo.ProjectArchiveManage"> |
| | | SELECT achievement_name, |
| | | achievement_type, |
| | | gain_date, |
| | | pro_archive_date |
| | | FROM db_experiment.tb_project_archive_manage |
| | | WHERE pro_num = #{proNum} |
| | | and pro_name_code = #{proNameCode} |
| | | </select> |
| | | |
| | | <delete id="delDocumentation"> |
| | | DELETE |
| | |
| | | <?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.whyc.mapper.ProjectManageMapper"> |
| | | <resultMap id="BaseResultMap" type="com.whyc.pojo.ProjectManage"> |
| | | <id column="num" jdbcType="INTEGER" property="num" /> |
| | | <result column="pro_num" jdbcType="INTEGER" property="proNum" /> |
| | | <result column="pro_name" jdbcType="VARCHAR" property="proName" /> |
| | | <result column="pro_name_code" jdbcType="VARCHAR" property="proNameCode" /> |
| | | <result column="pro_sort" jdbcType="INTEGER" property="proSort" /> |
| | | <result column="pro_admin" jdbcType="VARCHAR" property="proAdmin" /> |
| | | <result column="pro_tel" jdbcType="INTEGER" property="proTel" /> |
| | | <result column="pro_createdate" jdbcType="DATE" property="proCreatedate" /> |
| | | <result column="pro_execution_date" jdbcType="DATE" property="proExecutionDate" /> |
| | | <result column="pro_execution_date1" jdbcType="DATE" property="proExecutionDate1" /> |
| | | <result column="pro_person" jdbcType="VARCHAR" property="proPerson" /> |
| | | <result column="pro_funding" jdbcType="DECIMAL" property="proFunding" /> |
| | | <result column="pro_funding_source" jdbcType="VARCHAR" property="proFundingSource" /> |
| | | <result column="pro_content" jdbcType="VARCHAR" property="proContent" /> |
| | | <result column="pro_state" jdbcType="INTEGER" property="proState" /> |
| | | <result column="pro_progress" jdbcType="VARCHAR" property="proProgress" /> |
| | | <result column="note" jdbcType="VARCHAR" property="note" /> |
| | | </resultMap> |
| | | <sql id="Base_Column_List"> |
| | | num, pro_num, pro_name, pro_name_code, pro_sort, pro_admin, pro_tel, pro_createdate, |
| | | pro_execution_date, pro_execution_date1, pro_person, pro_funding, pro_funding_source, |
| | | pro_content, pro_state, pro_progress, note |
| | | </sql> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from tb_project_manage |
| | | where num = #{num,jdbcType=INTEGER} |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer"> |
| | | delete from tb_project_manage |
| | | where num = #{num,jdbcType=INTEGER} |
| | | </delete> |
| | | <insert id="insert" keyColumn="num" keyProperty="num" parameterType="com.whyc.pojo.ProjectManage" useGeneratedKeys="true"> |
| | | insert into tb_project_manage (pro_num, pro_name, pro_name_code, |
| | | pro_sort, pro_admin, pro_tel, |
| | | pro_createdate, pro_execution_date, pro_execution_date1, |
| | | pro_person, pro_funding, pro_funding_source, |
| | | pro_content, pro_state, pro_progress, |
| | | note) |
| | | values (#{proNum,jdbcType=INTEGER}, #{proName,jdbcType=VARCHAR}, #{proNameCode,jdbcType=VARCHAR}, |
| | | #{proSort,jdbcType=INTEGER}, #{proAdmin,jdbcType=VARCHAR}, #{proTel,jdbcType=INTEGER}, |
| | | #{proCreatedate,jdbcType=DATE}, #{proExecutionDate,jdbcType=DATE}, #{proExecutionDate1,jdbcType=DATE}, |
| | | #{proPerson,jdbcType=VARCHAR}, #{proFunding,jdbcType=DECIMAL}, #{proFundingSource,jdbcType=VARCHAR}, |
| | | #{proContent,jdbcType=VARCHAR}, #{proState,jdbcType=INTEGER}, #{proProgress,jdbcType=VARCHAR}, |
| | | #{note,jdbcType=VARCHAR}) |
| | | </insert> |
| | | <insert id="insertSelective" keyColumn="num" keyProperty="num" parameterType="com.whyc.pojo.ProjectManage" useGeneratedKeys="true"> |
| | | insert into tb_project_manage |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="proNum != null"> |
| | | pro_num, |
| | | </if> |
| | | <if test="proName != null"> |
| | | pro_name, |
| | | </if> |
| | | <if test="proNameCode != null"> |
| | | pro_name_code, |
| | | </if> |
| | | <if test="proSort != null"> |
| | | pro_sort, |
| | | </if> |
| | | <if test="proAdmin != null"> |
| | | pro_admin, |
| | | </if> |
| | | <if test="proTel != null"> |
| | | pro_tel, |
| | | </if> |
| | | <if test="proCreatedate != null"> |
| | | pro_createdate, |
| | | </if> |
| | | <if test="proExecutionDate != null"> |
| | | pro_execution_date, |
| | | </if> |
| | | <if test="proExecutionDate1 != null"> |
| | | pro_execution_date1, |
| | | </if> |
| | | <if test="proPerson != null"> |
| | | pro_person, |
| | | </if> |
| | | <if test="proFunding != null"> |
| | | pro_funding, |
| | | </if> |
| | | <if test="proFundingSource != null"> |
| | | pro_funding_source, |
| | | </if> |
| | | <if test="proContent != null"> |
| | | pro_content, |
| | | </if> |
| | | <if test="proState != null"> |
| | | pro_state, |
| | | </if> |
| | | <if test="proProgress != null"> |
| | | pro_progress, |
| | | </if> |
| | | <if test="note != null"> |
| | | note, |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="proNum != null"> |
| | | #{proNum,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="proName != null"> |
| | | #{proName,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="proNameCode != null"> |
| | | #{proNameCode,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="proSort != null"> |
| | | #{proSort,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="proAdmin != null"> |
| | | #{proAdmin,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="proTel != null"> |
| | | #{proTel,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="proCreatedate != null"> |
| | | #{proCreatedate,jdbcType=DATE}, |
| | | </if> |
| | | <if test="proExecutionDate != null"> |
| | | #{proExecutionDate,jdbcType=DATE}, |
| | | </if> |
| | | <if test="proExecutionDate1 != null"> |
| | | #{proExecutionDate1,jdbcType=DATE}, |
| | | </if> |
| | | <if test="proPerson != null"> |
| | | #{proPerson,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="proFunding != null"> |
| | | #{proFunding,jdbcType=DECIMAL}, |
| | | </if> |
| | | <if test="proFundingSource != null"> |
| | | #{proFundingSource,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="proContent != null"> |
| | | #{proContent,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="proState != null"> |
| | | #{proState,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="proProgress != null"> |
| | | #{proProgress,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="note != null"> |
| | | #{note,jdbcType=VARCHAR}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.whyc.pojo.ProjectManage"> |
| | | update tb_project_manage |
| | | <set> |
| | | <if test="proNum != null"> |
| | | pro_num = #{proNum,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="proName != null"> |
| | | pro_name = #{proName,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="proNameCode != null"> |
| | | pro_name_code = #{proNameCode,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="proSort != null"> |
| | | pro_sort = #{proSort,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="proAdmin != null"> |
| | | pro_admin = #{proAdmin,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="proTel != null"> |
| | | pro_tel = #{proTel,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="proCreatedate != null"> |
| | | pro_createdate = #{proCreatedate,jdbcType=DATE}, |
| | | </if> |
| | | <if test="proExecutionDate != null"> |
| | | pro_execution_date = #{proExecutionDate,jdbcType=DATE}, |
| | | </if> |
| | | <if test="proExecutionDate1 != null"> |
| | | pro_execution_date1 = #{proExecutionDate1,jdbcType=DATE}, |
| | | </if> |
| | | <if test="proPerson != null"> |
| | | pro_person = #{proPerson,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="proFunding != null"> |
| | | pro_funding = #{proFunding,jdbcType=DECIMAL}, |
| | | </if> |
| | | <if test="proFundingSource != null"> |
| | | pro_funding_source = #{proFundingSource,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="proContent != null"> |
| | | pro_content = #{proContent,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="proState != null"> |
| | | pro_state = #{proState,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="proProgress != null"> |
| | | pro_progress = #{proProgress,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="note != null"> |
| | | note = #{note,jdbcType=VARCHAR}, |
| | | </if> |
| | | </set> |
| | | where num = #{num,jdbcType=INTEGER} |
| | | </update> |
| | | <update id="updateByPrimaryKey" parameterType="com.whyc.pojo.ProjectManage"> |
| | | update tb_project_manage |
| | | set pro_num = #{proNum,jdbcType=INTEGER}, |
| | | pro_name = #{proName,jdbcType=VARCHAR}, |
| | | pro_name_code = #{proNameCode,jdbcType=VARCHAR}, |
| | | pro_sort = #{proSort,jdbcType=INTEGER}, |
| | | pro_admin = #{proAdmin,jdbcType=VARCHAR}, |
| | | pro_tel = #{proTel,jdbcType=INTEGER}, |
| | | pro_createdate = #{proCreatedate,jdbcType=DATE}, |
| | | pro_execution_date = #{proExecutionDate,jdbcType=DATE}, |
| | | pro_execution_date1 = #{proExecutionDate1,jdbcType=DATE}, |
| | | pro_person = #{proPerson,jdbcType=VARCHAR}, |
| | | pro_funding = #{proFunding,jdbcType=DECIMAL}, |
| | | pro_funding_source = #{proFundingSource,jdbcType=VARCHAR}, |
| | | pro_content = #{proContent,jdbcType=VARCHAR}, |
| | | pro_state = #{proState,jdbcType=INTEGER}, |
| | | pro_progress = #{proProgress,jdbcType=VARCHAR}, |
| | | note = #{note,jdbcType=VARCHAR} |
| | | where num = #{num,jdbcType=INTEGER} |
| | | </update> |
| | | <resultMap id="BaseResultMap" type="com.whyc.pojo.ProjectManage"> |
| | | <id column="num" jdbcType="INTEGER" property="num" /> |
| | | <result column="pro_num" jdbcType="VARCHAR" property="proNum" /> |
| | | <result column="pro_name" jdbcType="VARCHAR" property="proName" /> |
| | | <result column="pro_name_code" jdbcType="VARCHAR" property="proNameCode" /> |
| | | <result column="pro_sort" jdbcType="VARCHAR" property="proSort" /> |
| | | <result column="pro_admin" jdbcType="VARCHAR" property="proAdmin" /> |
| | | <result column="pro_department" jdbcType="VARCHAR" property="proDepartment" /> |
| | | <result column="pro_tel" jdbcType="VARCHAR" property="proTel" /> |
| | | <result column="pro_createdate" jdbcType="DATE" property="proCreatedate" /> |
| | | <result column="pro_execution_date" jdbcType="DATE" property="proExecutionDate" /> |
| | | <result column="pro_execution_date1" jdbcType="DATE" property="proExecutionDate1" /> |
| | | <result column="pro_archive_date" jdbcType="DATE" property="proArchiveDate" /> |
| | | <result column="pro_person" jdbcType="VARCHAR" property="proPerson" /> |
| | | <result column="pro_funding" jdbcType="DECIMAL" property="proFunding" /> |
| | | <result column="pro_funding_source" jdbcType="VARCHAR" property="proFundingSource" /> |
| | | <result column="pro_content" jdbcType="VARCHAR" property="proContent" /> |
| | | <result column="pro_state" jdbcType="INTEGER" property="proState" /> |
| | | <result column="pro_progress" jdbcType="INTEGER" property="proProgress" /> |
| | | <result column="note" jdbcType="VARCHAR" property="note" /> |
| | | </resultMap> |
| | | <sql id="Base_Column_List"> |
| | | num, pro_num, pro_name, pro_name_code, pro_sort, pro_admin, pro_department, pro_tel, |
| | | pro_createdate, pro_execution_date, pro_execution_date1, pro_archive_date, pro_person, |
| | | pro_funding, pro_funding_source, pro_content, pro_state, pro_progress, note |
| | | </sql> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from tb_project_manage |
| | | where num = #{num,jdbcType=INTEGER} |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer"> |
| | | delete from tb_project_manage |
| | | where num = #{num,jdbcType=INTEGER} |
| | | </delete> |
| | | <insert id="insert" keyColumn="num" keyProperty="num" parameterType="com.whyc.pojo.ProjectManage" useGeneratedKeys="true"> |
| | | insert into tb_project_manage (pro_num, pro_name, pro_name_code, |
| | | pro_sort, pro_admin, pro_department, |
| | | pro_tel, pro_createdate, pro_execution_date, |
| | | pro_execution_date1, pro_archive_date, pro_person, |
| | | pro_funding, pro_funding_source, pro_content, |
| | | pro_state, pro_progress, note |
| | | ) |
| | | values (#{proNum,jdbcType=VARCHAR}, #{proName,jdbcType=VARCHAR}, #{proNameCode,jdbcType=VARCHAR}, |
| | | #{proSort,jdbcType=VARCHAR}, #{proAdmin,jdbcType=VARCHAR}, #{proDepartment,jdbcType=VARCHAR}, |
| | | #{proTel,jdbcType=VARCHAR}, #{proCreatedate,jdbcType=DATE}, #{proExecutionDate,jdbcType=DATE}, |
| | | #{proExecutionDate1,jdbcType=DATE}, #{proArchiveDate,jdbcType=DATE}, #{proPerson,jdbcType=VARCHAR}, |
| | | #{proFunding,jdbcType=DECIMAL}, #{proFundingSource,jdbcType=VARCHAR}, #{proContent,jdbcType=VARCHAR}, |
| | | #{proState,jdbcType=INTEGER}, #{proProgress,jdbcType=INTEGER}, #{note,jdbcType=VARCHAR} |
| | | ) |
| | | </insert> |
| | | <insert id="insertSelective" keyColumn="num" keyProperty="num" parameterType="com.whyc.pojo.ProjectManage" useGeneratedKeys="true"> |
| | | insert into tb_project_manage |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="proNum != null"> |
| | | pro_num, |
| | | </if> |
| | | <if test="proName != null"> |
| | | pro_name, |
| | | </if> |
| | | <if test="proNameCode != null"> |
| | | pro_name_code, |
| | | </if> |
| | | <if test="proSort != null"> |
| | | pro_sort, |
| | | </if> |
| | | <if test="proAdmin != null"> |
| | | pro_admin, |
| | | </if> |
| | | <if test="proDepartment != null"> |
| | | pro_department, |
| | | </if> |
| | | <if test="proTel != null"> |
| | | pro_tel, |
| | | </if> |
| | | <if test="proCreatedate != null"> |
| | | pro_createdate, |
| | | </if> |
| | | <if test="proExecutionDate != null"> |
| | | pro_execution_date, |
| | | </if> |
| | | <if test="proExecutionDate1 != null"> |
| | | pro_execution_date1, |
| | | </if> |
| | | <if test="proArchiveDate != null"> |
| | | pro_archive_date, |
| | | </if> |
| | | <if test="proPerson != null"> |
| | | pro_person, |
| | | </if> |
| | | <if test="proFunding != null"> |
| | | pro_funding, |
| | | </if> |
| | | <if test="proFundingSource != null"> |
| | | pro_funding_source, |
| | | </if> |
| | | <if test="proContent != null"> |
| | | pro_content, |
| | | </if> |
| | | <if test="proState != null"> |
| | | pro_state, |
| | | </if> |
| | | <if test="proProgress != null"> |
| | | pro_progress, |
| | | </if> |
| | | <if test="note != null"> |
| | | note, |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="proNum != null"> |
| | | #{proNum,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="proName != null"> |
| | | #{proName,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="proNameCode != null"> |
| | | #{proNameCode,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="proSort != null"> |
| | | #{proSort,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="proAdmin != null"> |
| | | #{proAdmin,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="proDepartment != null"> |
| | | #{proDepartment,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="proTel != null"> |
| | | #{proTel,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="proCreatedate != null"> |
| | | #{proCreatedate,jdbcType=DATE}, |
| | | </if> |
| | | <if test="proExecutionDate != null"> |
| | | #{proExecutionDate,jdbcType=DATE}, |
| | | </if> |
| | | <if test="proExecutionDate1 != null"> |
| | | #{proExecutionDate1,jdbcType=DATE}, |
| | | </if> |
| | | <if test="proArchiveDate != null"> |
| | | #{proArchiveDate,jdbcType=DATE}, |
| | | </if> |
| | | <if test="proPerson != null"> |
| | | #{proPerson,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="proFunding != null"> |
| | | #{proFunding,jdbcType=DECIMAL}, |
| | | </if> |
| | | <if test="proFundingSource != null"> |
| | | #{proFundingSource,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="proContent != null"> |
| | | #{proContent,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="proState != null"> |
| | | #{proState,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="proProgress != null"> |
| | | #{proProgress,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="note != null"> |
| | | #{note,jdbcType=VARCHAR}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.whyc.pojo.ProjectManage"> |
| | | update tb_project_manage |
| | | <set> |
| | | <if test="proNum != null"> |
| | | pro_num = #{proNum,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="proName != null"> |
| | | pro_name = #{proName,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="proNameCode != null"> |
| | | pro_name_code = #{proNameCode,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="proSort != null"> |
| | | pro_sort = #{proSort,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="proAdmin != null"> |
| | | pro_admin = #{proAdmin,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="proDepartment != null"> |
| | | pro_department = #{proDepartment,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="proTel != null"> |
| | | pro_tel = #{proTel,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="proCreatedate != null"> |
| | | pro_createdate = #{proCreatedate,jdbcType=DATE}, |
| | | </if> |
| | | <if test="proExecutionDate != null"> |
| | | pro_execution_date = #{proExecutionDate,jdbcType=DATE}, |
| | | </if> |
| | | <if test="proExecutionDate1 != null"> |
| | | pro_execution_date1 = #{proExecutionDate1,jdbcType=DATE}, |
| | | </if> |
| | | <if test="proArchiveDate != null"> |
| | | pro_archive_date = #{proArchiveDate,jdbcType=DATE}, |
| | | </if> |
| | | <if test="proPerson != null"> |
| | | pro_person = #{proPerson,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="proFunding != null"> |
| | | pro_funding = #{proFunding,jdbcType=DECIMAL}, |
| | | </if> |
| | | <if test="proFundingSource != null"> |
| | | pro_funding_source = #{proFundingSource,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="proContent != null"> |
| | | pro_content = #{proContent,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="proState != null"> |
| | | pro_state = #{proState,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="proProgress != null"> |
| | | pro_progress = #{proProgress,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="note != null"> |
| | | note = #{note,jdbcType=VARCHAR}, |
| | | </if> |
| | | </set> |
| | | where num = #{num,jdbcType=INTEGER} |
| | | </update> |
| | | <update id="updateByPrimaryKey" parameterType="com.whyc.pojo.ProjectManage"> |
| | | update tb_project_manage |
| | | set pro_num = #{proNum,jdbcType=VARCHAR}, |
| | | pro_name = #{proName,jdbcType=VARCHAR}, |
| | | pro_name_code = #{proNameCode,jdbcType=VARCHAR}, |
| | | pro_sort = #{proSort,jdbcType=VARCHAR}, |
| | | pro_admin = #{proAdmin,jdbcType=VARCHAR}, |
| | | pro_department = #{proDepartment,jdbcType=VARCHAR}, |
| | | pro_tel = #{proTel,jdbcType=VARCHAR}, |
| | | pro_createdate = #{proCreatedate,jdbcType=DATE}, |
| | | pro_execution_date = #{proExecutionDate,jdbcType=DATE}, |
| | | pro_execution_date1 = #{proExecutionDate1,jdbcType=DATE}, |
| | | pro_archive_date = #{proArchiveDate,jdbcType=DATE}, |
| | | pro_person = #{proPerson,jdbcType=VARCHAR}, |
| | | pro_funding = #{proFunding,jdbcType=DECIMAL}, |
| | | pro_funding_source = #{proFundingSource,jdbcType=VARCHAR}, |
| | | pro_content = #{proContent,jdbcType=VARCHAR}, |
| | | pro_state = #{proState,jdbcType=INTEGER}, |
| | | pro_progress = #{proProgress,jdbcType=INTEGER}, |
| | | note = #{note,jdbcType=VARCHAR} |
| | | where num = #{num,jdbcType=INTEGER} |
| | | </update> |
| | | |
| | | <update id="updateManageState"> |
| | | update tb_project_manage |
| | | set pro_progress = #{proProgress,jdbcType=VARCHAR} |
| | |
| | | </update> |
| | | |
| | | <select id="searchAll" resultType="com.whyc.pojo.ProjectManage"> |
| | | SELECT * FROM db_experiment.tb_project_manage |
| | | SELECT pro_num, |
| | | pro_name, |
| | | pro_name_code, |
| | | pro_sort, |
| | | pro_admin, |
| | | pro_department, |
| | | pro_createdate, |
| | | pro_execution_date, |
| | | pro_execution_date1, |
| | | pro_state |
| | | FROM db_experiment.tb_project_manage |
| | | </select> |
| | | <select id="searchByCondition" resultType="com.whyc.pojo.ProjectManage"> |
| | | SELECT * |
| | | SELECT pro_num, |
| | | pro_name, |
| | | pro_name_code, |
| | | pro_sort, |
| | | pro_admin, |
| | | pro_department, |
| | | pro_createdate, |
| | | pro_execution_date, |
| | | pro_execution_date1, |
| | | pro_state |
| | | FROM db_experiment.tb_project_manage |
| | | where pro_createdate = #{proCreatedate} |
| | | and pro_sort = #{proSort} |
| | |
| | | SELECT * |
| | | FROM db_experiment.tb_project_manage |
| | | where pro_num = #{proNum} |
| | | and pro_name_code = #{proNameCode} |
| | | and pro_name_code = #{proNameCode} limit 1; |
| | | </select> |
| | | <select id="checkUniqueId" resultType="java.lang.Integer"> |
| | | SELECT count(*) num |
| | |
| | | where pro_name_code = #{proNameCode} |
| | | </select> |
| | | |
| | | <select id="searchArchiveAll" resultType="com.whyc.pojo.ProjectManage"> |
| | | SELECT pro_num, |
| | | pro_name, |
| | | pro_name_code, |
| | | pro_sort, |
| | | pro_admin, |
| | | pro_execution_date, |
| | | pro_execution_date1, |
| | | pro_archive_date |
| | | FROM db_experiment.tb_project_manage pm |
| | | </select> |
| | | <select id="searchArchiveByCondition" resultType="com.whyc.pojo.ProjectManage"> |
| | | SELECT pro_num, |
| | | pro_name, |
| | | pro_name_code, |
| | | pro_sort, |
| | | pro_admin, |
| | | pro_execution_date, |
| | | pro_execution_date1, |
| | | pro_archive_date |
| | | FROM db_experiment.tb_project_manage |
| | | where pro_num = #{proNum} |
| | | and pro_sort = #{proSort} |
| | | and pro_execution_date = #{proExecutionDate} |
| | | or pro_archive_date = #{proArchiveDate} |
| | | </select> |
| | | |
| | | <select id="searchArchiveProjectInfo" resultType="com.whyc.pojo.ProjectManage"> |
| | | SELECT pro_name, |
| | | pro_name_code, |
| | | pro_sort, |
| | | pro_funding, |
| | | pro_execution_date, |
| | | pro_execution_date1, |
| | | pro_admin |
| | | FROM db_experiment.tb_project_manage |
| | | where pro_num = #{proNum} |
| | | and pro_name_code = #{proNameCode} limit 1 |
| | | </select> |
| | | |
| | | |
| | | </mapper> |