Browse Source

增加追溯 打码

master
luanhui 8 years ago
parent
commit
2fe43c5482
6 changed files with 28 additions and 15 deletions
  1. +3
    -0
      BO/BO/Bill/GradeAndWeight/GradeAndWeight_Detail.cs
  2. +2
    -2
      BO/Utils/AfterLoginUtil.cs
  3. +2
    -1
      BO/Utils/BillRpc/GradeAndWeightRpc.cs
  4. +4
    -0
      ButcherManageClient/ButcherManageClient.csproj
  5. +1
    -0
      ButcherManageClient/SettingForm.cs
  6. +16
    -12
      WeighAndGrading/GradeFrom.cs

+ 3
- 0
BO/BO/Bill/GradeAndWeight/GradeAndWeight_Detail.cs View File

@ -7,6 +7,7 @@ using System.Threading.Tasks;
namespace BO.BO.Bill namespace BO.BO.Bill
{ {
[Serializable]
[MapToTable("GradeAndWeight_Detail")] [MapToTable("GradeAndWeight_Detail")]
[KeyField("SID", KeyGenType.identity)] [KeyField("SID", KeyGenType.identity)]
public class GradeAndWeight_Detail public class GradeAndWeight_Detail
@ -50,5 +51,7 @@ namespace BO.BO.Bill
//掉猪 //掉猪
public bool IsDrop { get; set; } public bool IsDrop { get; set; }
public string BarCode { get; set; }
} }
} }

+ 2
- 2
BO/Utils/AfterLoginUtil.cs View File

@ -20,9 +20,9 @@ namespace BO.Utils
{ {
#if DEBUG #if DEBUG
static List<Tuple<string, string>> roleToAssemblies = new List<Tuple<string, string>>(){new Tuple<string,string>("排宰员",@"C:\BwpB3Project\src\B3ButcherManageClient\ButcherOrder\bin\Debug\ButcherOrder"), static List<Tuple<string, string>> roleToAssemblies = new List<Tuple<string, string>>(){new Tuple<string,string>("排宰员",@"C:\BwpB3Project\src\B3ButcherManageClient\ButcherOrder\bin\Debug\ButcherOrder"),
new Tuple<string,string>("过磅员",@"C:\BwpB3Project\src\B3ButcherManageClient\ButcherWeight\bin\Debug\ButcherWeight"),
new Tuple<string,string>("过磅员",@"C:\B3\src\B3ButcherManageClient\ButcherWeight\bin\Debug\ButcherWeight"),
new Tuple<string,string>("验质员",@"C:\BwpB3Project\src\B3ButcherManageClient\QualityAndOrder\bin\Debug\QualityAndOrder"), new Tuple<string,string>("验质员",@"C:\BwpB3Project\src\B3ButcherManageClient\QualityAndOrder\bin\Debug\QualityAndOrder"),
new Tuple<string,string>("定级员",@"C:\BwpB3Project\src\B3ButcherManageClient\WeighAndGrading\bin\Debug\WeighAndGrading"),
new Tuple<string,string>("定级员",@"C:\B3\src\B3ButcherManageClient\WeighAndGrading\bin\Debug\WeighAndGrading"),
new Tuple<string,string>("窒晕员",@"C:\BwpB3Project\src\B3ButcherManageClient\OrderConfirm\bin\Debug\OrderConfirm"), new Tuple<string,string>("窒晕员",@"C:\BwpB3Project\src\B3ButcherManageClient\OrderConfirm\bin\Debug\OrderConfirm"),
new Tuple<string,string>("胴体白条出入库",@"C:\B3\src\B3ButcherManageClient\TrunksIousOutInStore\bin\Debug\TrunksIousOutInStore"), new Tuple<string,string>("胴体白条出入库",@"C:\B3\src\B3ButcherManageClient\TrunksIousOutInStore\bin\Debug\TrunksIousOutInStore"),
new Tuple<string,string>("掉猪处理员",@"C:\BwpB3Project\src\B3ButcherManageClient\DropPigReOrder\bin\Debug\DropPigReOrder"), new Tuple<string,string>("掉猪处理员",@"C:\BwpB3Project\src\B3ButcherManageClient\DropPigReOrder\bin\Debug\DropPigReOrder"),


+ 2
- 1
BO/Utils/BillRpc/GradeAndWeightRpc.cs View File

@ -299,7 +299,8 @@ namespace BO.Utils.BillRpc
{ {
var query = new DQueryDom(new JoinAlias(typeof(GradeAndWeight_Detail))); var query = new DQueryDom(new JoinAlias(typeof(GradeAndWeight_Detail)));
query.Columns.Add(DQSelectColumn.Count()); query.Columns.Add(DQSelectColumn.Count());
query.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("IsDeleted", false), DQCondition.EQ("Date", date)));
query.Where.Conditions.Add(DQCondition.And(DQCondition.IsNotNull(DQExpression.Field("Technics")), DQCondition.EQ("Date", date)));
using (var session = LocalDmoSession.New()) using (var session = LocalDmoSession.New())
{ {
return Convert.ToInt32(session.ExecuteScalar(query)); return Convert.ToInt32(session.ExecuteScalar(query));


+ 4
- 0
ButcherManageClient/ButcherManageClient.csproj View File

@ -126,6 +126,10 @@
<Project>{f06032a9-bc6c-4123-947b-ef078fab7a74}</Project> <Project>{f06032a9-bc6c-4123-947b-ef078fab7a74}</Project>
<Name>SegmentationWeight</Name> <Name>SegmentationWeight</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\WeighAndGrading\WeighAndGrading.csproj">
<Project>{bfc366e2-994c-433f-9ee2-5377dba9d948}</Project>
<Name>WeighAndGrading</Name>
</ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="libs\AutoMapper.dll" /> <Content Include="libs\AutoMapper.dll" />


+ 1
- 0
ButcherManageClient/SettingForm.cs View File

@ -68,6 +68,7 @@ namespace ButcherManageClient
list.Add("SegmentationWeight.dll"); list.Add("SegmentationWeight.dll");
list.Add("TrunksIousOutInStore.dll"); list.Add("TrunksIousOutInStore.dll");
list.Add("SegmentationInStore.dll"); list.Add("SegmentationInStore.dll");
list.Add("BO.dll");
return list; return list;
} }


+ 16
- 12
WeighAndGrading/GradeFrom.cs View File

@ -115,8 +115,8 @@ namespace WeighAndGrading
if (modifyDetail == null) if (modifyDetail == null)
{ {
StartPrintEntity(tech, null);
AddDetail(livestockTag);
var code=StartPrintEntity(tech, null);
AddDetail(livestockTag,code);
} }
else else
{ {
@ -416,18 +416,19 @@ namespace WeighAndGrading
historyGrid.Refresh(); historyGrid.Refresh();
} }
void StartPrintEntity(string gongyijibie, int? index)
string StartPrintEntity(string gongyijibie, int? index)
{ {
if (!isPrintCheckBox.Checked)
{
return;
}
if (string.IsNullOrWhiteSpace(gongyijibie)) if (string.IsNullOrWhiteSpace(gongyijibie))
{ {
return;
return "";
} }
var entity = CreatePrintEntity(gongyijibie, index); var entity = CreatePrintEntity(gongyijibie, index);
WeightGradePrint.Print(entity);
if (isPrintCheckBox.Checked)
{
WeightGradePrint.Print(entity);
}
return entity.BarCode;
} }
PrintEntity CreatePrintEntity(string jibie, int? index) PrintEntity CreatePrintEntity(string jibie, int? index)
@ -477,7 +478,7 @@ namespace WeighAndGrading
{ {
return; return;
} }
StartPrintEntity(modifyDetail.Technics_Name, modifyDetail.Index);
var code=StartPrintEntity(modifyDetail.Technics_Name, modifyDetail.Index);
cancelBtn_Click(sender, EventArgs.Empty); cancelBtn_Click(sender, EventArgs.Empty);
} }
@ -702,7 +703,7 @@ namespace WeighAndGrading
#endregion #endregion
static object _obj = new object(); static object _obj = new object();
void AddDetail(CTuple<long, string, short, string> livestock)
void AddDetail(CTuple<long, string, short, string> livestock,string barCode)
{ {
lock (_obj) lock (_obj)
{ {
@ -732,7 +733,9 @@ namespace WeighAndGrading
SetBtnUnCheck(disBtn); SetBtnUnCheck(disBtn);
disBtn = null; disBtn = null;
} }
LocalGradeAndWeightBL.Update(first, "OrderDetail_ID", "Order", "Date", "Livestock_ID", "Livestock_Name", "Technics", "Technics_Name", "Weight");
first.BarCode = barCode;
LocalGradeAndWeightBL.Update(first, "OrderDetail_ID", "Order", "Date", "Livestock_ID", "Livestock_Name", "Technics", "Technics_Name", "Weight", "BarCode");
var tag = details.FirstOrDefault(x => x.SID == first.SID); var tag = details.FirstOrDefault(x => x.SID == first.SID);
if (first != null) if (first != null)
{ {
@ -751,6 +754,7 @@ namespace WeighAndGrading
{ {
maxIndex++; maxIndex++;
var entity = new GradeAndWeight_Detail(); var entity = new GradeAndWeight_Detail();
entity.BarCode = barCode;
entity.Index = maxIndex; entity.Index = maxIndex;
if (currentRow != null) if (currentRow != null)
{ {


Loading…
Cancel
Save