54545454
This commit is contained in:
parent
9b50bb7a59
commit
b64bbdc582
@ -229,9 +229,21 @@ namespace MyCode.Project.OutSideService.Implementation
|
||||
public string AddTiaoMa(string json)
|
||||
{
|
||||
List<AddTiaoMa> list = JsonHelper.ToObject<List<AddTiaoMa>>(json);
|
||||
List<string> barcodeList = new List<string>();
|
||||
List<AddTiaoMa> senList = new List<AddTiaoMa>();
|
||||
list.ForEach(t =>
|
||||
{
|
||||
if (!barcodeList.Contains(t.FBarCode))
|
||||
{
|
||||
t.FBarCodeRule = "01";
|
||||
senList.Add(t);
|
||||
barcodeList.Add(t.FBarCode);
|
||||
}
|
||||
});
|
||||
|
||||
AddTiaoMaConfig addconfig = new AddTiaoMaConfig();
|
||||
addconfig.Key = "qwe123!@#";
|
||||
addconfig.Items = list;
|
||||
addconfig.Items = senList;
|
||||
WebUtils webUtils = new WebUtils();
|
||||
string json2 = JsonHelper.ToJson(addconfig);
|
||||
string ServerUrl = ConfigurationManager.AppSettings.Get("TiaoMaUrl");
|
||||
|
@ -4,7 +4,7 @@
|
||||
<job name="EveryOtherJob" desc="每60秒执行调度" enabled="true" type="MyCode.Project.ScheduleTask.Jobs.EveryOtherJob,MyCode.Project.ScheduleTask" CronExpression="0 */1 * * * ?" />
|
||||
|
||||
|
||||
<job name="EveryFiveMinuteJob" desc="10分钟抓取一次金蝶的采购订单" enabled="true" type="MyCode.Project.ScheduleTask.Jobs.EveryFiveMinuteJob,MyCode.Project.ScheduleTask" CronExpression="*/5 */1 * * * ?" />
|
||||
<job name="EveryFiveMinuteJob" desc="30分钟抓取一次金蝶的采购订单" enabled="true" type="MyCode.Project.ScheduleTask.Jobs.EveryFiveMinuteJob,MyCode.Project.ScheduleTask" CronExpression="0 */30 * * * ?" />
|
||||
|
||||
|
||||
</Jobs>
|
||||
|
@ -274,7 +274,8 @@ namespace MyCode.Project.Services.Implementation
|
||||
|
||||
|
||||
}
|
||||
if(addList.Count==0)
|
||||
var allBarcodeList = _tiaoMaRepository.Queryable().Where(t => t.FBillNo == order.FBillNo).Select(t => t.FBarCode).ToList().Distinct().ToList();
|
||||
if (addList.Count==0)
|
||||
{
|
||||
_tiaoMaRepository.Delete(t=>t.InvoceOrderItemId== orderItem.Id);
|
||||
orderItem.CuseQty = act.CuseQty;
|
||||
@ -325,10 +326,12 @@ namespace MyCode.Project.Services.Implementation
|
||||
}
|
||||
|
||||
List<AddTiaoMa> addTiaoMas = new List<AddTiaoMa>();
|
||||
addTiaoMas = addList.Select(t => new AddTiaoMa
|
||||
var addList2 = addList.Where(t => !allBarcodeList.Contains(t.FBarCode)).ToList();
|
||||
|
||||
addTiaoMas = addList2.Select(t => new AddTiaoMa
|
||||
{
|
||||
FBarCode = t.FBarCode,
|
||||
FBarCodeRule = "03",
|
||||
FBarCodeRule = "01",
|
||||
FBillCode = t.FBillNo,
|
||||
FSupplierLot = t.FSupplierLot == null ? "" : t.FSupplierLot,
|
||||
FMaterialId = t.MaterialCode,
|
||||
@ -337,6 +340,8 @@ namespace MyCode.Project.Services.Implementation
|
||||
}).ToList();
|
||||
_workProcessService.Add<IKingDeeService>(this.MerchantId, "AddTiaoMa", "生成条码档案", JsonHelper.ToJson(addTiaoMas), 5);
|
||||
}
|
||||
|
||||
|
||||
TiaoMaResp result = new TiaoMaResp();
|
||||
result.Id = orderItem.Id;
|
||||
result.BarCodeList = addList;
|
||||
|
Loading…
x
Reference in New Issue
Block a user