|
|
|
@ -1,15 +1,13 @@
|
|
|
|
|
package com.glxp.api.controller.purchase;
|
|
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
|
|
import com.glxp.api.annotation.RepeatSubmit;
|
|
|
|
|
import com.glxp.api.common.res.BaseResponse;
|
|
|
|
|
import com.glxp.api.common.util.ResultVOUtils;
|
|
|
|
|
import com.glxp.api.entity.purchase.PurContractDetailEntity;
|
|
|
|
|
import com.glxp.api.entity.purchase.PurContractEntity;
|
|
|
|
|
import com.glxp.api.entity.purchase.PurPlanEntity;
|
|
|
|
|
import com.glxp.api.req.purchase.AddPurPlanDetailRequest;
|
|
|
|
|
import com.glxp.api.req.purchase.PostPurContractRequest;
|
|
|
|
|
import com.glxp.api.req.purchase.PurContractDetailRequest;
|
|
|
|
|
import com.glxp.api.req.purchase.PurContractRequest;
|
|
|
|
|
import com.glxp.api.req.purchase.*;
|
|
|
|
|
import com.glxp.api.res.PageSimpleResponse;
|
|
|
|
|
import com.glxp.api.res.purchase.PurContractEntityResponse;
|
|
|
|
|
import com.glxp.api.service.auth.CustomerService;
|
|
|
|
@ -70,7 +68,9 @@ public class PurContractController {
|
|
|
|
|
String code = gennerOrderUtils.createScOrderNo(new OrderNoTypeBean("HT", "yyyyMMdd"));
|
|
|
|
|
purContractEntity.setCode(code);
|
|
|
|
|
}
|
|
|
|
|
if (editStatus == 2){//提交审核
|
|
|
|
|
|
|
|
|
|
Boolean sys_approval_flow = "1".equals(systemParamConfigService.selectValueByParamKey("sys_approval_flow"));
|
|
|
|
|
if (editStatus == 2 && sys_approval_flow){//提交审核
|
|
|
|
|
String approvalFlowId = sysApprovalFlowService.getApprovalFlowId();
|
|
|
|
|
purContractEntity.setApprovalFlowId(approvalFlowId);
|
|
|
|
|
sysApprovalFlowService.generateFlow(approvalFlowId,purContractEntity.getCode(),type);
|
|
|
|
@ -204,4 +204,20 @@ public class PurContractController {
|
|
|
|
|
return ResultVOUtils.success();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 审核采购合同
|
|
|
|
|
*/
|
|
|
|
|
@RepeatSubmit()
|
|
|
|
|
@PostMapping("/purchase/contract/auditOrder")
|
|
|
|
|
public BaseResponse auditOrder(@RequestBody PurContractRequest purContractRequest) {
|
|
|
|
|
String code = purContractRequest.getCode();
|
|
|
|
|
Integer status = purContractRequest.getStatus();
|
|
|
|
|
if (StringUtil.isEmpty(code) || status == null){
|
|
|
|
|
return ResultVOUtils.error(999, "参数有误!");
|
|
|
|
|
}
|
|
|
|
|
boolean b = purContractService.auditOrder(purContractRequest);
|
|
|
|
|
return ResultVOUtils.success("更新成功!");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|