Commit d2b4b1f3 by 穆龙飞

Merge branch 'feature-changeFlow-221110' of…

Merge branch 'feature-changeFlow-221110' of https://yxwbgit.mail.netease.com/yx-qc-change-flow/yanxuan-qc-change-system into feature-changeFlow-221110
parents 71beeeb0 183b765f
...@@ -870,9 +870,13 @@ public class ChangeFlowBiz { ...@@ -870,9 +870,13 @@ public class ChangeFlowBiz {
return changeFlowService.updateRecord(changeRecord); return changeFlowService.updateRecord(changeRecord);
} }
public BasicChangeFlowVO quote(Long flowId) { public BasicChangeFlowVO quote(Long flowId, String supplier, Integer createSource) {
// 获取工单详情 // 获取工单详情
ChangeRecord changeRecord = this.getFlowInfo(flowId); ChangeRecord changeRecord = this.getFlowInfo(flowId);
// 同舟端需校验只能引用同一供应商下的工单
if (CreateSourceEnum.TONG_ZHOU.getType().equals(createSource)) {
Assert.isTrue(changeRecord.getCreateSupplier().equals(supplier), "不能引用非本供应商工单");
}
// 获取附件 // 获取附件
List<ChangeFlowFile> changeFileList = changeFileService.getChangeFileList(changeRecord.getId()); List<ChangeFlowFile> changeFileList = changeFileService.getChangeFileList(changeRecord.getId());
return BasicChangeFlowVO.builder().parentChangeClassId(changeRecord.getParentChangeClassId()) return BasicChangeFlowVO.builder().parentChangeClassId(changeRecord.getParentChangeClassId())
......
...@@ -20,7 +20,6 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -20,7 +20,6 @@ import org.springframework.web.bind.annotation.RestController;
import com.netease.mail.yanxuan.change.biz.biz.ChangeFlowBiz; import com.netease.mail.yanxuan.change.biz.biz.ChangeFlowBiz;
import com.netease.mail.yanxuan.change.biz.config.TitleConfig; import com.netease.mail.yanxuan.change.biz.config.TitleConfig;
import com.netease.mail.yanxuan.change.biz.service.ChangeFlowExportQuery;
import com.netease.mail.yanxuan.change.biz.service.ChangeFlowService; import com.netease.mail.yanxuan.change.biz.service.ChangeFlowService;
import com.netease.mail.yanxuan.change.biz.service.DESExportService; import com.netease.mail.yanxuan.change.biz.service.DESExportService;
import com.netease.mail.yanxuan.change.biz.service.InteriorChangeConfigService; import com.netease.mail.yanxuan.change.biz.service.InteriorChangeConfigService;
...@@ -174,8 +173,10 @@ public class ChangeFlowController { ...@@ -174,8 +173,10 @@ public class ChangeFlowController {
* @return * @return
*/ */
@GetMapping("/quote") @GetMapping("/quote")
public AjaxResult<BasicChangeFlowVO> quote(@RequestParam Long flowId) { public AjaxResult<BasicChangeFlowVO> quote(@RequestParam Long flowId,
return AjaxResult.success(changeFlowBiz.quote(flowId)); @RequestParam(name = "supplier", required = false) String supplier,
@RequestParam(name = "createSource", required = false, defaultValue = "1") Integer createSource) {
return AjaxResult.success(changeFlowBiz.quote(flowId, supplier, createSource));
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment