Commit 714f0dca by 284718418@qq.com

7.审批的流程中增加开封和未开封功能。

parent 96593e85
...@@ -61,6 +61,9 @@ public class SpmkExecutor extends Model<SpmkExecutor> { ...@@ -61,6 +61,9 @@ public class SpmkExecutor extends Model<SpmkExecutor> {
@ApiModelProperty(value = "状态 0未执行 1执行中 2同意 3拒接 4转派", example = "101") @ApiModelProperty(value = "状态 0未执行 1执行中 2同意 3拒接 4转派", example = "101")
private Integer sts; private Integer sts;
@ApiModelProperty(value = "阅读标记0.未读 1.已读", example = "0")
private Integer readStatus;
@TableField(fill = FieldFill.INSERT) @TableField(fill = FieldFill.INSERT)
@ApiModelProperty(value = "创建时间 ", example = "创建时间") @ApiModelProperty(value = "创建时间 ", example = "创建时间")
private Date createTime; private Date createTime;
......
...@@ -12,11 +12,11 @@ import cn.timer.api.utils.redis.RedisUtil; ...@@ -12,11 +12,11 @@ import cn.timer.api.utils.redis.RedisUtil;
import cn.timer.api.utils.router.RequestDataUtils; import cn.timer.api.utils.router.RequestDataUtils;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.toolkit.SerializationUtils; import com.baomidou.mybatisplus.core.toolkit.SerializationUtils;
import com.mysql.cj.util.StringUtils;
import net.sf.json.JSONArray; import net.sf.json.JSONArray;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.StringUtils;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.MethodArgumentNotValidException; import org.springframework.web.bind.MethodArgumentNotValidException;
import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.DeleteMapping;
...@@ -666,6 +666,7 @@ public class SpmkController { ...@@ -666,6 +666,7 @@ public class SpmkController {
.orgCode(userBean.getOrgCode()) .orgCode(userBean.getOrgCode())
.empNum(userBean.getEmpNum()) .empNum(userBean.getEmpNum())
.title(spmkApproveSummaryDto.getTitle()) .title(spmkApproveSummaryDto.getTitle())
.digest(spmkApproveSummaryDto.getDigest())
.initiator(spmkApproveSummaryDto.getInitiator()) .initiator(spmkApproveSummaryDto.getInitiator())
.approveName(spmkApproveSummaryDto.getApproveName()) .approveName(spmkApproveSummaryDto.getApproveName())
.assoType(spmkApproveSummaryDto.getAssoType()) .assoType(spmkApproveSummaryDto.getAssoType())
...@@ -744,8 +745,8 @@ public class SpmkController { ...@@ -744,8 +745,8 @@ public class SpmkController {
@ApiOperation(value = "19.审批详情", httpMethod = "GET", notes = "审批详情") @ApiOperation(value = "19.审批详情", httpMethod = "GET", notes = "审批详情")
@ApiOperationSupport(order = 19) @ApiOperationSupport(order = 19)
@Log(title = "审批-审批详情", businessType = BusinessType.OTHER) @Log(title = "审批-审批详情", businessType = BusinessType.OTHER)
public Result<Object> selectAd(@PathVariable(required = true) Integer id) { public Result<Object> selectAd(@CurrentUser UserBean userBean,@PathVariable(required = true) Integer id) {
SpmkApproveDetailDto adD = spmkService.selectApproveDetailByAsId(id); SpmkApproveDetailDto adD = spmkService.selectApproveDetailByAsId(id,userBean.getEmpNum());
System.out.println(ResultUtil.data(adD)); System.out.println(ResultUtil.data(adD));
return ResultUtil.data(adD); return ResultUtil.data(adD);
...@@ -920,7 +921,7 @@ public class SpmkController { ...@@ -920,7 +921,7 @@ public class SpmkController {
String requerstr = ""; String requerstr = "";
try { try {
SpmkApproveDetailSummary ad = spmkApproveDetailSummaryMapper.selectOne(new QueryWrapper<SpmkApproveDetailSummary>().lambda().eq(SpmkApproveDetailSummary::getApproveSummaryId, sp.getId())); SpmkApproveDetailSummary ad = spmkApproveDetailSummaryMapper.selectOne(new QueryWrapper<SpmkApproveDetailSummary>().lambda().eq(SpmkApproveDetailSummary::getApproveSummaryId, sp.getId()).last("limit 1"));
JSONObject as =jsonObject.parseObject(ad.getRequestData().toString(),JSONObject.class); JSONObject as =jsonObject.parseObject(ad.getRequestData().toString(),JSONObject.class);
// Logoutput(as); // Logoutput(as);
...@@ -957,6 +958,9 @@ public class SpmkController { ...@@ -957,6 +958,9 @@ public class SpmkController {
e.printStackTrace(); e.printStackTrace();
} }
// Logoutput(requerstr); // Logoutput(requerstr);
if(!StringUtils.isEmpty(sp.getDigest())){
requerstr = requerstr+","+sp.getDigest();
}
sp.setDigest(requerstr); sp.setDigest(requerstr);
} }
......
...@@ -10,7 +10,7 @@ public interface SpmkService { ...@@ -10,7 +10,7 @@ public interface SpmkService {
boolean createCustomApproval(Integer orgCode); boolean createCustomApproval(Integer orgCode);
SpmkApproveDetailDto selectApproveDetailByAsId(Integer asId); SpmkApproveDetailDto selectApproveDetailByAsId(Integer asId,Integer empNum);
List<SpmkApprovalG> selectListAg(UserBean userBean); List<SpmkApprovalG> selectListAg(UserBean userBean);
......
...@@ -12,6 +12,7 @@ import cn.timer.api.dao.spmk.*; ...@@ -12,6 +12,7 @@ import cn.timer.api.dao.spmk.*;
import cn.timer.api.dto.spmk.FlowChildren; import cn.timer.api.dto.spmk.FlowChildren;
import cn.timer.api.dto.spmk.Router; import cn.timer.api.dto.spmk.Router;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -87,9 +88,12 @@ public class SpmkServiceImpl implements SpmkService{ ...@@ -87,9 +88,12 @@ public class SpmkServiceImpl implements SpmkService{
/** /**
* 根据审批汇总id 获取 审批详情 * 根据审批汇总id 获取 审批详情
* @param asId
* @param empNum
* @return
*/ */
@Override @Override
public SpmkApproveDetailDto selectApproveDetailByAsId(Integer asId) { public SpmkApproveDetailDto selectApproveDetailByAsId(Integer asId,Integer empNum) {
// TODO Auto-generated method stub // TODO Auto-generated method stub
//SpmkApproveDetail ad = spmkApproveDetailMapper.selectOne(new QueryWrapper<SpmkApproveDetail>().lambda().eq(SpmkApproveDetail::getApproveSummaryId, asId)); //SpmkApproveDetail ad = spmkApproveDetailMapper.selectOne(new QueryWrapper<SpmkApproveDetail>().lambda().eq(SpmkApproveDetail::getApproveSummaryId, asId));
//审批详情 //审批详情
...@@ -121,6 +125,11 @@ public class SpmkServiceImpl implements SpmkService{ ...@@ -121,6 +125,11 @@ public class SpmkServiceImpl implements SpmkService{
adD.setFlowChildren(jsonObject.parseArray(ad.getFlowChildren(), FlowChildren.class)); adD.setFlowChildren(jsonObject.parseArray(ad.getFlowChildren(), FlowChildren.class));
} }
adD.setApproveExecuteRecord(listAer); adD.setApproveExecuteRecord(listAer);
/*** 标记 执行人 阅读 ***/
if(!CollectionUtils.isEmpty(listAer)){
this.updateSpmkExecutorReadStatus(listAer,empNum);
}
/*** 标记执行人阅读 结束***/
if(sum != null) { if(sum != null) {
adD.setEmpNum(sum.getEmpNum()); adD.setEmpNum(sum.getEmpNum());
adD.setSts(sum.getSts()); adD.setSts(sum.getSts());
...@@ -207,4 +216,21 @@ public class SpmkServiceImpl implements SpmkService{ ...@@ -207,4 +216,21 @@ public class SpmkServiceImpl implements SpmkService{
return "成功"; return "成功";
} }
/**
* 标记 执行人 阅读
* @param listAer
* @param empNum
*/
private void updateSpmkExecutorReadStatus(List<SpmkApproveExecuteRecord> listAer, Integer empNum){
for (SpmkApproveExecuteRecord entity:listAer ) {
if(!CollectionUtils.isEmpty(entity.getSpmkExecutors())){
for (SpmkExecutor se:entity.getSpmkExecutors()) {
if(empNum.equals(se.getEmpNum()) && 0 == se.getReadStatus()){
SpmkExecutor.builder().id(se.getId()).readStatus(1).build().updateById();
}
}
}
}
}
} }
...@@ -54,6 +54,7 @@ ...@@ -54,6 +54,7 @@
b.operator_header_url SpmkExecutor_operator_header_url, b.operator_header_url SpmkExecutor_operator_header_url,
b.opinion SpmkExecutor_opinion, b.opinion SpmkExecutor_opinion,
b.sts SpmkExecutor_sts, b.sts SpmkExecutor_sts,
b.read_status SpmkExecutor_read_status,
b.create_time SpmkExecutor_create_time, b.create_time SpmkExecutor_create_time,
b.update_time SpmkExecutor_update_time, b.update_time SpmkExecutor_update_time,
b.signature_img SpmkExecutor_signature_img b.signature_img SpmkExecutor_signature_img
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
<result column="operator_header_url" property="operatorHeaderUrl" /> <result column="operator_header_url" property="operatorHeaderUrl" />
<result column="opinion" property="opinion" /> <result column="opinion" property="opinion" />
<result column="sts" property="sts" /> <result column="sts" property="sts" />
<result column="read_status" property="readStatus" />
<result column="create_time" property="createTime" /> <result column="create_time" property="createTime" />
<result column="update_time" property="updateTime" /> <result column="update_time" property="updateTime" />
<result column="signature_img" property="signatureImg" /> <result column="signature_img" property="signatureImg" />
...@@ -24,6 +25,7 @@ ...@@ -24,6 +25,7 @@
operator_header_url, operator_header_url,
opinion, opinion,
sts, sts,
read_status,
create_time, create_time,
update_time, update_time,
signature_img, signature_img,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment