作者 yangfu

refactor:统计代码优化

... ... @@ -2,14 +2,14 @@
echo "批量打卡"
# 待打卡的用户IC卡号列表
# 待打卡的用户IC卡号列表 打料 "18860189991" "18860189992"
icList=("18860189991" "18860189992")
# 设备编号
device_coe='STX-D-0001'
device_coe='STX-D-0003'
# 测试环境服务地址
host="http://allied-creation-manufacture-test.fjmaimaimai.com/zkteco/iclock/cdata?SN=$device_coe"
#host="http://allied-creation-manufacture-test.fjmaimaimai.com/zkteco/iclock/cdata?SN=$device_coe"
# 本地环境服务地址
#host="http://106.75.231.90:9999/zkteco/iclock/cdata?SN=$device_coe"
host="http://106.75.231.90:9999/zkteco/iclock/cdata?SN=$device_coe"
sign_time=`date "+%Y-%m-%d %H:%M:%S"`
... ...
#! /bin/bash
echo "批量打卡"
# 待打卡的用户IC卡号列表 成型 "18860189991" "18860189992"
icList=("18860189993" "18860187878")
# 设备编号
device_coe='STX-D-0004'
# 测试环境服务地址
#host="http://allied-creation-manufacture-test.fjmaimaimai.com/zkteco/iclock/cdata?SN=$device_coe"
# 本地环境服务地址
host="http://106.75.231.90:9999/zkteco/iclock/cdata?SN=$device_coe"
sign_time=`date "+%Y-%m-%d %H:%M:%S"`
for str in ${icList[*]};do
echo "IC: $str 打卡时间: $sign_time \r\n"
curl --location --request POST $host \
--data-raw "$str $sign_time $ YY"
done
\ No newline at end of file
... ...