From c60a7d7b29faba465969555e2a9c69acb8510f90 Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期五, 25 二月 2022 09:11:41 +0800
Subject: [PATCH] 如果客户资料中有“*”的内容,生产文书时自动填上,质疑单位默认填写客户名称,可修改
---
zhengcaioa/zhengcaioa/Controllers/AdmManagement/SigninController.cs | 64 ++++++++++++++++++++++++++++---
1 files changed, 57 insertions(+), 7 deletions(-)
diff --git a/zhengcaioa/zhengcaioa/Controllers/AdmManagement/SigninController.cs b/zhengcaioa/zhengcaioa/Controllers/AdmManagement/SigninController.cs
index beae1d7..23467c6 100644
--- a/zhengcaioa/zhengcaioa/Controllers/AdmManagement/SigninController.cs
+++ b/zhengcaioa/zhengcaioa/Controllers/AdmManagement/SigninController.cs
@@ -296,8 +296,8 @@
else
{
dangqianbuzhou = wfRunProcessDTO.Step;
- //鏌ヨ鍘嗗彶鎰忚
- lishiyijian = _wfHistoryService.GetListshenpi(wfRunProcessDTO.Id);
+ //鏌ヨ瀹℃壒杩涘害
+ lishiyijian = _wfHistoryService.GetListshenpi(wfRunProcessDTO.Id);
if(wfRunProcessDTO.Step != "鎻愪氦")
{
shifoubiaoji = "D";
@@ -338,8 +338,37 @@
admAsk.RecStatus = "A";
ResultEntity resultEntity = new ResultEntity();
resultEntity.Result = false;
-
- if (String.IsNullOrEmpty(admAsk.Id))
+
+ if(admAsk.Step == "鎻愪氦")
+ {
+ //璇峰亣鏃堕棿涓嶈兘閲嶅彔
+ var qingjia = _signinService.GetAskLeaveChongdie(curentuser.Id, admAsk.StratTime.Value, admAsk.EndTime.Value);
+ if (qingjia.Count > 0)
+ {
+ resultEntity.Result = false;
+ resultEntity.Message = "璇ユ椂闂存宸茬粡鏈夎鍋囷紒";
+ return JsonConvert.SerializeObject(resultEntity);
+ }
+
+ //璇峰亣瓒呰繃涓夊ぉ锛屽繀椤绘彁鍓嶄笁澶╀互涓婅鍋囷紒
+ if (admAsk.LaveDay.Value >= 3 && admAsk.StratTime.Value.Date < DateTime.Now.Date.AddDays(3))
+ {
+ resultEntity.Result = false;
+ resultEntity.Message = "璇峰亣瓒呰繃涓夊ぉ锛屽繀椤绘彁鍓嶄笁澶╀互涓婅鍋囷紒";
+ return JsonConvert.SerializeObject(resultEntity);
+ }
+
+ //璇峰亣瓒呰繃涓冨ぉ锛屽繀椤绘彁鍓嶄竷澶╀互涓婅鍋囷紒
+ if (admAsk.LaveDay.Value >= 7 && admAsk.StratTime.Value.Date < DateTime.Now.Date.AddDays(7))
+ {
+ resultEntity.Result = false;
+ resultEntity.Message = "璇峰亣瓒呰繃涓冨ぉ锛屽繀椤绘彁鍓嶄竷澶╀互涓婅鍋囷紒";
+ return JsonConvert.SerializeObject(resultEntity);
+ }
+ }
+
+
+ if (String.IsNullOrEmpty(admAsk.Id))
{
admAsk.Creater = curentuser.Id;
admAsk.Createtime = DateTime.Now;
@@ -872,7 +901,7 @@
else
{
dangqianbuzhou = wfRunProcessDTO.Step;
- //鏌ヨ鍘嗗彶鎰忚
+ //鏌ヨ瀹℃壒杩涘害
lishiyijian = _wfHistoryService.GetListshenpi(wfRunProcessDTO.Id);
if (wfRunProcessDTO.Step != "鎻愪氦")
{
@@ -910,8 +939,8 @@
var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
ViewData["curentuser"] = curentuser;
leaveOff.RecStatus = "A";
- //鏈寕瀹℃壒娴侊紝鎻愪氦鐩存帴閫氳繃
- leaveOff.ShenpiStatus = "A";
+ ////鏈寕瀹℃壒娴侊紝鎻愪氦鐩存帴閫氳繃
+ //leaveOff.ShenpiStatus = "A";
if (String.IsNullOrEmpty(leaveOff.Id))
{
leaveOff.Creater = curentuser.Id;
@@ -921,6 +950,27 @@
leaveOff.Modifytime = DateTime.Now;
ResultEntity resultEntity = new ResultEntity();
resultEntity.Result = false;
+
+ if (leaveOff.Step == "鎻愪氦")
+ {
+ //璇峰亣鏃堕棿涓嶈兘閲嶅彔
+ var qingjia = _signinService.GetAskLeaveOffChongdie(curentuser.Id, leaveOff.StratTime.Value, leaveOff.EndTime.Value);
+ if (qingjia.Count > 0)
+ {
+ resultEntity.Result = false;
+ resultEntity.Message = "璇ユ椂闂存宸茬粡鏈夐攢鍋囷紒";
+ return JsonConvert.SerializeObject(resultEntity);
+ }
+
+ //閿�鍋囧繀椤讳笁澶╀互鍐�
+ if (leaveOff.StratTime.Value.Date < DateTime.Now.Date.AddDays(-3))
+ {
+ resultEntity.Result = false;
+ resultEntity.Message = "璇峰湪72灏忔椂鍐呰繘琛岄攢鍋囧鐞嗭紝瓒呰繃72灏忔椂鏃犳硶鎻愪氦";
+ return JsonConvert.SerializeObject(resultEntity);
+ }
+ }
+
using (TransactionScope scope = new TransactionScope())
{
if (leaveOff.Step == "鎻愪氦")
--
Gitblit v1.9.1