diff --git a/AllBase/BaseClass.cs b/AllBase/BaseClass.cs
index a0f656b..722a82f 100644
--- a/AllBase/BaseClass.cs
+++ b/AllBase/BaseClass.cs
@@ -27,7 +27,7 @@ namespace AllBase
///
/// 版本ID
///
- public static int VersionCount = 788;
+ public static int VersionCount = 789;
//public static int VersionCount = 613;
///
diff --git a/AllBase/Model/Result/TemuDBProductSelect.cs b/AllBase/Model/Result/TemuDBProductSelect.cs
index 58b63a6..ba0c2b7 100644
--- a/AllBase/Model/Result/TemuDBProductSelect.cs
+++ b/AllBase/Model/Result/TemuDBProductSelect.cs
@@ -1,4 +1,5 @@
-using System;
+using AllBase.Model.Param.WXParam;
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -47,6 +48,7 @@ namespace AllBase.Model.Result
public string skc_id { get; set; }
public int product_get_type { get; set; }
public KJDDBProduct kjdDbProduct { get; set; } = null;
+ public WXUploadProductParam wxDraftProduct { get; set; } = null;
#endregion
}
}
diff --git a/KJDService/KJD_WebService/BLL/KJD/ProductThirdManage.cs b/KJDService/KJD_WebService/BLL/KJD/ProductThirdManage.cs
index b3dd8e4..c2b6d74 100644
--- a/KJDService/KJD_WebService/BLL/KJD/ProductThirdManage.cs
+++ b/KJDService/KJD_WebService/BLL/KJD/ProductThirdManage.cs
@@ -838,6 +838,7 @@ namespace KJD_Web.BLL
var search_sub_sa_name = RegexUtils.GetStringQuery(ref inputData, "search_sub_sa_name")?.Replace("'", "\\'");
var status = RegexUtils.GetStringQuery(ref inputData, "status")?.Replace("'", "\\'");
var operate_sub_sa_name = RegexUtils.GetStringQuery(ref inputData, "operate_sub_sa_name")?.Replace("'", "\\'");
+ var search_year = RegexUtils.GetStringQuery(ref inputData, "search_year")?.Replace("'", "\\'").ParseToInt();
var search_end_time = RegexUtils.GetStringJson(ref inputData, "search_end_time")?.ParseToDateTimeNullable();
if (search_end_time == null || search_end_time.Value > DateTime.Now.Date.AddDays(1)) search_end_time = DateTime.Now.Date.AddDays(1);
@@ -854,26 +855,41 @@ namespace KJD_Web.BLL
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
MysqlUtils mySql = new MysqlUtils(conn);
- string sql = "select count(s.id) from (";
-
- for (int year = search_start_time.Value.Year; year <= search_end_time.Value.Year; year++)
+ string sql = "";
+ if (search_year != null)
{
string dbName = "kjd";
- if (year >= 2026)
+ if (search_year >= 2026)
dbName = "kjd_yearly";
string tableName = dbName + ".third_product_select";
-
- if (year >= 2026)
- tableName += "_" + year;
- if (year > search_start_time.Value.Year)
- sql += " UNION ALL";
- sql += " SELECT * FROM " + tableName;
+ if (search_year >= 2026)
+ tableName += "_" + search_year;
+ sql += " SELECT count(s.id) FROM " + tableName + " s " +
+ //"LEFT JOIN kjd.third_product p on s.out_product_id=p.id " +
+ //"LEFT JOIN kjd.user u on s.operate_sub_sa_name=u.user_name " +
+ "WHERE 1=1";
}
+ else
+ {
+ sql = "select count(s.id) from (";
+ for (int year = search_start_time.Value.Year; year <= search_end_time.Value.Year; year++)
+ {
+ string dbName = "kjd";
+ if (year >= 2026)
+ dbName = "kjd_yearly";
+ string tableName = dbName + ".third_product_select";
- sql += ") s " +
- "LEFT JOIN kjd.third_product p on s.out_product_id=p.id " +
- "LEFT JOIN kjd.user u on s.operate_sub_sa_name=u.user_name " +
- "WHERE s.add_time BETWEEN '" + search_start_time.Value.ToString("yyyy-MM-dd") + "' AND '" + search_end_time.Value.ToString("yyyy-MM-dd") + "' ";
+ if (year >= 2026)
+ tableName += "_" + year;
+ if (year > search_start_time.Value.Year)
+ sql += " UNION ALL";
+ sql += " SELECT * FROM " + tableName;
+ }
+ sql += ") s " +
+ "LEFT JOIN kjd.third_product p on s.out_product_id=p.id " +
+ "LEFT JOIN kjd.user u on s.operate_sub_sa_name=u.user_name " +
+ "WHERE s.add_time BETWEEN '" + search_start_time.Value.ToString("yyyy-MM-dd") + "' AND '" + search_end_time.Value.ToString("yyyy-MM-dd") + "' ";
+ }
string where = "";
if (!isAdmin)
@@ -944,35 +960,83 @@ namespace KJD_Web.BLL
//if (isDetail)
//sql = "select * from kjd.third_product_select where 1=1";
//else
- sql = "SELECT s.id,s.out_product_id,s.shop_id,s.shop_account,s.user_name," +
- "s.sub_user_name,s.notes,s.user_notes,s.status,s.draft_id,s.add_times,s.add_time,s.mdy_time," +
- "s.fission_product_name,s.operate_sub_sa_name,s.add_sub_sa_time," +
- "p.spu_id,p.skc_id,p.cat_id,p.cat_name,p.change_cat_id,p.change_cat_name,p.ext_code,p.product_name,p.main_img," +
- "u.nick_name as operate_sub_sa_nick " +
- "FROM (";
- for (int year = search_start_time.Value.Year; year <= search_end_time.Value.Year; year++)
+ if (search_year != null)
{
string dbName = "kjd";
- if (year >= 2026)
+ if (search_year >= 2026)
dbName = "kjd_yearly";
string tableName = dbName + ".third_product_select";
+ if (search_year >= 2026)
+ tableName += "_" + search_year;
- if (year >= 2026)
- tableName += "_" + year;
- if (year > search_start_time.Value.Year)
- sql += " UNION ALL";
- sql += " SELECT * FROM " + tableName;
+ sql = "SELECT s.id,s.out_product_id,s.shop_id,s.shop_account,s.user_name," +
+ "s.sub_user_name,s.notes,s.user_notes,s.status,s.draft_id,s.add_times,s.add_time,s.mdy_time," +
+ "s.fission_product_name,s.operate_sub_sa_name,s.add_sub_sa_time," +
+ "p.spu_id,p.skc_id,p.cat_id,p.cat_name,p.change_cat_id,p.change_cat_name,p.ext_code,p.product_name,p.main_img," +
+ "u.nick_name as operate_sub_sa_nick " +
+ "FROM " + tableName + " s LEFT JOIN kjd.third_product p ON s.out_product_id=p.id " +
+ "LEFT JOIN kjd.user u ON u.user_name=s.operate_sub_sa_name " +
+ "WHERE 1=1";
+ sql += where; // where子句
+ sql += " order by s.add_time desc";
+ sql += " limit " + Math.Max(page - 1, 0) * page_size + "," + page_size;
+
+
+ sql = "SELECT s1.id,s1.out_product_id,s1.shop_id,s1.shop_account,s1.user_name," +
+ "s1.sub_user_name,s1.notes,s1.user_notes,s1.status,s1.draft_id,s1.add_times,s1.add_time,s1.mdy_time," +
+ "s1.fission_product_name,s1.operate_sub_sa_name,s1.add_sub_sa_time," +
+ "s2.spu_id,s2.skc_id,s2.cat_id,s2.cat_name,s2.change_cat_id,s2.change_cat_name,s2.ext_code,s2.product_name,s2.main_img ";
+ if (operate_sub_sa_name != null || 1 == 2)
+ sql += ",s2.operate_sub_sa_nick";
+ sql += " FROM " + tableName + " s1";
+ // 子查询
+ sql += " JOIN (SELECT s.id," +
+ "p.spu_id,p.skc_id,p.cat_id,p.cat_name,p.change_cat_id,p.change_cat_name,p.ext_code,p.product_name,p.main_img ";
+ if (operate_sub_sa_name != null || 1 == 2)
+ sql += ",u.nick_name as operate_sub_sa_nick ";
+ sql += " FROM " + tableName + " s LEFT JOIN kjd.third_product p ON s.out_product_id=p.id ";
+ if (operate_sub_sa_name != null || 1 == 2)
+ sql += "LEFT JOIN kjd.user u ON u.user_name=s.operate_sub_sa_name ";
+ sql += "WHERE 1=1";
+ sql += where; // where子句
+ sql += " order by s.add_time desc";
+ sql += " limit " + Math.Max(page - 1, 0) * page_size + "," + page_size;
+ sql += ") as s2 ON s1.id = s2.id";
}
+ else
+ {
+ sql = "SELECT s.id,s.out_product_id,s.shop_id,s.shop_account,s.user_name," +
+ "s.sub_user_name,s.notes,s.user_notes,s.status,s.draft_id,s.add_times,s.add_time,s.mdy_time," +
+ "s.fission_product_name,s.operate_sub_sa_name,s.add_sub_sa_time," +
+ "p.spu_id,p.skc_id,p.cat_id,p.cat_name,p.change_cat_id,p.change_cat_name,p.ext_code,p.product_name,p.main_img," +
+ "u.nick_name as operate_sub_sa_nick " +
+ "FROM (";
- sql += ") s LEFT JOIN kjd.third_product p ON s.out_product_id=p.id " +
- "LEFT JOIN kjd.user u ON u.user_name=s.operate_sub_sa_name " +
- "WHERE 1=1";
+ for (int year = search_start_time.Value.Year; year <= search_end_time.Value.Year; year++)
+ {
+ string dbName = "kjd";
+ if (year >= 2026)
+ dbName = "kjd_yearly";
+ string tableName = dbName + ".third_product_select";
- sql += where; // where子句
+ if (year >= 2026)
+ tableName += "_" + year;
+ if (year > search_start_time.Value.Year)
+ sql += " UNION ALL";
+ sql += " SELECT * FROM " + tableName;
+ }
- sql += " order by s.add_time desc";
- sql += " limit " + Math.Max(page - 1, 0) * page_size + "," + page_size;
+ sql += ") s LEFT JOIN kjd.third_product p ON s.out_product_id=p.id " +
+ "LEFT JOIN kjd.user u ON u.user_name=s.operate_sub_sa_name " +
+ "WHERE s.add_time BETWEEN '" + search_start_time.Value.ToString("yyyy-MM-dd") + "' AND '" + search_end_time.Value.ToString("yyyy-MM-dd") + "' ";
+
+
+ sql += where; // where子句
+
+ sql += " order by s.add_time desc";
+ sql += " limit " + Math.Max(page - 1, 0) * page_size + "," + page_size;
+ }
dt = mySql.ExecuteDataTable(sql, paramLst.ToArray());
}
@@ -1008,12 +1072,15 @@ namespace KJD_Web.BLL
skc_id = row["skc_id"].ToString(),
spu_id = row["spu_id"].ToString(),
operate_sub_sa_name = row["operate_sub_sa_name"].ToString(),
- operate_sub_sa_nick = row["operate_sub_sa_nick"].ToString(),
fission_product_name = row["fission_product_name"].ToString(),
user_notes = row["user_notes"].ToString(),
//product_json = row["product_json"].ToString(),
//size_json = row["size_json"].ToString(),
};
+ if (operate_sub_sa_name != null || 1 == 2)
+ {
+ prodSelect.operate_sub_sa_nick = row["operate_sub_sa_nick"].ToString();
+ }
prodSelect.add_sub_sa_time = row["add_sub_sa_time"] as DateTime?;
productLst.Add(prodSelect);
}
diff --git a/KJDService/KJD_WebService/KJD_WebService.csproj.user b/KJDService/KJD_WebService/KJD_WebService.csproj.user
index 1b87364..4bcdc04 100644
--- a/KJDService/KJD_WebService/KJD_WebService.csproj.user
+++ b/KJDService/KJD_WebService/KJD_WebService.csproj.user
@@ -8,7 +8,7 @@
- Debug|Any CPU
+ Release|Any CPU
ShowAllFiles
diff --git a/TEMUKJD/BaseForms/LRBaseForm.cs b/TEMUKJD/BaseForms/BaseGeneralForm.cs
similarity index 99%
rename from TEMUKJD/BaseForms/LRBaseForm.cs
rename to TEMUKJD/BaseForms/BaseGeneralForm.cs
index c58ef9c..7d73c59 100644
--- a/TEMUKJD/BaseForms/LRBaseForm.cs
+++ b/TEMUKJD/BaseForms/BaseGeneralForm.cs
@@ -11,7 +11,7 @@ using System.Windows.Forms;
namespace TemuKJD.BaseForms
{
- public partial class LRBaseForm : BaseForm
+ public partial class BaseGeneralForm : BaseForm
{
const int WM_NCHITTEST = 0x0084;
const int HTLEFT = 10; //左边界
@@ -95,7 +95,7 @@ namespace TemuKJD.BaseForms
}
}
- public LRBaseForm()
+ public BaseGeneralForm()
{
InitializeComponent();
this.MaximumSize = new Size(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height);
diff --git a/TEMUKJD/BaseForms/LRBaseForm.designer.cs b/TEMUKJD/BaseForms/BaseGeneralForm.designer.cs
similarity index 99%
rename from TEMUKJD/BaseForms/LRBaseForm.designer.cs
rename to TEMUKJD/BaseForms/BaseGeneralForm.designer.cs
index ff32c41..e858171 100644
--- a/TEMUKJD/BaseForms/LRBaseForm.designer.cs
+++ b/TEMUKJD/BaseForms/BaseGeneralForm.designer.cs
@@ -1,6 +1,6 @@
namespace TemuKJD.BaseForms
{
- partial class LRBaseForm
+ partial class BaseGeneralForm
{
///
/// Required designer variable.
diff --git a/TEMUKJD/BaseForms/LRBaseForm.resx b/TEMUKJD/BaseForms/BaseGeneralForm.resx
similarity index 100%
rename from TEMUKJD/BaseForms/LRBaseForm.resx
rename to TEMUKJD/BaseForms/BaseGeneralForm.resx
diff --git a/TEMUKJD/BaseForms/BaseMsgForm.cs b/TEMUKJD/BaseForms/BaseMsgForm.cs
index fae9852..0e44739 100644
--- a/TEMUKJD/BaseForms/BaseMsgForm.cs
+++ b/TEMUKJD/BaseForms/BaseMsgForm.cs
@@ -11,7 +11,7 @@ using System.Windows.Forms;
namespace TemuKJD.BaseForms
{
- public partial class BaseMsgForm : LRBaseForm
+ public partial class BaseMsgForm : BaseGeneralForm
{
public BaseMsgForm()
{
diff --git a/TEMUKJD/BaseForms/BaseTalkForm.cs b/TEMUKJD/BaseForms/BaseTalkForm.cs
new file mode 100644
index 0000000..e368531
--- /dev/null
+++ b/TEMUKJD/BaseForms/BaseTalkForm.cs
@@ -0,0 +1,375 @@
+using AllBase;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace TemuKJD.BaseForms
+{
+ public partial class BaseTalkForm : BaseForm
+ {
+ const int WM_NCHITTEST = 0x0084;
+ const int HTLEFT = 10; //左边界
+ const int HTRIGHT = 11; //右边界
+ const int HTTOP = 12; //上边界
+ const int HTTOPLEFT = 13; //左上角
+ const int HTTOPRIGHT = 14; //右上角
+ const int HTBOTTOM = 15; //下边界
+ const int HTBOTTOMLEFT = 0x10; //左下角
+ const int HTBOTTOMRIGHT = 17; //右下角
+
+ public bool Dragable { get; set; } = true;
+
+ protected override void WndProc(ref Message m)
+ {
+ switch (m.Msg)
+ {
+ case WM_NCHITTEST:
+ base.WndProc(ref m);
+ Point vPoint = new Point((int)m.LParam & 0xFFFF,
+ (int)m.LParam >> 16 & 0xFFFF);
+ vPoint = PointToClient(vPoint);
+ if (vPoint.X <= 5)
+ if (vPoint.Y <= 5)
+ m.Result = (IntPtr)HTTOPLEFT;
+ else if (vPoint.Y >= ClientSize.Height - 5)
+ m.Result = (IntPtr)HTBOTTOMLEFT;
+ else m.Result = (IntPtr)HTLEFT;
+ else if (vPoint.X >= ClientSize.Width - 5)
+ if (vPoint.Y <= 5)
+ m.Result = (IntPtr)HTTOPRIGHT;
+ else if (vPoint.Y >= ClientSize.Height - 5)
+ m.Result = (IntPtr)HTBOTTOMRIGHT;
+ else m.Result = (IntPtr)HTRIGHT;
+ else if (vPoint.Y <= 5)
+ m.Result = (IntPtr)HTTOP;
+ else if (vPoint.Y >= ClientSize.Height - 5)
+ m.Result = (IntPtr)HTBOTTOM;
+ break;
+ default:
+ try
+ {
+ base.WndProc(ref m);
+ }
+ catch
+ {
+ }
+ break;
+ }
+
+ this.Resize += LRBaseForm_Resize;
+ }
+
+ private void LRBaseForm_Resize(object sender, EventArgs e)
+ {
+ if (WindowState == FormWindowState.Maximized)
+ {
+ pbMaxBase.Visible = false;
+ pbNormalBase.Visible = true;
+ if (showMinimizedBox)
+ pbMinBase.Visible = true;
+ }
+ else if (WindowState == FormWindowState.Minimized)
+ {
+ }
+ else
+ {
+ if (showMaximizeBox)
+ pbMaxBase.Visible = true;
+ pbNormalBase.Visible = false;
+ if (showMinimizedBox)
+ pbMinBase.Visible = true;
+ }
+
+ if (!showMinimizedBox)
+ this.pbMinBase.Visible = false;
+ if (!showMaximizeBox)
+ {
+ this.pbMaxBase.Visible = false;
+ this.pbNormalBase.Visible = false;
+ }
+ }
+
+ public BaseTalkForm()
+ {
+ InitializeComponent();
+ this.MaximumSize = new Size(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height);
+ }
+
+ private void LcBaseForm_Load(object sender, EventArgs e)
+ {
+ if (BaseClass.Ico != null)
+ Iconx = Icon = BaseClass.Ico;
+ else
+ Iconx = this.Icon = BaseClass.Ico = ImageBuild.ConvertToIcon(global::TemuKJD.Properties.Resources.icon);
+
+ if (!this.ShowIcon)
+ {
+ this.pbLogo.Visible = false;
+ this.lbTitle.Location = new Point(this.pbLogo.Location.X, this.lbTitle.Location.Y);
+ }
+ this.pbLogo.Image = BaseClass.LogoImage;
+
+ if (this.ShowMaximizeBox)
+ {
+ if (this.WindowState == FormWindowState.Maximized)
+ {
+ this.pbMaxBase.Visible = false;
+ this.pbNormalBase.Visible = true;
+ }
+ else
+ {
+ this.pbMaxBase.Visible = true;
+ this.pbNormalBase.Visible = false;
+ }
+ }
+
+ lblVersionInfo.Text = BaseClass.ToolName + " V" + BaseClass.Varsion + " - " + BaseClass.NickName;
+
+ SetPanelVisible(this.TopLevel || DesignMode);
+ }
+
+ public void SetPanelVisible(bool visible)
+ {
+ if (visible)
+ {
+ this.Padding = new Padding(1);
+ this.panel1.Visible = true;
+ }
+ else
+ {
+ this.Padding = new Padding(0);
+ this.panel1.Visible = false;
+ }
+ }
+
+ private void PictureBox2_Click(object sender, EventArgs e)
+ {
+ WindowState = FormWindowState.Minimized;
+ }
+
+ public virtual void PictureBox1_Click(object sender, EventArgs e)
+ {
+ //pictureBox3.Image?.Dispose();
+ Close();
+ }
+
+ private Icon _iconx;
+ public Icon Iconx
+ {
+ set
+ {
+ _iconx = value;
+ if (_iconx == null) return;
+ pbLogo.Image = _iconx.ToBitmap();
+ }
+ }
+
+ private bool showMinimizedBox = true;
+ [Browsable(true), Description("显示最小化按钮"), Category("自定义分组")]
+ public bool ShowMinimizedBox
+ {
+ get
+ {
+ return showMinimizedBox;
+ }
+ set
+ {
+ this.showMinimizedBox = value;
+ }
+ }
+
+ private bool showMaximizeBox = false;
+ [Browsable(true), Description("显示最大化按钮"), Category("自定义分组")]
+ public bool ShowMaximizeBox
+ {
+ get { return showMaximizeBox; }
+ set
+ {
+ showMaximizeBox = value;
+ if (showMaximizeBox)
+ {
+ if (this.WindowState == FormWindowState.Maximized)
+ {
+ this.pbMaxBase.Visible = false;
+ this.pbNormalBase.Visible = true;
+ }
+ else
+ {
+ this.pbMaxBase.Visible = true;
+ this.pbNormalBase.Visible = false;
+ }
+ }
+ else
+ {
+ this.pbMaxBase.Visible = false;
+ this.pbNormalBase.Visible = false;
+ }
+ }
+ }
+
+ public string TitleText
+ {
+ get
+ {
+ return Text;
+ }
+ set
+ {
+ lbTitle.Text = Text = value;
+ }
+ }
+ private Point mouseOffset;//记录鼠标指针的坐标
+ private bool isMouseDown;//记录鼠标左键是否按下
+ private void Panel1_MouseMove(object sender, MouseEventArgs e)
+ {
+ if (isMouseDown && Dragable)
+ {
+ //获取鼠标的位置
+ Point mousePos = MousePosition;
+ mousePos.Offset(mouseOffset.X, mouseOffset.Y);
+ Location = mousePos;
+ }
+ }
+
+ private void Panel1_MouseDown(object sender, MouseEventArgs e)
+ {
+ if (e.Button == MouseButtons.Left)
+ {
+ mouseOffset = new Point(-e.X, -e.Y);
+ isMouseDown = true;
+ }
+ }
+
+ private void Panel1_MouseUp(object sender, MouseEventArgs e)
+ {
+ isMouseDown = false;
+ }
+
+ private void PictureBox1_MouseHover(object sender, EventArgs e)
+ {
+ this.pbCloseBase.Image = global::TemuKJD.Properties.Resources.close_hover;
+ this.Cursor = Cursors.Hand;
+
+ }
+
+ private void PictureBox1_MouseLeave(object sender, EventArgs e)
+ {
+ this.pbCloseBase.Image = global::TemuKJD.Properties.Resources.close;
+ this.Cursor = Cursors.Default;
+
+ }
+
+ private void PictureBox2_MouseHover(object sender, EventArgs e)
+ {
+ this.pbMinBase.Image = global::TemuKJD.Properties.Resources.min_hover;
+ this.Cursor = Cursors.Hand;
+
+ }
+
+ private void PictureBox2_MouseLeave(object sender, EventArgs e)
+ {
+ this.pbMinBase.Image = global::TemuKJD.Properties.Resources.min;
+ this.Cursor = Cursors.Default;
+
+ }
+
+ public virtual void HideTitle()
+ {
+ this.panel1.Visible = false;
+ }
+
+ #region 窗体提交数据完成事件
+ public event Action