Commit 5e470a26 by “zcwang”

modify:引用工单

parent 9630fd51
......@@ -870,9 +870,13 @@ public class ChangeFlowBiz {
return changeFlowService.updateRecord(changeRecord);
}
public BasicChangeFlowVO quote(Long flowId) {
public BasicChangeFlowVO quote(Long flowId, String supplier, Integer createSource) {
// 获取工单详情
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());
return BasicChangeFlowVO.builder().parentChangeClassId(changeRecord.getParentChangeClassId())
......
......@@ -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.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.DESExportService;
import com.netease.mail.yanxuan.change.biz.service.InteriorChangeConfigService;
......@@ -174,8 +173,10 @@ public class ChangeFlowController {
* @return
*/
@GetMapping("/quote")
public AjaxResult<BasicChangeFlowVO> quote(@RequestParam Long flowId) {
return AjaxResult.success(changeFlowBiz.quote(flowId));
public AjaxResult<BasicChangeFlowVO> quote(@RequestParam Long 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