稽核
面审通过后更改
This commit is contained in:
@@ -0,0 +1,39 @@
|
|||||||
|
package com.cool.store.enums;
|
||||||
|
|
||||||
|
public enum AuditStageEnum {
|
||||||
|
|
||||||
|
ONE(1, "一审稽核"),
|
||||||
|
TWO(2, "二审稽核"),
|
||||||
|
|
||||||
|
|
||||||
|
;
|
||||||
|
|
||||||
|
|
||||||
|
private Integer code;
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
AuditStageEnum(Integer code, String name) {
|
||||||
|
this.code = code;
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static AuditStageEnum getByCode(Integer code) {
|
||||||
|
for (AuditStageEnum auditStatusEnum : AuditStageEnum.values()) {
|
||||||
|
if (auditStatusEnum.getCode().equals(code)) {
|
||||||
|
return auditStatusEnum;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package com.cool.store.mapper;
|
||||||
|
|
||||||
|
import com.cool.store.entity.AuditStatusDO;
|
||||||
|
import tk.mybatis.mapper.common.Mapper;
|
||||||
|
|
||||||
|
@org.apache.ibatis.annotations.Mapper
|
||||||
|
public interface AuditStatusMapper extends Mapper<AuditStatusDO> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
<?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.cool.store.mapper.AuditStatusMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.cool.store.entity.AuditStatusDO">
|
||||||
|
<id column="id" jdbcType="BIGINT" property="id" />
|
||||||
|
<result column="line_id" jdbcType="BIGINT" property="lineId" />
|
||||||
|
<result column="interview_id" jdbcType="BIGINT" property="interviewId" />
|
||||||
|
<result column="audit_id" jdbcType="BIGINT" property="auditId" />
|
||||||
|
<result column="audit_status" jdbcType="TINYINT" property="auditStatus" />
|
||||||
|
<result column="audit_user_id" jdbcType="BIGINT" property="auditUserId" />
|
||||||
|
<result column="audit_user_name" jdbcType="VARCHAR" property="auditUserName" />
|
||||||
|
<result column="create_time" jdbcType="BIGINT" property="lineId" />
|
||||||
|
<result column="update_time" jdbcType="BIGINT" property="lineId" />
|
||||||
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||||
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||||
|
<result column="audit_stage" jdbcType="TINYINT" property="auditStage" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id,
|
||||||
|
line_id,
|
||||||
|
interview_id,
|
||||||
|
audit_id,
|
||||||
|
audit_status,
|
||||||
|
audit_user_id,
|
||||||
|
audit_user_name,
|
||||||
|
create_time,
|
||||||
|
update_time,
|
||||||
|
audit_stage
|
||||||
|
</sql>
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
package com.cool.store.entity;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.persistence.*;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Table(name = "xfsg_audit_status")
|
||||||
|
public class AuditStatusDO {
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private Long id;
|
||||||
|
@Column(name = "line_id")
|
||||||
|
private Long lineId;
|
||||||
|
@Column(name = "interview_id")
|
||||||
|
private Long interviewId;
|
||||||
|
@Column(name = "audit_id")
|
||||||
|
private Long auditId;
|
||||||
|
@Column(name = "audit_status")
|
||||||
|
private Integer auditStatus;
|
||||||
|
@Column(name = "audit_user_id")
|
||||||
|
private Integer auditUserId;
|
||||||
|
@Column(name = "audit_user_name")
|
||||||
|
private String auditUserName;
|
||||||
|
@Column(name = "create_time")
|
||||||
|
private Date createTime;
|
||||||
|
@Column(name = "update_time")
|
||||||
|
private Date updateTime;
|
||||||
|
@Column(name = "audit_stage")
|
||||||
|
private Integer auditStage;
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
package com.cool.store.service;
|
||||||
|
|
||||||
|
import com.cool.store.entity.AuditStatusDO;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface AuditStatusService {
|
||||||
|
|
||||||
|
List<AuditStatusDO> list();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 稽核
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Boolean audit();
|
||||||
|
|
||||||
|
/**
|
||||||
|
*插入数据
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int insert(Long lineId,
|
||||||
|
Long interviewId,
|
||||||
|
Long auditId,
|
||||||
|
Integer auditStage);
|
||||||
|
}
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
package com.cool.store.service.impl;
|
||||||
|
|
||||||
|
import com.cool.store.entity.AuditStatusDO;
|
||||||
|
import com.cool.store.mapper.AuditStatusMapper;
|
||||||
|
import com.cool.store.service.AuditStatusService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
@Slf4j
|
||||||
|
public class AuditStatusServiceImpl implements AuditStatusService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
AuditStatusMapper auditStatusMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<AuditStatusDO> list() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean audit() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int insert(Long lineId, Long interviewId, Long auditId,Integer auditStage) {
|
||||||
|
AuditStatusDO auditStatusDO = new AuditStatusDO();
|
||||||
|
auditStatusDO.setLineId(lineId);
|
||||||
|
auditStatusDO.setInterviewId(interviewId);
|
||||||
|
auditStatusDO.setAuditId(auditId);
|
||||||
|
auditStatusDO.setAuditStage(auditStage);
|
||||||
|
int result = auditStatusMapper.insertSelective(auditStatusDO);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -222,7 +222,7 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
|||||||
HyOpenAreaInfoDO openAreaInfoDO = openAreaInfoMapper.selectById(lineInfoDO.getWantShopAreaId());
|
HyOpenAreaInfoDO openAreaInfoDO = openAreaInfoMapper.selectById(lineInfoDO.getWantShopAreaId());
|
||||||
franchiseeDO.setProvinceCode(String.valueOf(openAreaInfoDO.getParentId()));
|
franchiseeDO.setProvinceCode(String.valueOf(openAreaInfoDO.getParentId()));
|
||||||
franchiseeDO.setCityCode(String.valueOf(openAreaInfoDO.getId()));
|
franchiseeDO.setCityCode(String.valueOf(openAreaInfoDO.getId()));
|
||||||
//操作人工号 暂时写死
|
//todo 操作人工号 暂时写死
|
||||||
LoginUserInfo user = CurrentUserHolder.getUser();
|
LoginUserInfo user = CurrentUserHolder.getUser();
|
||||||
franchiseeDO.setOperator("22090043");
|
franchiseeDO.setOperator("22090043");
|
||||||
InitiatingResponse initiatingResponse = httpRestTemplateService.postForObject(url, franchiseeDO, InitiatingResponse.class);
|
InitiatingResponse initiatingResponse = httpRestTemplateService.postForObject(url, franchiseeDO, InitiatingResponse.class);
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import com.cool.store.dto.interview.LineInterviewPageDTO;
|
|||||||
import com.cool.store.entity.*;
|
import com.cool.store.entity.*;
|
||||||
import com.cool.store.enums.*;
|
import com.cool.store.enums.*;
|
||||||
import com.cool.store.exception.ServiceException;
|
import com.cool.store.exception.ServiceException;
|
||||||
|
import com.cool.store.mapper.AuditStatusMapper;
|
||||||
import com.cool.store.request.*;
|
import com.cool.store.request.*;
|
||||||
import com.cool.store.service.*;
|
import com.cool.store.service.*;
|
||||||
import com.cool.store.utils.TRTCUtils;
|
import com.cool.store.utils.TRTCUtils;
|
||||||
@@ -74,6 +75,9 @@ public class LineInterviewServiceImpl extends LineFlowService implements LineInt
|
|||||||
@Resource
|
@Resource
|
||||||
private ShopService shopService;
|
private ShopService shopService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
AuditStatusService auditStatusService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<AppointmentTimeVO> getAppointmentTime(Long lineId, Integer interviewType, LocalDate appointmentDate) {
|
public List<AppointmentTimeVO> getAppointmentTime(Long lineId, Integer interviewType, LocalDate appointmentDate) {
|
||||||
InterviewTypeEnum interviewTypeEnum = InterviewTypeEnum.match(interviewType);
|
InterviewTypeEnum interviewTypeEnum = InterviewTypeEnum.match(interviewType);
|
||||||
@@ -404,6 +408,8 @@ public class LineInterviewServiceImpl extends LineFlowService implements LineInt
|
|||||||
if(!WorkflowSubStageEnum.SECOND_INTERVIEWS.equals(workflowSubStageEnum)){
|
if(!WorkflowSubStageEnum.SECOND_INTERVIEWS.equals(workflowSubStageEnum)){
|
||||||
//更新线索阶段
|
//更新线索阶段
|
||||||
lineInfoDAO.updateWorkflowStage(lineInfo.getId(), nextStage, nextStage.getInitStatus());
|
lineInfoDAO.updateWorkflowStage(lineInfo.getId(), nextStage, nextStage.getInitStatus());
|
||||||
|
//一审稽核
|
||||||
|
auditStatusService.insert(lineInfo.getId(),interviewInfo.getId(),auditId,AuditStageEnum.ONE.getCode());
|
||||||
}else{
|
}else{
|
||||||
LineInfoDO updateLine = new LineInfoDO();
|
LineInfoDO updateLine = new LineInfoDO();
|
||||||
updateLine.setId(lineInfo.getId());
|
updateLine.setId(lineInfo.getId());
|
||||||
@@ -415,6 +421,8 @@ public class LineInterviewServiceImpl extends LineFlowService implements LineInt
|
|||||||
lineInfoDAO.updateLineInfo(updateLine);
|
lineInfoDAO.updateLineInfo(updateLine);
|
||||||
//初始化店铺
|
//初始化店铺
|
||||||
shopService.initShop(lineInfo);
|
shopService.initShop(lineInfo);
|
||||||
|
//二审稽核
|
||||||
|
auditStatusService.insert(lineInfo.getId(),interviewInfo.getId(),auditId,AuditStageEnum.TWO.getCode());
|
||||||
}
|
}
|
||||||
return lineInterviewDAO.updateInterviewInfo(updateInterviewInfo) > 0;
|
return lineInterviewDAO.updateInterviewInfo(updateInterviewInfo) > 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user