QMS:质检不合格处置接口
master
xins 8 months ago
parent bcc7736224
commit 7a47c4f922

@ -4,10 +4,12 @@ import com.hw.common.core.constant.SecurityConstants;
import com.hw.common.core.constant.ServiceNameConstants;
import com.hw.common.core.domain.R;
import com.hw.system.api.domain.common.WfProcessActivity;
import com.hw.system.api.domain.common.vo.WfProcessActivityVo;
import com.hw.system.api.factory.RemoteSysCommonFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
/**
@ -23,4 +25,7 @@ public interface RemoteSysCommonService {
@PostMapping("/wfprocessactivity/selectProcessActivityIdByWfProcessId")
Long selectProcessActivityIdByWfProcessId(@RequestHeader(SecurityConstants.FROM_SOURCE) String source, Long wfProcessId);
@PostMapping("/wfprocessactivity/getWfProcessActivityByUI")
R<WfProcessActivity> getWfProcessActivityByUI(@RequestBody WfProcessActivityVo wfProcessActivityVo, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
}

@ -0,0 +1,26 @@
package com.hw.system.api.domain.common.vo;
import com.hw.common.core.web.domain.BaseEntity;
import lombok.Data;
import javax.validation.constraints.NotNull;
/**
* @Description: wf_process_activity vo
* @ClassName: WfProcessActivityVo
* @Author : xins
* @Date :2024-03-11 11:27
* @Version :1.0
*/
@Data
public class WfProcessActivityVo extends BaseEntity
{
@NotNull(message="流程ID必须输入")
private Long wfProcessId;
@NotNull(message="顺序必须输入")
private Long processActivityOrder;
}

@ -5,6 +5,7 @@ import com.hw.system.api.RemoteSysCommonService;
import com.hw.system.api.RemoteUserService;
import com.hw.system.api.domain.SysUser;
import com.hw.system.api.domain.common.WfProcessActivity;
import com.hw.system.api.domain.common.vo.WfProcessActivityVo;
import com.hw.system.api.model.LoginUser;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -19,15 +20,14 @@ import java.rmi.Remote;
* @author ruoyi
*/
@Component
public class RemoteSysCommonFallbackFactory implements FallbackFactory<RemoteSysCommonService>
{
public class RemoteSysCommonFallbackFactory implements FallbackFactory<RemoteSysCommonService> {
private static final Logger log = LoggerFactory.getLogger(RemoteLogFallbackFactory.class);
@Override
public RemoteSysCommonService create(Throwable throwable) {
log.error("用户服务调用失败:{}", throwable.getMessage());
return new RemoteSysCommonService(){
return new RemoteSysCommonService() {
@Override
@ -40,6 +40,11 @@ public class RemoteSysCommonFallbackFactory implements FallbackFactory<RemoteSys
return null;
}
@Override
public R<WfProcessActivity> getWfProcessActivityByUI(WfProcessActivityVo wfProcessActivityVo, String source) {
return R.fail("获取工单流程步骤失败:" + throwable.getMessage());
}
};
}

@ -12,6 +12,7 @@ public class WfConstants {
public static final Long WF_QUALITY_ABNORMAL_PROCESS_ID = 301L;
/**质检工单实例状态*/
public static final String WF_INSTANCE_STATUS_TO_START = "0";//未启动
public static final String WF_INSTANCE_STATUS_START = "1";//已启动
public static final String WF_INSTANCE_STATUS_FINISH = "3";//已结束

@ -185,7 +185,11 @@ public class QmsMobileController extends BaseController {
List<QmsCheckInstanceFile> qmsCheckInstanceFiles = qmsCheckInstanceFileService.selectQmsCheckInstanceFileList(queryCheckInstanceFile);
qmsCheckResultDetailVo.setQmsCheckInstanceFiles(qmsCheckInstanceFiles);
qmsCheckResultDetailVo.setWfInstsanceStatus(qmsQualityInstance.getWfInstanceStatus());
} else {
qmsCheckResultDetailVo.setWfInstsanceStatus(WfConstants.WF_INSTANCE_STATUS_TO_START);
qmsCheckResultDetailVo.setPicEditedAble(true);
}

@ -38,6 +38,8 @@ public class QmsCheckResultDetailVo
private String materialName;
private String wfInstsanceStatus;
List<QmsQualityInstanceActivity> qmsQualityInstanceActivities;
List<QmsCheckInstanceFile> qmsCheckInstanceFiles;
@ -108,6 +110,14 @@ public class QmsCheckResultDetailVo
this.materialName = materialName;
}
public String getWfInstsanceStatus() {
return wfInstsanceStatus;
}
public void setWfInstsanceStatus(String wfInstsanceStatus) {
this.wfInstsanceStatus = wfInstsanceStatus;
}
public List<QmsQualityInstanceActivity> getQmsQualityInstanceActivities() {
return qmsQualityInstanceActivities;
}

Loading…
Cancel
Save