更新检测相关功能
This commit is contained in:
parent
91dfdba9e6
commit
1dd68ef79c
@ -216,9 +216,6 @@ public class InspectionInfoServiceImpl extends ServiceImpl<InspectionInfoMapper,
|
||||
customerInfo.setSex("0");
|
||||
customerInfo.setUserAge(user.getUserAge());
|
||||
// 设置客户来源
|
||||
CustomerMain customerMain = new CustomerMain();
|
||||
customerMain.setDataFrom("01");
|
||||
customerMainService.saveOrUpdate(customerMain);
|
||||
try {
|
||||
customerInfoService.insertPartnerCustomerInfo(customerInfo);
|
||||
} catch (Exception ignored) {
|
||||
@ -385,8 +382,8 @@ public class InspectionInfoServiceImpl extends ServiceImpl<InspectionInfoMapper,
|
||||
//获取当前登陆人的角色
|
||||
List<UserRoleDO> byUserId = roleService.getByUserId(loginUser.getId());
|
||||
List<Long> roleIds = byUserId.stream().map(UserRoleDO::getRoleId).collect(Collectors.toList());
|
||||
if("2".equals(inspectionInfo.getStatus())){
|
||||
//进行中
|
||||
if(!"1".equals(inspectionInfo.getStatus())){
|
||||
//进行中 已完成
|
||||
inspectionInfo.setDealUserId(loginUser.getId());
|
||||
}
|
||||
return baseMapper.selectByUser(page,roleIds,inspectionInfo);
|
||||
|
@ -20,6 +20,7 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -81,6 +82,7 @@ public class InspectionWorkNodeServiceImpl extends ServiceImpl<InspectionWorkNod
|
||||
* @param inspectionWorkNode
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void updateImageAndStep(InspectionWorkNode inspectionWorkNode) {
|
||||
switch (inspectionWorkNode.getSelectType()) {
|
||||
case 1:
|
||||
@ -99,19 +101,19 @@ public class InspectionWorkNodeServiceImpl extends ServiceImpl<InspectionWorkNod
|
||||
InspectionWorkNode workNode = this.getById(inspectionWorkNode.getId());
|
||||
|
||||
//根据工单id查询工单
|
||||
InspectionInfo inspectionInfo = inspectionInfoService.selectInspectionInfoById(inspectionWorkNode.getInspectionInfoId());
|
||||
InspectionInfo inspectionInfo = inspectionInfoService.selectInspectionInfoById(workNode.getInspectionInfoId());
|
||||
|
||||
//判断是否是最后一个项目 根据工单id查询
|
||||
//根据工单id查询流程列表
|
||||
LambdaQueryWrapper<InspectionWorkNode> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(InspectionWorkNode::getInspectionInfoId, inspectionWorkNode.getInspectionInfoId());
|
||||
queryWrapper.eq(InspectionWorkNode::getInspectionInfoId, workNode.getInspectionInfoId());
|
||||
List<InspectionWorkNode> inspectionWorkNodes = this.list(queryWrapper);
|
||||
//判断当前是否是最后一个项目 根据顺序号判断
|
||||
boolean flag = hasNextNode(inspectionWorkNodes, workNode);
|
||||
|
||||
// 插入步骤信息
|
||||
InspectionStepInfo inspectionStepInfo = new InspectionStepInfo();
|
||||
inspectionStepInfo.setInspectionInfoId(Integer.parseInt(String.valueOf(inspectionWorkNode.getInspectionInfoId())));
|
||||
inspectionStepInfo.setInspectionInfoId(Integer.parseInt(String.valueOf(workNode.getInspectionInfoId())));
|
||||
|
||||
//根据projectId查询项目名称
|
||||
DlInspectionProject project = inspectionProjectService.getOne(new LambdaQueryWrapper<DlInspectionProject>()
|
||||
@ -170,6 +172,7 @@ public class InspectionWorkNodeServiceImpl extends ServiceImpl<InspectionWorkNod
|
||||
* @param inspectionWorkNode
|
||||
*/
|
||||
public void returnInspectionInfo(InspectionWorkNode inspectionWorkNode){
|
||||
// 通过
|
||||
//通过工单id获取工单
|
||||
InspectionInfo info = inspectionInfoService.getById(inspectionWorkNode.getInspectionInfoId());
|
||||
info.setIsPass("0");
|
||||
|
@ -278,7 +278,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
-- ii.status = '0' -- 工单正在进行中
|
||||
-- ii.now_order_num = iwn.order_num -- 当前工单步骤与流程节点顺序一致
|
||||
-- AND iwn.status = '0' -- 流程节点状态为待开始
|
||||
AND iwn.role_id IN
|
||||
iwn.role_id IN
|
||||
<foreach collection="roleIds" item="roleId" open="(" separator="," close=")">
|
||||
#{roleId}
|
||||
</foreach>
|
||||
|
Loading…
Reference in New Issue
Block a user