|
|
@@ -455,6 +455,7 @@ func (this *InfoChangeController) GetAllEntityList() {
|
|
|
where = where + " and SupplierId = '" + SupplierId + "'"
|
|
|
}
|
|
|
|
|
|
+ where = where + " and Name!='' and OldName!='' "
|
|
|
if CreateOn != "" {
|
|
|
dates := strings.Split(CreateOn, ",")
|
|
|
if len(dates) == 2 {
|
|
|
@@ -2197,16 +2198,16 @@ func (this *InfoChangeController) updateChangeInfo(supplierId int, infoId string
|
|
|
}
|
|
|
// 资质文件有效期延长and年审不过期,暂停状态改为准入
|
|
|
var file supplierfile.OilSupplierFile
|
|
|
- svc.GetEntityByWhere(OilSupplierFileName, "SupplierTypeCode = '000' and SupplierId = " + strconv.Itoa(supplierId) + " and EffectDate <= '" + time.Now().Format("2006-01-02") + "'" , &file)
|
|
|
+ svc.GetEntityByWhere(OilSupplierFileName, "SupplierTypeCode = '000' and SupplierId = "+strconv.Itoa(supplierId)+" and EffectDate <= '"+time.Now().Format("2006-01-02")+"'", &file)
|
|
|
if file.Id == 0 {
|
|
|
var certList []suppliercert.OilSupplierCert
|
|
|
- svc.GetEntitysByWhere(OilSupplierCertName, "SupplierId = " + strconv.Itoa(supplierId), &certList)
|
|
|
+ svc.GetEntitysByWhere(OilSupplierCertName, "SupplierId = "+strconv.Itoa(supplierId), &certList)
|
|
|
for _, cert := range certList {
|
|
|
var file1 supplierfile.OilSupplierFile
|
|
|
var certInfo suppliercert.OilSupplierCert
|
|
|
- svc.GetEntityByWhere(OilSupplierFileName, "SupplierTypeCode = '" + cert.SupplierTypeCode + "' and SupplierId = " + strconv.Itoa(supplierId) + " and EffectDate <= '" + time.Now().Format("2006-01-02") + "'" , &file1)
|
|
|
+ svc.GetEntityByWhere(OilSupplierFileName, "SupplierTypeCode = '"+cert.SupplierTypeCode+"' and SupplierId = "+strconv.Itoa(supplierId)+" and EffectDate <= '"+time.Now().Format("2006-01-02")+"'", &file1)
|
|
|
if file1.Id == 0 {
|
|
|
- if cert.InFlag == "2" && cert.ApplyTime.After(time.Now()){
|
|
|
+ if cert.InFlag == "2" && cert.ApplyTime.After(time.Now()) {
|
|
|
certInfo.InFlag = "1"
|
|
|
svc.UpdateEntityByIdCols(cert.Id, &certInfo, []string{"InFlag"})
|
|
|
}
|