From 760e53aeef80c287ced8b6716336733867fc7565 Mon Sep 17 00:00:00 2001
From: kongzy <kongzy>
Date: 星期四, 07 三月 2024 08:30:57 +0800
Subject: [PATCH] 新增需求

---
 src/main/java/com/nanometer/smartlab/controller/ApplyMngController.java |    9 +
 src/main/webapp/warehouse_reagent_use.xhtml                             |   33 +++++--
 src/main/webapp/reagent_user_flow_info.xhtml                            |   32 +++++--
 src/main/java/com/nanometer/smartlab/controller/PriceMngController.java |    7 +
 src/main/java/com/nanometer/smartlab/service/OpeApplyServiceImpl.java   |   10 ++
 pom.xml                                                                 |    2 
 src/main/webapp/WEB-INF/sdy/sdy.properties                              |    6 
 src/main/webapp/warehouse_reagent_use_person.xhtml                      |   34 +++++---
 src/main/webapp/WEB-INF/cq/cq.properties                                |   10 +-
 src/main/webapp/personal_use_info.xhtml                                 |   31 +++++--
 src/main/webapp/WEB-INF/config.properties                               |    1 
 src/main/webapp/index.xhtml                                             |    4 
 src/main/java/com/nanometer/smartlab/controller/MenuController.java     |   19 ++++
 13 files changed, 141 insertions(+), 57 deletions(-)

diff --git a/pom.xml b/pom.xml
index 3e6290e..eb0598b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -395,7 +395,7 @@
     <profile>
       <id>test</id>
       <properties>
-        <profile.active>sin_ma</profile.active>
+        <profile.active>gslab</profile.active>
       </properties>
       <activation>
         <activeByDefault>true</activeByDefault>
diff --git a/src/main/java/com/nanometer/smartlab/controller/ApplyMngController.java b/src/main/java/com/nanometer/smartlab/controller/ApplyMngController.java
index 32222c5..4eece79 100644
--- a/src/main/java/com/nanometer/smartlab/controller/ApplyMngController.java
+++ b/src/main/java/com/nanometer/smartlab/controller/ApplyMngController.java
@@ -426,8 +426,13 @@
 
                 this.opeApply.setApplyCode(this.sysSequenceService.getApplyCode());
                 this.opeApply.setApplyUserId(applyUser.getId());
-                this.opeApply.setStatus(ApplyStatus.PENDING_APPROVAL);
+                //this.opeApply.setStatus(ApplyStatus.PENDING_APPROVAL);
                 this.opeApplyService.insertOpeApply(this.opeApply);
+                if(getActiveEnv().equalsIgnoreCase("gslab")){//姑苏实验室先进入待审批状态,然后再进入价格确认状态
+                    this.opeApply.setStatus(ApplyStatus.PENDING_APPROVAL);
+                }else{
+                    this.opeApply.setStatus(ApplyStatus.Price_CONFIRM);
+                }
 
                 FacesUtils.info("新建成功。");
                 this.menuController.backToPage();
@@ -771,7 +776,7 @@
                 opeApply.setId(IDUtils.uuid());
                 opeApply.setApplyCode(applyCode);
                 opeApply.setApplyUserId(applyUser.getId());
-                if(getActiveEnv().equalsIgnoreCase("gslab")){//姑苏实验室跳过价格确认状态,直接进入待审批状态
+                if(getActiveEnv().equalsIgnoreCase("gslab")){//姑苏实验室先进入待审批状态,然后再进入价格确认状态
                     opeApply.setStatus(ApplyStatus.PENDING_APPROVAL);
                 }else{
                     opeApply.setStatus(ApplyStatus.Price_CONFIRM);
diff --git a/src/main/java/com/nanometer/smartlab/controller/MenuController.java b/src/main/java/com/nanometer/smartlab/controller/MenuController.java
index 1c93701..2b15bc8 100644
--- a/src/main/java/com/nanometer/smartlab/controller/MenuController.java
+++ b/src/main/java/com/nanometer/smartlab/controller/MenuController.java
@@ -2,6 +2,7 @@
 
 import com.nanometer.smartlab.model.MenuModel;
 import com.nanometer.smartlab.util.FacesUtils;
+import org.apache.commons.collections4.ListUtils;
 import org.apache.commons.lang.StringUtils;
 import org.springframework.context.ApplicationContext;
 import org.springframework.context.annotation.Scope;
@@ -12,7 +13,6 @@
 import javax.annotation.Resource;
 import javax.faces.context.FacesContext;
 import javax.servlet.ServletContext;
-import java.awt.*;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.util.HashMap;
@@ -73,7 +73,24 @@
                     }
                 }
             }
+            /**
+             * 姑苏实验室 价格管理需要放在审批管理后面
+             */
+            if(this.getActiveEnv().equalsIgnoreCase("gslab")){
+                MenuModel menuModel=this.menuList.get(0);
+                List<MenuModel> subMenuModels=menuModel.getSubMenu();
+                if(!subMenuModels.get(1).getId().equalsIgnoreCase("approval_mng")){
+                    swap(subMenuModels,1,2);
+                }
+            }
         }
+
+    }
+
+    public  void swap(List<MenuModel> a, int i, int j) {
+        MenuModel t = a.get(i);
+        a.set(i, a.get(j));
+        a.set(j, t);
     }
 
     private void executeMethod(String clazzName, String methodName, Object... params) {
diff --git a/src/main/java/com/nanometer/smartlab/controller/PriceMngController.java b/src/main/java/com/nanometer/smartlab/controller/PriceMngController.java
index 2440e9f..ad2586b 100644
--- a/src/main/java/com/nanometer/smartlab/controller/PriceMngController.java
+++ b/src/main/java/com/nanometer/smartlab/controller/PriceMngController.java
@@ -339,7 +339,12 @@
             }
 
             for (OpeApply oa : this.selectedList) {
-                oa.setStatus(ApplyStatus.PENDING_APPROVAL);
+                if("gslab".equalsIgnoreCase(this.getActiveEnv())){
+                    oa.setStatus(ApplyStatus.APPROVED);
+                }else{
+                    oa.setStatus(ApplyStatus.PENDING_APPROVAL);
+                }
+
                 this.opeApplyService.updateOpeApply(oa);
             }
 
diff --git a/src/main/java/com/nanometer/smartlab/service/OpeApplyServiceImpl.java b/src/main/java/com/nanometer/smartlab/service/OpeApplyServiceImpl.java
index a576af3..cd38618 100644
--- a/src/main/java/com/nanometer/smartlab/service/OpeApplyServiceImpl.java
+++ b/src/main/java/com/nanometer/smartlab/service/OpeApplyServiceImpl.java
@@ -22,6 +22,7 @@
 import org.apache.poi.xssf.usermodel.XSSFWorkbook;
 import org.primefaces.event.FileUploadEvent;
 import org.primefaces.model.UploadedFile;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.context.annotation.Lazy;
 import org.springframework.dao.DataAccessException;
 import org.springframework.dao.DataIntegrityViolationException;
@@ -69,6 +70,9 @@
 	private SysUserService sysUserService;
     @Resource
     private BaseMetaService baseMetaService;
+
+    @Value("${activeEnv}")
+    private String activeEnv;
 
     @Transactional(propagation = Propagation.REQUIRED)
     public List<OpeApply> getOpeApplyList(String reagentName, Timestamp startDeadline, String controlProduct,Timestamp endDeadline, Integer status,
@@ -372,7 +376,11 @@
     public boolean updateSelectedOpeApplyStatus(String memo, List<String> applyIds, String adminUserId, List<String> adminApplyIds,List<String> firstUserIds) {
         boolean apply = false, adminApply = false;
         if (!CollectionUtils.isEmpty(applyIds)) {
-            apply = this.updateOpeApplyStatus(ApplyStatus.APPROVED, memo, applyIds);
+            if("gslab".equalsIgnoreCase(activeEnv)){
+                apply = this.updateOpeApplyStatus(ApplyStatus.Price_CONFIRM, memo, applyIds);
+            }else{
+                apply = this.updateOpeApplyStatus(ApplyStatus.APPROVED, memo, applyIds);
+            }
         }
         if (!CollectionUtils.isEmpty(adminApplyIds)) {
             adminApply = this.updateOpeApplyAdminStatus2(memo, adminApplyIds, adminUserId,firstUserIds);
diff --git a/src/main/webapp/WEB-INF/config.properties b/src/main/webapp/WEB-INF/config.properties
index c1b136e..4910dc4 100644
--- a/src/main/webapp/WEB-INF/config.properties
+++ b/src/main/webapp/WEB-INF/config.properties
@@ -68,3 +68,4 @@
 
 activeEnv = ${envTag}
 
+
diff --git a/src/main/webapp/WEB-INF/cq/cq.properties b/src/main/webapp/WEB-INF/cq/cq.properties
index 7d4165d..068d45c 100644
--- a/src/main/webapp/WEB-INF/cq/cq.properties
+++ b/src/main/webapp/WEB-INF/cq/cq.properties
@@ -1,7 +1,9 @@
-jdbc.url=jdbc:mysql://121.239.169.27:23306/cq_smartlab?useUnicode=true&amp;characterEncoding=utf-8&amp;autoReconnect=true&amp;useSSL=false
-#jdbc.url=jdbc:mysql://sinanoaq.com:23306/cq_smartlab?useUnicode=true&amp;characterEncoding=utf-8&amp;autoReconnect=true&amp;useSSL=false
-jdbc.username=root
-jdbc.password=NMS@uss20201!
+#jdbc.url=jdbc:mysql://121.239.169.27:23306/cq_smartlab?useUnicode=true&amp;characterEncoding=utf-8&amp;autoReconnect=true&amp;useSSL=false
+#jdbc.username=root
+#jdbc.password=NMS@uss20201!
+jdbc.url=jdbc:mysql://127.0.0.1:33306/cq_smartlab?useUnicode=true&amp;characterEncoding=utf-8&amp;autoReconnect=true&amp;useSSL=false
+jdbc.username=cq_smartlab
+jdbc.password=FbsXhNzRFs8KNHyk
 
 institute.id =
 institute.name = \u4E2D\u56FD\u79D1\u5B66\u9662\u91CD\u5E86\u7EFF\u8272\u667A\u80FD\u6280\u672F\u7814\u7A76\u9662
diff --git a/src/main/webapp/WEB-INF/sdy/sdy.properties b/src/main/webapp/WEB-INF/sdy/sdy.properties
index 7035353..1c103c1 100644
--- a/src/main/webapp/WEB-INF/sdy/sdy.properties
+++ b/src/main/webapp/WEB-INF/sdy/sdy.properties
@@ -1,7 +1,7 @@
-jdbc.url=jdbc:mysql://192.168.30.107:3306/sdy_smartlab?useUnicode=true&amp;characterEncoding=utf-8&amp;autoReconnect=true&amp;useSSL=false
+jdbc.url=jdbc:mysql://127.0.01:33306/sdy_smartlab?useUnicode=true&amp;characterEncoding=utf-8&amp;autoReconnect=true&amp;useSSL=false
 #jdbc.url=jdbc:mysql://sinanoaq.com:23306/cq_smartlab?useUnicode=true&amp;characterEncoding=utf-8&amp;autoReconnect=true&amp;useSSL=false
-jdbc.username=gkhy_smartlab_1
-jdbc.password=acDv1#jk23$jsv
+jdbc.username=sdy_smartlab
+jdbc.password=nDa384hwK4z547NM
 
 institute.id =
 institute.name = \u82CF\u5DDE\u76DB\u8FEA\u4E9A\u751F\u7269\u533B\u836F\u6709\u9650\u516C\u53F8
diff --git a/src/main/webapp/index.xhtml b/src/main/webapp/index.xhtml
index a51c076..f9f3226 100644
--- a/src/main/webapp/index.xhtml
+++ b/src/main/webapp/index.xhtml
@@ -112,14 +112,14 @@
                                                styleClass="#{menu.icon}">
 
                                         <c:forEach items="#{menu.subMenu}" var="subMenu">
-                                            <c:if test="#{menuController.activeEnv ne 'gslab' or subMenu.id ne 'price_mng'}" >
+
                                                 <p:menuitem value="#{subMenu.title}"
                                                             actionListener="#{menuController.goToPage(subMenu)}"
                                                             update=":centerRootPanel,@form"
                                                             containerStyleClass="#{menuController.currentPage==subMenu.page?'menu-item-selected':''}"
                                                             rendered="#{menuController.isPermitted(subMenu.privilegeCode)}">
                                                 </p:menuitem>
-                                            </c:if>
+
 
                                         </c:forEach>
                                     </p:submenu>
diff --git a/src/main/webapp/personal_use_info.xhtml b/src/main/webapp/personal_use_info.xhtml
index 9f9d4a7..9b9c981 100644
--- a/src/main/webapp/personal_use_info.xhtml
+++ b/src/main/webapp/personal_use_info.xhtml
@@ -294,17 +294,28 @@
 						</p:column>
 					</p:dataTable>
 
-					<div style="margin-top: 20px;margin-right: 94px;">
-						<div style="display: flex;flex-direction: row;justify-content: flex-end;">
-							<div style="width: 100px">签收人:</div>
-							<div style="width: 100px"></div>
-						</div>
-					</div>
+					<div style="display: flex;flex-direction: row;justify-content: space-between;margin-top:20px; ">
+						<div style="margin-left: 94px;">
+							<div style="display: flex;flex-direction: row;justify-content: flex-end;">
+								<div style="width: 100px">出库人:</div>
+								<div style="width: 100px"></div>
+							</div>
+							<div style="display: flex;flex-direction: row;justify-content: flex-end;margin-top:10px; ">
+								<div style="width: 100px">日期:</div>
+								<div style="width: 100px"></div>
+							</div>
 
-					<div style="margin: 10px 94px 10px 0;">
-						<div style="display: flex;flex-direction: row;justify-content: flex-end;">
-							<div style="width: 100px">日期:</div>
-							<div style="width: 100px"></div>
+						</div>
+						<div style="margin-right: 94px;">
+							<div style="display: flex;flex-direction: row;justify-content: flex-end;">
+								<div style="width: 100px">签收人:</div>
+								<div style="width: 100px"></div>
+							</div>
+							<div style="display: flex;flex-direction: row;justify-content: flex-end;margin-top:10px;">
+								<div style="width: 100px">日期:</div>
+								<div style="width: 100px"></div>
+							</div>
+
 						</div>
 					</div>
 
diff --git a/src/main/webapp/reagent_user_flow_info.xhtml b/src/main/webapp/reagent_user_flow_info.xhtml
index 835ed83..be73b4f 100644
--- a/src/main/webapp/reagent_user_flow_info.xhtml
+++ b/src/main/webapp/reagent_user_flow_info.xhtml
@@ -204,19 +204,31 @@
 						</p:column>
 					</p:dataTable>
 
-					<div style="margin-top: 20px;">
-						<div style="display: flex;flex-direction: row;justify-content: flex-end;">
-							<div style="width: 100px">签收人:</div>
-							<div style="width: 300px"></div>
+					<div style="display: flex;flex-direction: row;justify-content: space-between;margin-top:20px; ">
+						<div style="margin-left: 94px;">
+							<div style="display: flex;flex-direction: row;justify-content: flex-end;">
+								<div style="width: 100px">出库人:</div>
+								<div style="width: 100px"></div>
+							</div>
+							<div style="display: flex;flex-direction: row;justify-content: flex-end;margin-top:10px; ">
+								<div style="width: 100px">日期:</div>
+								<div style="width: 100px"></div>
+							</div>
+
+						</div>
+						<div style="margin-right: 94px;">
+							<div style="display: flex;flex-direction: row;justify-content: flex-end;">
+								<div style="width: 100px">签收人:</div>
+								<div style="width: 100px"></div>
+							</div>
+							<div style="display: flex;flex-direction: row;justify-content: flex-end;margin-top:10px;">
+								<div style="width: 100px">日期:</div>
+								<div style="width: 100px"></div>
+							</div>
+
 						</div>
 					</div>
 
-					<div style="margin: 10px 0">
-						<div style="display: flex;flex-direction: row;justify-content: flex-end;">
-							<div style="width: 100px">日期:</div>
-							<div style="width: 300px"></div>
-						</div>
-					</div>
 
 					<p:panel styleClass="btn  no-print">
 						<div class="div-btn cancel" id="cancel">关闭</div>
diff --git a/src/main/webapp/warehouse_reagent_use.xhtml b/src/main/webapp/warehouse_reagent_use.xhtml
index 132eebc..df2a1bf 100644
--- a/src/main/webapp/warehouse_reagent_use.xhtml
+++ b/src/main/webapp/warehouse_reagent_use.xhtml
@@ -295,19 +295,32 @@
 		</p:column>
 	</p:dataTable>
 
-			<div style="margin-top: 20px;">
-				<div style="display: flex;flex-direction: row;justify-content: flex-end;">
-					<div style="width: 100px">签收人:</div>
-					<div style="width: 300px"></div>
+
+			<div style="display: flex;flex-direction: row;justify-content: space-between;margin-top:20px; ">
+				<div style="margin-left: 94px;">
+					<div style="display: flex;flex-direction: row;justify-content: flex-end;">
+						<div style="width: 100px">出库人:</div>
+						<div style="width: 100px"></div>
+					</div>
+					<div style="display: flex;flex-direction: row;justify-content: flex-end;margin-top:10px; ">
+						<div style="width: 100px">日期:</div>
+						<div style="width: 100px"></div>
+					</div>
+
+				</div>
+				<div style="margin-right: 94px;">
+					<div style="display: flex;flex-direction: row;justify-content: flex-end;">
+						<div style="width: 100px">签收人:</div>
+						<div style="width: 100px"></div>
+					</div>
+					<div style="display: flex;flex-direction: row;justify-content: flex-end;margin-top:10px;">
+						<div style="width: 100px">日期:</div>
+						<div style="width: 100px"></div>
+					</div>
+
 				</div>
 			</div>
 
-			<div style="margin: 10px 0">
-				<div style="display: flex;flex-direction: row;justify-content: flex-end;">
-					<div style="width: 100px">日期:</div>
-					<div style="width: 300px"></div>
-				</div>
-			</div>
 
 			<p:panel styleClass="btn  no-print">
 				<p:commandButton value="关闭"
diff --git a/src/main/webapp/warehouse_reagent_use_person.xhtml b/src/main/webapp/warehouse_reagent_use_person.xhtml
index c81bbf2..d5c5e24 100644
--- a/src/main/webapp/warehouse_reagent_use_person.xhtml
+++ b/src/main/webapp/warehouse_reagent_use_person.xhtml
@@ -210,20 +210,30 @@
 						</p:column>
 					</p:dataTable>
 
-					<div style="margin-top: 20px;margin-right: 94px;">
-						<div style="display: flex;flex-direction: row;justify-content: flex-end;">
-							<div style="width: 100px">签收人:</div>
-							<div style="width: 100px"></div>
+					<div style="display: flex;flex-direction: row;justify-content: space-between;margin-top:20px; ">
+						<div style="margin-left: 94px;">
+							<div style="display: flex;flex-direction: row;justify-content: flex-end;">
+								<div style="width: 100px">出库人:</div>
+								<div style="width: 100px"></div>
+							</div>
+							<div style="display: flex;flex-direction: row;justify-content: flex-end;margin-top:10px; ">
+								<div style="width: 100px">日期:</div>
+								<div style="width: 100px"></div>
+							</div>
+
+						</div>
+						<div style="margin-right: 94px;">
+							<div style="display: flex;flex-direction: row;justify-content: flex-end;">
+								<div style="width: 100px">签收人:</div>
+								<div style="width: 100px"></div>
+							</div>
+							<div style="display: flex;flex-direction: row;justify-content: flex-end;margin-top:10px;">
+								<div style="width: 100px">日期:</div>
+								<div style="width: 100px"></div>
+							</div>
+
 						</div>
 					</div>
-
-					<div style="margin: 10px 94px 10px 0;">
-						<div style="display: flex;flex-direction: row;justify-content: flex-end;">
-							<div style="width: 100px">日期:</div>
-							<div style="width: 100px"></div>
-						</div>
-					</div>
-
 
 
 					<p:panel styleClass="btn  no-print">

--
Gitblit v1.9.2