ziwen před 2 roky
rodič
revize
c23cc77eb0
1 změnil soubory, kde provedl 4 přidání a 0 odebrání
  1. 4 0
      controller/contract/pre_register.go

+ 4 - 0
controller/contract/pre_register.go

@@ -330,6 +330,10 @@ func (rg *PreRegisterController) Add(c *gin.Context) {
 		}
 
 		// 新增开票到款记录
+		if pp.ContractRegisterId == 0{
+			resp.FailMsg("操作失败", "新增预登记失败,合同ID为0, Err: "+e.Error(), c)
+			return
+		}
 		if e = pp.Create(); e != nil {
 			resp.FailMsg("操作失败", "新增预登记失败, Err: "+e.Error(), c)
 			return