Explorar el Código

修改抄表信息

yinyafei hace 2 años
padre
commit
7156df5bac

+ 10 - 15
PMS.NetCore/PMS.NetCore.BusinessCore/BaseCore/fdc_pm_meterrecordManager.cs

@@ -77,7 +77,7 @@ public class fdc_pm_meterrecordManager : DbContext<fdc_pm_meterrecord>
                 fdc_pm_meterrecord_b.autoid = fdc_pm_meterrecord_b.autoid == "" ? billcode : fdc_pm_meterrecord_b.autoid;
                 fdc_pm_meterrecord_b.metername = housemeterModel.metername;
                 //水表名称               
-                fdc_pm_meterrecord_b.billno = item.bcode + dt.ToString("yyyyMMdd") + item.Userid;
+                fdc_pm_meterrecord_b.billno = item.bcode + dt.ToString("yyyyMMdd") + item.userid;
                 //楼栋实例
                 var buildModel = Db.Queryable<fdc_pm_build>().Single(m => m.bcode == item.bcode);
                 if (!Db.Queryable<fdc_pm_meterrecord_b>().Any(m => m.billno == fdc_pm_meterrecord_b.billno))
@@ -90,22 +90,17 @@ public class fdc_pm_meterrecordManager : DbContext<fdc_pm_meterrecord>
                     fdc_pm_meterrecord.bcode = item.bcode;
                     fdc_pm_meterrecord.pcode = buildModel.pcode;
                     fdc_pm_meterrecord.metertime = DateTime.Now;
-                    fdc_pm_meterrecord.employeid = item.Userid;
+                    fdc_pm_meterrecord.employeid = item.userid;
                     fdc_pm_meterrecord.flag = "0";
-                    fdc_pm_meterrecord.voperatorid = item.Userid;
+                    fdc_pm_meterrecord.voperatorid = item.userid;
                     fdc_pm_meterrecord.doperatordate = DateTime.Now;
                     fdc_pm_meterrecord.billstatus = "3";
 
-                    if (item.bdate.IsNullOrEmpty())
-                    {
-                        fdc_pm_meterrecord.bdate = DateTime.Now;
-                    }
-                    else
-                    {
-                        fdc_pm_meterrecord.bdate = item.bdate.ToDateTime();
-                    }
+
+                    fdc_pm_meterrecord.bdate = DateTime.Now;
+
                     fdc_pm_meterrecord.edate = DateTime.Now;
-                    var secidModel = Db.Queryable<fdc_pm_userinmanagementsec>().Single(it => it.staffcode == item.Userid);
+                    var secidModel = Db.Queryable<fdc_pm_userinmanagementsec>().Single(it => it.staffcode == item.userid);
 
                     fdc_pm_meterrecord.pk_managementsecid = secidModel.pk_managementsecid;
                     Insert(fdc_pm_meterrecord);
@@ -113,15 +108,15 @@ public class fdc_pm_meterrecordManager : DbContext<fdc_pm_meterrecord>
 
 
                 var nlast = housemeterModel.amount;
-                if (item.ncur.ToDecimal() < nlast)
+                if (item.amount.ToDecimal() < nlast)
                 {
                     return "本期表小于上期表";
                 }
                 fdc_pm_meterrecord_b.flag = "0";
                 fdc_pm_meterrecord_b.nlast = nlast;
-                fdc_pm_meterrecord_b.ncur = item.ncur.ToDecimal();
+                fdc_pm_meterrecord_b.ncur = item.amount.ToDecimal();
 
-                fdc_pm_meterrecord_b.ndosage = item.ncur.ToDecimal() - nlast;
+                fdc_pm_meterrecord_b.ndosage = item.amount.ToDecimal() - nlast;
 
 
                 var success = new fdc_pm_meterrecord_bManager().Insert(fdc_pm_meterrecord_b);