Browse Source

科德系统修改公司管理开发

anderx 3 years ago
parent
commit
8e1060ed34

+ 1 - 1
src/main/java/com/goafanti/common/dao/NewOrderChangeMapper.java

@@ -48,5 +48,5 @@ public interface NewOrderChangeMapper {
      * @param aid 切换后审核人
      * @return
      */
-    int updatEexamineName(@Param("type")Integer type, @Param("depId")String depId, @Param("aid")String aid);
+    int updateExamineName(@Param("type")Integer type, @Param("depId")String depId, @Param("aid")String aid);
 }

+ 9 - 1
src/main/java/com/goafanti/common/dao/TOrderInvoiceMapper.java

@@ -42,5 +42,13 @@ public interface TOrderInvoiceMapper {
      * @param aid 切换后审核人
      * @return
      */
-    int updatEexamineName(@Param("type")Integer type, @Param("depId")String depId, @Param("aid")String aid);
+    int updateExamineName(@Param("type")Integer type, @Param("depId")String depId, @Param("aid")String aid);
+
+    /**
+     *  type 为预留,目前没有改sql
+     * @param type 2 公司管理
+     * @param depId
+     * @return
+     */
+    int updateListExamineName(@Param("type")Integer type, @Param("depId")String depId);
 }

+ 1 - 1
src/main/java/com/goafanti/common/dao/TOrderNewMapper.java

@@ -65,5 +65,5 @@ public interface TOrderNewMapper {
      * @param aid 切换后审核人
      * @return
      */
-    int updatEexamineName(@Param("type")Integer type, @Param("depId")String depId, @Param("aid")String aid);
+    int updateExamineName(@Param("type")Integer type, @Param("depId")String depId, @Param("aid")String aid);
 }

+ 1 - 1
src/main/java/com/goafanti/common/mapper/NewOrderChangeMapper.xml

@@ -727,7 +727,7 @@ select
 	select id,used_order usedOrder from new_order_change where  order_no= #{orderNo} order by id
 	</select>
 
-  <update id="updatEexamineName">
+  <update id="updateExamineName">
     update  new_order_change a,t_order_new b,admin c
     set a.examine_name=c.name
     where a.process_state = #{type} and a.order_no =b.order_no

+ 10 - 1
src/main/java/com/goafanti/common/mapper/TOrderInvoiceMapper.xml

@@ -593,7 +593,7 @@ where a.status=2 and a.order_no=  #{orderNo,jdbcType=VARCHAR}
     where a.invoice_id =#{id} order by a.create_time
   </select>
 
-  <update id="updatEexamineName">
+  <update id="updateExamineName">
     update  t_order_invoice a,t_order_new b,admin c
     set a.examine_name=c.name
     where 1=1
@@ -610,4 +610,13 @@ where a.status=2 and a.order_no=  #{orderNo,jdbcType=VARCHAR}
       and b.order_dep = #{depId}
       and c.id= #{aid}
   </update>
+  <update id="updateListExamineName">
+    update
+      t_order_invoice a left join t_order_new b on a.order_no =b.order_no
+        left join (select name ,department_id from admin a left join user_role b on a.id =b.uid
+                                                           left join `role` c on b.rid =c.id where  a.status ='0'and c.role_type  in ('9993'))x
+        on b.order_dep =x.department_id
+    set a.examine_name =x.name
+    where a.`type` =1 and a.status =1 and a.approval =1 and b.order_dep= #{depId}
+  </update>
 </mapper>

+ 1 - 1
src/main/java/com/goafanti/common/mapper/TOrderNewMapper.xml

@@ -1941,7 +1941,7 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
     where order_no = (select t_order_task.order_no from t_order_task where id=#{tid})
   </select>
 
-  <update id="updatEexamineName">
+  <update id="updateExamineName">
     update  t_order_new a,admin b
     set a.examine_name=b.name
     where a.process_status = #{type} and a.order_dep = #{depId}

+ 7 - 7
src/main/java/com/goafanti/common/utils/AsyncUtils.java

@@ -119,15 +119,15 @@ public class AsyncUtils {
 	 */
     public void updateexamineName(Integer type, String depId, String aid) {
 		if (type==1){
-			tOrderNewMapper.updatEexamineName(1,depId,aid);
-			newOrderChangeMapper.updatEexamineName(1,depId,aid);
-			tOrderInvoiceMapper.updatEexamineName(1,depId,aid);
+			tOrderNewMapper.updateExamineName(1,depId,aid);
+			newOrderChangeMapper.updateExamineName(1,depId,aid);
+			tOrderInvoiceMapper.updateExamineName(1,depId,aid);
 		}else if (type==2){
-			tOrderInvoiceMapper.updatEexamineName(2,depId,aid);
+			tOrderInvoiceMapper.updateListExamineName(2,depId);
 		}else if (type==3){
-			tOrderNewMapper.updatEexamineName(3,depId,aid);
-			newOrderChangeMapper.updatEexamineName(5,depId,aid);
-			tOrderInvoiceMapper.updatEexamineName(0,depId,aid);
+			tOrderNewMapper.updateExamineName(3,depId,aid);
+			newOrderChangeMapper.updateExamineName(5,depId,aid);
+			tOrderInvoiceMapper.updateExamineName(0,depId,aid);
 		}
 	}
 }