date arithmetic / map function

本文介绍了一种将日期(年、月、日)转换为天数,以及将天数转换回日期的算法实现。此外,还提供了判断闰年的方法,并展示了如何使用Lisp语言中的多种列表处理函数来辅助计算。

由date转化得到具体的天数

(defconstant month
  #(0 31 59 90 120 151 181 212 243 273 304 334 365))

(defconstant yzero 2000)

;;能够被4整除,并且要么是能够被400整除。要么是不能够被100整除。
(defun leap? (y)
  (and (zerop (mod y 4))
       (or (zerop (mod y 400))
           (not (zerop (mod y 100))))))


(defun date->num (d m y)
  (+ (- d 1) (month-num m y) (year-num y)))

(defun month-num (m y)
  (+ (svref month (- m 1))
     (if (and (> m 2) (leap? y)) 1 0))) ;;如果大于二月并且是leap则加1

(defun year-num (y)
  (let ((d 0))
    (if (>= y yzero)
        (dotimes (i (- y yzero) d)
          (incf d (year-days (+ yzero i))))
        (dotimes (i (- yzero y) (- d))   ;;它返回一个负数。比如1998年,他会求出99+98天数,去掉已经度过的就是到2000所需天数。
          (incf d (year-days (+ y i)))))))

(defun year-days (y) (if (leap? y) 366 365))

;;;由天数转化成对应的年月日
(defun num->date (n)
  (multiple-value-bind (y left) (num-year n)  ;;返回两个值,
    (multiple-value-bind (m d) (num-month left y)
      (values d m y))))

(defun num-year (n)
  (if (< n 0)
      (do* ((y (- yzero 1) (- y 1))
            (d (- (year-days y)) (- d (year-days y))))
           ((<= d n) (values y (- n d))))
      (do* ((y yzero (+ y 1))                ;;因为是do*所以前面定义的变量,后面可以使用。
            (prev 0 d)                       ;;prev存起来上一轮的值,为了当前轮减去上一轮的时间。
            (d (year-days y) (+ d (year-days y))))
           ((> d n) (values y (- n prev))))))

(defun num-month (n y)
  (if (leap? y)
      (cond ((= n 59) (values 2 29))
            ((> n 59) (nmon (- n 1)))
            (t        (nmon n)))
      (nmon n)))

(defun nmon (n)
  (let ((m (position n month :test #'<))) 
    (values m (+ 1 (- n (svref month (- m 1)))))))

;;which can add or subtract days from a date
(defun date+ (d m y n)   
  (num->date (+ (date->num d m y) n)))

下面是求每年开始到某有的天数

CL-USER> (setf mon '(31 28 31 30 31 30 31 31 30 31 30 31))
(31 28 31 30 31 30 31 31 30 31 30 31)
CL-USER> (setf nom (reverse mon))
(31 30 31 30 31 31 30 31 30 31 28 31)
CL-USER> (setf sums (maplist #'(lambda (x)
				 (apply #'+ x))
			     nom))
(365 334 304 273 243 212 181 151 120 90 59 31)
CL-USER> (reverse sums)
(31 59 90 120 151 181 212 243 273 304 334 365)
关键是理解maplist的用法,

(maplist function prolist forest prolists) 

它后面可以跟多个list形式,首先他会以最短的那个列表为标准,然后 所有的列表一起调用function方法。然后每个列表的cdr在接着一起调用function。直到最短的那个列表的值用完。显然这个function是可以接受很多个参数的函数。对于本例它先是对所有的数字调用+,然后它的cdr调用+

(mapc function prolist &rest prolists)    If the shortest prolist has n elements, calls function h times: first on the first element of each prolist, and last on the nth element of each prolist. Returns prolist.

(mapcan function prolist &rest prolists) Equivalent to applying nconc to the result of calling mapcar with the same arguments.

(mapcar function prolist &rest prolists) If the shortest prolist has n elements, calls function n times: first on the first element of each prolist, and last on the «th element of each prolist. Returns a list of the values returned by function.

(mapcon function prolist &rest prolists) Equivalent to applying nconc to the result of calling maplist with the same arguments.

(mapl function prolist &rest prolists) If the shortest prolist has n elements, calls function n times: first on each prolist, and last on the (n — l)th cdr of each prolist. Returns prolist.

(maplist function prolist forest prolists) If the shortest prolist has n elements, calls function n times: first on each prolist, and last on the (n — 1) th cdr of each prolist. Returns a list of the values returned by function.

(nconc &rest (lists)) Function Returns a list whose elements are the elements of each list, in order. Works by setting the cdr of the last cons in each list to the succeeding list. The final argument can be an object of any type. Returns n i l if given no arguments.它会返回一个包含list中所有元素的列表。通过使每个列表的最后一个cdr指向下一个列表的方式来实现。

CL-USER> (mapc (lambda (p q)
		 (format t "~a - ~a ~%" p q)) '(9 8 7) '(3 4 5))
9 - 3 
8 - 4 
7 - 5 
(9 8 7)

CL-USER> (mapcar #'+ '(1 2 4) '(1 2 3 4) '(8 7))
(10 11)
202
CL-USER> (mapcan #'list
	  '(a b c)
	  '(1 2 3 4))
(A 1 B 2 C 3)
CL-USER>  (mapcar #'list
	  '(a b c)
	  '(1 2 3 4))
((A 1) (B 2) (C 3))
CL-USER> (maplist #'list
	  '(a b c)
	  '(1 2 3 4))
(((A B C) (1 2 3 4)) ((B C) (2 3 4)) ((C) (3 4)))
CL-USER> (mapcon #'list
	  '(a b c)
	  '(1 2 3 4))
((A B C) (1 2 3 4) (B C) (2 3 4) (C) (3 4))
CL-USER> (nconc '(1 2) '(4 5))
(1 2 4 5)

关键是理解如何实现nconc的。下图是描述((A 1) (B 2) (C 3)) --> (A 1 B 2 C 3),同理可以得到 (((A B C) (1 2 3 4)) ((B C) (2 3 4)) ((C) (3 4)))-->((A B C) (1 2 3 4) (B C) (2 3 4) (C) (3 4))的原因。其实用一个列表的最后一个cdr连接后面单元,实际上就是减少一层括号。


遵循的规律为:  四年一闰,百年不闰,四百年再闰.
if((year % 400 == 0)||(year % 4 == 0)&&(year % 100 != 0))闰年的计算方法




                
arning: Module 'androidx.test.uiautomator_uiautomator' depends on non-existing optional_uses_libs 'com.android.extensions.xr' Warning: Module 'androidx.wear_wear' depends on non-existing optional_uses_libs 'wear-sdk' Warning: Module 'androidx.wear.compose_compose-foundation' depends on non-existi ng optional_uses_libs 'wear-sdk' [ 0% 172/131877] //external/icu/icu4c/source:libicuuc_stubdata clang++ stubdata FAILED: out/soong/.intermediates/external/icu/icu4c/source/libicuuc_stubdata/lin ux_glibc_x86_64_static/obj/external/icu/icu4c/source/stubdata/stubdata.o PWD=/proc/self/cwd /usr/bin/ccache prebuilts/clang/host/linux-x86/clang-r547379/ bin/clang++ -c -Wa,--noexecstack -fPIC -fno-omit-frame-pointer -U_FORTIFY_SOURC E -D_FORTIFY_SOURCE=3 -fstack-protector --gcc-toolchain=prebuilts/gcc/linux-x86/ host/x86_64-linux-glibc2.17-4.8 -fstack-protector-strong -m64 --sysroot prebuilt s/gcc/linux-x86/host/x86_64-linux-glibc2.17-4.8/sysroot -O2 -Wall -Wextra -Winit -self -Wpointer-arith -Wunguarded-availability -Werror=date-time -Werror=int-con version -Werror=pragma-pack -Werror=pragma-pack-suspicious-include -Werror=sizeo f-array-div -Werror=string-plus-int -Werror=unreachable-code-loop-increment -Wno -error=deprecated-declarations -Wno-c23-extensions -Wno-c99-designator -Wno-gnu- folding-constant -Wno-inconsistent-missing-override -Wno-error=reorder-init-list -Wno-reorder-init-list -Wno-sign-compare -Wno-unused -DANDROID -DNDEBUG -UDEBUG -D__compiler_offsetof=__builtin_offsetof -D__ANDROID_UNAVAILABLE_SYMBOLS_ARE_WE AK__ -faddrsig -fdebug-default-version=5 -fcolor-diagnostics -ffp-contract=off - fno-exceptions -fno-strict-aliasing -fmessage-length=0 -gsimple-template-names - gz=zstd -no-canonical-prefixes -fdebug-prefix-map=/proc/self/cwd= -ftrivial-auto -var-init=zero -Wno-unused-command-line-argument -g -Wno-enum-compare -Wno-enum -compare-switch -Wno-null-pointer-arithmetic -Wno-null-dereference -Wno-pointer- compare -Wno-final-dtor-non-final-class -Wno-psabi -Wno-null-pointer-subtraction -Wno-string-concatenation -Wno-deprecated-non-prototype -Wno-unused -Wno-deprec ated -Wno-error=format -target x86_64-linux-gnu -fPIC -Wimplicit-fallthrough -D _LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS -Wno-gnu-include-next -Iexternal/icu/ icu4c/source -Iexternal/icu/icu4c/source/common -Iexternal/icu/android_icu4c/inc lude -Iprebuilts/clang/host/linux-x86/clang-r547379/include/x86_64-unknown-linux -gnu/c++/v1 -Iprebuilts/clang/host/linux-x86/clang-r547379/include/c++/v1 -Wall -Werror -std=gnu++20 -fno-rtti -nostdinc++ -Isystem/core/include -Isystem/loggin g/liblog/include -Isystem/media/audio/include -Ihardware/libhardware/include -Ih ardware/libhardware_legacy/include -Ihardware/ril/include -Iframeworks/native/in clude -Iframeworks/native/opengl/include -Iframeworks/av/include -Werror=bool-o peration -Werror=dangling -Werror=format-insufficient-args -Werror=implicit-int- float-conversion -Werror=int-in-bool-context -Werror=int-to-pointer-cast -Werror =pointer-to-int-cast -Werror=xor-used-as-pow -Wimplicit-int-float-conversion -Wn o-void-pointer-to-enum-cast -Wno-void-pointer-to-int-cast -Wno-pointer-to-int-ca st -Werror=fortify-source -Wno-unused-variable -Wno-missing-field-initializers - Wno-packed-non-pod -Werror=address-of-temporary -Werror=incompatible-function-po inter-types -Werror=null-dereference -Werror=return-type -Wno-tautological-const ant-compare -Wno-tautological-type-limit-compare -Wno-implicit-int-float-convers ion -Wno-tautological-overlap-compare -Wno-deprecated-copy -Wno-range-loop-const ruct -Wno-zero-as-null-pointer-constant -Wno-deprecated-anon-enum-enum-conversio n -Wno-deprecated-enum-enum-conversion -Wno-error=pessimizing-move -Wno-non-c-ty pedef-for-linkage -Wno-align-mismatch -Wno-error=unused-but-set-variable -Wno-er ror=unused-but-set-parameter -Wno-error=deprecated-builtins -Wno-error=deprecate d -Wno-error=invalid-offsetof -Wno-vla-cxx-extension -Wno-cast-function-type-mis match -fcommon -Wno-format-insufficient-args -Wno-misleading-indentation -Wno-b itwise-instead-of-logical -Wno-unused -Wno-unused-parameter -Wno-unused-but-set- parameter -Wno-unqualified-std-cast-call -Wno-array-parameter -Wno-gnu-offsetof- extensions -Wno-pessimizing-move -MD -MF out/soong/.intermediates/external/icu/i cu4c/source/libicuuc_stubdata/linux_glibc_x86_64_static/obj/external/icu/icu4c/s ource/stubdata/stubdata.o.d -o out/soong/.intermediates/external/icu/icu4c/sourc e/libicuuc_stubdata/linux_glibc_x86_64_static/obj/external/icu/icu4c/source/stub data/stubdata.o external/icu/icu4c/source/stubdata/stubdata.cpp ccache: error: Failed to create directory /home/hya/.ccache/tmp: Read-only file system \nWrite to a read-only file system detected. Possible fixes include 1. Generate file directly to out/ which is ReadWrite, #recommend solution 2. BUILD_BROKEN_SRC_DIR_RW_ALLOWLIST := <my/path/1> <my/path/2> #discouraged, su bset of source tree will be RW 3. BUILD_BROKEN_SRC_DIR_IS_WRITABLE := true #highly discouraged, entire source t ree will be RW [ 0% 173/131877] //external/icu/libandroidicuinit:libandroidicuinit clang++ Icu FAILED: out/soong/.intermediates/external/icu/libandroidicuinit/libandroidicuini t/linux_glibc_x86_64_static/obj/external/icu/libandroidicuinit/IcuRegistration.o PWD=/proc/self/cwd /usr/bin/ccache prebuilts/clang/host/linux-x86/clang-r547379/ bin/clang++ -c -Wa,--noexecstack -fPIC -fno-omit-frame-pointer -U_FORTIFY_SOURC E -D_FORTIFY_SOURCE=3 -fstack-protector --gcc-toolchain=prebuilts/gcc/linux-x86/ host/x86_64-linux-glibc2.17-4.8 -fstack-protector-strong -m64 --sysroot prebuilt s/gcc/linux-x86/host/x86_64-linux-glibc2.17-4.8/sysroot -O2 -Wall -Wextra -Winit -self -Wpointer-arith -Wunguarded-availability -Werror=date-time -Werror=int-con version -Werror=pragma-pack -Werror=pragma-pack-suspicious-include -Werror=sizeo f-array-div -Werror=string-plus-int -Werror=unreachable-code-loop-increment -Wno -error=deprecated-declarations -Wno-c23-extensions -Wno-c99-designator -Wno-gnu- folding-constant -Wno-inconsistent-missing-override -Wno-error=reorder-init-list -Wno-reorder-init-list -Wno-sign-compare -Wno-unused -DANDROID -DNDEBUG -UDEBUG -D__compiler_offsetof=__builtin_offsetof -D__ANDROID_UNAVAILABLE_SYMBOLS_ARE_WE AK__ -faddrsig -fdebug-default-version=5 -fcolor-diagnostics -ffp-contract=off - fno-exceptions -fno-strict-aliasing -fmessage-length=0 -gsimple-template-names - gz=zstd -no-canonical-prefixes -fdebug-prefix-map=/proc/self/cwd= -ftrivial-auto -var-init=zero -Wno-unused-command-line-argument -g -Wno-enum-compare -Wno-enum -compare-switch -Wno-null-pointer-arithmetic -Wno-null-dereference -Wno-pointer- compare -Wno-final-dtor-non-final-class -Wno-psabi -Wno-null-pointer-subtraction -Wno-string-concatenation -Wno-deprecated-non-prototype -Wno-unused -Wno-deprec ated -Wno-error=format -target x86_64-linux-gnu -fPIC -Wimplicit-fallthrough -D _LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS -Wno-gnu-include-next -Iexternal/icu/ libandroidicuinit/include -Iexternal/icu/libandroidicuinit -Iexternal/icu/icu4c/ source/common -Iexternal/icu/android_icu4c/include -Iprebuilts/clang/host/linux- x86/clang-r547379/include/x86_64-unknown-linux-gnu/c++/v1 -Iprebuilts/clang/host /linux-x86/clang-r547379/include/c++/v1 -Wall -Werror -std=gnu++20 -fno-rtti -no stdinc++ -Isystem/core/include -Isystem/logging/liblog/include -Isystem/media/au dio/include -Ihardware/libhardware/include -Ihardware/libhardware_legacy/include -Ihardware/ril/include -Iframeworks/native/include -Iframeworks/native/opengl/i nclude -Iframeworks/av/include -Werror=bool-operation -Werror=dangling -Werror= format-insufficient-args -Werror=implicit-int-float-conversion -Werror=int-in-bo ol-context -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Werror=xor-u sed-as-pow -Wimplicit-int-float-conversion -Wno-void-pointer-to-enum-cast -Wno-v oid-pointer-to-int-cast -Wno-pointer-to-int-cast -Werror=fortify-source -Wno-unu sed-variable -Wno-missing-field-initializers -Wno-packed-non-pod -Werror=address -of-temporary -Werror=incompatible-function-pointer-types -Werror=null-dereferen ce -Werror=return-type -Wno-tautological-constant-compare -Wno-tautological-type -limit-compare -Wno-implicit-int-float-conversion -Wno-tautological-overlap-comp are -Wno-deprecated-copy -Wno-range-loop-construct -Wno-zero-as-null-pointer-con stant -Wno-deprecated-anon-enum-enum-conversion -Wno-deprecated-enum-enum-conver sion -Wno-error=pessimizing-move -Wno-non-c-typedef-for-linkage -Wno-align-misma tch -Wno-error=unused-but-set-variable -Wno-error=unused-but-set-parameter -Wno- error=deprecated-builtins -Wno-error=deprecated -Wno-error=invalid-offsetof -Wno -vla-cxx-extension -Wno-cast-function-type-mismatch -fcommon -Wno-format-insuff icient-args -Wno-misleading-indentation -Wno-bitwise-instead-of-logical -Wno-unu sed -Wno-unused-parameter -Wno-unused-but-set-parameter -Wno-unqualified-std-cas t-call -Wno-array-parameter -Wno-gnu-offsetof-extensions -Wno-pessimizing-move - MD -MF out/soong/.intermediates/external/icu/libandroidicuinit/libandroidicuinit /linux_glibc_x86_64_static/obj/external/icu/libandroidicuinit/IcuRegistration.o. d -o out/soong/.intermediates/external/icu/libandroidicuinit/libandroidicuinit/l inux_glibc_x86_64_static/obj/external/icu/libandroidicuinit/IcuRegistration.o ex ternal/icu/libandroidicuinit/IcuRegistration.cpp ccache: error: Failed to create directory /home/hya/.ccache/tmp: Read-only file system \nWrite to a read-only file system detected. Possible fixes include 1. Generate file directly to out/ which is ReadWrite, #recommend solution 2. BUILD_BROKEN_SRC_DIR_RW_ALLOWLIST := <my/path/1> <my/path/2> #discouraged, su bset of source tree will be RW 3. BUILD_BROKEN_SRC_DIR_IS_WRITABLE := true #highly discouraged, entire source t ree will be RW [ 0% 174/131877] //external/icu/libandroidicuinit:libandroidicuinit clang++ and FAILED: out/soong/.intermediates/external/icu/libandroidicuinit/libandroidicuini t/linux_glibc_x86_64_static/obj/external/icu/libandroidicuinit/android_icu_init. o PWD=/proc/self/cwd /usr/bin/ccache prebuilts/clang/host/linux-x86/clang-r547379/ bin/clang++ -c -Wa,--noexecstack -fPIC -fno-omit-frame-pointer -U_FORTIFY_SOURC E -D_FORTIFY_SOURCE=3 -fstack-protector --gcc-toolchain=prebuilts/gcc/linux-x86/ host/x86_64-linux-glibc2.17-4.8 -fstack-protector-strong -m64 --sysroot prebuilt s/gcc/linux-x86/host/x86_64-linux-glibc2.17-4.8/sysroot -O2 -Wall -Wextra -Winit -self -Wpointer-arith -Wunguarded-availability -Werror=date-time -Werror=int-con version -Werror=pragma-pack -Werror=pragma-pack-suspicious-include -Werror=sizeo f-array-div -Werror=string-plus-int -Werror=unreachable-code-loop-increment -Wno -error=deprecated-declarations -Wno-c23-extensions -Wno-c99-designator -Wno-gnu- folding-constant -Wno-inconsistent-missing-override -Wno-error=reorder-init-list -Wno-reorder-init-list -Wno-sign-compare -Wno-unused -DANDROID -DNDEBUG -UDEBUG -D__compiler_offsetof=__builtin_offsetof -D__ANDROID_UNAVAILABLE_SYMBOLS_ARE_WE AK__ -faddrsig -fdebug-default-version=5 -fcolor-diagnostics -ffp-contract=off - fno-exceptions -fno-strict-aliasing -fmessage-length=0 -gsimple-template-names - gz=zstd -no-canonical-prefixes -fdebug-prefix-map=/proc/self/cwd= -ftrivial-auto -var-init=zero -Wno-unused-command-line-argument -g -Wno-enum-compare -Wno-enum -compare-switch -Wno-null-pointer-arithmetic -Wno-null-dereference -Wno-pointer- compare -Wno-final-dtor-non-final-class -Wno-psabi -Wno-null-pointer-subtraction -Wno-string-concatenation -Wno-deprecated-non-prototype -Wno-unused -Wno-deprec ated -Wno-error=format -target x86_64-linux-gnu -fPIC -Wimplicit-fallthrough -D _LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS -Wno-gnu-include-next -Iexternal/icu/ libandroidicuinit/include -Iexternal/icu/libandroidicuinit -Iexternal/icu/icu4c/ source/common -Iexternal/icu/android_icu4c/include -Iprebuilts/clang/host/linux- x86/clang-r547379/include/x86_64-unknown-linux-gnu/c++/v1 -Iprebuilts/clang/host /linux-x86/clang-r547379/include/c++/v1 -Wall -Werror -std=gnu++20 -fno-rtti -no stdinc++ -Isystem/core/include -Isystem/logging/liblog/include -Isystem/media/au dio/include -Ihardware/libhardware/include -Ihardware/libhardware_legacy/include -Ihardware/ril/include -Iframeworks/native/include -Iframeworks/native/opengl/i nclude -Iframeworks/av/include -Werror=bool-operation -Werror=dangling -Werror= format-insufficient-args -Werror=implicit-int-float-conversion -Werror=int-in-bo ol-context -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Werror=xor-u sed-as-pow -Wimplicit-int-float-conversion -Wno-void-pointer-to-enum-cast -Wno-v oid-pointer-to-int-cast -Wno-pointer-to-int-cast -Werror=fortify-source -Wno-unu sed-variable -Wno-missing-field-initializers -Wno-packed-non-pod -Werror=address -of-temporary -Werror=incompatible-function-pointer-types -Werror=null-dereferen ce -Werror=return-type -Wno-tautological-constant-compare -Wno-tautological-type -limit-compare -Wno-implicit-int-float-conversion -Wno-tautological-overlap-comp are -Wno-deprecated-copy -Wno-range-loop-construct -Wno-zero-as-null-pointer-con stant -Wno-deprecated-anon-enum-enum-conversion -Wno-deprecated-enum-enum-conver sion -Wno-error=pessimizing-move -Wno-non-c-typedef-for-linkage -Wno-align-misma tch -Wno-error=unused-but-set-variable -Wno-error=unused-but-set-parameter -Wno- error=deprecated-builtins -Wno-error=deprecated -Wno-error=invalid-offsetof -Wno -vla-cxx-extension -Wno-cast-function-type-mismatch -fcommon -Wno-format-insuff icient-args -Wno-misleading-indentation -Wno-bitwise-instead-of-logical -Wno-unu sed -Wno-unused-parameter -Wno-unused-but-set-parameter -Wno-unqualified-std-cas t-call -Wno-array-parameter -Wno-gnu-offsetof-extensions -Wno-pessimizing-move - MD -MF out/soong/.intermediates/external/icu/libandroidicuinit/libandroidicuinit /linux_glibc_x86_64_static/obj/external/icu/libandroidicuinit/android_icu_init.o .d -o out/soong/.intermediates/external/icu/libandroidicuinit/libandroidicuinit/ linux_glibc_x86_64_static/obj/external/icu/libandroidicuinit/android_icu_init.o external/icu/libandroidicuinit/android_icu_init.cpp ccache: error: Failed to create directory /home/hya/.ccache/tmp: Read-only file system \nWrite to a read-only file system detected. Possible fixes include 1. Generate file directly to out/ which is ReadWrite, #recommend solution 2. BUILD_BROKEN_SRC_DIR_RW_ALLOWLIST := <my/path/1> <my/path/2> #discouraged, su bset of source tree will be RW 3. BUILD_BROKEN_SRC_DIR_IS_WRITABLE := true #highly discouraged, entire source t ree will be RW 02:46:49 ninja failed with: exit status 1 #### failed to build some targets (10:52 (mm:ss)) ####
09-18
Started by user admin Running as SYSTEM Building in workspace /var/jenkins_home/workspace/zq-web The recommended git tool is: NONE using credential jenkins-username > git rev-parse --resolve-git-dir /var/jenkins_home/workspace/zq-web/.git # timeout=10 Fetching changes from the remote Git repository > git config remote.origin.url http://39.105.179.91:30080/smart-factory/smart-web.git # timeout=10 Fetching upstream changes from http://39.105.179.91:30080/smart-factory/smart-web.git > git --version # timeout=10 > git --version # 'git version 2.39.5' using GIT_ASKPASS to set credentials > git fetch --tags --force --progress -- http://39.105.179.91:30080/smart-factory/smart-web.git +refs/heads/*:refs/remotes/origin/* # timeout=10 > git rev-parse refs/remotes/origin/main^{commit} # timeout=10 Checking out Revision 00dafb09bd552fe14c7cf270a553c497223d95b7 (refs/remotes/origin/main) > git config core.sparsecheckout # timeout=10 > git checkout -f 00dafb09bd552fe14c7cf270a553c497223d95b7 # timeout=10 Commit message: "first" > git rev-list --no-walk 00dafb09bd552fe14c7cf270a553c497223d95b7 # timeout=10 [zq-web] $ /bin/sh -xe /tmp/jenkins12597757760880265825.sh + npm config set registry https://registry.npmmirror.com -g + npm install --force npm warn using --force Recommended protections disabled. npm warn ERESOLVE overriding peer dependency npm warn While resolving: vue-echarts@7.0.3 npm warn Found: echarts@6.0.0 npm warn node_modules/echarts npm warn echarts@"^6.0.0" from the root project npm warn npm warn Could not resolve dependency: npm warn peer echarts@"^5.5.1" from vue-echarts@7.0.3 npm warn node_modules/vue-echarts npm warn vue-echarts@"^7.0.3" from the root project npm warn npm warn Conflicting peer dependency: echarts@5.6.0 npm warn node_modules/echarts npm warn peer echarts@"^5.5.1" from vue-echarts@7.0.3 npm warn node_modules/vue-echarts npm warn vue-echarts@"^7.0.3" from the root project removed 125 packages in 845ms 39 packages are looking for funding run `npm fund` for details + npm install --save-dev vite-plugin-node-polyfills crypto-browserify --force npm warn using --force Recommended protections disabled. npm warn ERESOLVE overriding peer dependency npm warn While resolving: vue-echarts@7.0.3 npm warn Found: echarts@6.0.0 npm warn node_modules/echarts npm warn echarts@"^6.0.0" from the root project npm warn npm warn Could not resolve dependency: npm warn peer echarts@"^5.5.1" from vue-echarts@7.0.3 npm warn node_modules/vue-echarts npm warn vue-echarts@"^7.0.3" from the root project npm warn npm warn Conflicting peer dependency: echarts@5.6.0 npm warn node_modules/echarts npm warn peer echarts@"^5.5.1" from vue-echarts@7.0.3 npm warn node_modules/vue-echarts npm warn vue-echarts@"^7.0.3" from the root project added 125 packages in 3s 78 packages are looking for funding run `npm fund` for details + npm run build > vite-project@0.0.0 build > vue-tsc -b && vite build src/components/Menu.vue(58,1): error TS6133: 'router' is declared but its value is never read. src/components/Menu.vue(59,1): error TS6192: All imports in import declaration are unused. src/components/Menu.vue(63,7): error TS6133: 'switchValue' is declared but its value is never read. src/components/Menu.vue(78,7): error TS6133: 'handleSwitch' is declared but its value is never read. src/request/api/record.ts(5,6): error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled. src/request/api/record.ts(15,32): error TS7006: Parameter 'data' implicitly has an 'any' type. src/request/api/record.ts(18,33): error TS7006: Parameter 'id' implicitly has an 'any' type. src/request/api/user.ts(5,6): error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled. src/request/api/user.ts(21,26): error TS7006: Parameter 'data' implicitly has an 'any' type. src/routes/index.ts(69,41): error TS2307: Cannot find module '@/views/MonitorView.vue' or its corresponding type declarations. src/store/modules/report.ts(13,22): error TS7006: Parameter 'data' implicitly has an 'any' type. src/store/modules/user.ts(17,21): error TS7006: Parameter 'data' implicitly has an 'any' type. src/store/modules/user.ts(34,14): error TS2339: Property 'token' does not exist on type '{ userLogin(data: any): Promise<string>; userLogout(): Promise<string>; } & { userInfo: {}; } & _StoreWithState<"User", { userInfo: {}; }, {}, { userLogin(data: any): Promise<string>; userLogout(): Promise<...>; }> & _StoreWithGetters_Readonly<...> & _StoreWithGetters_Writable<...> & PiniaCustomProperties<...>'. src/store/modules/user.ts(35,14): error TS2339: Property 'username' does not exist on type '{ userLogin(data: any): Promise<string>; userLogout(): Promise<string>; } & { userInfo: {}; } & _StoreWithState<"User", { userInfo: {}; }, {}, { userLogin(data: any): Promise<string>; userLogout(): Promise<...>; }> & _StoreWithGetters_Readonly<...> & _StoreWithGetters_Writable<...> & PiniaCustomProperties<...>'. src/store/modules/user.ts(36,14): error TS2339: Property 'avatar' does not exist on type '{ userLogin(data: any): Promise<string>; userLogout(): Promise<string>; } & { userInfo: {}; } & _StoreWithState<"User", { userInfo: {}; }, {}, { userLogin(data: any): Promise<string>; userLogout(): Promise<...>; }> & _StoreWithGetters_Readonly<...> & _StoreWithGetters_Writable<...> & PiniaCustomProperties<...>'. src/store/modules/user.ts(37,28): error TS2554: Expected 0 arguments, but got 1. src/store/modules/user.ts(41,41): error TS2304: Cannot find name 'result'. src/views/authorityManage/index.vue(144,39): error TS2551: Property 'name1' does not exist on type '{ name: string; region: string; }'. Did you mean 'name'? src/views/authorityManage/index.vue(147,39): error TS2551: Property 'name2' does not exist on type '{ name: string; region: string; }'. Did you mean 'name'? src/views/authorityManage/index.vue(150,39): error TS2551: Property 'name3' does not exist on type '{ name: string; region: string; }'. Did you mean 'name'? src/views/authorityManage/index.vue(153,39): error TS2551: Property 'name4' does not exist on type '{ name: string; region: string; }'. Did you mean 'name'? src/views/authorityManage/index.vue(177,26): error TS2339: Property 'handleUpload' does not exist on type 'CreateComponentPublicInstanceWithMixins<ToResolvedProps<{}, {}>, { Plus: DefineComponent<{}, void, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ... 12 more ..., any>; ... 26 more ...; resetMemberForm: (formEl: any) => void; }, ... 23 more ..., {}>'. src/views/authorityManage/index.vue(194,26): error TS2339: Property 'handleUpload' does not exist on type 'CreateComponentPublicInstanceWithMixins<ToResolvedProps<{}, {}>, { Plus: DefineComponent<{}, void, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ... 12 more ..., any>; ... 26 more ...; resetMemberForm: (formEl: any) => void; }, ... 23 more ..., {}>'. src/views/authorityManage/index.vue(287,7): error TS6133: 'defaultProps' is declared but its value is never read. src/views/authorityManage/index.vue(351,22): error TS7006: Parameter 'tab' implicitly has an 'any' type. src/views/authorityManage/index.vue(351,26): error TS7006: Parameter 'event' implicitly has an 'any' type. src/views/authorityManage/index.vue(364,25): error TS6133: 'node' is declared but its value is never read. src/views/authorityManage/index.vue(364,25): error TS7006: Parameter 'node' implicitly has an 'any' type. src/views/authorityManage/index.vue(364,30): error TS6133: 'data' is declared but its value is never read. src/views/authorityManage/index.vue(364,30): error TS7006: Parameter 'data' implicitly has an 'any' type. src/views/authorityManage/index.vue(381,25): error TS7006: Parameter 'index' implicitly has an 'any' type. src/views/authorityManage/index.vue(381,32): error TS7006: Parameter 'row' implicitly has an 'any' type. src/views/authorityManage/index.vue(391,29): error TS7006: Parameter 'index' implicitly has an 'any' type. src/views/authorityManage/index.vue(391,36): error TS7006: Parameter 'row' implicitly has an 'any' type. src/views/authorityManage/index.vue(395,33): error TS7006: Parameter 'formEl' implicitly has an 'any' type. src/views/authorityManage/index.vue(397,26): error TS7006: Parameter 'valid' implicitly has an 'any' type. src/views/authorityManage/index.vue(397,33): error TS7006: Parameter 'fields' implicitly has an 'any' type. src/views/authorityManage/index.vue(406,26): error TS7006: Parameter 'formEl' implicitly has an 'any' type. src/views/authorityManage/index.vue(412,33): error TS7006: Parameter 'formEl' implicitly has an 'any' type. src/views/authorityManage/index.vue(414,26): error TS7006: Parameter 'valid' implicitly has an 'any' type. src/views/authorityManage/index.vue(414,33): error TS7006: Parameter 'fields' implicitly has an 'any' type. src/views/authorityManage/index.vue(423,26): error TS7006: Parameter 'formEl' implicitly has an 'any' type. src/views/crownBlock.vue(82,28): error TS2339: Property 'resetForm' does not exist on type 'CreateComponentPublicInstanceWithMixins<ToResolvedProps<{}, {}>, { formInline: { user: string; region: string; date: string; }; value1: Ref<boolean, boolean>; value2: Ref<boolean, boolean>; list: Ref<...>; }, ... 23 more ..., {}>'. src/views/crownBlock.vue(82,38): error TS2339: Property 'ruleFormRef' does not exist on type 'CreateComponentPublicInstanceWithMixins<ToResolvedProps<{}, {}>, { formInline: { user: string; region: string; date: string; }; value1: Ref<boolean, boolean>; value2: Ref<boolean, boolean>; list: Ref<...>; }, ... 23 more ..., {}>'. src/views/crownBlock.vue(83,43): error TS2339: Property 'onSubmit' does not exist on type 'CreateComponentPublicInstanceWithMixins<ToResolvedProps<{}, {}>, { formInline: { user: string; region: string; date: string; }; value1: Ref<boolean, boolean>; value2: Ref<boolean, boolean>; list: Ref<...>; }, ... 23 more ..., {}>'. src/views/crownBlock.vue(89,22): error TS2339: Property 'tableData' does not exist on type 'CreateComponentPublicInstanceWithMixins<ToResolvedProps<{}, {}>, { formInline: { user: string; region: string; date: string; }; value1: Ref<boolean, boolean>; value2: Ref<boolean, boolean>; list: Ref<...>; }, ... 23 more ..., {}>'. src/views/deliverRecord/deliverDetail.vue(14,19): error TS2339: Property 'cargo_code' does not exist on type 'never'. src/views/deliverRecord/deliverDetail.vue(18,55): error TS2339: Property 'car_schedule_id' does not exist on type '{}'. src/views/deliverRecord/deliverDetail.vue(19,56): error TS2339: Property 'cargo_name' does not exist on type '{}'. src/views/deliverRecord/deliverDetail.vue(20,68): error TS2339: Property 'gross_weight' does not exist on type 'never'. src/views/deliverRecord/deliverDetail.vue(21,56): error TS2339: Property 'car_plate_number' does not exist on type '{}'. src/views/deliverRecord/deliverDetail.vue(22,67): error TS2339: Property 'spec' does not exist on type 'never'. src/views/deliverRecord/deliverDetail.vue(23,57): error TS2339: Property 'warranty_start_date' does not exist on type '{}'. src/views/deliverRecord/deliverDetail.vue(23,88): error TS2339: Property 'warranty_start_date' does not exist on type '{}'. src/views/deliverRecord/deliverDetail.vue(23,126): error TS2339: Property 'warranty_end_date' does not exist on type '{}'. src/views/deliverRecord/deliverDetail.vue(23,155): error TS2339: Property 'warranty_end_date' does not exist on type '{}'. src/views/deliverRecord/deliverDetail.vue(24,68): error TS2339: Property 'cargo_code' does not exist on type 'never'. src/views/deliverRecord/deliverDetail.vue(25,54): error TS2339: Property 'shift_plan' does not exist on type '{}'. src/views/deliverRecord/deliverDetail.vue(29,78): error TS2339: Property 'step_name' does not exist on type 'never'. src/views/deliverRecord/deliverDetail.vue(29,101): error TS2339: Property 'step_name' does not exist on type 'never'. src/views/deliverRecord/deliverDetail.vue(30,51): error TS2339: Property 'operator' does not exist on type 'never'. src/views/deliverRecord/deliverDetail.vue(31,52): error TS2339: Property 'create_time' does not exist on type 'never'. src/views/deliverRecord/deliverDetail.vue(32,51): error TS2339: Property 'car_plate_number' does not exist on type 'never'. src/views/deliverRecord/deliverDetail.vue(35,25): error TS7022: 'item' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. src/views/deliverRecord/deliverDetail.vue(35,33): error TS2448: Block-scoped variable 'item' used before its declaration. src/views/deliverRecord/deliverDetail.vue(46,48): error TS2339: Property 'flow_info' does not exist on type 'never'. src/views/deliverRecord/deliverDetail.vue(133,33): error TS6133: 'ArrowRight' is declared but its value is never read. src/views/deliverRecord/deliverDetail.vue(137,1): error TS6133: 'log' is declared but its value is never read. src/views/deliverRecord/deliverDetail.vue(150,28): error TS7006: Parameter 'index' implicitly has an 'any' type. src/views/deliverRecord/deliverDetail.vue(152,14): error TS2339: Property 'schedule_step_info' does not exist on type '{}'. src/views/deliverRecord/deliverDetail.vue(152,37): error TS7006: Parameter 'item' implicitly has an 'any' type. src/views/deliverRecord/deliverDetail.vue(153,24): error TS2345: Argument of type 'any' is not assignable to parameter of type 'never'. src/views/deliverRecord/deliverDetail.vue(155,26): error TS2339: Property 'step_info' does not exist on type 'never'. src/views/deliverRecord/deliverDetail.vue(155,40): error TS7006: Parameter 'item' implicitly has an 'any' type. src/views/deliverRecord/deliverDetail.vue(156,24): error TS2345: Argument of type 'any' is not assignable to parameter of type 'never'. src/views/deliverRecord/deliverDetail.vue(160,29): error TS2339: Property 'step_name' does not exist on type 'never'. src/views/deliverRecord/deliverDetail.vue(163,3): error TS2554: Expected 2 arguments, but got 1. src/views/deliverRecord/deliverDetail.vue(168,22): error TS7006: Parameter 'tab' implicitly has an 'any' type. src/views/deliverRecord/deliverDetail.vue(168,27): error TS6133: 'event' is declared but its value is never read. src/views/deliverRecord/deliverDetail.vue(168,27): error TS7006: Parameter 'event' implicitly has an 'any' type. src/views/deliverRecord/deliverDetail.vue(172,26): error TS7006: Parameter 'id' implicitly has an 'any' type. src/views/deliverRecord/deliverDetail.vue(174,10): error TS2339: Property 'code' does not exist on type 'AxiosResponse<any, any>'. src/views/deliverRecord/index.vue(22,24): error TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{ handleSearch0: (data: any) => void; handleSearch1: (data: any) => void; handleSearch2: (data: any) => void; handleSearch3: (data: any) => void; }'. No index signature with a parameter of type 'string' was found on type '{ handleSearch0: (data: any) => void; handleSearch1: (data: any) => void; handleSearch2: (data: any) => void; handleSearch3: (data: any) => void; }'. src/views/deliverRecord/index.vue(23,23): error TS7053: Element implicitly has an 'any' type because expression of type 'any' can't be used to index type '{ handleClear0: () => void; handleClear1: () => void; handleClear2: () => void; handleClear3: () => void; }'. src/views/deliverRecord/index.vue(23,37): error TS2551: Property 'clearMethodName' does not exist on type '{ name: string; input: string; list: never[]; methodName: string; activeName: string; } | { name: string; input: string; list: never[]; methodName: string; activeName?: undefined; }'. Did you mean 'methodName'? Property 'clearMethodName' does not exist on type '{ name: string; input: string; list: never[]; methodName: string; activeName: string; }'. src/views/deliverRecord/index.vue(28,22): error TS2339: Property 'value' does not exist on type 'never'. src/views/deliverRecord/index.vue(29,24): error TS2339: Property 'label' does not exist on type 'never'. src/views/deliverRecord/index.vue(30,24): error TS2339: Property 'value' does not exist on type 'never'. src/views/deliverRecord/index.vue(68,39): error TS2339: Property 'preserveExpanded' does not exist on type 'CreateComponentPublicInstanceWithMixins<ToResolvedProps<{}, {}>, { Search: DefineComponent<{}, void, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ... 12 more ..., any>; ... 22 more ...; handleDetail: (index: any, row: any) => void; }, ... 23 more ..., {}>'. src/views/deliverRecord/index.vue(99,35): error TS6133: 'scope' is declared but its value is never read. src/views/deliverRecord/index.vue(114,34): error TS6133: 'row' is declared but its value is never read. src/views/deliverRecord/index.vue(160,28): error TS2339: Property 'disabled' does not exist on type 'CreateComponentPublicInstanceWithMixins<ToResolvedProps<{}, {}>, { Search: DefineComponent<{}, void, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ... 12 more ..., any>; ... 22 more ...; handleDetail: (index: any, row: any) => void; }, ... 23 more ..., {}>'. src/views/deliverRecord/index.vue(161,30): error TS2339: Property 'background' does not exist on type 'CreateComponentPublicInstanceWithMixins<ToResolvedProps<{}, {}>, { Search: DefineComponent<{}, void, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ... 12 more ..., any>; ... 22 more ...; handleDetail: (index: any, row: any) => void; }, ... 23 more ..., {}>'. src/views/deliverRecord/index.vue(292,23): error TS7006: Parameter 'date' implicitly has an 'any' type. src/views/deliverRecord/index.vue(300,25): error TS7006: Parameter 'status' implicitly has an 'any' type. src/views/deliverRecord/index.vue(307,19): error TS7006: Parameter 'data' implicitly has an 'any' type. src/views/deliverRecord/index.vue(313,19): error TS7006: Parameter 'data' implicitly has an 'any' type. src/views/deliverRecord/index.vue(319,19): error TS7006: Parameter 'data' implicitly has an 'any' type. src/views/deliverRecord/index.vue(325,19): error TS7006: Parameter 'data' implicitly has an 'any' type. src/views/deliverRecord/index.vue(326,17): error TS2551: Property 'receiver_name' does not exist on type '{ car_plate_number: string; car_schedule_id: string; cargo_code: string; receive_name: string; limit: number; page: number; search_text: string; sort: string; sorts: string; start: number; state: string; time_condition: { ...; }[]; work_type: string; status: number; }'. Did you mean 'receive_name'? src/views/deliverRecord/index.vue(345,17): error TS2551: Property 'receiver_name' does not exist on type '{ car_plate_number: string; car_schedule_id: string; cargo_code: string; receive_name: string; limit: number; page: number; search_text: string; sort: string; sorts: string; start: number; state: string; time_condition: { ...; }[]; work_type: string; status: number; }'. Did you mean 'receive_name'? src/views/deliverRecord/index.vue(358,15): error TS2551: Property 'receiver_name' does not exist on type '{ car_plate_number: string; car_schedule_id: string; cargo_code: string; receive_name: string; limit: number; page: number; search_text: string; sort: string; sorts: string; start: number; state: string; time_condition: { ...; }[]; work_type: string; status: number; }'. Did you mean 'receive_name'? src/views/deliverRecord/index.vue(374,27): error TS2304: Cannot find name 'TabsPaneContext'. src/views/deliverRecord/index.vue(374,44): error TS6133: 'event' is declared but its value is never read. src/views/deliverRecord/index.vue(384,29): error TS7006: Parameter 'data' implicitly has an 'any' type. src/views/deliverRecord/index.vue(387,10): error TS2339: Property 'code' does not exist on type 'AxiosResponse<any, any>'. src/views/deliverRecord/index.vue(390,33): error TS7006: Parameter 'item' implicitly has an 'any' type. src/views/deliverRecord/index.vue(400,32): error TS7006: Parameter 'data' implicitly has an 'any' type. src/views/deliverRecord/index.vue(402,10): error TS2339: Property 'code' does not exist on type 'AxiosResponse<any, any>'. src/views/deliverRecord/index.vue(404,5): error TS2322: Type '{ label: unknown; value: unknown; }[]' is not assignable to type 'never[]'. Type '{ label: unknown; value: unknown; }' is not assignable to type 'never'. src/views/deliverRecord/index.vue(404,47): error TS7006: Parameter 'item' implicitly has an 'any' type. src/views/deliverRecord/index.vue(406,5): error TS2322: Type '{ label: unknown; value: unknown; }[]' is not assignable to type 'never[]'. Type '{ label: unknown; value: unknown; }' is not assignable to type 'never'. src/views/deliverRecord/index.vue(406,48): error TS7006: Parameter 'item' implicitly has an 'any' type. src/views/deliverRecord/index.vue(408,5): error TS2322: Type '{ label: unknown; value: unknown; }[]' is not assignable to type 'never[]'. Type '{ label: unknown; value: unknown; }' is not assignable to type 'never'. src/views/deliverRecord/index.vue(408,48): error TS7006: Parameter 'item' implicitly has an 'any' type. src/views/deliverRecord/index.vue(410,5): error TS2322: Type '{ label: unknown; value: unknown; }[]' is not assignable to type 'never[]'. Type '{ label: unknown; value: unknown; }' is not assignable to type 'never'. src/views/deliverRecord/index.vue(410,48): error TS7006: Parameter 'item' implicitly has an 'any' type. src/views/deliverRecord/index.vue(421,25): error TS6133: 'index' is declared but its value is never read. src/views/deliverRecord/index.vue(421,25): error TS7006: Parameter 'index' implicitly has an 'any' type. src/views/deliverRecord/index.vue(421,31): error TS7006: Parameter 'row' implicitly has an 'any' type. src/views/deliverRecord/index.vue(423,8): error TS2339: Property 'sap_room' does not exist on type '{ name: string; region: string; date1: string; date2: string; delivery: boolean; type: never[]; resource: string; desc: string; }'. src/views/deliverRecord/index.vue(424,8): error TS2339: Property 'calculated_room' does not exist on type '{ name: string; region: string; date1: string; date2: string; delivery: boolean; type: never[]; resource: string; desc: string; }'. src/views/deliverRecord/index.vue(425,8): error TS2339: Property 'small_room' does not exist on type '{ name: string; region: string; date1: string; date2: string; delivery: boolean; type: never[]; resource: string; desc: string; }'. src/views/deliverRecord/index.vue(426,8): error TS2339: Property 'receiver_name' does not exist on type '{ name: string; region: string; date1: string; date2: string; delivery: boolean; type: never[]; resource: string; desc: string; }'. src/views/deliverRecord/index.vue(429,23): error TS7006: Parameter 'index' implicitly has an 'any' type. src/views/deliverRecord/index.vue(429,29): error TS7006: Parameter 'row' implicitly has an 'any' type. src/views/deliverRecord/index.vue(445,26): error TS7006: Parameter 'warrantyDate' implicitly has an 'any' type. src/views/deliverRecord/index.vue(445,40): error TS7006: Parameter 'receiptDate' implicitly has an 'any' type. src/views/deliverRecord/index.vue(451,26): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. src/views/deliverRecord/index.vue(451,36): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. src/views/forkliftView.vue(87,30): error TS2339: Property 'resetForm' does not exist on type 'CreateComponentPublicInstanceWithMixins<ToResolvedProps<{}, {}>, { value1: Ref<boolean, boolean>; value2: Ref<boolean, boolean>; list: Ref<{ order: number; time: number; status: string; }[], { order: number; time: number; status: string; }[] | { ...; }[]>; formInline: { ...; }; tableData: { ...; }[]; }, ... 23 more ...'. src/views/forkliftView.vue(87,40): error TS2339: Property 'ruleFormRef' does not exist on type 'CreateComponentPublicInstanceWithMixins<ToResolvedProps<{}, {}>, { value1: Ref<boolean, boolean>; value2: Ref<boolean, boolean>; list: Ref<{ order: number; time: number; status: string; }[], { order: number; time: number; status: string; }[] | { ...; }[]>; formInline: { ...; }; tableData: { ...; }[]; }, ... 23 more ...'. src/views/forkliftView.vue(88,45): error TS2339: Property 'onSubmit' does not exist on type 'CreateComponentPublicInstanceWithMixins<ToResolvedProps<{}, {}>, { value1: Ref<boolean, boolean>; value2: Ref<boolean, boolean>; list: Ref<{ order: number; time: number; status: string; }[], { order: number; time: number; status: string; }[] | { ...; }[]>; formInline: { ...; }; tableData: { ...; }[]; }, ... 23 more ...'. src/views/forkliftView.vue(118,32): error TS2339: Property 'gridData' does not exist on type 'CreateComponentPublicInstanceWithMixins<ToResolvedProps<{}, {}>, { value1: Ref<boolean, boolean>; value2: Ref<boolean, boolean>; list: Ref<{ order: number; time: number; status: string; }[], { order: number; time: number; status: string; }[] | { ...; }[]>; formInline: { ...; }; tableData: { ...; }[]; }, ... 23 more ...'. src/views/goodsStat/goodsDetail.vue(12,24): error TS2339: Property 'methodMap' does not exist on type 'CreateComponentPublicInstanceWithMixins<ToResolvedProps<{}, {}>, { ruleFormRef: Ref<any, any>; formInline: { user: string; region: string; date: string; }; tableData: { date: string; name: string; address: string; sum: number; }[]; sortsArr: Ref<...>; onSubmit: () => void; resetForm: (formEl: any) => void; }, ... 23...'. src/views/goodsStat/goodsDetail.vue(16,22): error TS2339: Property 'value' does not exist on type 'never'. src/views/goodsStat/goodsDetail.vue(17,24): error TS2339: Property 'label' does not exist on type 'never'. src/views/goodsStat/goodsDetail.vue(18,24): error TS2339: Property 'value' does not exist on type 'never'. src/views/goodsStat/goodsDetail.vue(100,20): error TS7006: Parameter 'formEl' implicitly has an 'any' type. src/views/goodsStat/index.vue(83,26): error TS7016: Could not find a declaration file for module '@/components/LineBarChart.vue'. '/var/jenkins_home/workspace/zq-web/src/components/LineBarChart.vue' implicitly has an 'any' type. src/views/goodsStat/index.vue(84,26): error TS7016: Could not find a declaration file for module '@/components/StackedChart.vue'. '/var/jenkins_home/workspace/zq-web/src/components/StackedChart.vue' implicitly has an 'any' type. src/views/goodsStat/index.vue(88,21): error TS6133: 'name' is declared but its value is never read. src/views/goodsStat/index.vue(88,21): error TS7006: Parameter 'name' implicitly has an 'any' type. src/views/goodsStat/index.vue(88,26): error TS7006: Parameter 'index' implicitly has an 'any' type. src/views/homeView.vue(14,24): error TS2339: Property 'nickname' does not exist on type '{}'. src/views/loginView.vue(74,53): error TS2304: Cannot find name 'ComponentInternalInstance'. src/views/monitorView.vue(18,40): error TS6133: 'value' is declared but its value is never read. src/views/personStat/index.vue(100,23): error TS7016: Could not find a declaration file for module '@/components/RingChart.vue'. '/var/jenkins_home/workspace/zq-web/src/components/RingChart.vue' implicitly has an 'any' type. src/views/personStat/index.vue(148,20): error TS7006: Parameter 'formEl' implicitly has an 'any' type. src/views/receiveRecord/index.vue(22,24): error TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{ handleSearch0: (data: any) => void; handleSearch1: (data: any) => void; handleSearch2: (data: any) => void; handleSearch3: (data: any) => void; }'. No index signature with a parameter of type 'string' was found on type '{ handleSearch0: (data: any) => void; handleSearch1: (data: any) => void; handleSearch2: (data: any) => void; handleSearch3: (data: any) => void; }'. src/views/receiveRecord/index.vue(23,23): error TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{ handleClear0: () => void; handleClear1: () => void; handleClear2: () => void; handleClear3: () => void; }'. No index signature with a parameter of type 'string' was found on type '{ handleClear0: () => void; handleClear1: () => void; handleClear2: () => void; handleClear3: () => void; }'. src/views/receiveRecord/index.vue(28,22): error TS2339: Property 'value' does not exist on type 'never'. src/views/receiveRecord/index.vue(29,24): error TS2339: Property 'label' does not exist on type 'never'. src/views/receiveRecord/index.vue(30,24): error TS2339: Property 'value' does not exist on type 'never'. src/views/receiveRecord/index.vue(68,39): error TS2339: Property 'preserveExpanded' does not exist on type 'CreateComponentPublicInstanceWithMixins<ToResolvedProps<{}, {}>, { Search: DefineComponent<{}, void, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ... 12 more ..., any>; ... 22 more ...; handleDetail: (index: any, row: any) => void; }, ... 23 more ..., {}>'. src/views/receiveRecord/index.vue(100,34): error TS6133: 'row' is declared but its value is never read. src/views/receiveRecord/index.vue(123,35): error TS6133: 'scope' is declared but its value is never read. src/views/receiveRecord/index.vue(150,28): error TS2339: Property 'disabled' does not exist on type 'CreateComponentPublicInstanceWithMixins<ToResolvedProps<{}, {}>, { Search: DefineComponent<{}, void, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ... 12 more ..., any>; ... 22 more ...; handleDetail: (index: any, row: any) => void; }, ... 23 more ..., {}>'. src/views/receiveRecord/index.vue(151,30): error TS2339: Property 'background' does not exist on type 'CreateComponentPublicInstanceWithMixins<ToResolvedProps<{}, {}>, { Search: DefineComponent<{}, void, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ... 12 more ..., any>; ... 22 more ...; handleDetail: (index: any, row: any) => void; }, ... 23 more ..., {}>'. src/views/receiveRecord/index.vue(165,33): error TS2339: Property 'sap_room' does not exist on type '{ name: string; region: string; date1: string; date2: string; delivery: boolean; type: never[]; resource: string; desc: string; }'. src/views/receiveRecord/index.vue(168,33): error TS2339: Property 'calculated_room' does not exist on type '{ name: string; region: string; date1: string; date2: string; delivery: boolean; type: never[]; resource: string; desc: string; }'. src/views/receiveRecord/index.vue(171,33): error TS2339: Property 'small_room' does not exist on type '{ name: string; region: string; date1: string; date2: string; delivery: boolean; type: never[]; resource: string; desc: string; }'. src/views/receiveRecord/index.vue(178,33): error TS2339: Property 'receiver_name' does not exist on type '{ name: string; region: string; date1: string; date2: string; delivery: boolean; type: never[]; resource: string; desc: string; }'. src/views/receiveRecord/index.vue(283,23): error TS7006: Parameter 'date' implicitly has an 'any' type. src/views/receiveRecord/index.vue(291,25): error TS7006: Parameter 'status' implicitly has an 'any' type. src/views/receiveRecord/index.vue(298,19): error TS7006: Parameter 'data' implicitly has an 'any' type. src/views/receiveRecord/index.vue(304,19): error TS7006: Parameter 'data' implicitly has an 'any' type. src/views/receiveRecord/index.vue(310,19): error TS7006: Parameter 'data' implicitly has an 'any' type. src/views/receiveRecord/index.vue(316,19): error TS7006: Parameter 'data' implicitly has an 'any' type. src/views/receiveRecord/index.vue(317,17): error TS2551: Property 'receiver_name' does not exist on type '{ car_plate_number: string; car_schedule_id: string; cargo_code: string; receive_name: string; limit: number; page: number; search_text: string; sort: string; sorts: string; start: number; state: string; time_condition: { ...; }[]; work_type: string; status: number; }'. Did you mean 'receive_name'? src/views/receiveRecord/index.vue(336,17): error TS2551: Property 'receiver_name' does not exist on type '{ car_plate_number: string; car_schedule_id: string; cargo_code: string; receive_name: string; limit: number; page: number; search_text: string; sort: string; sorts: string; start: number; state: string; time_condition: { ...; }[]; work_type: string; status: number; }'. Did you mean 'receive_name'? src/views/receiveRecord/index.vue(349,15): error TS2551: Property 'receiver_name' does not exist on type '{ car_plate_number: string; car_schedule_id: string; cargo_code: string; receive_name: string; limit: number; page: number; search_text: string; sort: string; sorts: string; start: number; state: string; time_condition: { ...; }[]; work_type: string; status: number; }'. Did you mean 'receive_name'? src/views/receiveRecord/index.vue(365,27): error TS2304: Cannot find name 'TabsPaneContext'. src/views/receiveRecord/index.vue(365,44): error TS6133: 'event' is declared but its value is never read. src/views/receiveRecord/index.vue(375,29): error TS7006: Parameter 'data' implicitly has an 'any' type. src/views/receiveRecord/index.vue(378,10): error TS2339: Property 'code' does not exist on type 'AxiosResponse<any, any>'. src/views/receiveRecord/index.vue(381,33): error TS7006: Parameter 'item' implicitly has an 'any' type. src/views/receiveRecord/index.vue(391,32): error TS7006: Parameter 'data' implicitly has an 'any' type. src/views/receiveRecord/index.vue(393,10): error TS2339: Property 'code' does not exist on type 'AxiosResponse<any, any>'. src/views/receiveRecord/index.vue(395,5): error TS2322: Type '{ label: unknown; value: unknown; }[]' is not assignable to type 'never[]'. Type '{ label: unknown; value: unknown; }' is not assignable to type 'never'. src/views/receiveRecord/index.vue(395,47): error TS7006: Parameter 'item' implicitly has an 'any' type. src/views/receiveRecord/index.vue(397,5): error TS2322: Type '{ label: unknown; value: unknown; }[]' is not assignable to type 'never[]'. Type '{ label: unknown; value: unknown; }' is not assignable to type 'never'. src/views/receiveRecord/index.vue(397,48): error TS7006: Parameter 'item' implicitly has an 'any' type. src/views/receiveRecord/index.vue(399,5): error TS2322: Type '{ label: unknown; value: unknown; }[]' is not assignable to type 'never[]'. Type '{ label: unknown; value: unknown; }' is not assignable to type 'never'. src/views/receiveRecord/index.vue(399,48): error TS7006: Parameter 'item' implicitly has an 'any' type. src/views/receiveRecord/index.vue(401,5): error TS2322: Type '{ label: unknown; value: unknown; }[]' is not assignable to type 'never[]'. Type '{ label: unknown; value: unknown; }' is not assignable to type 'never'. src/views/receiveRecord/index.vue(401,48): error TS7006: Parameter 'item' implicitly has an 'any' type. src/views/receiveRecord/index.vue(412,25): error TS6133: 'index' is declared but its value is never read. src/views/receiveRecord/index.vue(412,25): error TS7006: Parameter 'index' implicitly has an 'any' type. src/views/receiveRecord/index.vue(412,31): error TS7006: Parameter 'row' implicitly has an 'any' type. src/views/receiveRecord/index.vue(414,8): error TS2339: Property 'sap_room' does not exist on type '{ name: string; region: string; date1: string; date2: string; delivery: boolean; type: never[]; resource: string; desc: string; }'. src/views/receiveRecord/index.vue(415,8): error TS2339: Property 'calculated_room' does not exist on type '{ name: string; region: string; date1: string; date2: string; delivery: boolean; type: never[]; resource: string; desc: string; }'. src/views/receiveRecord/index.vue(416,8): error TS2339: Property 'small_room' does not exist on type '{ name: string; region: string; date1: string; date2: string; delivery: boolean; type: never[]; resource: string; desc: string; }'. src/views/receiveRecord/index.vue(417,8): error TS2339: Property 'receiver_name' does not exist on type '{ name: string; region: string; date1: string; date2: string; delivery: boolean; type: never[]; resource: string; desc: string; }'. src/views/receiveRecord/index.vue(420,23): error TS7006: Parameter 'index' implicitly has an 'any' type. src/views/receiveRecord/index.vue(420,29): error TS7006: Parameter 'row' implicitly has an 'any' type. src/views/receiveRecord/index.vue(436,26): error TS7006: Parameter 'warrantyDate' implicitly has an 'any' type. src/views/receiveRecord/index.vue(436,40): error TS7006: Parameter 'receiptDate' implicitly has an 'any' type. src/views/receiveRecord/index.vue(442,26): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. src/views/receiveRecord/index.vue(442,36): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. src/views/receiveRecord/receiveDetail.vue(14,19): error TS2339: Property 'cargo_code' does not exist on type 'never'. src/views/receiveRecord/receiveDetail.vue(18,55): error TS2339: Property 'car_schedule_id' does not exist on type '{}'. src/views/receiveRecord/receiveDetail.vue(19,56): error TS2339: Property 'cargo_name' does not exist on type '{}'. src/views/receiveRecord/receiveDetail.vue(20,68): error TS2339: Property 'gross_weight' does not exist on type 'never'. src/views/receiveRecord/receiveDetail.vue(21,56): error TS2339: Property 'car_plate_number' does not exist on type '{}'. src/views/receiveRecord/receiveDetail.vue(22,67): error TS2339: Property 'spec' does not exist on type 'never'. src/views/receiveRecord/receiveDetail.vue(23,57): error TS2339: Property 'warranty_start_date' does not exist on type '{}'. src/views/receiveRecord/receiveDetail.vue(23,88): error TS2339: Property 'warranty_start_date' does not exist on type '{}'. src/views/receiveRecord/receiveDetail.vue(23,126): error TS2339: Property 'warranty_end_date' does not exist on type '{}'. src/views/receiveRecord/receiveDetail.vue(23,155): error TS2339: Property 'warranty_end_date' does not exist on type '{}'. src/views/receiveRecord/receiveDetail.vue(24,68): error TS2339: Property 'cargo_code' does not exist on type 'never'. src/views/receiveRecord/receiveDetail.vue(25,67): error TS2339: Property 'net_weight' does not exist on type 'never'. src/views/receiveRecord/receiveDetail.vue(26,55): error TS2339: Property 'receiver_name' does not exist on type '{}'. src/views/receiveRecord/receiveDetail.vue(29,78): error TS2339: Property 'step_name' does not exist on type 'never'. src/views/receiveRecord/receiveDetail.vue(29,101): error TS2339: Property 'step_name' does not exist on type 'never'. src/views/receiveRecord/receiveDetail.vue(30,51): error TS2339: Property 'operator' does not exist on type 'never'. src/views/receiveRecord/receiveDetail.vue(31,52): error TS2339: Property 'create_time' does not exist on type 'never'. src/views/receiveRecord/receiveDetail.vue(32,51): error TS2339: Property 'car_plate_number' does not exist on type 'never'. src/views/receiveRecord/receiveDetail.vue(35,25): error TS7022: 'item' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. src/views/receiveRecord/receiveDetail.vue(35,33): error TS2448: Block-scoped variable 'item' used before its declaration. src/views/receiveRecord/receiveDetail.vue(105,33): error TS6133: 'ArrowRight' is declared but its value is never read. src/views/receiveRecord/receiveDetail.vue(109,1): error TS6133: 'log' is declared but its value is never read. src/views/receiveRecord/receiveDetail.vue(122,28): error TS7006: Parameter 'index' implicitly has an 'any' type. src/views/receiveRecord/receiveDetail.vue(124,14): error TS2339: Property 'schedule_step_info' does not exist on type '{}'. src/views/receiveRecord/receiveDetail.vue(124,37): error TS7006: Parameter 'item' implicitly has an 'any' type. src/views/receiveRecord/receiveDetail.vue(125,24): error TS2345: Argument of type 'any' is not assignable to parameter of type 'never'. src/views/receiveRecord/receiveDetail.vue(127,26): error TS2339: Property 'step_info' does not exist on type 'never'. src/views/receiveRecord/receiveDetail.vue(127,40): error TS7006: Parameter 'item' implicitly has an 'any' type. src/views/receiveRecord/receiveDetail.vue(128,24): error TS2345: Argument of type 'any' is not assignable to parameter of type 'never'. src/views/receiveRecord/receiveDetail.vue(132,29): error TS2339: Property 'step_name' does not exist on type 'never'. src/views/receiveRecord/receiveDetail.vue(135,3): error TS2554: Expected 2 arguments, but got 1. src/views/receiveRecord/receiveDetail.vue(140,22): error TS7006: Parameter 'tab' implicitly has an 'any' type. src/views/receiveRecord/receiveDetail.vue(140,27): error TS6133: 'event' is declared but its value is never read. src/views/receiveRecord/receiveDetail.vue(140,27): error TS7006: Parameter 'event' implicitly has an 'any' type. src/views/receiveRecord/receiveDetail.vue(144,26): error TS7006: Parameter 'id' implicitly has an 'any' type. src/views/receiveRecord/receiveDetail.vue(146,10): error TS2339: Property 'code' does not exist on type 'AxiosResponse<any, any>'. vite.config.ts(9,25): error TS2307: Cannot find module 'path' or its corresponding type declarations. vite.config.ts(34,20): error TS2304: Cannot find name '__dirname'. Build step 'Execute shell' marked build as failure SSH: Current build result is [FAILURE], not going to run. Finished: FAILURE
10-31
HTTP 503 Service Unavailable 表示服务器当前不能处理客户端的请求,一段时间后可能恢复正常。对于 URI 为 `/arithmetic/${pageContext.request.contextPath}/user/toLogin` 的 503 错误,可从以下几个方面解决: ### 检查 Jetty 服务器配置 确保 Jetty 服务器的配置正确,资源分配合理。可以在启动 Jetty 时增加内存分配,避免因内存不足导致服务不可用。以下是一个使用 Jetty Maven 插件启动的 `pom.xml` 示例: ```xml <build> <plugins> <plugin> <groupId>org.eclipse.jetty</groupId> <artifactId>jetty-maven-plugin</artifactId> <version>9.4.50.v20221201</version> <configuration> <jettyEnvXml>src/main/resources/jetty-env.xml</jettyEnvXml> <jvmArgs>-Xmx512m -Xms256m</jvmArgs> </configuration> </plugin> </plugins> </build> ``` ### 检查 Servlet 代码 确保处理 `/arithmetic/${pageContext.request.contextPath}/user/toLogin` 请求的 Servlet 代码没有错误。以下是一个简单的 Servlet 示例: ```java import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; @WebServlet("/arithmetic/${pageContext.request.contextPath}/user/toLogin") public class LoginServlet extends HttpServlet { @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { try { // 处理登录逻辑 resp.setStatus(HttpServletResponse.SC_OK); resp.getWriter().println("Login page"); } catch (Exception e) { resp.setStatus(HttpServletResponse.SC_SERVICE_UNAVAILABLE); resp.getWriter().println("Service unavailable, please try again later."); } } } ``` ### 检查后端服务 如果该请求依赖于其他后端服务(如数据库、缓存等),确保这些服务正常运行。可以在 Servlet 中添加健康检查逻辑: ```java import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; @WebServlet("/arithmetic/${pageContext.request.contextPath}/user/toLogin") public class LoginServlet extends HttpServlet { @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { if (!isBackendServiceHealthy()) { resp.setStatus(HttpServletResponse.SC_SERVICE_UNAVAILABLE); resp.getWriter().println("Backend service is unavailable, please try again later."); return; } try { // 处理登录逻辑 resp.setStatus(HttpServletResponse.SC_OK); resp.getWriter().println("Login page"); } catch (Exception e) { resp.setStatus(HttpServletResponse.SC_SERVICE_UNAVAILABLE); resp.getWriter().println("Service unavailable, please try again later."); } } private boolean isBackendServiceHealthy() { try (Connection conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/mydb", "user", "password")) { return true; } catch (SQLException e) { return false; } } } ```
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值