|
|
@@ -47,9 +47,9 @@ namespace RMYY_CallCenter_Api.DAL
|
|
47
|
47
|
{
|
|
48
|
48
|
StringBuilder strSql = new StringBuilder();
|
|
49
|
49
|
strSql.Append("insert into T_Sys_DictDrug(");
|
|
50
|
|
- strSql.Append("F_DictDrugid,cDgDispCode,cDgName,cDgNameCode,cDgGeneralName,cDgSpecification,iDgMaxstock,iDgMinstock,cDgDescription,iDgStdPrice,iDgLocalStdPrice,F_CreateTime,F_IsDelete)");
|
|
|
50
|
+ strSql.Append("F_DictDrugid,cDgDispCode,cDgName,cDgNameCode,cDgGeneralName,cDgSpecification,iDgMaxstock,iDgMinstock,cDgDescription,iDgStdPrice,iDgLocalStdPrice,F_CreateTime,F_IsDelete,cManufacturer,iRetail)");
|
|
51
|
51
|
strSql.Append(" values (");
|
|
52
|
|
- strSql.Append("@F_DictDrugid,@cDgDispCode,@cDgName,@cDgNameCode,@cDgGeneralName,@cDgSpecification,@iDgMaxstock,@iDgMinstock,@cDgDescription,@iDgStdPrice,@iDgLocalStdPrice,@F_CreateTime,@F_IsDelete)");
|
|
|
52
|
+ strSql.Append("@F_DictDrugid,@cDgDispCode,@cDgName,@cDgNameCode,@cDgGeneralName,@cDgSpecification,@iDgMaxstock,@iDgMinstock,@cDgDescription,@iDgStdPrice,@iDgLocalStdPrice,@F_CreateTime,@F_IsDelete,@cManufacturer,@iRetail)");
|
|
53
|
53
|
strSql.Append(";select @@IDENTITY");
|
|
54
|
54
|
SqlParameter[] parameters = {
|
|
55
|
55
|
new SqlParameter("@F_DictDrugid", SqlDbType.Int,4),
|
|
|
@@ -64,7 +64,11 @@ namespace RMYY_CallCenter_Api.DAL
|
|
64
|
64
|
new SqlParameter("@iDgStdPrice", SqlDbType.Decimal,9),
|
|
65
|
65
|
new SqlParameter("@iDgLocalStdPrice", SqlDbType.Decimal,9),
|
|
66
|
66
|
new SqlParameter("@F_CreateTime", SqlDbType.DateTime),
|
|
67
|
|
- new SqlParameter("@F_IsDelete", SqlDbType.Int,4)};
|
|
|
67
|
+ new SqlParameter("@F_IsDelete", SqlDbType.Int,4),
|
|
|
68
|
+ new SqlParameter("@cManufacturer", SqlDbType.VarChar,200),
|
|
|
69
|
+ new SqlParameter("@iRetail", SqlDbType.Decimal ,9)};
|
|
|
70
|
+
|
|
|
71
|
+
|
|
68
|
72
|
parameters[0].Value = model.F_DictDrugid;
|
|
69
|
73
|
parameters[1].Value = model.cDgDispCode;
|
|
70
|
74
|
parameters[2].Value = model.cDgName;
|
|
|
@@ -78,7 +82,9 @@ namespace RMYY_CallCenter_Api.DAL
|
|
78
|
82
|
parameters[10].Value = model.iDgLocalStdPrice;
|
|
79
|
83
|
parameters[11].Value = model.F_CreateTime;
|
|
80
|
84
|
parameters[12].Value = model.F_IsDelete;
|
|
81
|
|
-
|
|
|
85
|
+ parameters[13].Value = model.cManufacturer;
|
|
|
86
|
+ parameters[14].Value = model.iRetail;
|
|
|
87
|
+
|
|
82
|
88
|
object obj = DbHelperSQL.GetSingle(strSql.ToString(), parameters);
|
|
83
|
89
|
if (obj == null)
|
|
84
|
90
|
{
|
|
|
@@ -108,7 +114,10 @@ namespace RMYY_CallCenter_Api.DAL
|
|
108
|
114
|
strSql.Append("iDgStdPrice=@iDgStdPrice,");
|
|
109
|
115
|
strSql.Append("iDgLocalStdPrice=@iDgLocalStdPrice,");
|
|
110
|
116
|
strSql.Append("F_CreateTime=@F_CreateTime,");
|
|
111
|
|
- strSql.Append("F_IsDelete=@F_IsDelete");
|
|
|
117
|
+ strSql.Append("F_IsDelete=@F_IsDelete,");
|
|
|
118
|
+ strSql.Append("cManufacturer=@cManufacturer,");
|
|
|
119
|
+ strSql.Append("iRetail=@iRetail");
|
|
|
120
|
+
|
|
112
|
121
|
strSql.Append(" where F_ID=@F_ID");
|
|
113
|
122
|
SqlParameter[] parameters = {
|
|
114
|
123
|
new SqlParameter("@F_DictDrugid", SqlDbType.Int,4),
|
|
|
@@ -124,6 +133,9 @@ namespace RMYY_CallCenter_Api.DAL
|
|
124
|
133
|
new SqlParameter("@iDgLocalStdPrice", SqlDbType.Decimal,9),
|
|
125
|
134
|
new SqlParameter("@F_CreateTime", SqlDbType.DateTime),
|
|
126
|
135
|
new SqlParameter("@F_IsDelete", SqlDbType.Int,4),
|
|
|
136
|
+ new SqlParameter("@cManufacturer", SqlDbType.VarChar,200),
|
|
|
137
|
+ new SqlParameter("@iRetail", SqlDbType.Decimal ,9),
|
|
|
138
|
+
|
|
127
|
139
|
new SqlParameter("@F_ID", SqlDbType.Int,4)};
|
|
128
|
140
|
parameters[0].Value = model.F_DictDrugid;
|
|
129
|
141
|
parameters[1].Value = model.cDgDispCode;
|
|
|
@@ -138,7 +150,10 @@ namespace RMYY_CallCenter_Api.DAL
|
|
138
|
150
|
parameters[10].Value = model.iDgLocalStdPrice;
|
|
139
|
151
|
parameters[11].Value = model.F_CreateTime;
|
|
140
|
152
|
parameters[12].Value = model.F_IsDelete;
|
|
141
|
|
- parameters[13].Value = model.F_ID;
|
|
|
153
|
+ parameters[13].Value = model.cManufacturer;
|
|
|
154
|
+ parameters[14].Value = model.iRetail;
|
|
|
155
|
+
|
|
|
156
|
+ parameters[15].Value = model.F_ID;
|
|
142
|
157
|
|
|
143
|
158
|
int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
|
|
144
|
159
|
if (rows > 0)
|
|
|
@@ -202,7 +217,7 @@ namespace RMYY_CallCenter_Api.DAL
|
|
202
|
217
|
{
|
|
203
|
218
|
|
|
204
|
219
|
StringBuilder strSql = new StringBuilder();
|
|
205
|
|
- strSql.Append("select top 1 F_ID,F_DictDrugid,cDgDispCode,cDgName,cDgNameCode,cDgGeneralName,cDgSpecification,iDgMaxstock,iDgMinstock,cDgDescription,iDgStdPrice,iDgLocalStdPrice,F_CreateTime,F_IsDelete from T_Sys_DictDrug ");
|
|
|
220
|
+ strSql.Append("select top 1 F_ID,F_DictDrugid ,cManufacturer,iRetail,cDgDispCode,cDgName,cDgNameCode,cDgGeneralName,cDgSpecification,iDgMaxstock,iDgMinstock,cDgDescription,iDgStdPrice,iDgLocalStdPrice,F_CreateTime,F_IsDelete from T_Sys_DictDrug ");
|
|
206
|
221
|
strSql.Append(" where F_ID=@F_ID");
|
|
207
|
222
|
SqlParameter[] parameters = {
|
|
208
|
223
|
new SqlParameter("@F_ID", SqlDbType.Int,4)
|
|
|
@@ -286,6 +301,16 @@ namespace RMYY_CallCenter_Api.DAL
|
|
286
|
301
|
{
|
|
287
|
302
|
model.F_IsDelete = int.Parse(row["F_IsDelete"].ToString());
|
|
288
|
303
|
}
|
|
|
304
|
+ if (row["iRetail"] != null && row["iRetail"].ToString() != "")
|
|
|
305
|
+ {
|
|
|
306
|
+ model.iRetail = decimal.Parse(row["iRetail"].ToString());
|
|
|
307
|
+ }
|
|
|
308
|
+ if (row["cManufacturer"] != null)
|
|
|
309
|
+ {
|
|
|
310
|
+ model.cManufacturer = row["cManufacturer"].ToString();
|
|
|
311
|
+ }
|
|
|
312
|
+
|
|
|
313
|
+
|
|
289
|
314
|
}
|
|
290
|
315
|
return model;
|
|
291
|
316
|
}
|
|
|
@@ -296,7 +321,7 @@ namespace RMYY_CallCenter_Api.DAL
|
|
296
|
321
|
public DataSet GetList(string strWhere)
|
|
297
|
322
|
{
|
|
298
|
323
|
StringBuilder strSql = new StringBuilder();
|
|
299
|
|
- strSql.Append("select F_ID,F_DictDrugid,cDgDispCode,cDgName,cDgNameCode,cDgGeneralName,cDgSpecification,iDgMaxstock,iDgMinstock,cDgDescription,iDgStdPrice,iDgLocalStdPrice,F_CreateTime,F_IsDelete ");
|
|
|
324
|
+ strSql.Append("select F_ID,F_DictDrugid,cManufacturer,iRetail,cDgDispCode,cDgName,cDgNameCode,cDgGeneralName,cDgSpecification,iDgMaxstock,iDgMinstock,cDgDescription,iDgStdPrice,iDgLocalStdPrice,F_CreateTime,F_IsDelete ");
|
|
300
|
325
|
strSql.Append(" FROM T_Sys_DictDrug ");
|
|
301
|
326
|
if (strWhere.Trim() != "")
|
|
302
|
327
|
{
|
|
|
@@ -316,7 +341,7 @@ namespace RMYY_CallCenter_Api.DAL
|
|
316
|
341
|
{
|
|
317
|
342
|
strSql.Append(" top " + Top.ToString());
|
|
318
|
343
|
}
|
|
319
|
|
- strSql.Append(" F_ID,F_DictDrugid,cDgDispCode,cDgName,cDgNameCode,cDgGeneralName,cDgSpecification,iDgMaxstock,iDgMinstock,cDgDescription,iDgStdPrice,iDgLocalStdPrice,F_CreateTime,F_IsDelete ");
|
|
|
344
|
+ strSql.Append(" F_ID,F_DictDrugid,cManufacturer,iRetail,cDgDispCode,cDgName,cDgNameCode,cDgGeneralName,cDgSpecification,iDgMaxstock,iDgMinstock,cDgDescription,iDgStdPrice,iDgLocalStdPrice,F_CreateTime,F_IsDelete ");
|
|
320
|
345
|
strSql.Append(" FROM T_Sys_DictDrug ");
|
|
321
|
346
|
if (strWhere.Trim() != "")
|
|
322
|
347
|
{
|