故障保修 保养管理修改相关
This commit is contained in:
@@ -14,6 +14,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -50,4 +51,26 @@ public class DevGzbxController {
|
|||||||
return BaseWebResult.success("审批成功");
|
return BaseWebResult.success("审批成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@PostMapping("/process")
|
||||||
|
public BaseWebResult process(@RequestBody Map<String,Object> model) {
|
||||||
|
Long id = lideeYunJiUtils.getMap2Long(model, "faultId");
|
||||||
|
if(id == null){
|
||||||
|
return BaseWebResult.error(FrameErrorCodeConstants.FRAME_OP_ERROR);
|
||||||
|
}
|
||||||
|
List<Map<String,Object>> data = devGzbxService.process(id);
|
||||||
|
return BaseWebResult.success(data);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@PostMapping("/processGd")
|
||||||
|
public BaseWebResult processGd(@RequestBody Map<String,Object> model) {
|
||||||
|
Long id = lideeYunJiUtils.getMap2Long(model, "faultId");
|
||||||
|
if(id == null){
|
||||||
|
return BaseWebResult.error(FrameErrorCodeConstants.FRAME_OP_ERROR);
|
||||||
|
}
|
||||||
|
List<Map<String,Object>> data = devGzbxService.processGd(id);
|
||||||
|
return BaseWebResult.success(data);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
package com.lideeyunji.module.biz.service;
|
package com.lideeyunji.module.biz.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 故障报修 Service 接口
|
* 故障报修 Service 接口
|
||||||
*
|
*
|
||||||
@@ -11,4 +14,8 @@ public interface DevGzbxService {
|
|||||||
void auditNotPass(Long id);
|
void auditNotPass(Long id);
|
||||||
|
|
||||||
void orderAuditNotPass(Long id);
|
void orderAuditNotPass(Long id);
|
||||||
|
|
||||||
|
List<Map<String, Object>> process(Long id);
|
||||||
|
|
||||||
|
List<Map<String, Object>> processGd(Long id);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,12 +5,18 @@ import com.lideeyunji.module.biz.entity.DevGzbxWxgdDO;
|
|||||||
import com.lideeyunji.module.biz.mapper.DevGzbxMapper;
|
import com.lideeyunji.module.biz.mapper.DevGzbxMapper;
|
||||||
import com.lideeyunji.module.biz.mapper.DevGzbxWxgdMapper;
|
import com.lideeyunji.module.biz.mapper.DevGzbxWxgdMapper;
|
||||||
import com.lideeyunji.module.biz.service.DevGzbxService;
|
import com.lideeyunji.module.biz.service.DevGzbxService;
|
||||||
|
import com.lideeyunji.service.system.api.IApiAdminUserApi;
|
||||||
import com.lideeyunji.tool.framework.yunji.enums.AcceptanceStatusEnum;
|
import com.lideeyunji.tool.framework.yunji.enums.AcceptanceStatusEnum;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 参数配置 Service 实现类
|
* 参数配置 Service 实现类
|
||||||
*/
|
*/
|
||||||
@@ -24,6 +30,8 @@ public class DevGzbxServiceImpl implements DevGzbxService {
|
|||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private DevGzbxWxgdMapper devGzbxWxgdMapper;
|
private DevGzbxWxgdMapper devGzbxWxgdMapper;
|
||||||
|
@Resource
|
||||||
|
private IApiAdminUserApi userApi;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void auditNotPass(Long id) {
|
public void auditNotPass(Long id) {
|
||||||
@@ -41,4 +49,115 @@ public class DevGzbxServiceImpl implements DevGzbxService {
|
|||||||
devGzbxWxgdMapper.updateById(wxgd);
|
devGzbxWxgdMapper.updateById(wxgd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Map<String, Object>> process(Long id) {
|
||||||
|
List<Map<String, Object>> result = new ArrayList<>();
|
||||||
|
DevGzbxDO devGzbxDO = devGzbxMapper.selectById(id);
|
||||||
|
DevGzbxWxgdDO gd = devGzbxWxgdMapper.selectOne("gzbx_id", id);
|
||||||
|
Map<String, Object> model = new HashMap<>();
|
||||||
|
model.put("nodeName", "车间主任审批");
|
||||||
|
model.put("spr",userApi.getUser(devGzbxDO.getLeaderUserId()));
|
||||||
|
model.put("status", "current");
|
||||||
|
model.put("comment", "-");
|
||||||
|
if(devGzbxDO.getLeaderUserZt() == 1){
|
||||||
|
model.put("status", "approved");
|
||||||
|
model.put("comment", devGzbxDO.getLeaderUserYj());
|
||||||
|
}
|
||||||
|
result.add(model);
|
||||||
|
|
||||||
|
Map<String, Object> model1 = new HashMap<>();
|
||||||
|
model1.put("nodeName", "指定部门审批");
|
||||||
|
model1.put("spr",userApi.getUser(devGzbxDO.getAssignDeptLeader()));
|
||||||
|
model1.put("status", "current");
|
||||||
|
model1.put("comment", "-");
|
||||||
|
if(devGzbxDO.getAssignUserZt() == 1){
|
||||||
|
model1.put("status", "approved");
|
||||||
|
model1.put("comment", devGzbxDO.getAssignUserYj());
|
||||||
|
}
|
||||||
|
result.add(model1);
|
||||||
|
|
||||||
|
Map<String, Object> model4 = new HashMap<>();
|
||||||
|
model4.put("nodeName", "车间主任验收");
|
||||||
|
model4.put("status", "current");
|
||||||
|
model4.put("comment", "-");
|
||||||
|
|
||||||
|
Map<String, Object> model5 = new HashMap<>();
|
||||||
|
model5.put("nodeName", "指定部门验收");
|
||||||
|
model5.put("status", "current");
|
||||||
|
model5.put("comment", "-");
|
||||||
|
if (gd != null){
|
||||||
|
model4.put("spr",userApi.getUser(gd.getLeaderUserId()));
|
||||||
|
if(gd.getLeaderYsZt() == 1){
|
||||||
|
model4.put("status", "approved");
|
||||||
|
model4.put("comment", gd.getLeaderYsYj());
|
||||||
|
}
|
||||||
|
model5.put("spr",userApi.getUser(gd.getAssignDeptLeader()));
|
||||||
|
if(gd.getAssignYsZt() == 1){
|
||||||
|
model5.put("status", "approved");
|
||||||
|
model5.put("comment", gd.getAssignYsYj());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
result.add(model4);
|
||||||
|
result.add(model5);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Map<String, Object>> processGd(Long id) {
|
||||||
|
List<Map<String, Object>> result = new ArrayList<>();
|
||||||
|
DevGzbxWxgdDO devGzbxWxgdDO = devGzbxWxgdMapper.selectById(id);
|
||||||
|
Long gzbxId = devGzbxWxgdDO.getGzbxId();
|
||||||
|
|
||||||
|
Map<String, Object> model = new HashMap<>();
|
||||||
|
model.put("nodeName", "车间主任审批");
|
||||||
|
model.put("status", "approved");
|
||||||
|
model.put("comment", "-");
|
||||||
|
|
||||||
|
Map<String, Object> model1 = new HashMap<>();
|
||||||
|
model1.put("nodeName", "指定部门审批");
|
||||||
|
model1.put("status", "approved");
|
||||||
|
model1.put("comment", "-");
|
||||||
|
|
||||||
|
Map<String, Object> model4 = new HashMap<>();
|
||||||
|
model4.put("nodeName", "车间主任验收");
|
||||||
|
model4.put("status", "current");
|
||||||
|
model4.put("comment", "-");
|
||||||
|
model4.put("spr",userApi.getUser(devGzbxWxgdDO.getLeaderUserId()));
|
||||||
|
if(devGzbxWxgdDO.getLeaderYsZt() == 1){
|
||||||
|
model4.put("status", "approved");
|
||||||
|
model4.put("comment", devGzbxWxgdDO.getLeaderYsYj());
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, Object> model5 = new HashMap<>();
|
||||||
|
model5.put("nodeName", "指定部门验收");
|
||||||
|
model5.put("status", "current");
|
||||||
|
model5.put("comment", "-");
|
||||||
|
model5.put("spr",userApi.getUser(devGzbxWxgdDO.getAssignDeptLeader()));
|
||||||
|
if(devGzbxWxgdDO.getAssignYsZt() == 1){
|
||||||
|
model5.put("status", "approved");
|
||||||
|
model5.put("comment", devGzbxWxgdDO.getAssignYsYj());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (gzbxId != null) {
|
||||||
|
DevGzbxDO devGzbxDO = devGzbxMapper.selectById(gzbxId);
|
||||||
|
model.put("comment", devGzbxDO.getLeaderUserYj());
|
||||||
|
model.put("spr",userApi.getUser(devGzbxDO.getLeaderUserId()));
|
||||||
|
|
||||||
|
model1.put("comment", devGzbxDO.getAssignUserYj());
|
||||||
|
model1.put("spr",userApi.getUser(devGzbxDO.getAssignDeptLeader()));
|
||||||
|
}else {
|
||||||
|
model.put("comment", devGzbxWxgdDO.getLeaderYsYj());
|
||||||
|
model.put("spr",userApi.getUser(devGzbxWxgdDO.getLeaderUserId()));
|
||||||
|
|
||||||
|
model1.put("comment", devGzbxWxgdDO.getAssignYsYj());
|
||||||
|
model1.put("spr",userApi.getUser(devGzbxWxgdDO.getAssignDeptLeader()));
|
||||||
|
}
|
||||||
|
|
||||||
|
result.add(model);
|
||||||
|
result.add(model1);
|
||||||
|
result.add(model4);
|
||||||
|
result.add(model5);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user