DS7_JinGang
dengyu 2 months ago
parent 2fb762c222
commit 1b119eec73

@ -4281,6 +4281,19 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Settlement
return result; return result;
} }
public static DBResult PaySettlemetCanDo(List<ChPaySettlement> bodyList)
{
var result = new DBResult();
var cdc = new CommonDataContext();
return result;
}
/// <summary> /// <summary>
/// 20231102 用于通过收费申请的审批通过 /// 20231102 用于通过收费申请的审批通过
/// 自动产生收费结算 /// 自动产生收费结算

@ -1315,7 +1315,9 @@ Ext.extend(Shipping.MsOpApplyIndex, Ext.Panel, {
xtype: 'container', xtype: 'container',
layout: 'hbox', layout: 'hbox',
defaultType: 'textfield', defaultType: 'textfield',
items: [{ items: [
{
fieldLabel: '编号', fieldLabel: '编号',
name: 'CustNo', name: 'CustNo',
enableKeyEvents: true, enableKeyEvents: true,
@ -1326,7 +1328,9 @@ Ext.extend(Shipping.MsOpApplyIndex, Ext.Panel, {
} }
} }
} }
}, { }
, {
fieldLabel: '从报关日期', fieldLabel: '从报关日期',
format: 'Y-m-d', format: 'Y-m-d',
xtype: 'datefield', xtype: 'datefield',
@ -1339,7 +1343,9 @@ Ext.extend(Shipping.MsOpApplyIndex, Ext.Panel, {
} }
} }
} }
}, { }
, {
fieldLabel: '到报关日期', fieldLabel: '到报关日期',
format: 'Y-m-d', format: 'Y-m-d',
xtype: 'datefield', xtype: 'datefield',
@ -1366,7 +1372,9 @@ Ext.extend(Shipping.MsOpApplyIndex, Ext.Panel, {
scope: this scope: this
} }
] ]
}, { }
, {
xtype: 'container', xtype: 'container',
layout: 'hbox', layout: 'hbox',
defaultType: 'textfield', defaultType: 'textfield',
@ -1446,7 +1454,48 @@ Ext.extend(Shipping.MsOpApplyIndex, Ext.Panel, {
scope: this scope: this
} }
] ]
} }
, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
labelWidth: 110,
fieldLabel: '从原产地证有效期',
xtype: 'datefield',
format: 'Y-m-d',
name: 'YCDZMDateBGN',
enableKeyEvents: true,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}, {
fieldLabel: '..至',
xtype: 'datefield',
format: 'Y-m-d',
name: 'YCDZMDateEND',
enableKeyEvents: true,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}, { xtype: 'hiddenfield', flex: 1 }
, { xtype: 'hiddenfield', flex: 1 }
, { xtype: 'hiddenfield', flex: 1 }
, { xtype: 'hiddenfield', flex: 1 }
, { xtype: 'hiddenfield', flex: 1 }
, { xtype: 'hiddenfield', flex: 0.4 }
//, { xtype: 'hiddenfield',width: 70 }
]
}
]//end items(fieldset 1) ]//end items(fieldset 1)
}//end fieldset 1 }//end fieldset 1
]//end root items ]//end root items
@ -1792,7 +1841,7 @@ Ext.extend(Shipping.MsOpApplyIndex, Ext.Panel, {
this.panelTop = new Ext.Panel({ this.panelTop = new Ext.Panel({
layout: "border", layout: "border",
region: "north", region: "north",
height: 108, height: 125,
items: [this.formSearch, this.panelBtn] items: [this.formSearch, this.panelBtn]
}); });
@ -3466,6 +3515,14 @@ Ext.extend(Shipping.MsOpApplyIndex, Ext.Panel, {
var accDate_Max = form.findField('PS_ACCDATEEND').getRawValue(); var accDate_Max = form.findField('PS_ACCDATEEND').getRawValue();
sql = sql + getAndConSql(sql, accDate_Max, " ACCDATE<='" + accDate_Max + "'"); sql = sql + getAndConSql(sql, accDate_Max, " ACCDATE<='" + accDate_Max + "'");
var YCDZMDateBGN = form.findField('YCDZMDateBGN').getRawValue();
sql = sql + getAndConSql(sql, YCDZMDateBGN, " YCDZMDate>='" + YCDZMDateBGN + "'");
var YCDZMDateEND = form.findField('YCDZMDateEND').getRawValue();
sql = sql + getAndConSql(sql, YCDZMDateEND, " YCDZMDate<='" + YCDZMDateEND + "'");
// var opDateBgn = form.findField('OpDateBgn').getRawValue(); // var opDateBgn = form.findField('OpDateBgn').getRawValue();
// sql = sql + getAndConSql(sql, opDateBgn, "OPDATE >='" + opDateBgn + "'"); // sql = sql + getAndConSql(sql, opDateBgn, "OPDATE >='" + opDateBgn + "'");

@ -17,7 +17,9 @@ using System.IO.Compression;
namespace Job_DSWMS_REPORT namespace Job_DSWMS_REPORT
{ {
/// <summary>
/// 新仓储系统 分类监管 报文上传
/// </summary>
public class Job_DSWMS_REPORT_1 : IJob public class Job_DSWMS_REPORT_1 : IJob
{ {
private ILog log = LogManager.GetLogger(typeof(Job_DSWMS_REPORT_1)); private ILog log = LogManager.GetLogger(typeof(Job_DSWMS_REPORT_1));
@ -52,23 +54,26 @@ namespace Job_DSWMS_REPORT
DownLoad(filename); DownLoad(filename);
} }
catch (Exception ex) { catch (Exception ex)
{
log.Error("错误中断0:" + ex.Message); log.Error("错误中断0:" + ex.Message);
} }
} }
public class WMSXMLResult { public class WMSXMLResult
{
bool status { get; set; } bool status { get; set; }
string code { get; set; } string code { get; set; }
public string data { get; set; } public string data { get; set; }
} }
private string getFileName() { private string getFileName()
{
string strBuff = ""; string strBuff = "";
var url = SERVERPORTUrl + "?USERCODE="+USERCODE+"&PWD="+ PWD; var url = SERVERPORTUrl + "?USERCODE=" + USERCODE + "&PWD=" + PWD;
var rtn = DoGet(url); var rtn = DoGet(url);
@ -108,7 +113,8 @@ namespace Job_DSWMS_REPORT
responseString = GetResponseBody((HttpWebResponse)response); responseString = GetResponseBody((HttpWebResponse)response);
return responseString; return responseString;
} }
catch (Exception e) { catch (Exception e)
{
return e.Message; return e.Message;
} }
} }
@ -158,7 +164,7 @@ namespace Job_DSWMS_REPORT
stmMemory.Write(buffer, 0, i); stmMemory.Write(buffer, 0, i);
} }
fileBytes = stmMemory.ToArray();//文件流Byte fileBytes = stmMemory.ToArray();//文件流Byte
FileStream fs = new FileStream(FilePath+"\\" + filename, FileMode.OpenOrCreate); FileStream fs = new FileStream(FilePath + "\\" + filename, FileMode.OpenOrCreate);
stmMemory.WriteTo(fs); stmMemory.WriteTo(fs);
stmMemory.Close(); stmMemory.Close();
fs.Close(); fs.Close();
@ -206,4 +212,214 @@ namespace Job_DSWMS_REPORT
} }
/// <summary>
/// 新仓储系统 分类监管 报文上传
/// </summary>
public class Job_DSWMS_SaveDailyAmount : IJob
{
private ILog log = LogManager.GetLogger(typeof(Job_DSWMS_SaveDailyAmount));
private string USERCODE = "";
private string PWD = "";
private string SERVERUrl = "";
private string SERVERPORTUrl = "";
private string SERVERPORTUrl2 = "";
private string FilePath = "";
public void Execute(IJobExecutionContext context)
{
log.Debug($"Execute开始");
USERCODE = context.JobDetail.JobDataMap.GetString("USERCODE");
PWD = context.JobDetail.JobDataMap.GetString("PWD");
SERVERUrl = context.JobDetail.JobDataMap.GetString("SERVERUrl");
//SERVERPORTUrl = context.JobDetail.JobDataMap.GetString("SERVERPORTUrl");
SERVERPORTUrl2 = context.JobDetail.JobDataMap.GetString("SERVERPORTUrl2");
//1调用URL指定的接口 得到返回数据 取得其中的文件名
//2从URL+文件名中取得文件,保存至指定文件夹
try
{
var _data = SetDo();
//DownLoad(filename);
}
catch (Exception ex)
{
log.Error("错误中断0:" + ex.Message);
}
}
public class WMSXMLResult
{
bool status { get; set; }
string code { get; set; }
public string data { get; set; }
}
private string getFileName()
{
string strBuff = "";
var url = SERVERPORTUrl + "?USERCODE=" + USERCODE + "&PWD=" + PWD;
var rtn = DoGet(url);
//"{\"status\":true,\"code\":null,\"message\":\"\",\"data\":\"Upload/FLJG/2021_07_06_YLDY_StockApply.FLJGRX\"}"
var jsonObj = JsonConvert.DeserializeObject<WMSXMLResult>(rtn);
return jsonObj.data;
}
public static string DoPost(string url, string json, int timeout = 10000)
{
try
{
string responseString = "";//post返回的结果
ServicePointManager.ServerCertificateValidationCallback += (sender, cert, chain, err) => { return true; };
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls;
HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create(url);
req.Method = "POST";
req.Timeout = timeout;
req.Headers.Add("Accept-Encoding", "gzip, deflate");
if (!string.IsNullOrWhiteSpace(json))
{
byte[] postBytes = Encoding.UTF8.GetBytes(json);
req.ContentType = "application/json; charset=utf-8";
req.ContentLength = Encoding.UTF8.GetByteCount(json);
Stream stream = req.GetRequestStream();
stream.Write(postBytes, 0, postBytes.Length);
stream.Close();
}
else
{
req.ContentLength = 0;
}
var response = req.GetResponse();
responseString = GetResponseBody((HttpWebResponse)response);
return responseString;
}
catch (Exception e)
{
return e.Message;
}
}
public static string DoGet(string url)
{
string responseString = "";//post返回的结果
ServicePointManager.ServerCertificateValidationCallback += (sender, cert, chain, err) => { return true; };
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls;
HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create(url);
req.Method = "GET";
req.ContentLength = 0;
var response = req.GetResponse();
Stream streamResponse = response.GetResponseStream();
StreamReader streamRead = new StreamReader(streamResponse);
responseString = streamRead.ReadToEnd();
response.Close();
streamRead.Close();
return responseString;
}
public string DownLoad(string FileName)
{
var url = SERVERUrl + FileName;
var fr = FileName.Split('/').ToList();
var fileSaveName = fr[fr.Count - 1];
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.Method = "GET";
byte[] fileBytes;
using (WebResponse webRes = request.GetResponse())
{
int length = (int)webRes.ContentLength;
HttpWebResponse response = webRes as HttpWebResponse;
Stream stream = response.GetResponseStream();
var contentdisposition = response.Headers["Content-Disposition"];
var filename = fileSaveName;
//读取到内存
MemoryStream stmMemory = new MemoryStream();
byte[] buffer = new byte[length];
int i;
//将字节逐个放入到Byte中
while ((i = stream.Read(buffer, 0, buffer.Length)) > 0)
{
stmMemory.Write(buffer, 0, i);
}
fileBytes = stmMemory.ToArray();//文件流Byte
FileStream fs = new FileStream(FilePath + "\\" + filename, FileMode.OpenOrCreate);
stmMemory.WriteTo(fs);
stmMemory.Close();
fs.Close();
return FilePath + filename;
}
}
private string SetDo()
{
string strBuff = "";
var url = SERVERPORTUrl2 + "?USERCODE=" + USERCODE + "&PWD=" + PWD;
var rtn = DoGet(url);
//"{\"status\":true,\"code\":null,\"message\":\"\",\"data\":\"Upload/FLJG/2021_07_06_YLDY_StockApply.FLJGRX\"}"
var jsonObj = JsonConvert.DeserializeObject<WMSXMLResult>(rtn);
return jsonObj.data;
}
private static string GetResponseBody(HttpWebResponse response)
{
string responseBody = string.Empty;
if (response.ContentEncoding != null && response.ContentEncoding.ToLower().Contains("gzip"))
{
using (GZipStream stream = new GZipStream(response.GetResponseStream(), CompressionMode.Decompress))
{
using (StreamReader reader = new StreamReader(stream))
{
responseBody = reader.ReadToEnd();
}
}
}
else if (response.ContentEncoding != null && response.ContentEncoding.ToLower().Contains("deflate"))
{
using (DeflateStream stream = new DeflateStream(
response.GetResponseStream(), CompressionMode.Decompress))
{
using (StreamReader reader =
new StreamReader(stream, Encoding.UTF8))
{
responseBody = reader.ReadToEnd();
}
}
}
else
{
using (Stream stream = response.GetResponseStream())
{
using (StreamReader reader = new StreamReader(stream, Encoding.UTF8))
{
responseBody = reader.ReadToEnd();
}
}
}
return responseBody;
}
}
} }

@ -1,61 +1,121 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<job-scheduling-data xmlns="http://quartznet.sourceforge.net/JobSchedulingData"> <job-scheduling-data xmlns="http://quartznet.sourceforge.net/JobSchedulingData">
<processing-directives> <processing-directives>
<overwrite-existing-data>true</overwrite-existing-data> <overwrite-existing-data>true</overwrite-existing-data>
</processing-directives> </processing-directives>
<schedule> <schedule>
<job> <job>
<name>Job_DSWMS_REPORT_1</name> <name>Job_DSWMS_REPORT_1</name>
<group>Job_DSWMS_REPORT_1</group> <group>Job_DSWMS_REPORT_1</group>
<description>DSWMS分公司定时上报库存</description> <description>DSWMS分公司定时上报库存</description>
<job-type>Job_DSWMS_REPORT.Job_DSWMS_REPORT_1,Job_DSWMS_REPORT</job-type> <job-type>Job_DSWMS_REPORT.Job_DSWMS_REPORT_1,Job_DSWMS_REPORT</job-type>
<durable>true</durable> <durable>true</durable>
<recover>false</recover> <recover>false</recover>
<job-data-map> <job-data-map>
<entry> <entry>
<key>SERVERUrl</key> <key>SERVERUrl</key>
<value>http://123.234.180.6/:9991/</value> <value>http://127.0.0.1:9991/</value>
</entry> </entry>
<entry> <entry>
<key>SERVERPORTUrl</key> <key>SERVERPORTUrl</key>
<value>http://123.234.180.6/:9991/api/VW_OP_WMS_AREAGOODS/GetWMSXML</value> <value>http://127.0.0.1:9991/api/VW_OP_WMS_AREAGOODS/GetWMSXML</value>
</entry> </entry>
<entry>
<entry> <key>SERVERPORTUrl2</key>
<key>USERCODE</key> <value>http://127.0.0.1:9991/api/VW_OP_WMS_AREAGOODS/SetDailyWmsFeeCalandar</value>
<value>fxq</value> </entry>
</entry> <entry>
<key>USERCODE</key>
<entry> <value>fxq</value>
<key>PWD</key> </entry>
<value>123456</value>
</entry> <entry>
<key>PWD</key>
<entry> <value>123456</value>
<key>FilePath</key> </entry>
<value>C:\FTP</value>
</entry> <entry>
<key>FilePath</key>
</job-data-map> <value>C:\FTP</value>
</job> </entry>
<trigger> </job-data-map>
</job>
<simple>
<name>TriggerJob_DSWMS_REPORT</name> <trigger>
<group>Job_DSWMS_REPORT_1</group>
<description>报文下载解析</description> <simple>
<job-name>Job_DSWMS_REPORT_1</job-name> <name>TriggerJob_DSWMS_REPORT</name>
<job-group>Job_DSWMS_REPORT_1</job-group> <group>Job_DSWMS_REPORT_1</group>
<repeat-count>1</repeat-count> <description>报文下载解析</description>
<repeat-interval>3000</repeat-interval> <job-name>Job_DSWMS_REPORT_1</job-name>
</simple> <job-group>Job_DSWMS_REPORT_1</job-group>
</trigger> <repeat-count>1</repeat-count>
<repeat-interval>3000</repeat-interval>
</simple>
</trigger>
</schedule>
<job>
<name>Job_DSWMS_SaveDailyAmount</name>
<group>Job_DSWMS_SaveDailyAmount</group>
<description>DSWMS定时触发库存和仓储费计算</description>
<job-type>Job_DSWMS_REPORT.Job_DSWMS_SaveDailyAmount,Job_DSWMS_REPORT</job-type>
<durable>true</durable>
<recover>false</recover>
<job-data-map>
<entry>
<key>SERVERUrl</key>
<value>http://127.0.0.1:9991/</value>
</entry>
<entry>
<key>SERVERPORTUrl</key>
<value>http://127.0.0.1:9991/api/VW_OP_WMS_AREAGOODS/GetWMSXML</value>
</entry>
<entry>
<key>SERVERPORTUrl2</key>
<value>http://127.0.0.1:9991/api/VW_OP_WMS_AREAGOODS/SetDailyWmsFeeCalandar</value>
</entry>
<entry>
<key>USERCODE</key>
<value>admin</value>
</entry>
<entry>
<key>PWD</key>
<value>123456</value>
</entry>
</job-data-map>
</job>
<trigger>
<!--
<simple>
<name>TriggerDSWMS_SaveDailyAmount</name>
<group>Job_DSWMS_SaveDailyAmount</group>
<description>DSWMS定时触发库存和仓储费计算</description>
<job-name>Job_DSWMS_SaveDailyAmount</job-name>
<job-group>Job_DSWMS_SaveDailyAmount</job-group>
<repeat-count>1</repeat-count>
<repeat-interval>3000</repeat-interval>
</simple>
-->
<cron>
<name>TriggerDSWMS_SaveDailyAmount</name>
<group>Job_DSWMS_SaveDailyAmount</group>
<description>DSWMS定时触发库存和仓储费计算</description>
<job-name>Job_DSWMS_SaveDailyAmount</job-name>
<job-group>Job_DSWMS_SaveDailyAmount</job-group>
<cron-expression>0 35 0 * * ? </cron-expression>
<!--每日0点35分-->
</cron>
</trigger>
</schedule>
</job-scheduling-data> </job-scheduling-data>
Loading…
Cancel
Save