8efe030f47
为收敛当前分支代码范围并统一人员服务目录,移除历史模块与静态资源,减少无效代码和目录分散带来的维护成本。
873 lines
26 KiB
C#
873 lines
26 KiB
C#
using BLL;
|
|
using System;
|
|
using System.Linq;
|
|
using System.Web.Http;
|
|
|
|
namespace WebAPI.Controllers
|
|
{
|
|
/// <summary>
|
|
/// 基础数据信息
|
|
/// </summary>
|
|
public class BaseInfoController : ApiController
|
|
{
|
|
#region 获取项目列表
|
|
/// <summary>
|
|
/// 获取项目列表
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public Model.ResponeData getProjectList()
|
|
{
|
|
var responeData = new Model.ResponeData();
|
|
try
|
|
{
|
|
responeData.data = BLL.APIBaseInfoService.getProjectList();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
responeData.code = 0;
|
|
responeData.message = ex.Message;
|
|
}
|
|
|
|
return responeData;
|
|
}
|
|
#endregion
|
|
|
|
#region 根据项目号获取项目信息
|
|
/// <summary>
|
|
/// 根据项目号获取项目信息
|
|
/// </summary>
|
|
/// <param name="projectCode"></param>
|
|
/// <returns></returns>
|
|
public Model.ResponeData getProjectByCode(string projectCode)
|
|
{
|
|
var responeData = new Model.ResponeData();
|
|
try
|
|
{
|
|
responeData.data = BLL.APIBaseInfoService.getProjectByCode(projectCode);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
responeData.code = 0;
|
|
responeData.message = ex.Message;
|
|
}
|
|
|
|
return responeData;
|
|
}
|
|
#endregion
|
|
|
|
#region 根据projectId获取单位工程
|
|
/// <summary>
|
|
/// 根据projectId获取单位工程
|
|
/// </summary>
|
|
/// <param name="projectId"></param>
|
|
/// <returns></returns>
|
|
public Model.ResponeData getProjectWorkArea(string projectId)
|
|
{
|
|
var responeData = new Model.ResponeData();
|
|
try
|
|
{
|
|
responeData.data = BLL.APIBaseInfoService.getProjectWorkArea(projectId);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
responeData.code = 0;
|
|
responeData.message = ex.Message;
|
|
}
|
|
|
|
return responeData;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取单位工程下分部分项
|
|
/// </summary>
|
|
/// <param name="projectId"></param>
|
|
/// <param name="unitWorkId"></param>
|
|
/// <returns></returns>
|
|
public Model.ResponeData getProjectWBSByUnitWorkId(string projectId, string unitWorkId)
|
|
{
|
|
var responeData = new Model.ResponeData();
|
|
try
|
|
{
|
|
responeData.data = BLL.APIBaseInfoService.getProjectWBSByUnitWorkId(projectId, unitWorkId);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
responeData.code = 0;
|
|
responeData.message = ex.Message;
|
|
}
|
|
|
|
return responeData;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 根据项目,单位Id获取单位工程
|
|
/// </summary>
|
|
/// <param name="projectId"></param>
|
|
/// <param name="unitId"></param>
|
|
/// <returns></returns>
|
|
public Model.ResponeData GetProjecUnitWorkByUnitId(string projectId, string unitId)
|
|
{
|
|
var responeData = new Model.ResponeData();
|
|
try
|
|
{
|
|
responeData.data = BLL.APIBaseInfoService.GetProjecUnitWorkByUnitId(projectId, unitId);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
responeData.code = 0;
|
|
responeData.message = ex.Message;
|
|
}
|
|
|
|
return responeData;
|
|
}
|
|
#endregion
|
|
|
|
#region 获取焊接基础信息
|
|
/// <summary>
|
|
/// 获取材质列表
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public Model.ResponeData GetMaterial()
|
|
{
|
|
var responeData = new Model.ResponeData();
|
|
try
|
|
{
|
|
responeData.data = BLL.APIBaseInfoService.GetMaterial();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
responeData.code = 0;
|
|
responeData.message = ex.Message;
|
|
}
|
|
|
|
return responeData;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 根据入库条码获取材料信息
|
|
/// </summary>
|
|
/// <param name="materialCode"></param>
|
|
/// <returns></returns>
|
|
public Model.ResponeData GetMaterialInfoByMaterialCode(string materialCode)
|
|
{
|
|
var responeData = new Model.ResponeData();
|
|
try
|
|
{
|
|
responeData.data = BLL.MaterialCodeLibService.GetBarCodeMaterialInfo(materialCode);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
responeData.code = 0;
|
|
responeData.message = ex.Message;
|
|
}
|
|
|
|
return responeData;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 根据入库条码保存数量
|
|
/// </summary>
|
|
[HttpPost]
|
|
public Model.ResponeData SaveMaterialInfoByBarCode(string barCode, decimal quantity)
|
|
{
|
|
var responeData = new Model.ResponeData();
|
|
try
|
|
{
|
|
responeData.data = BLL.MaterialCodeLibService.SaveBarCodeQuantity(barCode, quantity);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
responeData.code = 0;
|
|
responeData.message = ex.Message;
|
|
}
|
|
return responeData;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取焊接方法
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public Model.ResponeData GetWeldingMethod()
|
|
{
|
|
var responeData = new Model.ResponeData();
|
|
try
|
|
{
|
|
responeData.data = BLL.APIBaseInfoService.GetWeldingMethod();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
responeData.code = 0;
|
|
responeData.message = ex.Message;
|
|
}
|
|
|
|
return responeData;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取焊缝类型
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public Model.ResponeData GetWeldType()
|
|
{
|
|
var responeData = new Model.ResponeData();
|
|
try
|
|
{
|
|
responeData.data = BLL.APIBaseInfoService.GetWeldType();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
responeData.code = 0;
|
|
responeData.message = ex.Message;
|
|
}
|
|
|
|
return responeData;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 按类型获取焊接耗材。
|
|
/// </summary>
|
|
/// <param name="consumablesType">焊材类型:1焊丝,2焊条</param>
|
|
/// <returns>焊接耗材列表</returns>
|
|
public Model.ResponeData GetWeldingConsumables(string consumablesType)
|
|
{
|
|
var responeData = new Model.ResponeData();
|
|
try
|
|
{
|
|
responeData.data = BLL.APIBaseInfoService.GetWeldingConsumables(consumablesType);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
responeData.code = 0;
|
|
responeData.message = ex.Message;
|
|
}
|
|
|
|
return responeData;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取探伤类型
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public Model.ResponeData getDetectionType()
|
|
{
|
|
var responeData = new Model.ResponeData();
|
|
try
|
|
{
|
|
responeData.data = BLL.APIBaseInfoService.getDetectionType();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
responeData.code = 0;
|
|
responeData.message = ex.Message;
|
|
}
|
|
|
|
return responeData;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取探伤比例
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public Model.ResponeData getDetectionRate()
|
|
{
|
|
var responeData = new Model.ResponeData();
|
|
try
|
|
{
|
|
responeData.data = BLL.APIBaseInfoService.getDetectionRate();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
responeData.code = 0;
|
|
responeData.message = ex.Message;
|
|
}
|
|
|
|
return responeData;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取坡口类型
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public Model.ResponeData getGrooveType()
|
|
{
|
|
var responeData = new Model.ResponeData();
|
|
try
|
|
{
|
|
responeData.data = BLL.APIBaseInfoService.getGrooveType();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
responeData.code = 0;
|
|
responeData.message = ex.Message;
|
|
}
|
|
|
|
return responeData;
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region 获取通知通告
|
|
/// <summary>
|
|
/// 获取头条通知
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public Model.ResponeData getTopNotices()
|
|
{
|
|
var responeData = new Model.ResponeData();
|
|
try
|
|
{
|
|
Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString);
|
|
string returnValue = string.Empty;
|
|
var notice = (from x in db.InformationProject_Notice
|
|
where x.IsRelease == true
|
|
orderby x.ReleaseDate descending
|
|
select x).FirstOrDefault();
|
|
|
|
if (notice != null)
|
|
{
|
|
returnValue = notice.NoticeTitle;
|
|
}
|
|
|
|
responeData.data = new { returnValue };
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
responeData.code = 0;
|
|
responeData.message = ex.Message;
|
|
}
|
|
|
|
return responeData;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 根据项目ID通知通告
|
|
/// </summary>
|
|
/// <param name="projectId"></param>
|
|
/// <param name="pageIndex"></param>
|
|
/// <returns></returns>
|
|
public Model.ResponeData getNotices(string projectId, int pageIndex)
|
|
{
|
|
var responeData = new Model.ResponeData();
|
|
try
|
|
{
|
|
var noticeList = APIBaseInfoService.getNoticesList(projectId, null);
|
|
int pageCount = noticeList.Count();
|
|
if (pageCount > 0 && pageIndex > 0)
|
|
{
|
|
noticeList = noticeList.OrderByDescending(u => u.ReleaseDate).Skip(Funs.PageSize * (pageIndex - 1)).Take(Funs.PageSize).ToList();
|
|
}
|
|
responeData.data = new { pageCount, noticeList };
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
responeData.code = 0;
|
|
responeData.message = ex.Message;
|
|
}
|
|
|
|
return responeData;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 根据项目ID通知通告
|
|
/// </summary>
|
|
/// <param name="projectId">项目ID</param>
|
|
/// <param name="strParam">查询条件</param>
|
|
/// <param name="pageIndex"></param>
|
|
/// <returns></returns>
|
|
public Model.ResponeData getNoticesQuery(string projectId, string strParam, int pageIndex)
|
|
{
|
|
var responeData = new Model.ResponeData();
|
|
try
|
|
{
|
|
var noticeList = APIBaseInfoService.getNoticesList(projectId, strParam);
|
|
int pageCount = noticeList.Count();
|
|
if (pageCount > 0 && pageIndex > 0)
|
|
{
|
|
noticeList = noticeList.OrderByDescending(u => u.ReleaseDate).Skip(Funs.PageSize * (pageIndex - 1)).Take(Funs.PageSize).ToList();
|
|
}
|
|
responeData.data = new { pageCount, noticeList };
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
responeData.code = 0;
|
|
responeData.message = ex.Message;
|
|
}
|
|
|
|
return responeData;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 根据项目ID通知通告
|
|
/// </summary>
|
|
/// <param name="projectId">项目ID</param>
|
|
/// <param name="userId">用户ID</param>
|
|
/// <param name="strParam">查询条件</param>
|
|
/// <param name="pageIndex"></param>
|
|
/// <returns></returns>
|
|
public Model.ResponeData getNoticesQuery(string projectId, string userId, string strParam, int pageIndex)
|
|
{
|
|
var responeData = new Model.ResponeData();
|
|
try
|
|
{
|
|
var noticeList = APIBaseInfoService.getNoticesList(projectId, userId, strParam);
|
|
int pageCount = noticeList.Count();
|
|
if (pageCount > 0 && pageIndex > 0)
|
|
{
|
|
noticeList = noticeList.Skip(Funs.PageSize * (pageIndex - 1)).Take(Funs.PageSize).ToList();
|
|
}
|
|
responeData.data = new { pageCount, noticeList };
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
responeData.code = 0;
|
|
responeData.message = ex.Message;
|
|
}
|
|
|
|
return responeData;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 根据noticeId获取通知通告详细
|
|
/// </summary>
|
|
/// <param name="noticeId"></param>
|
|
/// <returns></returns>
|
|
public Model.ResponeData getNoticesByNoticeId(string noticeId)
|
|
{
|
|
var responeData = new Model.ResponeData();
|
|
try
|
|
{
|
|
responeData.data = APIBaseInfoService.getNoticesByNoticeId(noticeId);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
responeData.code = 0;
|
|
responeData.message = ex.Message;
|
|
}
|
|
|
|
return responeData;
|
|
}
|
|
#endregion
|
|
|
|
#region 获取岗位信息
|
|
/// <summary>
|
|
/// 获取岗位信息
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public Model.ResponeData getWorkPost()
|
|
{
|
|
var responeData = new Model.ResponeData();
|
|
try
|
|
{
|
|
responeData.data = APIBaseInfoService.getWorkPost(null);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
responeData.code = 0;
|
|
responeData.message = ex.Message;
|
|
}
|
|
|
|
return responeData;
|
|
}
|
|
/// <summary>
|
|
/// 获取岗位信息
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public Model.ResponeData getWorkPostQuery(string strParam)
|
|
{
|
|
var responeData = new Model.ResponeData();
|
|
try
|
|
{
|
|
responeData.data = APIBaseInfoService.getWorkPost(strParam);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
responeData.code = 0;
|
|
responeData.message = ex.Message;
|
|
}
|
|
|
|
return responeData;
|
|
}
|
|
#endregion
|
|
|
|
#region 获取培训类别
|
|
/// <summary>
|
|
/// 获取培训类别
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public Model.ResponeData getTrainType()
|
|
{
|
|
var responeData = new Model.ResponeData();
|
|
try
|
|
{
|
|
responeData.data = APIBaseInfoService.getTrainType();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
responeData.code = 0;
|
|
responeData.message = ex.Message;
|
|
}
|
|
return responeData;
|
|
}
|
|
#endregion
|
|
|
|
#region 获取培训级别
|
|
/// <summary>
|
|
/// 获取培训级别
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public Model.ResponeData getTrainLevel()
|
|
{
|
|
var responeData = new Model.ResponeData();
|
|
try
|
|
{
|
|
responeData.data = APIBaseInfoService.getTrainLevel();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
responeData.code = 0;
|
|
responeData.message = ex.Message;
|
|
}
|
|
return responeData;
|
|
}
|
|
#endregion
|
|
|
|
#region 获取机具类型
|
|
/// <summary>
|
|
/// 获取机具类型
|
|
/// </summary>
|
|
/// <param name="isSpecial">是否特殊</param>
|
|
/// <returns></returns>
|
|
public Model.ResponeData getSpecialEquipment(bool isSpecial)
|
|
{
|
|
var responeData = new Model.ResponeData();
|
|
try
|
|
{
|
|
responeData.data = APIBaseInfoService.getSpecialEquipment(isSpecial);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
responeData.code = 0;
|
|
responeData.message = ex.Message;
|
|
}
|
|
return responeData;
|
|
}
|
|
#endregion
|
|
|
|
#region 获取工作阶段
|
|
/// <summary>
|
|
/// 获取施工方案类别
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public Model.ResponeData getWorkStage()
|
|
{
|
|
var responeData = new Model.ResponeData();
|
|
try
|
|
{
|
|
responeData.data = APIBaseInfoService.getWorkStage();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
responeData.code = 0;
|
|
responeData.message = ex.Message;
|
|
}
|
|
return responeData;
|
|
}
|
|
#endregion
|
|
|
|
#region 获取项目班组
|
|
/// <summary>
|
|
/// 获取项目班组
|
|
/// </summary>
|
|
/// <param name="projectId"></param>
|
|
/// <param name="unitId"></param>
|
|
/// <returns></returns>
|
|
public Model.ResponeData getTeamGroup(string projectId, string unitId)
|
|
{
|
|
var responeData = new Model.ResponeData();
|
|
try
|
|
{
|
|
responeData.data = APIBaseInfoService.getTeamGroup(projectId, unitId);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
responeData.code = 0;
|
|
responeData.message = ex.Message;
|
|
}
|
|
return responeData;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取项目班组人数
|
|
/// </summary>
|
|
/// <param name="teamGroupId"></param>
|
|
/// <returns></returns>
|
|
public Model.ResponeData getTeamGroupPersonNum(string teamGroupId)
|
|
{
|
|
var responeData = new Model.ResponeData();
|
|
try
|
|
{
|
|
responeData.data = TeamGroupService.getTeamGroupPersonNum(teamGroupId);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
responeData.code = 0;
|
|
responeData.message = ex.Message;
|
|
}
|
|
return responeData;
|
|
}
|
|
/// <summary>
|
|
/// 获取项目班组人数
|
|
/// </summary>
|
|
/// <param name="teamGroupId"></param>
|
|
/// <returns></returns>
|
|
public Model.ResponeData getTeamGroupLeader(string teamGroupId)
|
|
{
|
|
var responeData = new Model.ResponeData();
|
|
try
|
|
{
|
|
responeData.data = APIBaseInfoService.getTeamGroupLeader(teamGroupId);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
responeData.code = 0;
|
|
responeData.message = ex.Message;
|
|
}
|
|
return responeData;
|
|
}
|
|
#endregion
|
|
|
|
#region 获取项目区域
|
|
/// <summary>
|
|
/// 获取项目区域
|
|
/// </summary>
|
|
/// <param name="projectId"></param>
|
|
/// <param name="unitId"></param>
|
|
/// <returns></returns>
|
|
public Model.ResponeData getWorkArea(string projectId, string unitId)
|
|
{
|
|
var responeData = new Model.ResponeData();
|
|
try
|
|
{
|
|
responeData.data = APIBaseInfoService.getWorkArea(projectId, unitId);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
responeData.code = 0;
|
|
responeData.message = ex.Message;
|
|
}
|
|
return responeData;
|
|
}
|
|
#endregion
|
|
|
|
#region 获取项目图片分类
|
|
/// <summary>
|
|
/// 获取项目图片分类
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public Model.ResponeData getPictureType()
|
|
{
|
|
var responeData = new Model.ResponeData();
|
|
try
|
|
{
|
|
responeData.data = APIBaseInfoService.getPictureType(null);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
responeData.code = 0;
|
|
responeData.message = ex.Message;
|
|
}
|
|
return responeData;
|
|
}
|
|
/// <summary>
|
|
/// 获取项目图片分类
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public Model.ResponeData getPictureType(string menuType)
|
|
{
|
|
var responeData = new Model.ResponeData();
|
|
try
|
|
{
|
|
responeData.data = APIBaseInfoService.getPictureType(menuType);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
responeData.code = 0;
|
|
responeData.message = ex.Message;
|
|
}
|
|
return responeData;
|
|
}
|
|
#endregion
|
|
|
|
#region 获取岗位类型
|
|
/// <summary>
|
|
/// 获取岗位类型
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public Model.ResponeData getPostType()
|
|
{
|
|
var responeData = new Model.ResponeData();
|
|
try
|
|
{
|
|
responeData.data = APIBaseInfoService.getSysConst(ConstValue.Group_PostType);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
responeData.code = 0;
|
|
responeData.message = ex.Message;
|
|
}
|
|
return responeData;
|
|
}
|
|
#endregion
|
|
|
|
#region 获取特岗证书
|
|
/// <summary>
|
|
/// 获取特岗证书
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public Model.ResponeData getCertificate()
|
|
{
|
|
var responeData = new Model.ResponeData();
|
|
try
|
|
{
|
|
responeData.data = APIBaseInfoService.getCertificate();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
responeData.code = 0;
|
|
responeData.message = ex.Message;
|
|
}
|
|
return responeData;
|
|
}
|
|
#endregion
|
|
|
|
#region 获取部门信息
|
|
/// <summary>
|
|
/// 获取部门信息
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public Model.ResponeData getDepart()
|
|
{
|
|
var responeData = new Model.ResponeData();
|
|
try
|
|
{
|
|
responeData.data = APIBaseInfoService.getDepart();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
responeData.code = 0;
|
|
responeData.message = ex.Message;
|
|
}
|
|
return responeData;
|
|
}
|
|
#endregion
|
|
|
|
#region 获取国家基础信息
|
|
/// <summary>
|
|
/// 获取应急预案类型
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public Model.ResponeData getCountry()
|
|
{
|
|
var responeData = new Model.ResponeData();
|
|
try
|
|
{
|
|
responeData.data = APIBaseInfoService.getCountry();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
responeData.code = 0;
|
|
responeData.message = ex.Message;
|
|
}
|
|
return responeData;
|
|
}
|
|
#endregion
|
|
|
|
#region 获取省份基础信息
|
|
/// <summary>
|
|
/// 获取应急预案类型
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public Model.ResponeData getProvinceByCountry(string countryId)
|
|
{
|
|
var responeData = new Model.ResponeData();
|
|
try
|
|
{
|
|
responeData.data = APIBaseInfoService.getProvinceByCountry(countryId);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
responeData.code = 0;
|
|
responeData.message = ex.Message;
|
|
}
|
|
return responeData;
|
|
}
|
|
#endregion
|
|
|
|
#region 获取实名制数据字典信息
|
|
/// <summary>
|
|
/// 获取实名制数据字典信息
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public Model.ResponeData getBasicDataByDictTypeCode(string dictTypeCode)
|
|
{
|
|
var responeData = new Model.ResponeData();
|
|
try
|
|
{
|
|
responeData.data = APIBaseInfoService.getBasicDataByDictTypeCode(dictTypeCode);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
responeData.code = 0;
|
|
responeData.message = ex.Message;
|
|
}
|
|
return responeData;
|
|
}
|
|
#endregion
|
|
|
|
#region 获取焊接位置
|
|
/// <summary>
|
|
/// 获取焊接位置
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public Model.ResponeData getWeldingLocation()
|
|
{
|
|
var responeData = new Model.ResponeData();
|
|
try
|
|
{
|
|
responeData.data = APIBaseInfoService.GetWeldingLocationList();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
responeData.code = 0;
|
|
responeData.message = ex.Message;
|
|
}
|
|
return responeData;
|
|
}
|
|
#endregion
|
|
|
|
/// <summary>
|
|
/// 分页查询入库条码明细。
|
|
/// </summary>
|
|
[HttpGet]
|
|
public Model.ResponeData GetInputDetailBarCodes(string barCodeKeyword, int pageIndex = 1, int pageSize = 20)
|
|
{
|
|
var responeData = new Model.ResponeData();
|
|
try
|
|
{
|
|
pageIndex = pageIndex < 1 ? 1 : pageIndex;
|
|
pageSize = pageSize < 1 ? 20 : Math.Min(pageSize, 200);
|
|
var result = APIBaseInfoService.GetInputDetailBarCodes(barCodeKeyword, pageIndex, pageSize);
|
|
int totalCount = result.Item2;
|
|
int pageCount = totalCount == 0 ? 0 : (int)Math.Ceiling(totalCount / (double)pageSize);
|
|
responeData.data = new { pageCount, totalCount, getDataList = result.Item1 };
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
responeData.code = 0;
|
|
responeData.message = ex.Message;
|
|
}
|
|
return responeData;
|
|
}
|
|
}
|
|
}
|