Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
978c15ed14
|
|
@ -20,9 +20,13 @@ public enum TmTaskTypeEnum {
|
||||||
TM_TASK_PART_LEASE(12, "配件领料任务"),
|
TM_TASK_PART_LEASE(12, "配件领料任务"),
|
||||||
TM_TASK_PART_TYPE(13, "费用减免任务"),
|
TM_TASK_PART_TYPE(13, "费用减免任务"),
|
||||||
TM_TASK_REPAIR_NUM(14, "数量维修人员信息附件"),
|
TM_TASK_REPAIR_NUM(14, "数量维修人员信息附件"),
|
||||||
|
|
||||||
|
TM_TASK_DIRECT(16, "直转任务"),
|
||||||
//盘点报废
|
//盘点报废
|
||||||
TM_TASK_PART_SCRAP(15, "盘点报废");
|
TM_TASK_PART_SCRAP(15, "盘点报废");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private final Integer taskTypeId;
|
private final Integer taskTypeId;
|
||||||
private final String taskTypeName;
|
private final String taskTypeName;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -154,4 +154,8 @@ public class DirectApplyInfo extends BaseEntity {
|
||||||
|
|
||||||
private Integer taskStatus;
|
private Integer taskStatus;
|
||||||
|
|
||||||
|
private String flowStatus;
|
||||||
|
|
||||||
|
private String flowId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,10 @@ import com.bonus.material.ma.mapper.DirectRotationMapper;
|
||||||
import com.bonus.material.ma.service.DirectRotationService;
|
import com.bonus.material.ma.service.DirectRotationService;
|
||||||
import com.bonus.material.ma.service.WorkSiteDirectManageService;
|
import com.bonus.material.ma.service.WorkSiteDirectManageService;
|
||||||
import com.bonus.material.settlement.domain.SltAgreementInfo;
|
import com.bonus.material.settlement.domain.SltAgreementInfo;
|
||||||
|
import com.bonus.material.work.domain.SysWorkflowRecord;
|
||||||
|
import com.bonus.material.work.domain.SysWorkflowRecordHistory;
|
||||||
|
import com.bonus.material.work.mapper.SysWorkflowRecordHistoryMapper;
|
||||||
|
import com.bonus.material.work.mapper.SysWorkflowRecordMapper;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
@ -17,6 +21,8 @@ import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import static com.bonus.common.biz.enums.TmTaskTypeEnum.TM_TASK_DIRECT;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author hay
|
* @author hay
|
||||||
* @description 直转申请
|
* @description 直转申请
|
||||||
|
|
@ -29,6 +35,12 @@ public class DirectRotationImpl implements DirectRotationService {
|
||||||
@Resource
|
@Resource
|
||||||
private DirectRotationMapper mapper;
|
private DirectRotationMapper mapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private SysWorkflowRecordMapper wfMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private SysWorkflowRecordHistoryMapper hisMapper;
|
||||||
|
|
||||||
@Resource(name = "workSiteDirectManageService")
|
@Resource(name = "workSiteDirectManageService")
|
||||||
private WorkSiteDirectManageService workSiteDirectManageService;
|
private WorkSiteDirectManageService workSiteDirectManageService;
|
||||||
|
|
||||||
|
|
@ -45,13 +57,15 @@ public class DirectRotationImpl implements DirectRotationService {
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult submit(DirectApplyInfoDetails directApplyInfoDetails) {
|
public AjaxResult submit(DirectApplyInfoDetails directApplyInfoDetails) {
|
||||||
int id = 0;
|
int id = 0;
|
||||||
|
String code ="";
|
||||||
if (directApplyInfoDetails != null) {
|
if (directApplyInfoDetails != null) {
|
||||||
if (directApplyInfoDetails.getDirectApplyInfo() != null) {
|
if (directApplyInfoDetails.getDirectApplyInfo() != null) {
|
||||||
DirectApplyInfo directApplyInfos = directApplyInfoDetails.getDirectApplyInfo();
|
DirectApplyInfo directApplyInfos = directApplyInfoDetails.getDirectApplyInfo();
|
||||||
if (directApplyInfos.getBackAgreementId()==directApplyInfos.getLeaseAgreementId()){
|
if (directApplyInfos.getBackAgreementId()==directApplyInfos.getLeaseAgreementId()){
|
||||||
return AjaxResult.error("申请失败,不能转入同单位同工程");
|
return AjaxResult.error("申请失败,不能转入同单位同工程");
|
||||||
}
|
}
|
||||||
directApplyInfos.setCode(workSiteDirectManageService.genderLeaseCode());
|
code = workSiteDirectManageService.genderLeaseCode();
|
||||||
|
directApplyInfos.setCode(code);
|
||||||
directApplyInfos.setCreateTime(new Date());
|
directApplyInfos.setCreateTime(new Date());
|
||||||
List<String> urls = new ArrayList<>();
|
List<String> urls = new ArrayList<>();
|
||||||
if (directApplyInfoDetails.getDirectApplyInfo().getDirUrls() != null) {
|
if (directApplyInfoDetails.getDirectApplyInfo().getDirUrls() != null) {
|
||||||
|
|
@ -89,9 +103,33 @@ public class DirectRotationImpl implements DirectRotationService {
|
||||||
} else {
|
} else {
|
||||||
return AjaxResult.error("保存失败");
|
return AjaxResult.error("保存失败");
|
||||||
}
|
}
|
||||||
|
initAuditDir(id,code);
|
||||||
|
|
||||||
|
|
||||||
return AjaxResult.success("保存成功");
|
return AjaxResult.success("保存成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void initAuditDir(int id, String code) {
|
||||||
|
|
||||||
|
//1 生成直转审核节点任务
|
||||||
|
SysWorkflowRecord wf = new SysWorkflowRecord();
|
||||||
|
wf.setTaskId(id);
|
||||||
|
wf.setTaskType(TM_TASK_DIRECT.getTaskTypeId());
|
||||||
|
wf.setTaskCode(code);
|
||||||
|
wf.setWorkflowId(16);
|
||||||
|
wfMapper.addSysWorkflowRecord(wf);
|
||||||
|
//2 生成直转审核人
|
||||||
|
SysWorkflowRecordHistory his = new SysWorkflowRecordHistory();
|
||||||
|
|
||||||
|
his.setRecordId(wf.getId());
|
||||||
|
his.setNodeId(9);
|
||||||
|
his.setNextNodeId(10);
|
||||||
|
his.setIsAccept(1);
|
||||||
|
his.setCreateBy(SecurityUtils.getUsername());
|
||||||
|
his.setCreateTime(new Date());
|
||||||
|
hisMapper.addSysWorkflowRecordHistory(his) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult edit(DirectApplyInfoDetails directApplyInfoDetails) {
|
public AjaxResult edit(DirectApplyInfoDetails directApplyInfoDetails) {
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,19 @@ public class SltAgreementReduceController extends BaseController {
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询结算协议减免申请列表
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "查询结算协议减免列表")
|
||||||
|
//@RequiresPermissions("settlement:apply:list")
|
||||||
|
@GetMapping("/reduceList")
|
||||||
|
public AjaxResult reduceList(SltAgreementReduce sltAgreement) {
|
||||||
|
|
||||||
|
List<SltAgreementReduce> list = sltAgreementReduceService.selectAuditReduceList(sltAgreement);
|
||||||
|
return success(list);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询协议申请减免明细
|
* 查询协议申请减免明细
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -39,17 +39,9 @@ public interface SltAgreementReduceMapper {
|
||||||
*/
|
*/
|
||||||
List<SltAgreementReduce> getReductionList(SltAgreementReduce bean);
|
List<SltAgreementReduce> getReductionList(SltAgreementReduce bean);
|
||||||
|
|
||||||
/**
|
List<SltAgreementReduce> selectAuditReduceList(SltAgreementReduce sltAgreement);
|
||||||
* 根据Id删除减免明细
|
|
||||||
* @param id
|
void deleteReduceDetail(Long id);
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
int deleteReduceDetail(Long id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改减免申请
|
|
||||||
* @param sltAgreement
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
Long updateReduce(SltAgreementReduce sltAgreement);
|
Long updateReduce(SltAgreementReduce sltAgreement);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ package com.bonus.material.settlement.service;
|
||||||
|
|
||||||
import com.bonus.common.core.web.domain.AjaxResult;
|
import com.bonus.common.core.web.domain.AjaxResult;
|
||||||
import com.bonus.material.settlement.domain.SltAgreementReduce;
|
import com.bonus.material.settlement.domain.SltAgreementReduce;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
@ -23,10 +24,8 @@ public interface ISltAgreementReduceService {
|
||||||
|
|
||||||
List<SltAgreementReduce> selectByMaModel(SltAgreementReduce sltAgreement);
|
List<SltAgreementReduce> selectByMaModel(SltAgreementReduce sltAgreement);
|
||||||
|
|
||||||
/**
|
@Transactional(rollbackFor = Exception.class)
|
||||||
* 修改减免申请
|
|
||||||
* @param sltAgreement
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
AjaxResult editApply(SltAgreementReduce sltAgreement);
|
AjaxResult editApply(SltAgreementReduce sltAgreement);
|
||||||
|
|
||||||
|
List<SltAgreementReduce> selectAuditReduceList(SltAgreementReduce sltAgreement);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -175,6 +175,11 @@ public class SltAgreementReduceServiceImpl implements ISltAgreementReduceService
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SltAgreementReduce> selectAuditReduceList(SltAgreementReduce sltAgreement) {
|
||||||
|
return sltAgreementRecudceMapper.selectAuditReduceList(sltAgreement);
|
||||||
|
}
|
||||||
|
|
||||||
private void initSltAgreement(SltAgreementReduce sltAgreement) {
|
private void initSltAgreement(SltAgreementReduce sltAgreement) {
|
||||||
sltAgreement.setCode(generateCode());
|
sltAgreement.setCode(generateCode());
|
||||||
sltAgreement.setCreateTime(new Date());
|
sltAgreement.setCreateTime(new Date());
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,87 @@
|
||||||
|
package com.bonus.material.work.controller;
|
||||||
|
|
||||||
|
import cn.hutool.core.convert.Convert;
|
||||||
|
import com.bonus.common.biz.config.ListPagingUtil;
|
||||||
|
import com.bonus.common.biz.domain.lease.LeaseApplyInfo;
|
||||||
|
import com.bonus.common.core.utils.ServletUtils;
|
||||||
|
import com.bonus.common.core.web.controller.BaseController;
|
||||||
|
import com.bonus.common.core.web.domain.AjaxResult;
|
||||||
|
import com.bonus.common.core.web.page.TableDataInfo;
|
||||||
|
import com.bonus.common.log.annotation.SysLog;
|
||||||
|
import com.bonus.common.log.enums.OperaType;
|
||||||
|
import com.bonus.common.security.utils.SecurityUtils;
|
||||||
|
import com.bonus.material.common.annotation.PreventRepeatSubmit;
|
||||||
|
import com.bonus.material.lease.domain.vo.LeaseApplyRequestVo;
|
||||||
|
import com.bonus.material.lease.service.ILeaseTaskService;
|
||||||
|
import com.bonus.material.ma.domain.DirectApplyInfo;
|
||||||
|
import com.bonus.material.ma.domain.DirectApplyInfoDetails;
|
||||||
|
import com.bonus.material.ma.domain.Type;
|
||||||
|
import com.bonus.material.settlement.domain.SltAgreementInfo;
|
||||||
|
import com.bonus.material.work.domain.DirectAudit;
|
||||||
|
import com.bonus.material.work.service.IDirectAuditService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author hay
|
||||||
|
* @description 业务办理--直转审核
|
||||||
|
* @date 2025/2/17 13:13
|
||||||
|
*/
|
||||||
|
@Api(tags = "直转审核任务接口")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/directAudit")
|
||||||
|
public class DirectAuditController extends BaseController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IDirectAuditService service;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 直转记录查询列表
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "直转记录查询列表")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(DirectApplyInfo directApplyInfo) {
|
||||||
|
startPage();
|
||||||
|
try {
|
||||||
|
directApplyInfo.setAuditor(SecurityUtils.getUserId()+"");
|
||||||
|
List<DirectApplyInfo> directApplyInfos = service.getList(directApplyInfo);
|
||||||
|
return getDataTable(directApplyInfos);
|
||||||
|
} catch (Exception e) {
|
||||||
|
return getDataTable(new ArrayList<>());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "查看审批详情")
|
||||||
|
@GetMapping("/getAuditInfo")
|
||||||
|
public AjaxResult getAuditInfo(DirectAudit du) {
|
||||||
|
try {
|
||||||
|
return AjaxResult.success(service.getAuditInfo(du));
|
||||||
|
} catch (Exception e) {
|
||||||
|
return AjaxResult.success(new DirectApplyInfo());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核直转申请
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "审核直转申请")
|
||||||
|
@PostMapping("/auditDir")
|
||||||
|
public AjaxResult auditDir(@RequestBody DirectAudit audit) {
|
||||||
|
try {
|
||||||
|
return service.auditDir(audit);
|
||||||
|
} catch (Exception e) {
|
||||||
|
return AjaxResult.error("保存失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,42 @@
|
||||||
|
package com.bonus.material.work.domain;
|
||||||
|
|
||||||
|
|
||||||
|
import com.bonus.material.ma.domain.DirectApplyInfo;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.ToString;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ToString
|
||||||
|
public class DirectAudit {
|
||||||
|
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
private DirectApplyInfo dir;
|
||||||
|
|
||||||
|
private String creator;
|
||||||
|
|
||||||
|
private String createTime;
|
||||||
|
|
||||||
|
private int nodeId;
|
||||||
|
|
||||||
|
private String nodeName;
|
||||||
|
|
||||||
|
private String isAccept;
|
||||||
|
|
||||||
|
private int nextNodeId;
|
||||||
|
|
||||||
|
private String nextNodeName;
|
||||||
|
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
private int flowId;
|
||||||
|
|
||||||
|
private String flowStatus;
|
||||||
|
|
||||||
|
private String userId;
|
||||||
|
|
||||||
|
private List<DirectAudit> nodeList;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -82,14 +82,5 @@ public class SysWorkflowNode {
|
||||||
*/
|
*/
|
||||||
private int isAccept;
|
private int isAccept;
|
||||||
|
|
||||||
/**
|
private String nodeLabel;
|
||||||
*
|
|
||||||
*/
|
|
||||||
private Integer recordId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
private Integer nodeId;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
package com.bonus.material.work.mapper;
|
||||||
|
|
||||||
|
|
||||||
|
import com.bonus.common.biz.domain.lease.LeaseApplyInfo;
|
||||||
|
import com.bonus.material.lease.domain.LeaseApplyDetails;
|
||||||
|
import com.bonus.material.ma.domain.DirectApplyInfo;
|
||||||
|
import com.bonus.material.ma.domain.Type;
|
||||||
|
import com.bonus.material.work.domain.DirectAudit;
|
||||||
|
import com.bonus.material.work.domain.SysWorkflowRecord;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 业务办理--领用任务
|
||||||
|
* @author hay
|
||||||
|
* @date 2025/2/17 13:18
|
||||||
|
*/
|
||||||
|
public interface DirectAuditMapper {
|
||||||
|
|
||||||
|
|
||||||
|
List<DirectApplyInfo> getList(DirectApplyInfo directApplyInfo);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
List<DirectAudit> getAuditInfo(DirectAudit du);
|
||||||
|
|
||||||
|
void updateWorkflowRecord(DirectAudit fr);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,30 @@
|
||||||
|
package com.bonus.material.work.service;
|
||||||
|
|
||||||
|
|
||||||
|
import com.bonus.common.biz.domain.lease.LeaseApplyInfo;
|
||||||
|
import com.bonus.common.core.web.domain.AjaxResult;
|
||||||
|
import com.bonus.material.lease.domain.vo.LeaseApplyRequestVo;
|
||||||
|
import com.bonus.material.ma.domain.DirectApplyInfo;
|
||||||
|
import com.bonus.material.ma.domain.Type;
|
||||||
|
import com.bonus.material.settlement.domain.SltAgreementInfo;
|
||||||
|
import com.bonus.material.work.domain.DirectAudit;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author hay
|
||||||
|
* @description 业务办理--直转审核
|
||||||
|
* @date 2025/2/17 13:15
|
||||||
|
*/
|
||||||
|
public interface IDirectAuditService {
|
||||||
|
|
||||||
|
|
||||||
|
List<DirectApplyInfo> getList(DirectApplyInfo directApplyInfo);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
List<DirectAudit> getAuditInfo(DirectAudit du);
|
||||||
|
|
||||||
|
AjaxResult auditDir(DirectAudit audit);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,156 @@
|
||||||
|
package com.bonus.material.work.service.impl;
|
||||||
|
|
||||||
|
|
||||||
|
import com.bonus.common.core.web.domain.AjaxResult;
|
||||||
|
import com.bonus.common.security.utils.SecurityUtils;
|
||||||
|
import com.bonus.material.ma.domain.DirectApplyInfo;
|
||||||
|
|
||||||
|
import com.bonus.material.work.domain.DirectAudit;
|
||||||
|
import com.bonus.material.work.domain.SysWorkflowNode;
|
||||||
|
import com.bonus.material.work.domain.SysWorkflowRecord;
|
||||||
|
import com.bonus.material.work.domain.SysWorkflowRecordHistory;
|
||||||
|
import com.bonus.material.work.mapper.DirectAuditMapper;
|
||||||
|
import com.bonus.material.work.mapper.SysWorkflowNodeMapper;
|
||||||
|
import com.bonus.material.work.mapper.SysWorkflowRecordHistoryMapper;
|
||||||
|
import com.bonus.material.work.mapper.SysWorkflowRecordMapper;
|
||||||
|
import com.bonus.material.work.service.IDirectAuditService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.dao.DataAccessException;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.util.CollectionUtils;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Optional;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author hay
|
||||||
|
* @description 业务办理--直转审核
|
||||||
|
* @date 2025/2/17 13:16
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@Slf4j
|
||||||
|
public class DirectAuditImpl implements IDirectAuditService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private DirectAuditMapper mapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private SysWorkflowNodeMapper wfnMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private SysWorkflowRecordHistoryMapper hisMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private SysWorkflowRecordMapper wfrMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<DirectApplyInfo> getList(DirectApplyInfo directApplyInfo) {
|
||||||
|
return mapper.getList(directApplyInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<DirectAudit> getAuditInfo(DirectAudit du) {
|
||||||
|
List<DirectAudit> list = new ArrayList<>();
|
||||||
|
try {
|
||||||
|
|
||||||
|
List<DirectAudit> auditlist = mapper.getAuditInfo(du);
|
||||||
|
|
||||||
|
if(auditlist!=null && auditlist.size()>0){
|
||||||
|
list.add(auditlist.get(0));
|
||||||
|
for(int i= 0 ; i<auditlist.size();i++){
|
||||||
|
DirectAudit da = new DirectAudit();
|
||||||
|
da.setNodeId(auditlist.get(i).getNextNodeId());
|
||||||
|
da.setNodeName(auditlist.get(i).getNextNodeName());
|
||||||
|
da.setFlowId(auditlist.get(i).getFlowId());
|
||||||
|
if(auditlist.size() - 1 == i){
|
||||||
|
da.setIsAccept("");
|
||||||
|
da.setRemark("");
|
||||||
|
}else{
|
||||||
|
da.setIsAccept(auditlist.get(i).getIsAccept());
|
||||||
|
da.setRemark(auditlist.get(i).getRemark());
|
||||||
|
}
|
||||||
|
|
||||||
|
da.setCreator(auditlist.get(i).getCreator());
|
||||||
|
da.setCreateTime(auditlist.get(i).getCreateTime());
|
||||||
|
|
||||||
|
list.add(da);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (DataAccessException e) {
|
||||||
|
log.error("查询直转审核记录失败", e);
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AjaxResult auditDir(DirectAudit audit) {
|
||||||
|
|
||||||
|
//1判断节点是否为最后一个节点,如果是最后一个节点,则修改状态为通过,如果不是循环节点进行审核
|
||||||
|
//判断最后一个节点,查询审核流配置倒序排序,如果前端传回下个节点和查询节点相等,则为最后一个节点
|
||||||
|
|
||||||
|
SysWorkflowNode node = new SysWorkflowNode();
|
||||||
|
|
||||||
|
node.setTypeId(15);
|
||||||
|
|
||||||
|
String isAccept = audit.getIsAccept();
|
||||||
|
String remark = audit.getRemark();
|
||||||
|
List<SysWorkflowNode> nodes = wfnMapper.selectSysWorkflowNodeList(node);
|
||||||
|
int flowId = audit.getFlowId();
|
||||||
|
if(nodes !=null && nodes.size()>0){
|
||||||
|
|
||||||
|
for(SysWorkflowNode n : nodes){
|
||||||
|
int flowNodeId = n.getId();
|
||||||
|
String nodeLable = n.getNodeLabel();
|
||||||
|
if (audit.getNodeId()==flowNodeId) {
|
||||||
|
|
||||||
|
DirectAudit fr = new DirectAudit();
|
||||||
|
fr.setId(flowId);
|
||||||
|
if(2==Integer.parseInt(isAccept)){
|
||||||
|
fr.setFlowStatus("3");
|
||||||
|
}else{
|
||||||
|
if("2".equals(nodeLable)){
|
||||||
|
fr.setFlowStatus("2");
|
||||||
|
}else{
|
||||||
|
fr.setFlowStatus("1");
|
||||||
|
|
||||||
|
//这里未判断下个节点的逻辑,后面需要修改
|
||||||
|
int nextNodeId = flowNodeId +1;
|
||||||
|
|
||||||
|
//2 生成直转审核人
|
||||||
|
SysWorkflowRecordHistory his = new SysWorkflowRecordHistory();
|
||||||
|
|
||||||
|
his.setRecordId(flowId);
|
||||||
|
his.setNodeId(flowNodeId);
|
||||||
|
his.setNextNodeId(nextNodeId);
|
||||||
|
his.setIsAccept(Integer.parseInt(isAccept));
|
||||||
|
his.setCreateBy(SecurityUtils.getUsername());
|
||||||
|
his.setCreateTime(new Date());
|
||||||
|
his.setRemark(remark);
|
||||||
|
hisMapper.addSysWorkflowRecordHistory(his) ;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
mapper.updateWorkflowRecord(fr);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return AjaxResult.success();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -111,6 +111,7 @@ public class SysWorkflowNodeServiceImpl implements SysWorkflowNodeService {
|
||||||
if (StringUtils.isNotNull(sysWorkflowRecordHistoryNew)){
|
if (StringUtils.isNotNull(sysWorkflowRecordHistoryNew)){
|
||||||
SysWorkflowNode.setIsAccept(sysWorkflowRecordHistoryNew.getIsAccept());
|
SysWorkflowNode.setIsAccept(sysWorkflowRecordHistoryNew.getIsAccept());
|
||||||
SysWorkflowNode.setCreateTime(sysWorkflowRecordHistoryNew.getCreateTime());
|
SysWorkflowNode.setCreateTime(sysWorkflowRecordHistoryNew.getCreateTime());
|
||||||
|
SysWorkflowNode.setRemark(sysWorkflowRecordHistoryNew.getRemark());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,8 @@ package com.bonus.material.work.service.impl;
|
||||||
import com.bonus.common.core.exception.ServiceException;
|
import com.bonus.common.core.exception.ServiceException;
|
||||||
import com.bonus.common.core.utils.DateUtils;
|
import com.bonus.common.core.utils.DateUtils;
|
||||||
import com.bonus.common.security.utils.SecurityUtils;
|
import com.bonus.common.security.utils.SecurityUtils;
|
||||||
|
import com.bonus.material.task.domain.TmTask;
|
||||||
|
import com.bonus.material.task.mapper.TmTaskMapper;
|
||||||
import com.bonus.material.work.domain.SysWorkflowNode;
|
import com.bonus.material.work.domain.SysWorkflowNode;
|
||||||
import com.bonus.material.work.domain.SysWorkflowRecord;
|
import com.bonus.material.work.domain.SysWorkflowRecord;
|
||||||
import com.bonus.material.work.domain.SysWorkflowRecordHistory;
|
import com.bonus.material.work.domain.SysWorkflowRecordHistory;
|
||||||
|
|
@ -34,6 +36,9 @@ public class SysWorkflowRecordHistoryServiceImpl implements SysWorkflowRecordHis
|
||||||
@Resource
|
@Resource
|
||||||
private SysWorkflowNodeMapper sysWorkflowNodeMapper;
|
private SysWorkflowNodeMapper sysWorkflowNodeMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private TmTaskMapper tmTaskMapper;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
|
|
@ -66,6 +71,12 @@ public class SysWorkflowRecordHistoryServiceImpl implements SysWorkflowRecordHis
|
||||||
sysWorkflowRecord.setTaskId(sysWorkflowRecordHistory.getTaskId());
|
sysWorkflowRecord.setTaskId(sysWorkflowRecordHistory.getTaskId());
|
||||||
sysWorkflowRecord.setWorkflowStatus(2);
|
sysWorkflowRecord.setWorkflowStatus(2);
|
||||||
sysWorkflowRecordMapper.updateSysWorkflowRecord(sysWorkflowRecord);
|
sysWorkflowRecordMapper.updateSysWorkflowRecord(sysWorkflowRecord);
|
||||||
|
|
||||||
|
//修改业务状态
|
||||||
|
TmTask tmTask = new TmTask();
|
||||||
|
tmTask.setTaskId(sysWorkflowRecordHistory.getTaskId().longValue());
|
||||||
|
tmTask.setTaskStatus(1);
|
||||||
|
tmTaskMapper.updateTmTask(tmTask);
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
SysWorkflowRecord sysWorkflowRecord = new SysWorkflowRecord();
|
SysWorkflowRecord sysWorkflowRecord = new SysWorkflowRecord();
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="status != null "> and `status` = #{status}</if>
|
<if test="status != null "> and `status` = #{status}</if>
|
||||||
and del_flag = '0'
|
and del_flag = '0'
|
||||||
</where>
|
</where>
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectSupplierInfoBySupplierId" parameterType="Long" resultMap="SupplierInfoResult">
|
<select id="selectSupplierInfoBySupplierId" parameterType="Long" resultMap="SupplierInfoResult">
|
||||||
|
|
|
||||||
|
|
@ -260,6 +260,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
sai.agreement_id = #{agreementId} and mt2.type_id = #{typeId}
|
sai.agreement_id = #{agreementId} and mt2.type_id = #{typeId}
|
||||||
group by mt.type_id
|
group by mt.type_id
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getReductionList" resultType="com.bonus.material.settlement.domain.SltAgreementReduce">
|
<select id="getReductionList" resultType="com.bonus.material.settlement.domain.SltAgreementReduce">
|
||||||
SELECT mt2.type_name as typeName,
|
SELECT mt2.type_name as typeName,
|
||||||
mt.type_name as modeName,
|
mt.type_name as modeName,
|
||||||
|
|
@ -278,4 +279,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
LEFT JOIN ma_type mt2 on mt2.type_id = mt.parent_id
|
LEFT JOIN ma_type mt2 on mt2.type_id = mt.parent_id
|
||||||
WHERE sra.agreement_id = #{agreementId}
|
WHERE sra.agreement_id = #{agreementId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectAuditReduceList" resultType="com.bonus.material.settlement.domain.SltAgreementReduce">
|
||||||
|
|
||||||
|
SELECT mt2.type_name as maName,
|
||||||
|
mt.type_name as maModel,
|
||||||
|
mt.unit_name as maUnit,
|
||||||
|
srd.lease_price as leasePrice,
|
||||||
|
srd.reduce_num as reduceNum,
|
||||||
|
srd.start_time as startTime,
|
||||||
|
srd.end_time as endTime,
|
||||||
|
srd.days as days,
|
||||||
|
srd.lease_money as leaseMoney,
|
||||||
|
sra.remark
|
||||||
|
FROM slt_reduce_apply sra
|
||||||
|
LEFT JOIN slt_reduce_details srd on sra.id = srd.apply_id
|
||||||
|
LEFT JOIN ma_type mt on mt.type_id = srd.type_id
|
||||||
|
LEFT JOIN ma_type mt2 on mt2.type_id = mt.parent_id
|
||||||
|
WHERE sra.agreement_id = #{agreementId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -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.bonus.material.work.mapper.DirectAuditMapper">
|
||||||
|
|
||||||
|
<select id="getList" resultType="com.bonus.material.ma.domain.DirectApplyInfo">
|
||||||
|
SELECT DISTINCT
|
||||||
|
dai.Id,
|
||||||
|
dai.create_time AS createTime,
|
||||||
|
su.user_name AS createName,
|
||||||
|
bui.unit_id AS backUnitId,
|
||||||
|
bui.unit_name AS backUnitName,
|
||||||
|
bpl.pro_id AS backProId,
|
||||||
|
bpl.pro_name AS backProName,
|
||||||
|
bui1.unit_id AS leaseUnitId,
|
||||||
|
bui1.unit_name AS leaseUnitName,
|
||||||
|
bpl1.pro_id AS leaseProId,
|
||||||
|
bpl1.pro_name AS leaseProName,
|
||||||
|
dai.lease_man as leaseMan ,
|
||||||
|
swr.workflow_status as flowStatus,
|
||||||
|
swr.id as flowId
|
||||||
|
FROM
|
||||||
|
direct_apply_info dai
|
||||||
|
LEFT JOIN bm_agreement_info bai ON dai.back_agreement_id = bai.agreement_id
|
||||||
|
LEFT JOIN bm_agreement_info bai1 ON dai.lease_agreement_id = bai1.agreement_id
|
||||||
|
LEFT JOIN bm_project bpl ON bpl.pro_id = bai.project_id
|
||||||
|
LEFT JOIN bm_project bpl1 ON bpl1.pro_id = bai1.project_id
|
||||||
|
LEFT JOIN bm_unit bui ON bui.unit_id = bai.unit_id
|
||||||
|
LEFT JOIN bm_unit bui1 ON bui1.unit_id = bai1.unit_id
|
||||||
|
LEFT JOIN direct_apply_details dad on dad.direct_id=dai.id
|
||||||
|
left join sys_user su on dai.create_by = su.user_id
|
||||||
|
left join sys_workflow_record swr on dai.id = swr.task_id
|
||||||
|
<where>
|
||||||
|
swr.task_id is not null
|
||||||
|
<if test="keyWord != null and keyWord != ''">
|
||||||
|
and (
|
||||||
|
bui.unit_name like concat('%', #{keyWord}, '%') or
|
||||||
|
bpl.pro_name like concat('%', #{keyWord}, '%') or
|
||||||
|
bui1.unit_name like concat('%', #{keyWord}, '%') or
|
||||||
|
bpl1.pro_name like concat('%', #{keyWord}, '%'))
|
||||||
|
</if>
|
||||||
|
<if test="lotId != null and lotId != ''">
|
||||||
|
and bpl.pro_id = #{lotId}
|
||||||
|
</if>
|
||||||
|
<if test="unitId != null and unitId != ''">
|
||||||
|
and bui.unit_id = #{unitId}
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<if test="status != null and status != ''">
|
||||||
|
and dai.status = #{status}
|
||||||
|
</if>
|
||||||
|
<if test="isApp != null and taskStatus==0">and dai.status = 0 </if>
|
||||||
|
<if test="isApp != null and taskStatus==1">and (dai.status = 1 or dai.status = 2)</if>
|
||||||
|
</where>
|
||||||
|
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<select id="getAuditInfo" resultType="com.bonus.material.work.domain.DirectAudit">
|
||||||
|
SELECT
|
||||||
|
wh.record_id AS flowId,
|
||||||
|
wh.node_id AS nodeId,
|
||||||
|
wn.node_name AS nodeName,
|
||||||
|
wn2.node_name AS nextNodeName,
|
||||||
|
wh.next_node_id AS nextNodeId,
|
||||||
|
wh.create_time AS createTime,
|
||||||
|
wh.create_by AS creator,
|
||||||
|
wh.is_accept as isAccept,
|
||||||
|
wc.config_value as userId,
|
||||||
|
wh.remark as remark
|
||||||
|
FROM
|
||||||
|
sys_workflow_record_history wh
|
||||||
|
LEFT JOIN sys_workflow_config wc on wh.next_node_id = wc.node_id
|
||||||
|
LEFT JOIN sys_workflow_node wn on wh.node_id = wn.id
|
||||||
|
LEFT JOIN sys_workflow_node wn2 on wc.node_id = wn2.id
|
||||||
|
WHERE wh.record_id = #{flowId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<update id="updateWorkflowRecord">
|
||||||
|
update sys_workflow_record set workflow_status = #{flowStatus} where id = #{id}
|
||||||
|
</update>
|
||||||
|
</mapper>
|
||||||
|
|
@ -57,7 +57,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</delete>
|
</delete>
|
||||||
<select id="selectSysWorkflowNodeList" resultType="com.bonus.material.work.domain.SysWorkflowNode">
|
<select id="selectSysWorkflowNodeList" resultType="com.bonus.material.work.domain.SysWorkflowNode">
|
||||||
select swn.id as id, swn.type_id typeId, swn.node_name as nodeName, swn.node_sort as nodeSort,
|
select swn.id as id, swn.type_id typeId, swn.node_name as nodeName, swn.node_sort as nodeSort,
|
||||||
swn.node_sign_type as nodeSignType, swn.node_sign_config as nodeSignConfig,
|
swn.node_sign_type as nodeSignType, swn.node_sign_config as nodeSignConfig,swn.node_label as nodeLabel,
|
||||||
swn.create_by as createBy,swn.create_time as createTime,swn.is_enable as isEnable,
|
swn.create_by as createBy,swn.create_time as createTime,swn.is_enable as isEnable,
|
||||||
GROUP_CONCAT(sec.config_value SEPARATOR ',') AS configValues
|
GROUP_CONCAT(sec.config_value SEPARATOR ',') AS configValues
|
||||||
from sys_workflow_node swn
|
from sys_workflow_node swn
|
||||||
|
|
@ -72,7 +72,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
swn.node_sign_type as nodeSignType, swn.node_sign_config as nodeSignConfig,swn.id as nodeId,
|
swn.node_sign_type as nodeSignType, swn.node_sign_config as nodeSignConfig,swn.id as nodeId,
|
||||||
swrh.create_by as createBy,swn.is_enable as isEnable,
|
swrh.create_by as createBy,swn.is_enable as isEnable,
|
||||||
GROUP_CONCAT(DISTINCT sec.config_value SEPARATOR ',') AS configValues,
|
GROUP_CONCAT(DISTINCT sec.config_value SEPARATOR ',') AS configValues,
|
||||||
swrh.remark as remark,swr.id as recordId
|
swr.id as recordId
|
||||||
from sys_workflow_node swn
|
from sys_workflow_node swn
|
||||||
left join sys_workflow_config sec on swn.id= sec.node_id
|
left join sys_workflow_config sec on swn.id= sec.node_id
|
||||||
left join sys_workflow_record swr on swr.workflow_id = swn.type_id
|
left join sys_workflow_record swr on swr.workflow_id = swn.type_id
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</insert>
|
</insert>
|
||||||
<select id="seleteSysWorkflowRecordHistory"
|
<select id="seleteSysWorkflowRecordHistory"
|
||||||
resultType="com.bonus.material.work.domain.SysWorkflowRecordHistory">
|
resultType="com.bonus.material.work.domain.SysWorkflowRecordHistory">
|
||||||
select swrh.is_accept as isAccept,swrh.create_time as createTime
|
select swrh.is_accept as isAccept,swrh.create_time as createTime,swrh.remark as remark
|
||||||
from sys_workflow_record_history swrh
|
from sys_workflow_record_history swrh
|
||||||
where swrh.record_id=#{recordId} and swrh.node_id= #{nodeId}
|
where swrh.record_id=#{recordId} and swrh.node_id= #{nodeId}
|
||||||
</select>
|
</select>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue