|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Web;
|
|
|
|
|
using Estsh.Web.Util;
|
|
|
|
|
using System.Data;
|
|
|
|
|
using Estsh.Web.Dal;
|
|
|
|
|
using System.Collections;
|
|
|
|
|
using Estsh.Web.Models;
|
|
|
|
|
using ApServerProvider;
|
|
|
|
|
|
|
|
|
|
/***************************************************************************************************
|
|
|
|
|
*
|
|
|
|
|
* 作者:黄飞
|
|
|
|
|
*
|
|
|
|
|
* *************************************************************************************************/
|
|
|
|
|
namespace Estsh.Core.Services
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 菜单业务处理类
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class SupplierProductionPlanPrintService
|
|
|
|
|
{
|
|
|
|
|
private SupplierProductionPlanPrintDal dal = new SupplierProductionPlanPrintDal(RemotingProxyProvider._remotingProxy);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 根据分页条件获取分页菜单数据
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="AdjustOrderName"></param>
|
|
|
|
|
/// <param name="pager"></param>
|
|
|
|
|
/// <param name="direction"></param>
|
|
|
|
|
/// <param name="sort"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public Hashtable getListByPage(RemotingProxy.RecordStatus status, Pager pager, String direction, String sort)
|
|
|
|
|
{
|
|
|
|
|
Hashtable result = new Hashtable();
|
|
|
|
|
|
|
|
|
|
String strWhere = @" 1=1 ";
|
|
|
|
|
|
|
|
|
|
String orderBy = "";
|
|
|
|
|
result = dal.getListByPage(status, pager.pageSize, pager.pageNo, strWhere, orderBy);
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取客户产线列表
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public ArrayList GetCustPDLine()
|
|
|
|
|
{
|
|
|
|
|
Hashtable result = new Hashtable();
|
|
|
|
|
DataTable dt = dal.GetCustPDLine();
|
|
|
|
|
return DataTypeConvert.NewObject.DataTableToArrayList(dt);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public ArrayList GetPrint(string cbCustPDLine, string pdLine, string partLocation, string txtCreateDate)
|
|
|
|
|
{
|
|
|
|
|
String strWhere = @" WHERE j.work_flag = -1
|
|
|
|
|
AND a.enabled = 'Y' AND k.document_data='" + txtCreateDate + @"'
|
|
|
|
|
AND j.pdline_id='" + pdLine + @"'
|
|
|
|
|
AND d.part_location " + partLocation + " ORDER BY a.seq";
|
|
|
|
|
|
|
|
|
|
Hashtable result = new Hashtable();
|
|
|
|
|
DataTable dt = dal.GetPrint(strWhere, cbCustPDLine, pdLine, txtCreateDate);
|
|
|
|
|
return DataTypeConvert.NewObject.DataTableToArrayList(dt);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public ArrayList GetSummary(string txtCreateDate)
|
|
|
|
|
{
|
|
|
|
|
Hashtable result = new Hashtable();
|
|
|
|
|
DataTable dt = dal.GetSummary(txtCreateDate);
|
|
|
|
|
|
|
|
|
|
//string aa = dt.Rows[25]["part_spec"].ToString();
|
|
|
|
|
//int bb = aa.Length;
|
|
|
|
|
for (int i = 0; i < dt.Rows.Count; i++)
|
|
|
|
|
{
|
|
|
|
|
int partSpec = dt.Rows[i]["part_spec"].ToString().Length;
|
|
|
|
|
if (partSpec > 14)
|
|
|
|
|
{
|
|
|
|
|
dt.Rows[i]["part_spec"] = dt.Rows[i]["part_spec"].ToString().Substring(0, 14);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return DataTypeConvert.NewObject.DataTableToArrayList(dt);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 保存菜单数据
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="htParams"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public int saveAdjustOrder(Hashtable htParams)
|
|
|
|
|
{
|
|
|
|
|
return dal.saveAdjustOrder(htParams);
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 更新菜单数据
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="htParams"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public int updateAdjustOrder(Hashtable htParams)
|
|
|
|
|
{
|
|
|
|
|
return dal.updateAdjustOrder(htParams);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 查看详情
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="ruid"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public ArrayList getAdjustOrder(String part_id)
|
|
|
|
|
{
|
|
|
|
|
part_id = "part_id = " + part_id;
|
|
|
|
|
DataTable dt = dal.getList(part_id, "");
|
|
|
|
|
ArrayList result = DataTypeConvert.NewObject.DataTableToArrayList(dt);
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 删除菜单
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="ids"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public int deleteAdjustOrder(String ids)
|
|
|
|
|
{
|
|
|
|
|
String[] idArray = ids.Split(',');
|
|
|
|
|
int count = 0;
|
|
|
|
|
foreach (String id in idArray)
|
|
|
|
|
{
|
|
|
|
|
if (!"".Equals(id))
|
|
|
|
|
{
|
|
|
|
|
count += this.dal.deleteAdjustOrder(id);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return count;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 上移
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="ids"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public bool upRow(int seq, int ruid, int up_ruid, int up_seq)
|
|
|
|
|
{
|
|
|
|
|
bool Bool = false;
|
|
|
|
|
|
|
|
|
|
Bool = this.dal.upRow(seq, ruid, up_ruid, up_seq);
|
|
|
|
|
|
|
|
|
|
return Bool;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 上移多行
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="ids"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public bool upAll(int ruid, int seq, int up_ruid, int up_seq)
|
|
|
|
|
{
|
|
|
|
|
bool Bool = false;
|
|
|
|
|
|
|
|
|
|
Bool = this.dal.upAll(ruid, seq, up_ruid, up_seq);
|
|
|
|
|
|
|
|
|
|
return Bool;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool adjustSeq(int addSeqNo, int SequenceNumber, string ruidList, string prodType)
|
|
|
|
|
{
|
|
|
|
|
bool Bool = false;
|
|
|
|
|
|
|
|
|
|
Bool = this.dal.adjustSeq(addSeqNo, SequenceNumber, ruidList, prodType);
|
|
|
|
|
|
|
|
|
|
return Bool;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool adjustSeq2(int addSeqNo, int SequenceNumber, string ruidList, string prodType)
|
|
|
|
|
{
|
|
|
|
|
bool Bool = false;
|
|
|
|
|
|
|
|
|
|
Bool = this.dal.adjustSeq2(addSeqNo, SequenceNumber, ruidList, prodType);
|
|
|
|
|
|
|
|
|
|
return Bool;
|
|
|
|
|
}
|
|
|
|
|
public int maxSeq()
|
|
|
|
|
{
|
|
|
|
|
return dal.maxSeq();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取上一条数据
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="ids"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public DataTable selectAll(string CustPDLine)
|
|
|
|
|
{
|
|
|
|
|
DataTable dt = new DataTable();
|
|
|
|
|
|
|
|
|
|
dt = this.dal.selectAll(CustPDLine);
|
|
|
|
|
|
|
|
|
|
return dt;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取下拉框中的菜单数据
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public ArrayList getSelectAdjustOrder()
|
|
|
|
|
{
|
|
|
|
|
Hashtable result = new Hashtable();
|
|
|
|
|
|
|
|
|
|
DataTable dt = dal.getSelectAdjustOrder();
|
|
|
|
|
|
|
|
|
|
return DataTypeConvert.NewObject.DataTableToArrayList(dt);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int deleteOrder(String ruid, string prodType)
|
|
|
|
|
{
|
|
|
|
|
return dal.deleteOrder(ruid, prodType);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int deleteOrderInfo(String seq, string custPdlineDesc, string prodType, string pdLine)
|
|
|
|
|
{
|
|
|
|
|
string partLocation = dal.getPartLocation(seq);
|
|
|
|
|
return dal.deleteOrderInfo(seq, custPdlineDesc, partLocation, prodType, pdLine);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|