From 314f15fe2caeb0d09f3824aa3ebcc8d8ecb2221e Mon Sep 17 00:00:00 2001
From: yl <ykxkd@outlook.com>
Date: 星期一, 03 三月 2025 17:25:52 +0800
Subject: [PATCH] 1.用户信息新增:薪资类型:S(计件),T(计时),M(月) 2.人员工资明细报表去掉外协部分 3.生产工单增加批量绑定工艺接口(PartSelectRputeList,RouteSelectStepList,UpdateMesOrderStepListSearch,AddUpdateMesOrderList) 4.生产工单增加自定义字段(B.priuserdefnvc1,B.priuserdefnvc2,B.priuserdefnvc3,B.priuserdefnvc4,B.priuserdefnvc5,B.priuserdefnvc6) 5.增加仓库看板接口(ProcureOutsourcLeftTop,ProductConsignmentLeftBottom,ProcureOutsourcRightTop,ProductionStockedInRightBottom)
---
VueWebCoreApi/DLL/DAL/BasicSettingDAL.cs | 125 +++++++++++++++++++++++++++++++++++++++++
1 files changed, 125 insertions(+), 0 deletions(-)
diff --git a/VueWebCoreApi/DLL/DAL/BasicSettingDAL.cs b/VueWebCoreApi/DLL/DAL/BasicSettingDAL.cs
index ef10ef2..dfce34d 100644
--- a/VueWebCoreApi/DLL/DAL/BasicSettingDAL.cs
+++ b/VueWebCoreApi/DLL/DAL/BasicSettingDAL.cs
@@ -10,6 +10,7 @@
using VueWebCoreApi.DLL.BLL;
using VueWebCoreApi.Models;
using VueWebCoreApi.Models.RolePermission;
+using VueWebCoreApi.Models.WorkData;
using VueWebCoreApi.Tools;
using static VueWebCoreApi.Models.RolePermission.RolePermission;
using static VueWebCoreApi.Models.RolePermission.RolePermissionSava;
@@ -3512,6 +3513,130 @@
}
#endregion
+ #region[浜у搧缂栫爜鎵归噺鏌ユ壘鍏宠仈鐨勫伐鑹轰俊鎭痌
+ public static ToMessage PartSelectRputeList(List<PartRouteList> list, User us)
+ {
+ string sql = "";
+ var dynamicParams = new DynamicParameters();
+ List<Dictionary<object, object>> dir = new List<Dictionary<object, object>>();
+ try
+ {
+ dynamic dynObj = JObject.Parse(us.mesSetting);
+ bool route = dynObj.route;
+ if (route) //宸ヨ壓璺嚎鐗�
+ {
+ for (int i = 0; i < list.Count; i++)
+ {
+ // 鍒涘缓涓�涓柊鐨勫瓧鍏�
+ Dictionary<object, object> dict = new Dictionary<object, object>();
+ //閫氳繃浜у搧缂栫爜鏌ユ壘鍏宠仈鐨勫伐鑹鸿矾绾夸俊鎭�
+ sql = @"select A.route_code,B.name as route_name
+ from TMateriel_Route A
+ inner join TFlw_Rout B on A.route_code=B.code
+ where A.materiel_code=@partcode and B.is_delete<>'1' and A.is_delete<>'1'";
+ dynamicParams.Add("@partcode", list[i].partcode);
+ var data = DapperHelper.selectdata(sql, dynamicParams);
+ // 鍚戝瓧鍏镐腑娣诲姞鏁版嵁
+ dict.Add("routedata", data);
+ // 灏嗗瓧鍏告坊鍔犲埌鍒楄〃涓�
+ dir.Add(dict);
+ }
+ }
+ else //宸ュ簭鐗�
+ {
+ for (int i = 0; i < list.Count; i++)
+ {
+ // 鍒涘缓涓�涓柊鐨勫瓧鍏�
+ Dictionary<object, object> dict = new Dictionary<object, object>();
+ //閫氳繃浜у搧缂栫爜鏌ユ壘鍏宠仈鐨勫伐搴忎俊鎭�
+ sql = @"select A.step_seq,A.step_code,S.stepname as step_name,A.unprice,A.isbott,A.isend
+ from (
+ select S.materiel_code,R.step_seq,S.step_code,S.unprice,R.isbott,R.isend from TPrteEqp_Stad S
+ inner join TMateriel_Step R on S.materiel_code=R.materiel_code and S.step_code=R.step_code
+ where S.materiel_code=@partcode
+ union all
+ select materiel_code,step_seq,step_code,'0' as unprice,isbott,isend from TMateriel_Step
+ where materiel_code=@partcode and materiel_code+step_code
+ not in(select materiel_code+step_code from TPrteEqp_Stad
+ where materiel_code=@partcode)
+ ) as A
+ left join TStep S on A.step_code=S.stepcode";
+ dynamicParams.Add("@partcode", list[i].partcode);
+ var data = DapperHelper.selectdata(sql, dynamicParams);
+ // 鍚戝瓧鍏镐腑娣诲姞鏁版嵁
+ dict.Add("stepdata", data);
+ // 灏嗗瓧鍏告坊鍔犲埌鍒楄〃涓�
+ dir.Add(dict);
+ }
+ }
+
+ mes.code = "200";
+ mes.message = "鏌ヨ鎴愬姛!";
+ mes.count = dir.Count;
+ mes.data = dir;
+ }
+ catch (Exception e)
+ {
+ mes.code = "300";
+ mes.count = 0;
+ mes.message = e.Message;
+ mes.data = null;
+ }
+ return mes;
+ }
+ #endregion
+
+ #region[鏍规嵁宸ヨ壓淇℃伅(宸ヨ壓璺嚎缂栫爜)鎵归噺鏌ユ壘鍏宠仈宸ュ簭闆嗗悎]
+ public static ToMessage RouteSelectStepList(List<PartRouteStepList> list)
+ {
+ string sql = "";
+ var dynamicParams = new DynamicParameters();
+ List<Dictionary<object, object>> dir = new List<Dictionary<object, object>>();
+ try
+ {
+ for (int i = 0; i < list.Count; i++)
+ {
+ // 鍒涘缓涓�涓柊鐨勫瓧鍏�
+ Dictionary<object, object> dict = new Dictionary<object, object>();
+ //閫氳繃宸ヨ壓璺嚎缂栫爜鏌ユ壘鍏宠仈鐨勫伐搴忎俊鎭�
+ sql = @"select A.step_seq,A.step_code,S.stepname as step_name,A.unprice,A.isbott,A.isend
+ from (
+ select S.materiel_code,R.seq as step_seq,S.step_code,S.unprice,R.first_choke as isbott,R.last_choke as isend from TPrteEqp_Stad S
+ inner join TFlw_Rtdt R on S.route_code=R.rout_code and S.step_code=R.step_code
+ where S.materiel_code=@partcode and S.route_code=@route_code
+ union all
+ select @partcode as materiel_code,B.seq as step_seq,B.step_code,'0' as unprice,B.first_choke as isbott,B.last_choke as isend from TFlw_Rout A
+ inner join TFlw_Rtdt B on A.code=B.rout_code
+ where A.code=@route_code and @partcode+A.code+B.step_code
+ not in(select materiel_code+rout_code+step_code from TPrteEqp_Stad
+ where materiel_code=@partcode and route_code=@route_code)
+ ) as A
+ left join TStep S on A.step_code=S.stepcode";
+ dynamicParams.Add("@partcode", list[i].partcode);
+ dynamicParams.Add("@route_code", list[i].routecode);
+ var data = DapperHelper.selectdata(sql, dynamicParams);
+ // 鍚戝瓧鍏镐腑娣诲姞鏁版嵁
+ dict.Add("stepdata", data);
+ // 灏嗗瓧鍏告坊鍔犲埌鍒楄〃涓�
+ dir.Add(dict);
+ }
+
+ mes.code = "200";
+ mes.message = "鏌ヨ鎴愬姛!";
+ mes.data = dir;
+ }
+ catch (Exception e)
+ {
+ mes.code = "300";
+ mes.count = 0;
+ mes.message = e.Message;
+ mes.data = null;
+ }
+ return mes;
+ }
+ #endregion
+
+
#region[鑺傛媿宸ヤ环鏌ヨ]
public static ToMessage BeatRateSearch(string partcode, string routecode, string stepcode, User us, int startNum, int endNum, string prop, string order)
{
--
Gitblit v1.9.3