|
|
@@ -1615,6 +1615,17 @@ func (this *OilSupplierController) AddEntity() {
|
|
|
modelCert.CreateOn = time.Now()
|
|
|
modelCert.CreateBy = this.User.Realname
|
|
|
modelCert.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
|
|
|
+ // 保存推荐单位
|
|
|
+ if this.User.IsCompanyUser == 1 {
|
|
|
+ modelCert.RecUnitId = strconv.Itoa(registerUser.CheckUnitId)
|
|
|
+ modelCert.RecUnitName = registerUser.CheckUnitName
|
|
|
+ modelCert.RecUnitPerson = registerUser.ModifiedBy
|
|
|
+ } else {
|
|
|
+ modelCert.RecUnitId = strconv.Itoa(this.User.UnitId)
|
|
|
+ modelCert.RecUnitName = this.User.Unit
|
|
|
+ modelCert.RecUnitPerson = this.User.Realname
|
|
|
+ }
|
|
|
+
|
|
|
_, err = svcCert.InsertEntityBytbl(OilSupplierCertName, &modelCert)
|
|
|
|
|
|
if err != nil {
|