Compare commits

...

2 Commits

Author SHA1 Message Date
liuwu 959180859a Merge remote-tracking branch 'origin/master'
# Conflicts:
#	cyx-admin/src/main/resources/templates/base/affairs/affairs.html
2023-08-28 17:08:18 +08:00
liuwu f250de843d 修改代码 2023-08-28 17:07:11 +08:00
26 changed files with 1418 additions and 33 deletions

View File

@ -1,5 +1,6 @@
package com.cyx.web.base.controller;
import java.util.Date;
import java.util.List;
import java.util.Map;
@ -9,6 +10,12 @@ import com.cyx.common.core.domain.AjaxResult;
import com.cyx.common.core.page.TableDataInfo;
import com.cyx.common.enums.BusinessType;
import com.cyx.common.utils.poi.ExcelUtil;
import com.cyx.web.base.domain.TAmentCommitHis;
import com.cyx.web.base.domain.TAmentPersonnel;
import com.cyx.web.base.domain.TAmentReviewedHis;
import com.cyx.web.base.service.ITAmentCommitHisService;
import com.cyx.web.base.service.ITAmentPersonnelService;
import com.cyx.web.base.service.ITAmentReviewedHisService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
@ -55,6 +62,10 @@ public class TAmentPartyAffairsController extends BaseController
@Autowired
private ITAmentPartyAffairsService tAmentPartyAffairsService;
@Autowired
private ITAmentCommitHisService commitHisService;
@Autowired
private ITAmentReviewedHisService reviewedHisService;
/**
* 党务及意识形态
* @return
@ -77,6 +88,60 @@ public class TAmentPartyAffairsController extends BaseController
return prefix + "/upload";
}
/**
*
* @return
*/
@RequiresPermissions("base:affairs:view")
@GetMapping("reviewed")
public String reviewed()
{
return prefix + "/reviewed";
}
/**
* 提交附件
*/
@RequiresPermissions("base:affairs:edit")
@Log(title = "党务", businessType = BusinessType.UPDATE)
@PostMapping("/commit")
@ResponseBody
public AjaxResult commit(TAmentPartyAffairs tAmentPartyAffairs)
{
TAmentCommitHis his = new TAmentCommitHis();
his.setPer(tAmentPartyAffairs.getHeader());
his.setDept(tAmentPartyAffairs.getDeptName());
his.setTarget(tAmentPartyAffairs.getShotName());
his.setCommitTime(new Date());
his.setDept(tAmentPartyAffairs.getDeptName());
his.setRemark(tAmentPartyAffairs.getRemark());
his.setFiles(tAmentPartyAffairs.getFiles());
tAmentPartyAffairs.setStatus("2");
commitHisService.insertTAmentCommitHis(his);
tAmentPartyAffairs.setCommitId(his.getId());
return toAjax(tAmentPartyAffairsService.updateTAmentPartyAffairs(tAmentPartyAffairs));
}
/**
* 审核
*/
@RequiresPermissions("base:affairs:edit")
@Log(title = "党务", businessType = BusinessType.UPDATE)
@GetMapping("/reviewedSave")
@ResponseBody
public AjaxResult reviewedSave(TAmentPartyAffairs tAmentPartyAffairs)
{
TAmentReviewedHis his = new TAmentReviewedHis();
his.setPer(tAmentPartyAffairs.getReviewer());
his.setReviewedTime(new Date());
his.setScore(tAmentPartyAffairs.getScore());
his.setRemark(tAmentPartyAffairs.getRemark());
reviewedHisService.insertTAmentReviewedHis(his);
tAmentPartyAffairs.setReviewedId(his.getId());
tAmentPartyAffairs.setStatus("4");
return toAjax(tAmentPartyAffairsService.updateTAmentPartyAffairs(tAmentPartyAffairs));
}
@RequiresPermissions("base:affairs:view")
@GetMapping("viewImages")
public String viewImages()
@ -184,6 +249,7 @@ public class TAmentPartyAffairsController extends BaseController
public AjaxResult addSave(TAmentPartyAffairs tAmentPartyAffairs)
{
tAmentPartyAffairs.setUnit(getSysUser().getDept().getDeptName());
tAmentPartyAffairs.setStatus("1");
return toAjax(tAmentPartyAffairsService.insertTAmentPartyAffairs(tAmentPartyAffairs));
}

View File

@ -0,0 +1,112 @@
package com.cyx.web.base.domain;
import java.util.Date;
import com.cyx.common.annotation.Excel;
import com.cyx.common.core.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* 提交记录对象 t_ament_commit_his
*
* @author ruoyi
* @date 2023-08-28
*/
public class TAmentCommitHis extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** */
private Long id;
/** 提交人 */
@Excel(name = "提交人")
private String per;
/** 提交时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "提交时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date commitTime;
/** 部门 */
@Excel(name = "部门")
private String dept;
/** 指标 */
@Excel(name = "指标")
private String target;
/** 附件信息 */
@Excel(name = "附件信息")
private String files;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setPer(String per)
{
this.per = per;
}
public String getPer()
{
return per;
}
public void setCommitTime(Date commitTime)
{
this.commitTime = commitTime;
}
public Date getCommitTime()
{
return commitTime;
}
public void setDept(String dept)
{
this.dept = dept;
}
public String getDept()
{
return dept;
}
public void setTarget(String target)
{
this.target = target;
}
public String getTarget()
{
return target;
}
public void setFiles(String files)
{
this.files = files;
}
public String getFiles()
{
return files;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("per", getPer())
.append("commitTime", getCommitTime())
.append("dept", getDept())
.append("target", getTarget())
.append("remark", getRemark())
.append("files", getFiles())
.toString();
}
}

View File

@ -29,10 +29,48 @@ public class TAmentPartyAffairs extends BaseEntity
// @Excel(name = "单位名称")
private String unit;
private String shotName;
public String getShotName() {
return shotName;
}
public void setShotName(String shotName) {
this.shotName = shotName;
}
/** 目标项及分值 */
@Excel(name = "目标项及分值")
private String target;
private String status;
private Long commitId;
private Long reviewedId;
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public Long getCommitId() {
return commitId;
}
public void setCommitId(Long commitId) {
this.commitId = commitId;
}
public Long getReviewedId() {
return reviewedId;
}
public void setReviewedId(Long reviewedId) {
this.reviewedId = reviewedId;
}
/** 目标要求 */
@Excel(name = "目标要求")
private String demand;

View File

@ -0,0 +1,84 @@
package com.cyx.web.base.domain;
import java.util.Date;
import com.cyx.common.annotation.Excel;
import com.cyx.common.core.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* 审批记录信息对象 t_ament_reviewed_his
*
* @author ruoyi
* @date 2023-08-28
*/
public class TAmentReviewedHis extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** */
private Long id;
/** 审批人 */
@Excel(name = "审批人")
private String per;
/** 审批时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "审批时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date reviewedTime;
/** 审批得分 */
@Excel(name = "审批得分")
private String score;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setPer(String per)
{
this.per = per;
}
public String getPer()
{
return per;
}
public void setReviewedTime(Date reviewedTime)
{
this.reviewedTime = reviewedTime;
}
public Date getReviewedTime()
{
return reviewedTime;
}
public void setScore(String score)
{
this.score = score;
}
public String getScore()
{
return score;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("per", getPer())
.append("reviewedTime", getReviewedTime())
.append("remark", getRemark())
.append("score", getScore())
.toString();
}
}

View File

@ -0,0 +1,61 @@
package com.cyx.web.base.mapper;
import java.util.List;
import com.cyx.web.base.domain.TAmentCommitHis;
/**
* 提交记录Mapper接口
*
* @author ruoyi
* @date 2023-08-28
*/
public interface TAmentCommitHisMapper
{
/**
* 查询提交记录
*
* @param id 提交记录主键
* @return 提交记录
*/
public TAmentCommitHis selectTAmentCommitHisById(Long id);
/**
* 查询提交记录列表
*
* @param tAmentCommitHis 提交记录
* @return 提交记录集合
*/
public List<TAmentCommitHis> selectTAmentCommitHisList(TAmentCommitHis tAmentCommitHis);
/**
* 新增提交记录
*
* @param tAmentCommitHis 提交记录
* @return 结果
*/
public int insertTAmentCommitHis(TAmentCommitHis tAmentCommitHis);
/**
* 修改提交记录
*
* @param tAmentCommitHis 提交记录
* @return 结果
*/
public int updateTAmentCommitHis(TAmentCommitHis tAmentCommitHis);
/**
* 删除提交记录
*
* @param id 提交记录主键
* @return 结果
*/
public int deleteTAmentCommitHisById(Long id);
/**
* 批量删除提交记录
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteTAmentCommitHisByIds(String[] ids);
}

View File

@ -0,0 +1,61 @@
package com.cyx.web.base.mapper;
import java.util.List;
import com.cyx.web.base.domain.TAmentReviewedHis;
/**
* 审批记录信息Mapper接口
*
* @author ruoyi
* @date 2023-08-28
*/
public interface TAmentReviewedHisMapper
{
/**
* 查询审批记录信息
*
* @param id 审批记录信息主键
* @return 审批记录信息
*/
public TAmentReviewedHis selectTAmentReviewedHisById(Long id);
/**
* 查询审批记录信息列表
*
* @param tAmentReviewedHis 审批记录信息
* @return 审批记录信息集合
*/
public List<TAmentReviewedHis> selectTAmentReviewedHisList(TAmentReviewedHis tAmentReviewedHis);
/**
* 新增审批记录信息
*
* @param tAmentReviewedHis 审批记录信息
* @return 结果
*/
public int insertTAmentReviewedHis(TAmentReviewedHis tAmentReviewedHis);
/**
* 修改审批记录信息
*
* @param tAmentReviewedHis 审批记录信息
* @return 结果
*/
public int updateTAmentReviewedHis(TAmentReviewedHis tAmentReviewedHis);
/**
* 删除审批记录信息
*
* @param id 审批记录信息主键
* @return 结果
*/
public int deleteTAmentReviewedHisById(Long id);
/**
* 批量删除审批记录信息
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteTAmentReviewedHisByIds(String[] ids);
}

View File

@ -0,0 +1,61 @@
package com.cyx.web.base.service;
import java.util.List;
import com.cyx.web.base.domain.TAmentCommitHis;
/**
* 提交记录Service接口
*
* @author ruoyi
* @date 2023-08-28
*/
public interface ITAmentCommitHisService
{
/**
* 查询提交记录
*
* @param id 提交记录主键
* @return 提交记录
*/
public TAmentCommitHis selectTAmentCommitHisById(Long id);
/**
* 查询提交记录列表
*
* @param tAmentCommitHis 提交记录
* @return 提交记录集合
*/
public List<TAmentCommitHis> selectTAmentCommitHisList(TAmentCommitHis tAmentCommitHis);
/**
* 新增提交记录
*
* @param tAmentCommitHis 提交记录
* @return 结果
*/
public int insertTAmentCommitHis(TAmentCommitHis tAmentCommitHis);
/**
* 修改提交记录
*
* @param tAmentCommitHis 提交记录
* @return 结果
*/
public int updateTAmentCommitHis(TAmentCommitHis tAmentCommitHis);
/**
* 批量删除提交记录
*
* @param ids 需要删除的提交记录主键集合
* @return 结果
*/
public int deleteTAmentCommitHisByIds(String ids);
/**
* 删除提交记录信息
*
* @param id 提交记录主键
* @return 结果
*/
public int deleteTAmentCommitHisById(Long id);
}

View File

@ -0,0 +1,61 @@
package com.cyx.web.base.service;
import java.util.List;
import com.cyx.web.base.domain.TAmentReviewedHis;
/**
* 审批记录信息Service接口
*
* @author ruoyi
* @date 2023-08-28
*/
public interface ITAmentReviewedHisService
{
/**
* 查询审批记录信息
*
* @param id 审批记录信息主键
* @return 审批记录信息
*/
public TAmentReviewedHis selectTAmentReviewedHisById(Long id);
/**
* 查询审批记录信息列表
*
* @param tAmentReviewedHis 审批记录信息
* @return 审批记录信息集合
*/
public List<TAmentReviewedHis> selectTAmentReviewedHisList(TAmentReviewedHis tAmentReviewedHis);
/**
* 新增审批记录信息
*
* @param tAmentReviewedHis 审批记录信息
* @return 结果
*/
public int insertTAmentReviewedHis(TAmentReviewedHis tAmentReviewedHis);
/**
* 修改审批记录信息
*
* @param tAmentReviewedHis 审批记录信息
* @return 结果
*/
public int updateTAmentReviewedHis(TAmentReviewedHis tAmentReviewedHis);
/**
* 批量删除审批记录信息
*
* @param ids 需要删除的审批记录信息主键集合
* @return 结果
*/
public int deleteTAmentReviewedHisByIds(String ids);
/**
* 删除审批记录信息信息
*
* @param id 审批记录信息主键
* @return 结果
*/
public int deleteTAmentReviewedHisById(Long id);
}

View File

@ -0,0 +1,95 @@
package com.cyx.web.base.service.impl;
import java.util.List;
import com.cyx.common.core.text.Convert;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.cyx.web.base.mapper.TAmentCommitHisMapper;
import com.cyx.web.base.domain.TAmentCommitHis;
import com.cyx.web.base.service.ITAmentCommitHisService;
/**
* 提交记录Service业务层处理
*
* @author ruoyi
* @date 2023-08-28
*/
@Service
public class TAmentCommitHisServiceImpl implements ITAmentCommitHisService
{
@Autowired
private TAmentCommitHisMapper tAmentCommitHisMapper;
/**
* 查询提交记录
*
* @param id 提交记录主键
* @return 提交记录
*/
@Override
public TAmentCommitHis selectTAmentCommitHisById(Long id)
{
return tAmentCommitHisMapper.selectTAmentCommitHisById(id);
}
/**
* 查询提交记录列表
*
* @param tAmentCommitHis 提交记录
* @return 提交记录
*/
@Override
public List<TAmentCommitHis> selectTAmentCommitHisList(TAmentCommitHis tAmentCommitHis)
{
return tAmentCommitHisMapper.selectTAmentCommitHisList(tAmentCommitHis);
}
/**
* 新增提交记录
*
* @param tAmentCommitHis 提交记录
* @return 结果
*/
@Override
public int insertTAmentCommitHis(TAmentCommitHis tAmentCommitHis)
{
return tAmentCommitHisMapper.insertTAmentCommitHis(tAmentCommitHis);
}
/**
* 修改提交记录
*
* @param tAmentCommitHis 提交记录
* @return 结果
*/
@Override
public int updateTAmentCommitHis(TAmentCommitHis tAmentCommitHis)
{
return tAmentCommitHisMapper.updateTAmentCommitHis(tAmentCommitHis);
}
/**
* 批量删除提交记录
*
* @param ids 需要删除的提交记录主键
* @return 结果
*/
@Override
public int deleteTAmentCommitHisByIds(String ids)
{
return tAmentCommitHisMapper.deleteTAmentCommitHisByIds(Convert.toStrArray(ids));
}
/**
* 删除提交记录信息
*
* @param id 提交记录主键
* @return 结果
*/
@Override
public int deleteTAmentCommitHisById(Long id)
{
return tAmentCommitHisMapper.deleteTAmentCommitHisById(id);
}
}

View File

@ -0,0 +1,95 @@
package com.cyx.web.base.service.impl;
import java.util.List;
import com.cyx.common.core.text.Convert;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.cyx.web.base.mapper.TAmentReviewedHisMapper;
import com.cyx.web.base.domain.TAmentReviewedHis;
import com.cyx.web.base.service.ITAmentReviewedHisService;
/**
* 审批记录信息Service业务层处理
*
* @author ruoyi
* @date 2023-08-28
*/
@Service
public class TAmentReviewedHisServiceImpl implements ITAmentReviewedHisService
{
@Autowired
private TAmentReviewedHisMapper tAmentReviewedHisMapper;
/**
* 查询审批记录信息
*
* @param id 审批记录信息主键
* @return 审批记录信息
*/
@Override
public TAmentReviewedHis selectTAmentReviewedHisById(Long id)
{
return tAmentReviewedHisMapper.selectTAmentReviewedHisById(id);
}
/**
* 查询审批记录信息列表
*
* @param tAmentReviewedHis 审批记录信息
* @return 审批记录信息
*/
@Override
public List<TAmentReviewedHis> selectTAmentReviewedHisList(TAmentReviewedHis tAmentReviewedHis)
{
return tAmentReviewedHisMapper.selectTAmentReviewedHisList(tAmentReviewedHis);
}
/**
* 新增审批记录信息
*
* @param tAmentReviewedHis 审批记录信息
* @return 结果
*/
@Override
public int insertTAmentReviewedHis(TAmentReviewedHis tAmentReviewedHis)
{
return tAmentReviewedHisMapper.insertTAmentReviewedHis(tAmentReviewedHis);
}
/**
* 修改审批记录信息
*
* @param tAmentReviewedHis 审批记录信息
* @return 结果
*/
@Override
public int updateTAmentReviewedHis(TAmentReviewedHis tAmentReviewedHis)
{
return tAmentReviewedHisMapper.updateTAmentReviewedHis(tAmentReviewedHis);
}
/**
* 批量删除审批记录信息
*
* @param ids 需要删除的审批记录信息主键
* @return 结果
*/
@Override
public int deleteTAmentReviewedHisByIds(String ids)
{
return tAmentReviewedHisMapper.deleteTAmentReviewedHisByIds(Convert.toStrArray(ids));
}
/**
* 删除审批记录信息信息
*
* @param id 审批记录信息主键
* @return 结果
*/
@Override
public int deleteTAmentReviewedHisById(Long id)
{
return tAmentReviewedHisMapper.deleteTAmentReviewedHisById(id);
}
}

View File

@ -124,7 +124,7 @@
actions.push('<a data-files="'+row.events+'" data-type="1" class="viewFiles0828 btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)"><i class="fa fa-edit"></i>查看图片</a> ');
actions.push('<a data-files="'+row.events+'" data-type="2" class="viewFiles0828 btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)"><i class="fa fa-edit"></i>下载文件</a> ');
actions.push('<a data-id="'+row.id+'" class="openUpload btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)"><i class="fa fa-edit"></i>上传附件</a> ');
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>查看详情</a> ');
actions.push('<a class="btn btn-default btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>查看详情</a> ');
// actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}

View File

@ -108,7 +108,7 @@
actions.push('<a data-files="'+row.events+'" data-type="1" class="viewFiles0828 btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)"><i class="fa fa-edit"></i>查看图片</a> ');
actions.push('<a data-files="'+row.events+'" data-type="2" class="viewFiles0828 btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)"><i class="fa fa-edit"></i>下载文件</a> ');
actions.push('<a data-id="'+row.id+'" class="openUpload btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)"><i class="fa fa-edit"></i>上传附件</a> ');
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>查看详情</a> ');
actions.push('<a class="btn btn-default btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>查看详情</a> ');
// actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
// actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');

View File

@ -34,7 +34,7 @@
<div class="form-group">
<label class="col-sm-3 control-label" id="demand">目标要求:</label>
<div class="col-sm-8">
<textarea required name="demand" class="form-control"></textarea>
<textarea name="demand" class="form-control"></textarea>
</div>
</div>
<div class="form-group">
@ -58,7 +58,7 @@
<div class="form-group">
<label class="col-sm-3 control-label">负责人:</label>
<div class="col-sm-8">
<select name="head" id="head" class="form-control m-b">
<select required name="head" id="head" class="form-control m-b">
<option value="">请选择</option>
</select>
</div>
@ -66,7 +66,7 @@
<div class="form-group">
<label class="col-sm-3 control-label">审核人:</label>
<div class="col-sm-8">
<select name="reviewed" id="reviewed" class="form-control m-b">
<select required name="reviewed" id="reviewed" class="form-control m-b">
<option value="">请选择</option>
</select>
</div>
@ -75,7 +75,7 @@
<label class="col-sm-3 control-label">完成截止时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="finishDate" class="form-control" placeholder="yyyy-MM-dd" type="text">
<input required name="finishDate" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
@ -128,7 +128,7 @@
data: {
},
success: function(data) {
var opt = '';
var opt = '<option value="">请选择</option>';
data.data.forEach(d=>{
opt += '<option value="'+d.id+'">'+d.name+'</option>';
})
@ -144,7 +144,7 @@
data: {
},
success: function(data) {
var opt = '';
var opt = '<option value="">请选择</option>';
data.data.forEach(d=>{
opt += '<option value="'+d.deptId+'">'+d.deptName+'</option>';
})
@ -158,7 +158,7 @@
data: {
},
success: function(data) {
var opt = '';
var opt = '<option value="">请选择</option>';
data.data.forEach(d=>{
opt += '<option value="'+d.branchId+'">'+d.branchName+'</option>';
})

View File

@ -113,6 +113,10 @@
field: 'target',
title: '目标项'
},
{
field: 'shotName',
title: '简写'
},
{
field: 'demand',
title: '目标要求',
@ -135,6 +139,10 @@
field: 'score',
title: '达标分'
},
{
field: 'nowScore',
title: '当前得分'
},
{
field: 'method',
title: '考核方式',
@ -181,6 +189,17 @@
actions.push('<a data-files="'+row.files+'" data-type="2" class="viewFiles0828 btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)"><i class="fa fa-edit"></i>下载文件</a> ');
actions.push('<a data-id="'+row.id+'" class="openUpload btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)"><i class="fa fa-edit"></i>上传附件</a> ');
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>查看详情</a> ');
if (row.status === '1'){
actions.push('<a data-id="'+row.id+'" data-header="'+row.header+'" data-shotname="'+row.shotName+'" data-deptname="'+row.deptName+'" class="openUpload btn btn-primary btn-xs ' + editFlag + '" href="javascript:void(0)"><i class="fa fa-upload"></i>上传附件</a> ');
}else if (row.status === '2'){
actions.push('<a class="btn btn-default btn-xs" href="javascript:void(0)">待审核</a> ');
}else if(row.status === '3'){
actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)">已驳回</a> ');
actions.push('<a data-id="'+row.id+'" data-header="'+row.header+'" data-shotname="'+row.shotName+'" data-deptname="'+row.deptName+'" class="openUpload btn btn-primary btn-xs ' + editFlag + '" href="javascript:void(0)"><i class="fa fa-upload"></i>重新上传附件</a> ');
}else if (row.status === '4'){
actions.push('<a class="btn btn-primary btn-xs" href="javascript:void(0)">已完成</a> ');
}
actions.push('<a class="btn btn-default btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>查看详情</a> ');
// actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
// actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
@ -191,6 +210,9 @@
$.table.init(options);
$("#bootstrap-table").on('click',".openUpload",function () {
let _id = $(this)[0].dataset.id;
let header = $(this)[0].dataset.header;
let deptName = $(this)[0].dataset.deptname;
let shotName = $(this)[0].dataset.shotname;
layer.open({
title:'上传附件',
area:['80%','80%'],
@ -199,6 +221,9 @@
success(res,index){
//传值
parent.a_upload_id = _id;
parent.a_header = header;
parent.a_deptName = deptName;
parent.a_shotName = shotName;
parent.a_upload_index = index;
parent.a_upload_type = "1";
},

View File

@ -113,6 +113,10 @@
field: 'target',
title: '考核内容'
},
{
field: 'shotName',
title: '简写'
},
{
field: 'demand',
title: '考核目标',
@ -188,7 +192,7 @@
actions.push('<a data-files="'+row.files+'" data-type="1" class="viewFiles0828 btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)"><i class="fa fa-edit"></i>查看图片</a> ');
actions.push('<a data-files="'+row.files+'" data-type="2" class="viewFiles0828 btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)"><i class="fa fa-edit"></i>下载文件</a> ');
actions.push('<a data-id="'+row.id+'" class="openUpload btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)"><i class="fa fa-edit"></i>上传附件</a> ');
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>查看详情</a> ');
actions.push('<a class="btn btn-default btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>查看详情</a> ');
// actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
// actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');

View File

@ -111,7 +111,16 @@
},
{
field: 'target',
title: '责任类别'
title: '责任类别',
width:200,
align: 'center',
formatter: function(value, row, index) {
return $.table.tooltip(value);
}
},
{
field: 'shotName',
title: '简写'
},
{
field: 'demand',
@ -180,7 +189,7 @@
actions.push('<a data-files="'+row.files+'" data-type="1" class="viewFiles0828 btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)"><i class="fa fa-edit"></i>查看图片</a> ');
actions.push('<a data-files="'+row.files+'" data-type="2" class="viewFiles0828 btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)"><i class="fa fa-edit"></i>下载文件</a> ');
actions.push('<a data-id="'+row.id+'" class="openUpload btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)"><i class="fa fa-edit"></i>上传附件</a> ');
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>查看详情</a> ');
actions.push('<a class="btn btn-default btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>查看详情</a> ');
// actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
// actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');

View File

@ -0,0 +1,108 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('修改党务')" />
<th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m-t" id="commentForm">
<input id="id" readonly type="hidden" class="form-control" name="id">
<div class="row">
<div class="form-group col-sm-6 col-md-6">
<label class="col-sm-4 col-md-4 control-label">提交时间</label>
<div class="col-sm-8 col-md-8">
<input type="text" required class="form-control" id="datetimepicker-demo-1" placeholder="yyyy-MM-dd HH:mm">
</div>
</div>
<div class="form-group col-sm-6 col-md-6">
<label class="col-sm-4 col-md-4 control-label">提交人</label>
<div class="col-sm-8 col-md-8">
<input id="header" readonly type="text" class="form-control" name="header">
</div>
</div>
<div class="form-group col-sm-6 col-md-6">
<label class="col-sm-4 col-md-4 control-label">部门</label>
<div class="col-sm-8 col-md-8">
<!-- <p class="form-control-static" id="dept" name="dept"></p>-->
<input id="deptName" readonly type="text" class="form-control" name="deptName">
</div>
</div>
<div class="form-group col-sm-6 col-md-6">
<label class="col-sm-4 col-md-4 control-label">提交指标</label>
<div class="col-sm-8 col-md-8">
<!-- <p class="form-control-static" id="shotName" name="shotName"></p>-->
<input id="shotName" readonly type="text" class="form-control" name="shotName">
</div>
</div>
<div class="form-group col-sm-6 col-md-6">
<label class="col-sm-4 col-md-4 control-label">审核人</label>
<div class="col-sm-8 col-md-8">
<input id="reviewer" readonly type="text" class="form-control" name="reviewer">
</div>
</div>
<div class="form-group col-sm-6 col-md-6">
<label class="col-sm-4 col-md-4 control-label">评分</label>
<div class="col-sm-8 col-md-8">
<input id="nowScore" required type="number" class="form-control" name="nowScore">
</div>
</div>
<div class="form-group col-sm-12 col-md-12">
<label class="col-sm-2 col-md-2 control-label">审批意见</label>
<div class="col-sm-10 col-md-10">
<textarea id="remark" required class="form-control" name="remark"></textarea>
</div>
</div>
</div>
</form>
<div class="form-group">
<div class="col-sm-4 col-sm-offset-3">
<button class="btn btn-primary" onclick="submitHandler()">通过</button>
<button class="btn btn-default">取消</button>
<button class="btn btn-danger" onclick="reback()">驳回</button>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
var prefix = ctx + "base/affairs";
$("#form-affairs-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
// console.log($('#commentForm').serialize())
$.ajax({
type: "get",
url: ctx + "base/affairs/reviewedSave?"+$('#commentForm').serialize(),
data: {
},
success: function(data) {
console.log(data)
}
});
}
}
function reback(id){
alert(id)
}
$("#datetimepicker-demo-1").datetimepicker();
let _id = parent.parent.a_upload_id;
let header = parent.parent.a_header;
let deptName = parent.parent.a_deptName;
let shotName = parent.parent.a_shotName;
let reviewer = parent.parent.a_reviewer;
$("#id").val(_id)
$("#reviewer").val(reviewer)
$("#shotName").val(shotName)
$("#header").val(header)
$("#deptName").val(deptName)
$("#commitTime").val(new Date())
</script>
</body>
</html>

View File

@ -36,14 +36,20 @@
// allowedFileExtensions: "image/*,.pdf,.xls,.xlsx,.docx,.doc", //接收的文件后缀
}).on('filebatchuploadsuccess', function (event, data, previewId, index) {
let _type = parent.parent.a_upload_type;
let _url = _type === '1'?'/base/affairs/edit':'/base/advancedparty/edit';
let _url = _type === '1'?'/base/affairs/commit':'/base/advancedparty/edit';
let _id = parent.parent.a_upload_id;
let header = parent.parent.a_header;
let deptName = parent.parent.a_deptName;
let shotName = parent.parent.a_shotName;
let _index = parent.parent.a_upload_index;
let _data = null;
let _fileNames = data.response.fileNames;
if(_type === '1'){
_data = {
id:_id,
header:header,
deptName:deptName,
shotName:shotName,
files:_fileNames
}
}else{
@ -52,6 +58,7 @@
events:_fileNames
}
}
console.log(_data)
$.ajax({
url:_url,
type:'post',

View File

@ -181,8 +181,15 @@
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.upload(\'' + row.id + '\')"><i class="fa fa-edit"></i>上传附件</a> ');
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>查看详情</a> ');
if (row.status === '1'){
actions.push('<a class="btn btn-primary btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.upload(\'' + row.id + '\')"><i class="fa fa-edit"></i>上传附件</a> ');
}else if (row.status === '2'){
actions.push('<a data-id="'+row.id+'" data-header="'+row.header+'" data-shotname="'+row.shotName+'" data-deptname="'+row.deptName+'" data-reviewer="'+row.reviewer+'" data-nowscore="'+row.nowScore+'" class="shenhe btn btn-primary btn-xs ' + editFlag + '" href="javascript:void(0)">审批</a> ');
}else if (row.status === '3'){
actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)">已驳回</a> ');
actions.push('<a class="btn btn-primary btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.upload(\'' + row.id + '\')"><i class="fa fa-edit"></i>重新上传附件</a> ');
}
actions.push('<a class="btn btn-default btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>查看详情</a> ');
// actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
// actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
@ -191,7 +198,36 @@
}]
};
$.table.init(options);
$("#bootstrap-table").on('click','.shenhe',function () {
let _id = $(this)[0].dataset.id;
let header = $(this)[0].dataset.header;
let nowScore = $(this)[0].dataset.nowscore;
let deptName = $(this)[0].dataset.deptname;
let shotName = $(this)[0].dataset.shotname;
let reviewer = $(this)[0].dataset.reviewer;
layer.open({
title:'审批',
area:['40%','50%'],
type:2,
content:'/base/affairs/reviewed',
success(res,index){
//传值
parent.a_upload_id = _id;
parent.a_header = header;
parent.a_nowScore = nowScore;
parent.a_deptName = deptName;
parent.a_shotName = shotName;
parent.a_reviewer = reviewer;
parent.a_upload_index = index;
parent.a_upload_type = "1";
},
end(){
$.table.search()
}
})
})
});
</script>
</body>
</html>

View File

@ -89,6 +89,10 @@
field: 'target',
title: '考核内容'
},
{
field: 'shotName',
title: '简写'
},
{
field: 'demand',
title: '考核目标',
@ -164,7 +168,7 @@
actions.push('<a data-files="'+row.files+'" data-type="1" class="viewFiles0828 btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)"><i class="fa fa-edit"></i>查看图片</a> ');
actions.push('<a data-files="'+row.files+'" data-type="2" class="viewFiles0828 btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)"><i class="fa fa-edit"></i>下载文件</a> ');
actions.push('<a data-id="'+row.id+'" class="openUpload btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)"><i class="fa fa-edit"></i>上传附件</a> ');
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>查看详情</a> ');
actions.push('<a class="btn btn-default btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>查看详情</a> ');
// actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
// actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');

View File

@ -0,0 +1,72 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('新增提交记录')" />
<th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-his-add">
<div class="form-group">
<label class="col-sm-3 control-label">提交人:</label>
<div class="col-sm-8">
<input name="per" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">提交时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="commitTime" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">部门:</label>
<div class="col-sm-8">
<input name="dept" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">指标:</label>
<div class="col-sm-8">
<input name="target" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注说明:</label>
<div class="col-sm-8">
<input name="remark" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">附件信息:</label>
<div class="col-sm-8">
<input name="files" class="form-control" type="text">
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
var prefix = ctx + "base/his"
$("#form-his-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-his-add').serialize());
}
}
$("input[name='commitTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>

View File

@ -0,0 +1,73 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('修改提交记录')" />
<th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-his-edit" th:object="${tAmentCommitHis}">
<input name="id" th:field="*{id}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">提交人:</label>
<div class="col-sm-8">
<input name="per" th:field="*{per}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">提交时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="commitTime" th:value="${#dates.format(tAmentCommitHis.commitTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">部门:</label>
<div class="col-sm-8">
<input name="dept" th:field="*{dept}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">指标:</label>
<div class="col-sm-8">
<input name="target" th:field="*{target}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注说明:</label>
<div class="col-sm-8">
<input name="remark" th:field="*{remark}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">附件信息:</label>
<div class="col-sm-8">
<input name="files" th:field="*{files}" class="form-control" type="text">
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
var prefix = ctx + "base/his";
$("#form-his-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-his-edit').serialize());
}
}
$("input[name='commitTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>

View File

@ -0,0 +1,122 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('提交记录列表')" />
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="formId">
<div class="select-list">
<ul>
<li>
<label>提交人:</label>
<input type="text" name="per"/>
</li>
<li>
<label>提交时间:</label>
<input type="text" class="time-input" placeholder="请选择提交时间" name="commitTime"/>
</li>
<li>
<label>部门:</label>
<input type="text" name="dept"/>
</li>
<li>
<label>指标:</label>
<input type="text" name="target"/>
</li>
<li>
<label>附件信息:</label>
<input type="text" name="files"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
</div>
</form>
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="base:his:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="base:his:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="base:his:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="base:his:export">
<i class="fa fa-download"></i> 导出
</a>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('base:his:edit')}]];
var removeFlag = [[${@permission.hasPermi('base:his:remove')}]];
var prefix = ctx + "base/his";
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
modalName: "提交记录",
columns: [{
checkbox: true
},
{
field: 'id',
title: '',
visible: false
},
{
field: 'per',
title: '提交人'
},
{
field: 'commitTime',
title: '提交时间'
},
{
field: 'dept',
title: '部门'
},
{
field: 'target',
title: '指标'
},
{
field: 'remark',
title: '备注说明'
},
{
field: 'files',
title: '附件信息'
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
}]
};
$.table.init(options);
});
</script>
</body>
</html>

View File

@ -0,0 +1,83 @@
<?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.cyx.web.base.mapper.TAmentCommitHisMapper">
<resultMap type="TAmentCommitHis" id="TAmentCommitHisResult">
<result property="id" column="id" />
<result property="per" column="per" />
<result property="commitTime" column="commit_time" />
<result property="dept" column="dept" />
<result property="target" column="target" />
<result property="remark" column="remark" />
<result property="files" column="files" />
</resultMap>
<sql id="selectTAmentCommitHisVo">
select id, per, commit_time, dept, target, remark, files from t_ament_commit_his
</sql>
<select id="selectTAmentCommitHisList" parameterType="TAmentCommitHis" resultMap="TAmentCommitHisResult">
<include refid="selectTAmentCommitHisVo"/>
<where>
<if test="per != null and per != ''"> and per = #{per}</if>
<if test="commitTime != null "> and commit_time = #{commitTime}</if>
<if test="dept != null and dept != ''"> and dept = #{dept}</if>
<if test="target != null and target != ''"> and target = #{target}</if>
<if test="files != null and files != ''"> and files = #{files}</if>
</where>
</select>
<select id="selectTAmentCommitHisById" parameterType="Long" resultMap="TAmentCommitHisResult">
<include refid="selectTAmentCommitHisVo"/>
where id = #{id}
</select>
<insert id="insertTAmentCommitHis" parameterType="TAmentCommitHis" useGeneratedKeys="true" keyProperty="id">
insert into t_ament_commit_his
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="per != null">per,</if>
<if test="commitTime != null">commit_time,</if>
<if test="dept != null">dept,</if>
<if test="target != null">target,</if>
<if test="remark != null">remark,</if>
<if test="files != null">files,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="per != null">#{per},</if>
<if test="commitTime != null">#{commitTime},</if>
<if test="dept != null">#{dept},</if>
<if test="target != null">#{target},</if>
<if test="remark != null">#{remark},</if>
<if test="files != null">#{files},</if>
</trim>
</insert>
<update id="updateTAmentCommitHis" parameterType="TAmentCommitHis">
update t_ament_commit_his
<trim prefix="SET" suffixOverrides=",">
<if test="per != null">per = #{per},</if>
<if test="commitTime != null">commit_time = #{commitTime},</if>
<if test="dept != null">dept = #{dept},</if>
<if test="target != null">target = #{target},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="files != null">files = #{files},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteTAmentCommitHisById" parameterType="Long">
delete from t_ament_commit_his where id = #{id}
</delete>
<delete id="deleteTAmentCommitHisByIds" parameterType="String">
delete from t_ament_commit_his where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -9,6 +9,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="type" column="type" />
<result property="unit" column="unit" />
<result property="target" column="target" />
<result property="status" column="status" />
<result property="demand" column="demand" />
<result property="detailed" column="detailed" />
<result property="score" column="score" />
@ -29,29 +30,45 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectTAmentPartyAffairsVo">
select id, type, files, unit, target, demand, detailed, score,now_score, method, head, reviewed, finish_date, per_id, dept_id, branch_id, create_by, create_time, update_by, update_time, remark from t_ament_party_affairs
select id, type, files, unit, target, status, demand, detailed, score,now_score, method, head, reviewed, finish_date, per_id, dept_id, branch_id, create_by, create_time, update_by, update_time, remark from t_ament_party_affairs
</sql>
<select id="selectTAmentPartyAffairsList" parameterType="TAmentPartyAffairs" resultMap="TAmentPartyAffairsResult">
<include refid="selectTAmentPartyAffairsVo"/>
SELECT
a.*,
ROUND( a.now_score / a.score * 100 ) percent,
a.shot_name shotName,
a.now_score nowScore,
b.`name` oprator,
c.`name` reviewer,
d.`name` header,
e.branch_name branch,
f.dept_name deptName
FROM
t_ament_party_affairs a
LEFT JOIN t_ament_personnel b ON a.per_id = b.id
LEFT JOIN t_ament_personnel c ON a.reviewed = c.id
LEFT JOIN t_ament_personnel d ON a.head = d.id
LEFT JOIN t_ament_branch e ON a.branch_id = e.branch_id
LEFT JOIN sys_dept f ON a.dept_id = f.dept_id
<where>
<if test="type != null and type != ''"> and type = #{type}</if>
<if test="unit != null and unit != ''"> and unit = #{unit}</if>
<if test="type != null and type != ''"> and a.type = #{type}</if>
<if test="unit != null and unit != ''"> and a.unit = #{unit}</if>
<if test="target != null and target != ''">
AND target like concat('%', #{target}, '%')
AND a.target like concat('%', #{target}, '%')
</if>
<if test="demand != null and demand != ''">
AND demand like concat('%', #{demand}, '%')
AND a.demand like concat('%', #{demand}, '%')
</if>
<if test="detailed != null and detailed != ''"> and detailed = #{detailed}</if>
<if test="score != null and score != ''"> and score = #{score}</if>
<if test="method != null and method != ''"> and method = #{method}</if>
<if test="head != null and head != ''"> and head = #{head}</if>
<if test="reviewed != null and reviewed != ''"> and reviewed = #{reviewed}</if>
<if test="finishDate != null "> and finish_date = #{finishDate}</if>
<if test="perId != null "> and per_id = #{perId}</if>
<if test="deptId != null "> and dept_id = #{deptId}</if>
<if test="branchId != null "> and branch_id = #{branchId}</if>
<if test="detailed != null and detailed != ''"> and a.detailed = #{detailed}</if>
<if test="score != null and score != ''"> and a.score = #{score}</if>
<if test="method != null and method != ''"> and a.method = #{method}</if>
<if test="head != null and head != ''"> and a.head = #{head}</if>
<if test="reviewed != null and reviewed != ''"> and a.reviewed = #{reviewed}</if>
<if test="finishDate != null "> and a.finish_date = #{finishDate}</if>
<if test="perId != null "> and a.per_id = #{perId}</if>
<if test="deptId != null "> and a.dept_id = #{deptId}</if>
<if test="branchId != null "> and a.branch_id = #{branchId}</if>
</where>
</select>
@ -73,8 +90,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="warnList" parameterType="TAmentPartyAffairs" resultMap="TAmentPartyAffairsResult">
<include refid="selectTAmentPartyAffairsVo"/>
where (now() > finish_date or datediff(finish_date,now()) &lt;=3)
SELECT
a.*,
ROUND( a.now_score / a.score * 100 ) percent,
a.shot_name shotName,
a.now_score nowScore,
b.`name` oprator,
c.`name` reviewer,
d.`name` header,
e.branch_name branch,
f.dept_name deptName
FROM
t_ament_party_affairs a
LEFT JOIN t_ament_personnel b ON a.per_id = b.id
LEFT JOIN t_ament_personnel c ON a.reviewed = c.id
LEFT JOIN t_ament_personnel d ON a.head = d.id
LEFT JOIN t_ament_branch e ON a.branch_id = e.branch_id
LEFT JOIN sys_dept f ON a.dept_id = f.dept_id
where (now() > a.finish_date or datediff(a.finish_date,now()) &lt;=3)
</select>
<select id="selectTAmentPartyAffairsById" parameterType="Long" resultMap="TAmentPartyAffairsResult">
@ -251,6 +284,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="files != null">files = #{files},</if>
<if test="commitId != null">commit_id = #{commitId},</if>
<if test="status != null">status = #{status},</if>
</trim>
where id = #{id}
</update>

View File

@ -0,0 +1,73 @@
<?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.cyx.web.base.mapper.TAmentReviewedHisMapper">
<resultMap type="TAmentReviewedHis" id="TAmentReviewedHisResult">
<result property="id" column="id" />
<result property="per" column="per" />
<result property="reviewedTime" column="reviewed_time" />
<result property="remark" column="remark" />
<result property="score" column="score" />
</resultMap>
<sql id="selectTAmentReviewedHisVo">
select id, per, reviewed_time, remark, score from t_ament_reviewed_his
</sql>
<select id="selectTAmentReviewedHisList" parameterType="TAmentReviewedHis" resultMap="TAmentReviewedHisResult">
<include refid="selectTAmentReviewedHisVo"/>
<where>
<if test="per != null and per != ''"> and per = #{per}</if>
<if test="reviewedTime != null "> and reviewed_time = #{reviewedTime}</if>
<if test="score != null and score != ''"> and score = #{score}</if>
</where>
</select>
<select id="selectTAmentReviewedHisById" parameterType="Long" resultMap="TAmentReviewedHisResult">
<include refid="selectTAmentReviewedHisVo"/>
where id = #{id}
</select>
<insert id="insertTAmentReviewedHis" parameterType="TAmentReviewedHis" useGeneratedKeys="true" keyProperty="id">
insert into t_ament_reviewed_his
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="per != null">per,</if>
<if test="reviewedTime != null">reviewed_time,</if>
<if test="remark != null">remark,</if>
<if test="score != null">score,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="per != null">#{per},</if>
<if test="reviewedTime != null">#{reviewedTime},</if>
<if test="remark != null">#{remark},</if>
<if test="score != null">#{score},</if>
</trim>
</insert>
<update id="updateTAmentReviewedHis" parameterType="TAmentReviewedHis">
update t_ament_reviewed_his
<trim prefix="SET" suffixOverrides=",">
<if test="per != null">per = #{per},</if>
<if test="reviewedTime != null">reviewed_time = #{reviewedTime},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="score != null">score = #{score},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteTAmentReviewedHisById" parameterType="Long">
delete from t_ament_reviewed_his where id = #{id}
</delete>
<delete id="deleteTAmentReviewedHisByIds" parameterType="String">
delete from t_ament_reviewed_his where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>