Bladeren bron

考勤异常元数据更新

Heyuan 1 maand geleden
bovenliggende
commit
f3aaf37279
20 gewijzigde bestanden met toevoegingen van 1033 en 101 verwijderingen
  1. 3 3
      metadata/com/kingdee/eas/custom/attendanceexception/AttendanceExceptionLog.bizunit
  2. 91 7
      metadata/com/kingdee/eas/custom/attendanceexception/app/AttendanceExceptionLog.entity
  3. 47 0
      metadata/com/kingdee/eas/custom/attendanceexception/app/AttendanceExceptionLogQuery.query
  4. 26 0
      metadata/com/kingdee/eas/custom/attendanceexception/app/CT_ATT_AttendanceExceptionLog.table
  5. 166 0
      metadata/com/kingdee/eas/custom/attendanceexception/client/AttendanceExceptionLogEditUI.ui
  6. 11 0
      metadata/com/kingdee/eas/custom/attendanceexception/client/AttendanceExceptionLogListUI.ui
  7. 11 0
      src/com/kingdee/eas/custom/attendanceexception/AbstractAttendanceExceptionLogInfo.java
  8. 44 42
      src/com/kingdee/eas/custom/attendanceexception/app/CenterLeaderRelationControllerBean.java
  9. 90 0
      src/com/kingdee/eas/custom/attendanceexception/bean/DingMsgBean.java
  10. 143 0
      src/com/kingdee/eas/custom/attendanceexception/bean/SyncAttendanceDataBean.java
  11. 26 3
      src/com/kingdee/eas/custom/attendanceexception/client/AbstractAttendanceExceptionLogEditUI.java
  12. 1 0
      src/com/kingdee/eas/custom/attendanceexception/client/AbstractAttendanceExceptionLogEditUI.properties
  13. 1 0
      src/com/kingdee/eas/custom/attendanceexception/client/AbstractAttendanceExceptionLogEditUI_l1.properties
  14. 1 0
      src/com/kingdee/eas/custom/attendanceexception/client/AbstractAttendanceExceptionLogEditUI_l2.properties
  15. 1 0
      src/com/kingdee/eas/custom/attendanceexception/client/AbstractAttendanceExceptionLogEditUI_l3.properties
  16. 0 0
      src/com/kingdee/eas/custom/attendanceexception/client/AbstractAttendanceExceptionLogListUI.java
  17. 0 0
      src/com/kingdee/eas/custom/attendanceexception/client/AbstractAttendanceExceptionLogListUI.properties
  18. 0 0
      src/com/kingdee/eas/custom/attendanceexception/client/AbstractAttendanceExceptionLogListUI_l2.properties
  19. 0 0
      src/com/kingdee/eas/custom/attendanceexception/client/AbstractAttendanceExceptionLogListUI_l3.properties
  20. 371 46
      src/com/kingdee/eas/custom/attendanceexception/task/AttendanceExceptionFacadeControllerBean.java

+ 3 - 3
metadata/com/kingdee/eas/custom/attendanceexception/AttendanceExceptionLog.bizunit

@@ -111,9 +111,9 @@
             <lang locale="zh_TW" value="com.kingdee.eas.custom.attendanceexception.client.AttendanceExceptionLogListUI" />
         </rs>
         <rs key="bizUnit[com.kingdee.eas.custom.attendanceexception.AttendanceExceptionLog].extendedProperty.maxFieldIndex">
-            <lang locale="en_US" value="12" />
-            <lang locale="zh_CN" value="12" />
-            <lang locale="zh_TW" value="12" />
+            <lang locale="en_US" value="13" />
+            <lang locale="zh_CN" value="13" />
+            <lang locale="zh_TW" value="13" />
         </rs>
         <rs key="bizUnit[com.kingdee.eas.custom.attendanceexception.AttendanceExceptionLog].extendedProperty.useTableEditUI">
             <lang locale="en_US" value="false" />

+ 91 - 7
metadata/com/kingdee/eas/custom/attendanceexception/app/AttendanceExceptionLog.entity

@@ -190,7 +190,7 @@
             <isNullable>false</isNullable>
             <formula />
             <length>1</length>
-            <precision>0</precision>
+            <precision>1</precision>
             <decimalDigits>0</decimalDigits>
             <defaultValue>entityObject[com.kingdee.eas.custom.attendanceexception.app.AttendanceExceptionLog].properties.ownProperty[Fivouchered].defaultValue</defaultValue>
             <displayFormat />
@@ -210,7 +210,7 @@
             <isNullable>false</isNullable>
             <formula />
             <length>2000</length>
-            <precision>0</precision>
+            <precision>2000</precision>
             <decimalDigits>0</decimalDigits>
             <defaultValue>entityObject[com.kingdee.eas.custom.attendanceexception.app.AttendanceExceptionLog].properties.ownProperty[pushResult].defaultValue</defaultValue>
             <displayFormat />
@@ -330,7 +330,7 @@
             <isNullable>false</isNullable>
             <formula />
             <length>80</length>
-            <precision>0</precision>
+            <precision>4</precision>
             <decimalDigits>0</decimalDigits>
             <defaultValue>entityObject[com.kingdee.eas.custom.attendanceexception.app.AttendanceExceptionLog].properties.ownProperty[pushStatus].defaultValue</defaultValue>
             <displayFormat />
@@ -338,6 +338,26 @@
                 <key name="name" value="CFPushStatus" />
             </mappingField>
         </ownProperty>
+        <ownProperty>
+            <name>messageId</name>
+            <alias>entityObject[com.kingdee.eas.custom.attendanceexception.app.AttendanceExceptionLog].properties.ownProperty[messageId].alias</alias>
+            <description>entityObject[com.kingdee.eas.custom.attendanceexception.app.AttendanceExceptionLog].properties.ownProperty[messageId].description</description>
+            <userDefined>true</userDefined>
+            <configured>false</configured>
+            <dataType>String</dataType>
+            <metadataRef />
+            <isMultilingual>false</isMultilingual>
+            <isNullable>false</isNullable>
+            <formula />
+            <length>255</length>
+            <precision>0</precision>
+            <decimalDigits>0</decimalDigits>
+            <defaultValue>entityObject[com.kingdee.eas.custom.attendanceexception.app.AttendanceExceptionLog].properties.ownProperty[messageId].defaultValue</defaultValue>
+            <displayFormat />
+            <mappingField>
+                <key name="name" value="CFMessageId" />
+            </mappingField>
+        </ownProperty>
     </properties>
     <logicalKey>
         <name>id</name>
@@ -1155,6 +1175,69 @@
             <lang locale="zh_CN" value="true" />
             <lang locale="zh_TW" value="true" />
         </rs>
+        <rs key="entityObject[com.kingdee.eas.custom.attendanceexception.app.AttendanceExceptionLog].properties.ownProperty[messageId].alias">
+            <lang locale="en_US" value="null" />
+            <lang locale="zh_CN" value="消息id" />
+            <lang locale="zh_HK" value="消息id" />
+            <lang locale="zh_TW" value="消息id" />
+        </rs>
+        <rs key="entityObject[com.kingdee.eas.custom.attendanceexception.app.AttendanceExceptionLog].properties.ownProperty[messageId].defaultValue">
+            <lang locale="en_US" value="null" />
+            <lang locale="zh_CN" value="null" />
+            <lang locale="zh_HK" value="null" />
+            <lang locale="zh_TW" value="null" />
+        </rs>
+        <rs key="entityObject[com.kingdee.eas.custom.attendanceexception.app.AttendanceExceptionLog].properties.ownProperty[messageId].description">
+            <lang locale="en_US" value="null" />
+            <lang locale="zh_CN" value="消息id" />
+            <lang locale="zh_HK" value="消息id" />
+            <lang locale="zh_TW" value="消息id" />
+        </rs>
+        <rs key="entityObject[com.kingdee.eas.custom.attendanceexception.app.AttendanceExceptionLog].properties.ownProperty[messageId].extendedProperty.ColWidthInKDTable">
+            <lang locale="en_US" value="50" />
+            <lang locale="zh_CN" value="50" />
+            <lang locale="zh_TW" value="50" />
+        </rs>
+        <rs key="entityObject[com.kingdee.eas.custom.attendanceexception.app.AttendanceExceptionLog].properties.ownProperty[messageId].extendedProperty.bizDataType">
+            <lang locale="en_US" value="STRING" />
+            <lang locale="zh_CN" value="STRING" />
+            <lang locale="zh_TW" value="STRING" />
+        </rs>
+        <rs key="entityObject[com.kingdee.eas.custom.attendanceexception.app.AttendanceExceptionLog].properties.ownProperty[messageId].extendedProperty.enableFieldPermission">
+            <lang locale="en_US" value="false" />
+            <lang locale="zh_CN" value="false" />
+            <lang locale="zh_TW" value="false" />
+        </rs>
+        <rs key="entityObject[com.kingdee.eas.custom.attendanceexception.app.AttendanceExceptionLog].properties.ownProperty[messageId].extendedProperty.isForGrouping">
+            <lang locale="en_US" value="false" />
+            <lang locale="zh_CN" value="false" />
+            <lang locale="zh_TW" value="false" />
+        </rs>
+        <rs key="entityObject[com.kingdee.eas.custom.attendanceexception.app.AttendanceExceptionLog].properties.ownProperty[messageId].extendedProperty.isForMapping">
+            <lang locale="en_US" value="true" />
+            <lang locale="zh_CN" value="true" />
+            <lang locale="zh_TW" value="true" />
+        </rs>
+        <rs key="entityObject[com.kingdee.eas.custom.attendanceexception.app.AttendanceExceptionLog].properties.ownProperty[messageId].extendedProperty.isForMatching">
+            <lang locale="en_US" value="false" />
+            <lang locale="zh_CN" value="false" />
+            <lang locale="zh_TW" value="false" />
+        </rs>
+        <rs key="entityObject[com.kingdee.eas.custom.attendanceexception.app.AttendanceExceptionLog].properties.ownProperty[messageId].extendedProperty.isForWrittenBack">
+            <lang locale="en_US" value="false" />
+            <lang locale="zh_CN" value="false" />
+            <lang locale="zh_TW" value="false" />
+        </rs>
+        <rs key="entityObject[com.kingdee.eas.custom.attendanceexception.app.AttendanceExceptionLog].properties.ownProperty[messageId].extendedProperty.isInCode">
+            <lang locale="en_US" value="false" />
+            <lang locale="zh_CN" value="false" />
+            <lang locale="zh_TW" value="false" />
+        </rs>
+        <rs key="entityObject[com.kingdee.eas.custom.attendanceexception.app.AttendanceExceptionLog].properties.ownProperty[messageId].extendedProperty.isVisibleForKDTable">
+            <lang locale="en_US" value="true" />
+            <lang locale="zh_CN" value="true" />
+            <lang locale="zh_TW" value="true" />
+        </rs>
         <rs key="entityObject[com.kingdee.eas.custom.attendanceexception.app.AttendanceExceptionLog].properties.ownProperty[messageRequest].alias">
             <lang locale="en_US" value="null" />
             <lang locale="zh_CN" value="消息接口入参" />
@@ -1352,9 +1435,9 @@
         </rs>
         <rs key="entityObject[com.kingdee.eas.custom.attendanceexception.app.AttendanceExceptionLog].properties.ownProperty[pushStatus].defaultValue">
             <lang locale="en_US" value="null" />
-            <lang locale="zh_CN" value="1" />
-            <lang locale="zh_HK" value="1" />
-            <lang locale="zh_TW" value="1" />
+            <lang locale="zh_CN" value="failure" />
+            <lang locale="zh_HK" value="failure" />
+            <lang locale="zh_TW" value="failure" />
         </rs>
         <rs key="entityObject[com.kingdee.eas.custom.attendanceexception.app.AttendanceExceptionLog].properties.ownProperty[pushStatus].description">
             <lang locale="en_US" value="null" />
@@ -1420,7 +1503,8 @@
         </rs>
         <rs key="entityObject[com.kingdee.eas.custom.attendanceexception.app.AttendanceExceptionLog].properties.ownProperty[pushType].defaultValue">
             <lang locale="en_US" value="null" />
-            <lang locale="zh_CN" value="" />
+            <lang locale="zh_CN" value="EMPLOYEEREMINDER" />
+            <lang locale="zh_HK" value="EMPLOYEEREMINDER" />
             <lang locale="zh_TW" value="EMPLOYEEREMINDER" />
         </rs>
         <rs key="entityObject[com.kingdee.eas.custom.attendanceexception.app.AttendanceExceptionLog].properties.ownProperty[pushType].description">

+ 47 - 0
metadata/com/kingdee/eas/custom/attendanceexception/app/AttendanceExceptionLogQuery.query

@@ -1006,6 +1006,37 @@
                 <key name="name" value="AttendanceExceptionLogQuery" />
             </query>
         </queryField>
+        <queryField>
+            <name>messageId</name>
+            <userDefined>true</userDefined>
+            <formulaString>#0</formulaString>
+            <constString />
+            <displayName>joinQuery[com.kingdee.eas.custom.attendanceexception.app.AttendanceExceptionLogQuery].units.queryField[messageId].displayName</displayName>
+            <groupType />
+            <isSelector>true</isSelector>
+            <isFilter>true</isFilter>
+            <isSorter>true</isSorter>
+            <isParameter>false</isParameter>
+            <returnType>String</returnType>
+            <propertyRefs>
+                <propertyRef>
+                    <key>91cc3616-7f4e-4aa3-b192-b08b473e774e</key>
+                    <parentUnit>
+                        <key name="name" value="messageId" />
+                    </parentUnit>
+                    <subEntity>
+                        <key name="name" value="AttendanceExceptionLog" />
+                    </subEntity>
+                    <refProperty>
+                        <key name="name" value="messageId" />
+                    </refProperty>
+                </propertyRef>
+            </propertyRefs>
+            <query>
+                <key name="package" value="com.kingdee.eas.custom.attendanceexception.app" />
+                <key name="name" value="AttendanceExceptionLogQuery" />
+            </query>
+        </queryField>
     </units>
     <defaultFilter>
         <name>defaultFilter</name>
@@ -1444,6 +1475,22 @@
             <lang locale="zh_HK" value="用戶名" />
             <lang locale="zh_TW" value="用戶名" />
         </rs>
+        <rs key="joinQuery[com.kingdee.eas.custom.attendanceexception.app.AttendanceExceptionLogQuery].units.queryField[messageId].displayName">
+            <lang locale="en_US" value="null" />
+            <lang locale="zh_CN" value="消息id" />
+            <lang locale="zh_HK" value="消息id" />
+            <lang locale="zh_TW" value="消息id" />
+        </rs>
+        <rs key="joinQuery[com.kingdee.eas.custom.attendanceexception.app.AttendanceExceptionLogQuery].units.queryField[messageId].extendedProperty.isCommonQueryFilter">
+            <lang locale="en_US" value="true" />
+            <lang locale="zh_CN" value="true" />
+            <lang locale="zh_TW" value="true" />
+        </rs>
+        <rs key="joinQuery[com.kingdee.eas.custom.attendanceexception.app.AttendanceExceptionLogQuery].units.queryField[messageId].extendedProperty.isCommonQuerySorter">
+            <lang locale="en_US" value="true" />
+            <lang locale="zh_CN" value="true" />
+            <lang locale="zh_TW" value="true" />
+        </rs>
         <rs key="joinQuery[com.kingdee.eas.custom.attendanceexception.app.AttendanceExceptionLogQuery].units.queryField[messageRequest].displayName">
             <lang locale="en_US" value="null" />
             <lang locale="zh_CN" value="消息接口入参" />

+ 26 - 0
metadata/com/kingdee/eas/custom/attendanceexception/app/CT_ATT_AttendanceExceptionLog.table

@@ -315,6 +315,20 @@
             <scale>0</scale>
             <precision>44</precision>
         </column>
+        <column>
+            <name>CFMessageId</name>
+            <alias>dataTable[com.kingdee.eas.custom.attendanceexception.app.CT_ATT_AttendanceExceptionLog].columns.column[CFMessageId].alias</alias>
+            <description>dataTable[com.kingdee.eas.custom.attendanceexception.app.CT_ATT_AttendanceExceptionLog].columns.column[CFMessageId].description</description>
+            <userDefined>true</userDefined>
+            <isMultilingual>false</isMultilingual>
+            <isEncoded>false</isEncoded>
+            <isNullable>true</isNullable>
+            <defaultValue />
+            <sqlType>NVARCHAR</sqlType>
+            <length>255</length>
+            <scale>0</scale>
+            <precision>0</precision>
+        </column>
     </columns>
     <primaryKey>
         <name>PK_AttendanceExcep</name>
@@ -457,6 +471,18 @@
             <lang locale="zh_HK" value="異常數據推送介面回參" />
             <lang locale="zh_TW" value="異常數據推送介面回參" />
         </rs>
+        <rs key="dataTable[com.kingdee.eas.custom.attendanceexception.app.CT_ATT_AttendanceExceptionLog].columns.column[CFMessageId].alias">
+            <lang locale="en_US" value="null" />
+            <lang locale="zh_CN" value="消息id" />
+            <lang locale="zh_HK" value="消息id" />
+            <lang locale="zh_TW" value="消息id" />
+        </rs>
+        <rs key="dataTable[com.kingdee.eas.custom.attendanceexception.app.CT_ATT_AttendanceExceptionLog].columns.column[CFMessageId].description">
+            <lang locale="en_US" value="null" />
+            <lang locale="zh_CN" value="消息id" />
+            <lang locale="zh_HK" value="消息id" />
+            <lang locale="zh_TW" value="消息id" />
+        </rs>
         <rs key="dataTable[com.kingdee.eas.custom.attendanceexception.app.CT_ATT_AttendanceExceptionLog].columns.column[CFMessageRequest].alias">
             <lang locale="en_US" value="null" />
             <lang locale="zh_CN" value="消息接口入参" />

+ 166 - 0
metadata/com/kingdee/eas/custom/attendanceexception/client/AttendanceExceptionLogEditUI.ui

@@ -766,6 +766,55 @@
                 <key name="name" value="CoreUI" />
             </parent>
         </component>
+        <component>
+            <name>contmessageId</name>
+            <alias>uiObject[com.kingdee.eas.custom.attendanceexception.client.AttendanceExceptionLogEditUI].components.component[contmessageId].alias</alias>
+            <userDefined>true</userDefined>
+            <classType>com.kingdee.bos.ctrl.swing.KDLabelContainer</classType>
+            <isContainer>true</isContainer>
+            <constraints>0,0,270,19</constraints>
+            <tabIndex>0</tabIndex>
+            <herited>false</herited>
+            <bimUIObjectPK />
+            <layoutInfo>
+                <name />
+                <type>LabelContainerLayout</type>
+                <value />
+            </layoutInfo>
+            <properties>
+                <property>
+                    <name>boundLabelText</name>
+                    <type>java.lang.String</type>
+                    <value>uiObject[com.kingdee.eas.custom.attendanceexception.client.AttendanceExceptionLogEditUI].components.component[contmessageId].properties.property[boundLabelText].value</value>
+                    <isMultiLan>true</isMultiLan>
+                    <userDefined>true</userDefined>
+                </property>
+                <property>
+                    <name>boundLabelLength</name>
+                    <type>int</type>
+                    <value>uiObject[com.kingdee.eas.custom.attendanceexception.client.AttendanceExceptionLogEditUI].components.component[contmessageId].properties.property[boundLabelLength].value</value>
+                    <isMultiLan>false</isMultiLan>
+                    <userDefined>true</userDefined>
+                </property>
+                <property>
+                    <name>boundLabelUnderline</name>
+                    <type>boolean</type>
+                    <value>uiObject[com.kingdee.eas.custom.attendanceexception.client.AttendanceExceptionLogEditUI].components.component[contmessageId].properties.property[boundLabelUnderline].value</value>
+                    <isMultiLan>false</isMultiLan>
+                    <userDefined>true</userDefined>
+                </property>
+                <property>
+                    <name>visible</name>
+                    <type>boolean</type>
+                    <value>uiObject[com.kingdee.eas.custom.attendanceexception.client.AttendanceExceptionLogEditUI].components.component[contmessageId].properties.property[visible].value</value>
+                    <isMultiLan>false</isMultiLan>
+                    <userDefined>true</userDefined>
+                </property>
+            </properties>
+            <parent>
+                <key name="name" value="CoreUI" />
+            </parent>
+        </component>
         <component>
             <name>prmtCreator</name>
             <alias>uiObject[com.kingdee.eas.custom.attendanceexception.client.AttendanceExceptionLogEditUI].components.component[prmtCreator].alias</alias>
@@ -1560,6 +1609,63 @@
                 </propertyBinding>
             </propertyBindings>
         </component>
+        <component>
+            <name>txtmessageId</name>
+            <alias>uiObject[com.kingdee.eas.custom.attendanceexception.client.AttendanceExceptionLogEditUI].components.component[txtmessageId].alias</alias>
+            <userDefined>true</userDefined>
+            <classType>com.kingdee.bos.ctrl.swing.KDTextField</classType>
+            <isContainer>false</isContainer>
+            <constraints>3</constraints>
+            <tabIndex>28</tabIndex>
+            <herited>false</herited>
+            <bimUIObjectPK />
+            <properties>
+                <property>
+                    <name>visible</name>
+                    <type>boolean</type>
+                    <value>uiObject[com.kingdee.eas.custom.attendanceexception.client.AttendanceExceptionLogEditUI].components.component[txtmessageId].properties.property[visible].value</value>
+                    <isMultiLan>false</isMultiLan>
+                    <userDefined>true</userDefined>
+                </property>
+                <property>
+                    <name>horizontalAlignment</name>
+                    <type>int</type>
+                    <value>uiObject[com.kingdee.eas.custom.attendanceexception.client.AttendanceExceptionLogEditUI].components.component[txtmessageId].properties.property[horizontalAlignment].value</value>
+                    <isMultiLan>false</isMultiLan>
+                    <userDefined>true</userDefined>
+                </property>
+                <property>
+                    <name>maxLength</name>
+                    <type>int</type>
+                    <value>uiObject[com.kingdee.eas.custom.attendanceexception.client.AttendanceExceptionLogEditUI].components.component[txtmessageId].properties.property[maxLength].value</value>
+                    <isMultiLan>false</isMultiLan>
+                    <userDefined>true</userDefined>
+                </property>
+                <property>
+                    <name>required</name>
+                    <type>boolean</type>
+                    <value>uiObject[com.kingdee.eas.custom.attendanceexception.client.AttendanceExceptionLogEditUI].components.component[txtmessageId].properties.property[required].value</value>
+                    <isMultiLan>false</isMultiLan>
+                    <userDefined>true</userDefined>
+                </property>
+            </properties>
+            <parent>
+                <key name="name" value="contmessageId" />
+            </parent>
+            <propertyBindings>
+                <propertyBinding>
+                    <propertyName>text</propertyName>
+                    <propertyType>java.lang.String</propertyType>
+                    <bindingObject>editData</bindingObject>
+                    <bindingField>messageId</bindingField>
+                    <fieldType>String</fieldType>
+                    <accessType>2</accessType>
+                    <autoMode>false</autoMode>
+                    <herited>false</herited>
+                    <userDefined>true</userDefined>
+                </propertyBinding>
+            </propertyBindings>
+        </component>
         <component>
             <name>btnTraceUp</name>
             <alias>uiObject[com.kingdee.eas.custom.attendanceexception.client.AttendanceExceptionLogEditUI].components.component[btnTraceUp].alias</alias>
@@ -2579,6 +2685,36 @@
             <lang locale="zh_HK" value="true" />
             <lang locale="zh_TW" value="true" />
         </rs>
+        <rs key="uiObject[com.kingdee.eas.custom.attendanceexception.client.AttendanceExceptionLogEditUI].components.component[contmessageId].alias">
+            <lang locale="en_US" value="null" />
+            <lang locale="zh_CN" value="null" />
+            <lang locale="zh_HK" value="null" />
+            <lang locale="zh_TW" value="null" />
+        </rs>
+        <rs key="uiObject[com.kingdee.eas.custom.attendanceexception.client.AttendanceExceptionLogEditUI].components.component[contmessageId].properties.property[boundLabelLength].value">
+            <lang locale="en_US" value="100" />
+            <lang locale="zh_CN" value="100" />
+            <lang locale="zh_HK" value="100" />
+            <lang locale="zh_TW" value="100" />
+        </rs>
+        <rs key="uiObject[com.kingdee.eas.custom.attendanceexception.client.AttendanceExceptionLogEditUI].components.component[contmessageId].properties.property[boundLabelText].value">
+            <lang locale="en_US" value="null" />
+            <lang locale="zh_CN" value="消息id" />
+            <lang locale="zh_HK" value="消息id" />
+            <lang locale="zh_TW" value="消息id" />
+        </rs>
+        <rs key="uiObject[com.kingdee.eas.custom.attendanceexception.client.AttendanceExceptionLogEditUI].components.component[contmessageId].properties.property[boundLabelUnderline].value">
+            <lang locale="en_US" value="true" />
+            <lang locale="zh_CN" value="true" />
+            <lang locale="zh_HK" value="true" />
+            <lang locale="zh_TW" value="true" />
+        </rs>
+        <rs key="uiObject[com.kingdee.eas.custom.attendanceexception.client.AttendanceExceptionLogEditUI].components.component[contmessageId].properties.property[visible].value">
+            <lang locale="en_US" value="true" />
+            <lang locale="zh_CN" value="true" />
+            <lang locale="zh_HK" value="true" />
+            <lang locale="zh_TW" value="true" />
+        </rs>
         <rs key="uiObject[com.kingdee.eas.custom.attendanceexception.client.AttendanceExceptionLogEditUI].components.component[contmessageRequest].alias">
             <lang locale="en_US" value="null" />
             <lang locale="zh_CN" value="null" />
@@ -3125,6 +3261,36 @@
             <lang locale="zh_HK" value="true" />
             <lang locale="zh_TW" value="true" />
         </rs>
+        <rs key="uiObject[com.kingdee.eas.custom.attendanceexception.client.AttendanceExceptionLogEditUI].components.component[txtmessageId].alias">
+            <lang locale="en_US" value="null" />
+            <lang locale="zh_CN" value="消息id" />
+            <lang locale="zh_HK" value="消息id" />
+            <lang locale="zh_TW" value="消息id" />
+        </rs>
+        <rs key="uiObject[com.kingdee.eas.custom.attendanceexception.client.AttendanceExceptionLogEditUI].components.component[txtmessageId].properties.property[horizontalAlignment].value">
+            <lang locale="en_US" value="2" />
+            <lang locale="zh_CN" value="2" />
+            <lang locale="zh_HK" value="2" />
+            <lang locale="zh_TW" value="2" />
+        </rs>
+        <rs key="uiObject[com.kingdee.eas.custom.attendanceexception.client.AttendanceExceptionLogEditUI].components.component[txtmessageId].properties.property[maxLength].value">
+            <lang locale="en_US" value="255" />
+            <lang locale="zh_CN" value="255" />
+            <lang locale="zh_HK" value="255" />
+            <lang locale="zh_TW" value="255" />
+        </rs>
+        <rs key="uiObject[com.kingdee.eas.custom.attendanceexception.client.AttendanceExceptionLogEditUI].components.component[txtmessageId].properties.property[required].value">
+            <lang locale="en_US" value="false" />
+            <lang locale="zh_CN" value="false" />
+            <lang locale="zh_HK" value="false" />
+            <lang locale="zh_TW" value="false" />
+        </rs>
+        <rs key="uiObject[com.kingdee.eas.custom.attendanceexception.client.AttendanceExceptionLogEditUI].components.component[txtmessageId].properties.property[visible].value">
+            <lang locale="en_US" value="true" />
+            <lang locale="zh_CN" value="true" />
+            <lang locale="zh_HK" value="true" />
+            <lang locale="zh_TW" value="true" />
+        </rs>
         <rs key="uiObject[com.kingdee.eas.custom.attendanceexception.client.AttendanceExceptionLogEditUI].components.component[txtmessageRequest].alias">
             <lang locale="en_US" value="null" />
             <lang locale="zh_CN" value="消息接口入参" />

File diff suppressed because it is too large
+ 11 - 0
metadata/com/kingdee/eas/custom/attendanceexception/client/AttendanceExceptionLogListUI.ui


+ 11 - 0
src/com/kingdee/eas/custom/attendanceexception/AbstractAttendanceExceptionLogInfo.java

@@ -109,6 +109,17 @@ public class AbstractAttendanceExceptionLogInfo extends com.kingdee.eas.framewor
         setInt("pushStatus", item.getValue());
 		}
     }
+    /**
+     * Object:¿¼ÇÚÒì³£ÏûÏ¢¼Ç¼±í's ÏûÏ¢idproperty 
+     */
+    public String getMessageId()
+    {
+        return getString("messageId");
+    }
+    public void setMessageId(String item)
+    {
+        setString("messageId", item);
+    }
     public BOSObjectType getBOSType()
     {
         return new BOSObjectType("F478FDEB");

+ 44 - 42
src/com/kingdee/eas/custom/attendanceexception/app/CenterLeaderRelationControllerBean.java

@@ -25,16 +25,13 @@ import com.kingdee.bos.*;
 import com.kingdee.eas.custom.attendanceexception.CenterLeaderRelationCollection;
 
 import java.lang.String;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
+import java.util.*;
 
 import com.kingdee.eas.custom.attendanceexception.CenterLeaderRelationInfo;
 
 public class CenterLeaderRelationControllerBean extends AbstractCenterLeaderRelationControllerBean {
     private static Logger logger = Logger.getLogger(CenterLeaderRelationControllerBean.class);
-    //涓€绾х粍缁囩被鍨媔d
+    //一级组织类型id
     private final String FIRSTLEVELORGID = "00000000-0000-0000-0000-00000000000362824988";
 
     @Override
@@ -43,18 +40,18 @@ public class CenterLeaderRelationControllerBean extends AbstractCenterLeaderRela
         CenterLeaderRelationInfo info = (CenterLeaderRelationInfo) model;
         AdminOrgUnitInfo department = info.getDepartment();
         if (department == null) {
-            throw new BOSException("缁勭粐涓嶈兘涓虹┖!");
+            throw new BOSException("组织不能为空!");
         }
         String orgId = department.getId().toString();
-        //1.鏍¢獙缁勭粐鏄�惁涓轰竴绾ч儴闂�
+        //1.校验组织是否为一级部门
         IAdminOrgUnit iAdminOrgUnit = AdminOrgUnitFactory.getLocalInstance(ctx);
         department = iAdminOrgUnit.getAdminOrgUnitInfo(new ObjectUuidPK(orgId));
         String unitLayerTypeId = department.getUnitLayerType().getId().toString();
         if (!FIRSTLEVELORGID.equals(unitLayerTypeId)) {
             String orgName = department.getName();
-            throw new BOSException(orgName + "涓嶆槸涓€绾х粍缁囷紝涓嶈兘缁存姢璐熻矗浜猴紒");
+            throw new BOSException(orgName + "不是一级组织,不能维护负责人!");
         }
-        //2.鏍¢獙鏄�惁瀛樺湪閲嶅�缁勭粐鏁版嵁
+        //2.校验是否存在重复组织数据
         FilterInfo filterInfo = new FilterInfo();
         FilterItemCollection filterItems = filterInfo.getFilterItems();
         filterItems.add(new FilterItemInfo("department", department.getId()));
@@ -64,45 +61,39 @@ public class CenterLeaderRelationControllerBean extends AbstractCenterLeaderRela
         boolean exists = exists(ctx, filterInfo);
         if (exists) {
             String orgName = department.getName();
-            throw new BOSException("缁勭粐[" + orgName + "]鏁版嵁宸茬粡瀛樺湪锛岃�鍕块噸澶嶆坊鍔狅紒");
+            throw new BOSException("组织[" + orgName + "]数据已经存在,请勿重复添加!");
         }
-        //3.鏍¢獙鍒嗗綍浜哄憳鏁版嵁
+        //3.校验分录人员数据
         CenterLeaderRelationEntryCollection entrys = info.getEntry();
         if (entrys.size() <= 0) {
-            throw new BOSException("鍒嗗綍涓嶈兘涓虹┖!");
+            throw new BOSException("分录不能为空!");
         } else {
-            StringBuilder numbers = new StringBuilder();
-            StringBuilder names = new StringBuilder();
             Set<String> personIds = new HashSet<>();
+            List<String> numbers = new ArrayList<>();
+            List<String> names = new ArrayList<>();
             for (int i = entrys.size() - 1; i >= 0; i--) {
                 CenterLeaderRelationEntryInfo entryInfo = entrys.get(i);
                 PersonInfo person = entryInfo.getPerson();
                 String personId = person.getId().toString();
                 if (personIds.contains(personId)) {
-                    //鍘婚櫎閲嶅�浜哄憳
+                    //去除重复人员
                     entrys.remove(entryInfo);
                     continue;
                 }
                 personIds.add(personId);
-                String number = person.getNumber();
-                numbers.append(number).append(",");
-                String name = person.getName();
-                names.append(name).append(",");
+                numbers.add(person.getNumber());
+                names.add(person.getName());
             }
-            if (numbers.length() > 0) {
-                numbers.deleteCharAt(numbers.lastIndexOf(","));
-            }
-            info.setPersonNumbers(numbers.toString());
-            if (names.length() > 0) {
-                names.deleteCharAt(names.lastIndexOf(","));
-            }
-            info.setPersonNames(names.toString());
+            Collections.reverse(numbers);
+            Collections.reverse(names);
+            info.setPersonNumbers(listToString(numbers));
+            info.setPersonNames(listToString(names));
         }
         return super._save(ctx, model);
     }
 
     /**
-     * 鑾峰彇涓�績璐熻矗浜�
+     * 获取中心负责人
      *
      * @param ctx
      * @return
@@ -111,19 +102,19 @@ public class CenterLeaderRelationControllerBean extends AbstractCenterLeaderRela
     @Override
     protected Map _getLeaders(Context ctx) throws BOSException {
         super._getLeaders(ctx);
-        //鑾峰彇缁勭粐璐熻矗浜�
+        //获取组织负责人
         Map<String, Set<String>> orgLeadersMap = getOrgLeaders(ctx);
-        //涓�績璐熻矗浜哄叧绯昏〃
+        //中心负责人关系表
         CenterLeaderRelationCollection relationCol = getCenterLeaderRelationCollection(ctx);
         for (int i = 0; i < relationCol.size(); i++) {
             CenterLeaderRelationInfo info = relationCol.get(i);
-            //涓�績
+            //中心
             AdminOrgUnitInfo department = info.getDepartment();
-            //鍛樺伐ids
+            //员工ids
             //String personIds = info.getPersonIds();
-            //鍛樺伐宸ュ彿s
+            //员工工号s
             String personNumbers = info.getPersonNumbers();
-            //鏄�惁閫氱煡缁勭粐璐熻矗浜�
+            //是否通知组织负责人
             boolean notifyOrgLeader = info.isNotifyOrgLeader();
             if (department != null && StringUtils.isNotBlank(personNumbers)) {
                 String orgId = department.getId().toString();
@@ -145,7 +136,7 @@ public class CenterLeaderRelationControllerBean extends AbstractCenterLeaderRela
     }
 
     /**
-     * 鑾峰彇缁勭粐璐熻矗浜�
+     * 获取组织负责人
      *
      * @param ctx
      * @return
@@ -153,22 +144,22 @@ public class CenterLeaderRelationControllerBean extends AbstractCenterLeaderRela
      */
     protected Map<String, Set<String>> getOrgLeaders(Context ctx) throws BOSException {
         Map<String, Set<String>> orgLeadersMap = new HashMap<String, Set<String>>();
-        //浠婂ぉ
+        //今天
         String curentShortStringDate = HRTimeWebUtils.getCurentShortStringDate();
         IPersonPosition iPersonPosition = PersonPositionFactory.getLocalInstance(ctx);
         FilterInfo filterInfo = new FilterInfo();
         FilterItemCollection filterItems = filterInfo.getFilterItems();
-        //缁勭粐灞傜骇涓轰竴绾х粍缁�
+        //组织层级为一级组织
         filterItems.add(new FilterItemInfo("personDep.unitLayerType", "00000000-0000-0000-0000-00000000000362824988"));
-        //缁勭粐鐘舵€佷负鍚�敤
+        //组织状态为启用
         filterItems.add(new FilterItemInfo("personDep.isSealUp", "0"));
-        //鑱屼綅涓鸿礋璐d汉鑱屼綅
+        //职位为负责人职位
         filterItems.add(new FilterItemInfo("primaryPosition.isRespPosition", "1"));
-        //鑱屼綅鐘舵€佷负鍚�敤
+        //职位状态为启用
         filterItems.add(new FilterItemInfo("primaryPosition.deletedStatus", "1"));
-        //缁撴潫鏃ユ湡澶т簬绛変簬浠婂ぉ
+        //结束日期大于等于今天
         filterItems.add(new FilterItemInfo("LEFFDT", curentShortStringDate, CompareType.GREATER_EQUALS));
-        //缁撴潫鏃ユ湡澶т簬绛変簬浠婂ぉ
+        //结束日期大于等于今天
         filterItems.add(new FilterItemInfo("endDateTime", curentShortStringDate, CompareType.GREATER_EQUALS));
         SelectorItemCollection sic = new SelectorItemCollection();
         sic.add("person.number");
@@ -194,4 +185,15 @@ public class CenterLeaderRelationControllerBean extends AbstractCenterLeaderRela
         }
         return orgLeadersMap;
     }
+
+    protected String listToString(List<String> list) {
+        StringBuffer sb = new StringBuffer();
+        for (int i = 0; list != null && i < list.size(); i++) {
+            sb.append(list.get(i)).append(",");
+        }
+        if (sb.length() > 0) {
+            sb.deleteCharAt(sb.lastIndexOf(","));
+        }
+        return sb.toString();
+    }
 }

+ 90 - 0
src/com/kingdee/eas/custom/attendanceexception/bean/DingMsgBean.java

@@ -0,0 +1,90 @@
+package com.kingdee.eas.custom.attendanceexception.bean;
+
+import java.util.UUID;
+
+/**
+ * @Description TODO
+ * @Date 2025/4/17 9:51
+ * @Created by Heyuan
+ */
+public class DingMsgBean {
+    //消息 id
+    private String msgId;
+    //
+    private String title;
+    private String content;
+    private Boolean toAllUser;
+    private String alertUser;
+    //提醒方式类型,1:工作通知,2:应用消息,3:群消息
+    private Integer alertType;
+
+
+    public DingMsgBean(String msgId, String title, String content, String alertUser) {
+        this.msgId = UUID.randomUUID().toString();
+        this.title = title;
+        this.content = content;
+        this.toAllUser = false;
+        this.alertUser = alertUser;
+        this.alertType = 2;
+    }
+
+    public String getMsgId() {
+        return msgId;
+    }
+
+    public String getTitle() {
+        return title;
+    }
+
+    public String getContent() {
+        return content;
+    }
+
+    public Boolean getToAllUser() {
+        return toAllUser;
+    }
+
+    public String getAlertUser() {
+        return alertUser;
+    }
+
+    public Integer getAlertType() {
+        return alertType;
+    }
+
+    public void setMsgId(String msgId) {
+        this.msgId = msgId;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    public void setContent(String content) {
+        this.content = content;
+    }
+
+    public void setToAllUser(Boolean toAllUser) {
+        this.toAllUser = toAllUser;
+    }
+
+    public void setAlertUser(String alertUser) {
+        this.alertUser = alertUser;
+    }
+
+    public void setAlertType(Integer alertType) {
+        this.alertType = alertType;
+    }
+
+    @Override
+    public String toString() {
+        return "DingMsgBean{" +
+                "msgId='" + msgId + '\'' +
+                ", title='" + title + '\'' +
+                ", content='" + content + '\'' +
+                ", toAllUser=" + toAllUser +
+                ", alertUser='" + alertUser + '\'' +
+                ", alertType=" + alertType +
+                '}';
+    }
+}

+ 143 - 0
src/com/kingdee/eas/custom/attendanceexception/bean/SyncAttendanceDataBean.java

@@ -0,0 +1,143 @@
+package com.kingdee.eas.custom.attendanceexception.bean;
+
+import java.util.UUID;
+
+/**
+ * @Description TODO
+ * @Date 2025/4/17 15:57
+ * @Created by Heyuan
+ */
+public class SyncAttendanceDataBean {
+    //消息 id
+    private String msgId;
+    //部门名称
+    private String departmentName;
+    //员工姓名
+    private String employeeName;
+    //异常日期,格式:YYYY-MM-DD
+    private String exceptionDate;
+    //考勤结果,如迟到、早退等
+    private String attendanceResult;
+    //异常次数
+    private int times;
+    //工号
+    private String employeeId;
+    //部门编码
+    private String departmentCode;
+    //部门长名称
+    private String departmentManagerName;
+    //部门长编码
+    private String departmentManagerCode;
+    //部门排序码
+    private String departmentSortCode;
+
+
+    public SyncAttendanceDataBean() {
+        this.exceptionDate = "";
+    }
+
+    public String getMsgId() {
+        return msgId;
+    }
+
+    public String getDepartmentName() {
+        return departmentName;
+    }
+
+    public String getEmployeeName() {
+        return employeeName;
+    }
+
+    public String getExceptionDate() {
+        return exceptionDate;
+    }
+
+    public String getAttendanceResult() {
+        return attendanceResult;
+    }
+
+    public int getTimes() {
+        return times;
+    }
+
+    public String getEmployeeId() {
+        return employeeId;
+    }
+
+    public String getDepartmentCode() {
+        return departmentCode;
+    }
+
+    public String getDepartmentManagerName() {
+        return departmentManagerName;
+    }
+
+    public String getDepartmentManagerCode() {
+        return departmentManagerCode;
+    }
+
+    public String getDepartmentSortCode() {
+        return departmentSortCode;
+    }
+
+    public void setMsgId(String msgId) {
+        this.msgId = msgId;
+    }
+
+    public void setDepartmentName(String departmentName) {
+        this.departmentName = departmentName;
+    }
+
+    public void setEmployeeName(String employeeName) {
+        this.employeeName = employeeName;
+    }
+
+    public void setExceptionDate(String exceptionDate) {
+        this.exceptionDate = exceptionDate;
+    }
+
+    public void setAttendanceResult(String attendanceResult) {
+        this.attendanceResult = attendanceResult;
+    }
+
+    public void setTimes(int times) {
+        this.times = times;
+    }
+
+    public void setEmployeeId(String employeeId) {
+        this.employeeId = employeeId;
+    }
+
+    public void setDepartmentCode(String departmentCode) {
+        this.departmentCode = departmentCode;
+    }
+
+    public void setDepartmentManagerName(String departmentManagerName) {
+        this.departmentManagerName = departmentManagerName;
+    }
+
+    public void setDepartmentManagerCode(String departmentManagerCode) {
+        this.departmentManagerCode = departmentManagerCode;
+    }
+
+    public void setDepartmentSortCode(String departmentSortCode) {
+        this.departmentSortCode = departmentSortCode;
+    }
+
+    @Override
+    public String toString() {
+        return "SyncAttendanceDataBean{" +
+                "msgId='" + msgId + '\'' +
+                ", departmentName='" + departmentName + '\'' +
+                ", employeeName='" + employeeName + '\'' +
+                ", exceptionDate='" + exceptionDate + '\'' +
+                ", attendanceResult='" + attendanceResult + '\'' +
+                ", times=" + times +
+                ", employeeId='" + employeeId + '\'' +
+                ", departmentCode='" + departmentCode + '\'' +
+                ", departmentManagerName='" + departmentManagerName + '\'' +
+                ", departmentManagerCode='" + departmentManagerCode + '\'' +
+                ", departmentSortCode='" + departmentSortCode + '\'' +
+                '}';
+    }
+}

+ 26 - 3
src/com/kingdee/eas/custom/attendanceexception/client/AbstractAttendanceExceptionLogEditUI.java

@@ -61,6 +61,7 @@ public abstract class AbstractAttendanceExceptionLogEditUI extends com.kingdee.e
     protected com.kingdee.bos.ctrl.swing.KDLabelContainer contdataPushResponse;
     protected com.kingdee.bos.ctrl.swing.KDLabelContainer contdataPushRequest;
     protected com.kingdee.bos.ctrl.swing.KDLabelContainer contpushStatus;
+    protected com.kingdee.bos.ctrl.swing.KDLabelContainer contmessageId;
     protected com.kingdee.bos.ctrl.extendcontrols.KDBizPromptBox prmtCreator;
     protected com.kingdee.bos.ctrl.swing.KDDatePicker kDDateCreateTime;
     protected com.kingdee.bos.ctrl.extendcontrols.KDBizPromptBox prmtLastUpdateUser;
@@ -81,6 +82,7 @@ public abstract class AbstractAttendanceExceptionLogEditUI extends com.kingdee.e
     protected com.kingdee.bos.ctrl.swing.KDScrollPane scrollPanedataPushRequest;
     protected com.kingdee.bos.ctrl.swing.KDTextArea txtdataPushRequest;
     protected com.kingdee.bos.ctrl.swing.KDComboBox pushStatus;
+    protected com.kingdee.bos.ctrl.swing.KDTextField txtmessageId;
     protected com.kingdee.eas.custom.attendanceexception.AttendanceExceptionLogInfo editData = null;
     /**
      * output class constructor
@@ -160,6 +162,7 @@ public abstract class AbstractAttendanceExceptionLogEditUI extends com.kingdee.e
         this.contdataPushResponse = new com.kingdee.bos.ctrl.swing.KDLabelContainer();
         this.contdataPushRequest = new com.kingdee.bos.ctrl.swing.KDLabelContainer();
         this.contpushStatus = new com.kingdee.bos.ctrl.swing.KDLabelContainer();
+        this.contmessageId = new com.kingdee.bos.ctrl.swing.KDLabelContainer();
         this.prmtCreator = new com.kingdee.bos.ctrl.extendcontrols.KDBizPromptBox();
         this.kDDateCreateTime = new com.kingdee.bos.ctrl.swing.KDDatePicker();
         this.prmtLastUpdateUser = new com.kingdee.bos.ctrl.extendcontrols.KDBizPromptBox();
@@ -180,6 +183,7 @@ public abstract class AbstractAttendanceExceptionLogEditUI extends com.kingdee.e
         this.scrollPanedataPushRequest = new com.kingdee.bos.ctrl.swing.KDScrollPane();
         this.txtdataPushRequest = new com.kingdee.bos.ctrl.swing.KDTextArea();
         this.pushStatus = new com.kingdee.bos.ctrl.swing.KDComboBox();
+        this.txtmessageId = new com.kingdee.bos.ctrl.swing.KDTextField();
         this.contCreator.setName("contCreator");
         this.contCreateTime.setName("contCreateTime");
         this.contLastUpdateUser.setName("contLastUpdateUser");
@@ -195,6 +199,7 @@ public abstract class AbstractAttendanceExceptionLogEditUI extends com.kingdee.e
         this.contdataPushResponse.setName("contdataPushResponse");
         this.contdataPushRequest.setName("contdataPushRequest");
         this.contpushStatus.setName("contpushStatus");
+        this.contmessageId.setName("contmessageId");
         this.prmtCreator.setName("prmtCreator");
         this.kDDateCreateTime.setName("kDDateCreateTime");
         this.prmtLastUpdateUser.setName("prmtLastUpdateUser");
@@ -215,6 +220,7 @@ public abstract class AbstractAttendanceExceptionLogEditUI extends com.kingdee.e
         this.scrollPanedataPushRequest.setName("scrollPanedataPushRequest");
         this.txtdataPushRequest.setName("txtdataPushRequest");
         this.pushStatus.setName("pushStatus");
+        this.txtmessageId.setName("txtmessageId");
         // CoreUI		
         this.btnTraceUp.setVisible(false);		
         this.btnTraceDown.setVisible(false);		
@@ -312,6 +318,11 @@ public abstract class AbstractAttendanceExceptionLogEditUI extends com.kingdee.e
         this.contpushStatus.setBoundLabelLength(100);		
         this.contpushStatus.setBoundLabelUnderline(true);		
         this.contpushStatus.setVisible(true);
+        // contmessageId		
+        this.contmessageId.setBoundLabelText(resHelper.getString("contmessageId.boundLabelText"));		
+        this.contmessageId.setBoundLabelLength(100);		
+        this.contmessageId.setBoundLabelUnderline(true);		
+        this.contmessageId.setVisible(true);
         // prmtCreator		
         this.prmtCreator.setEnabled(false);
         // kDDateCreateTime		
@@ -364,7 +375,12 @@ public abstract class AbstractAttendanceExceptionLogEditUI extends com.kingdee.e
         this.pushStatus.setVisible(true);		
         this.pushStatus.addItems(EnumUtils.getEnumList("com.kingdee.shr.base.syssetting.CallStatusEnum").toArray());		
         this.pushStatus.setRequired(false);
-        this.setFocusTraversalPolicy(new com.kingdee.bos.ui.UIFocusTraversalPolicy(new java.awt.Component[] {txtpushResult,pushType,txtmessageResponse,txtmessageRequest,txtdataPushResponse,txtdataPushRequest,pushStatus}));
+        // txtmessageId		
+        this.txtmessageId.setVisible(true);		
+        this.txtmessageId.setHorizontalAlignment(2);		
+        this.txtmessageId.setMaxLength(255);		
+        this.txtmessageId.setRequired(false);
+        this.setFocusTraversalPolicy(new com.kingdee.bos.ui.UIFocusTraversalPolicy(new java.awt.Component[] {txtpushResult,pushType,txtmessageResponse,txtmessageRequest,txtdataPushResponse,txtdataPushRequest,pushStatus,txtmessageId}));
         this.setFocusCycleRoot(true);
 		//Register control's property binding
 		registerBindings();
@@ -422,6 +438,8 @@ public abstract class AbstractAttendanceExceptionLogEditUI extends com.kingdee.e
         this.add(contdataPushRequest, null);
         contpushStatus.setBounds(new Rectangle(0, 0, 270, 19));
         this.add(contpushStatus, null);
+        contmessageId.setBounds(new Rectangle(0, 0, 270, 19));
+        this.add(contmessageId, null);
         //contCreator
         contCreator.setBoundEditor(prmtCreator);
         //contCreateTime
@@ -462,6 +480,8 @@ public abstract class AbstractAttendanceExceptionLogEditUI extends com.kingdee.e
         scrollPanedataPushRequest.getViewport().add(txtdataPushRequest, null);
         //contpushStatus
         contpushStatus.setBoundEditor(pushStatus);
+        //contmessageId
+        contmessageId.setBoundEditor(txtmessageId);
 
     }
 
@@ -652,7 +672,8 @@ public abstract class AbstractAttendanceExceptionLogEditUI extends com.kingdee.e
 		dataBinder.registerBinding("messageRequest", String.class, this.txtmessageRequest, "text");
 		dataBinder.registerBinding("dataPushResponse", String.class, this.txtdataPushResponse, "text");
 		dataBinder.registerBinding("dataPushRequest", String.class, this.txtdataPushRequest, "text");
-		dataBinder.registerBinding("pushStatus", com.kingdee.shr.base.syssetting.CallStatusEnum.class, this.pushStatus, "selectedItem");		
+		dataBinder.registerBinding("pushStatus", com.kingdee.shr.base.syssetting.CallStatusEnum.class, this.pushStatus, "selectedItem");
+		dataBinder.registerBinding("messageId", String.class, this.txtmessageId, "text");		
 	}
 	//Regiester UI State
 	private void registerUIState(){		
@@ -801,7 +822,8 @@ public abstract class AbstractAttendanceExceptionLogEditUI extends com.kingdee.e
 		getValidateHelper().registerBindProperty("messageRequest", ValidateHelper.ON_SAVE);    
 		getValidateHelper().registerBindProperty("dataPushResponse", ValidateHelper.ON_SAVE);    
 		getValidateHelper().registerBindProperty("dataPushRequest", ValidateHelper.ON_SAVE);    
-		getValidateHelper().registerBindProperty("pushStatus", ValidateHelper.ON_SAVE);    		
+		getValidateHelper().registerBindProperty("pushStatus", ValidateHelper.ON_SAVE);    
+		getValidateHelper().registerBindProperty("messageId", ValidateHelper.ON_SAVE);    		
 	}
 
 
@@ -868,6 +890,7 @@ public abstract class AbstractAttendanceExceptionLogEditUI extends com.kingdee.e
         sic.add(new SelectorItemInfo("dataPushResponse"));
         sic.add(new SelectorItemInfo("dataPushRequest"));
         sic.add(new SelectorItemInfo("pushStatus"));
+        sic.add(new SelectorItemInfo("messageId"));
         return sic;
     }        
     	

+ 1 - 0
src/com/kingdee/eas/custom/attendanceexception/client/AbstractAttendanceExceptionLogEditUI.properties

@@ -16,6 +16,7 @@ contdataPushResponse.boundLabelText=\u5F02\u5E38\u6570\u636E\u63A8\u9001\u63A5\u
 contdataPushRequest.boundLabelText=\u5F02\u5E38\u6570\u636E\u63A8\u9001\u63A5\u53E3\u5165\u53C2
 contpushStatus.boundLabelText=\u63A8\u9001\u72B6\u6001
 pushStatus.items=[Enum]com.kingdee.shr.base.syssetting.CallStatusEnum
+contmessageId.boundLabelText=\u6D88\u606Fid
 ActionSubmit.SHORT_DESCRIPTION=\u63D0\u4EA4
 ActionSubmit.LONG_DESCRIPTION=\u63D0\u4EA4
 ActionSubmit.NAME=\u63D0\u4EA4

+ 1 - 0
src/com/kingdee/eas/custom/attendanceexception/client/AbstractAttendanceExceptionLogEditUI_l1.properties

@@ -16,6 +16,7 @@ contdataPushResponse.boundLabelText=
 contdataPushRequest.boundLabelText=
 contpushStatus.boundLabelText=
 pushStatus.items=
+contmessageId.boundLabelText=
 ActionSubmit.SHORT_DESCRIPTION=
 ActionSubmit.LONG_DESCRIPTION=
 ActionSubmit.NAME=

+ 1 - 0
src/com/kingdee/eas/custom/attendanceexception/client/AbstractAttendanceExceptionLogEditUI_l2.properties

@@ -16,6 +16,7 @@ contdataPushResponse.boundLabelText=\u5F02\u5E38\u6570\u636E\u63A8\u9001\u63A5\u
 contdataPushRequest.boundLabelText=\u5F02\u5E38\u6570\u636E\u63A8\u9001\u63A5\u53E3\u5165\u53C2
 contpushStatus.boundLabelText=\u63A8\u9001\u72B6\u6001
 pushStatus.items=[Enum]com.kingdee.shr.base.syssetting.CallStatusEnum
+contmessageId.boundLabelText=\u6D88\u606Fid
 ActionSubmit.SHORT_DESCRIPTION=\u63D0\u4EA4
 ActionSubmit.LONG_DESCRIPTION=\u63D0\u4EA4
 ActionSubmit.NAME=\u63D0\u4EA4

+ 1 - 0
src/com/kingdee/eas/custom/attendanceexception/client/AbstractAttendanceExceptionLogEditUI_l3.properties

@@ -16,6 +16,7 @@ contdataPushResponse.boundLabelText=\u7570\u5E38\u6578\u64DA\u63A8\u9001\u4ECB\u
 contdataPushRequest.boundLabelText=\u7570\u5E38\u6578\u64DA\u63A8\u9001\u4ECB\u9762\u5165\u53C3
 contpushStatus.boundLabelText=\u63A8\u9001\u72C0\u614B
 pushStatus.items=[Enum]com.kingdee.shr.base.syssetting.CallStatusEnum
+contmessageId.boundLabelText=\u6D88\u606Fid
 ActionSubmit.SHORT_DESCRIPTION=\u63D0\u4EA4
 ActionSubmit.LONG_DESCRIPTION=\u63D0\u4EA4
 ActionSubmit.NAME=\u63D0\u4EA4

File diff suppressed because it is too large
+ 0 - 0
src/com/kingdee/eas/custom/attendanceexception/client/AbstractAttendanceExceptionLogListUI.java


File diff suppressed because it is too large
+ 0 - 0
src/com/kingdee/eas/custom/attendanceexception/client/AbstractAttendanceExceptionLogListUI.properties


File diff suppressed because it is too large
+ 0 - 0
src/com/kingdee/eas/custom/attendanceexception/client/AbstractAttendanceExceptionLogListUI_l2.properties


File diff suppressed because it is too large
+ 0 - 0
src/com/kingdee/eas/custom/attendanceexception/client/AbstractAttendanceExceptionLogListUI_l3.properties


+ 371 - 46
src/com/kingdee/eas/custom/attendanceexception/task/AttendanceExceptionFacadeControllerBean.java

@@ -1,31 +1,57 @@
 package com.kingdee.eas.custom.attendanceexception.task;
 
-import com.kingdee.eas.basedata.org.AdminOrgUnitInfo;
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.kingdee.eas.basedata.person.IPerson;
+import com.kingdee.eas.basedata.person.PersonCollection;
+import com.kingdee.eas.basedata.person.PersonFactory;
+import com.kingdee.eas.basedata.person.PersonInfo;
 import com.kingdee.eas.custom.attendanceexception.*;
+import com.kingdee.eas.custom.attendanceexception.bean.DingMsgBean;
+import com.kingdee.eas.custom.attendanceexception.bean.SyncAttendanceDataBean;
 import com.kingdee.eas.custom.attendanceexception.bizEnum.PushTypeEnum;
-import com.kingdee.eas.custom.synctask.utils.HRTimeWebUtils;
+import com.kingdee.eas.fi.arap.util.DBUtil;
 import com.kingdee.eas.hr.ats.util.AtsDateUtils;
-import com.kingdee.eas.scm.util.datetime.DateTimeUtil;
+import com.kingdee.jdbc.rowset.IRowSet;
 import com.kingdee.util.DateTimeUtils;
+import okhttp3.MediaType;
+import okhttp3.OkHttpClient;
+import okhttp3.Request;
+import okhttp3.RequestBody;
+import okhttp3.Response;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.log4j.Logger;
 import com.kingdee.bos.*;
 import com.kingdee.eas.common.EASBizException;
 
+import java.io.IOException;
 import java.lang.String;
-import java.text.ParseException;
+import java.math.BigDecimal;
+import java.sql.SQLException;
+import java.text.MessageFormat;
 import java.text.SimpleDateFormat;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.Map;
-import java.util.Set;
+import java.util.*;
 
 public class AttendanceExceptionFacadeControllerBean extends AbstractAttendanceExceptionFacadeControllerBean {
     private static Logger logger =
             Logger.getLogger(AttendanceExceptionFacadeControllerBean.class);
+    //通知员工个人消息模板
+    private static final String NOTIFYEMPLOYEEMSGTEMPLATE = "您在{0}出现考勤异常!";
+    //通知员工个人消息标题
+    private static final String NOTIFYEMPLOYEEMSGTitle = "【考勤异常提醒】";
+    //通知员工个人消息模板
+    private static final String NOTIFYEMPLOYEECUMULATIVEMSGTEMPLATE = "您在{0}考勤异常次数以达到{1}次,请您注意本月考勤!";
+    //通知员工个人消息标题
+    private static final String NOTIFYEMPLOYEECUMULATIVEMSGTitle = "【员工考勤提醒】";
+    //通知员工个人消息模板
+//    private static final String NOTIFYEMPLOYEECUMULATIVEMSGTEMPLATE = "您在{0}考勤异常次数以达到{1}次,请您注意本月考勤!";
+//    //通知员工个人消息标题
+//    private static final String NOTIFYEMPLOYEECUMULATIVEMSGTitle = "【员工考勤提醒】";
 
     /**
-     * 鍛樺伐涓�汉寮傚父鎻愰啋
+     * 员工个人异常提醒
      *
      * @param ctx
      * @throws BOSException
@@ -38,14 +64,19 @@ public class AttendanceExceptionFacadeControllerBean extends AbstractAttendanceE
             logger.info("AttendanceExceptionFacadeControllerBean.notifyEmployeeException start");
         }
         super._notifyEmployeeException(ctx);
-        //1.鏌ヨ�寮傚父鏁版嵁
-        //鏄ㄥぉ
+        //1.查询异常数据
+        //昨天
         Date preDay = AtsDateUtils.getPreDay(new Date());
-        getAttendanceExceptionData(ctx, preDay, preDay);
+        //getAttendanceExceptionData(ctx, preDay, preDay);
+        //2.调用接口给对应员工发送异常预警消息
 
-        //2.璋冪敤鎺ュ彛缁欏�搴斿憳宸ュ彂閫佸紓甯搁�璀︽秷鎭�
 
-        //3.淇濆瓨娑堟伅璁板綍
+        String msgId = UUID.randomUUID().toString();
+        String content = MessageFormat.format(NOTIFYEMPLOYEEMSGTEMPLATE, msgId);
+        DingMsgBean dingMsgBean = new DingMsgBean(msgId, NOTIFYEMPLOYEEMSGTitle, content, "");
+
+
+        //3.保存消息记录
         if (logger.isInfoEnabled()) {
             long endTime = System.currentTimeMillis();
             float duration = (endTime - startTime) / 1000f;
@@ -55,7 +86,7 @@ public class AttendanceExceptionFacadeControllerBean extends AbstractAttendanceE
 
     /**
      * @param ctx
-     * @param exceptionLimit 寮傚父娆℃暟涓婇檺
+     * @param exceptionLimit 异常次数上限
      * @throws BOSException
      * @throws EASBizException
      */
@@ -73,23 +104,29 @@ public class AttendanceExceptionFacadeControllerBean extends AbstractAttendanceE
         if (StringUtils.isNotBlank(exceptionLimit)) {
             limit = Integer.parseInt(exceptionLimit);
         }
-        //1.鏌ヨ�寮傚父鏁版嵁
+        IAttendanceExceptionLog iAttendanceExceptionLog = AttendanceExceptionLogFactory.getLocalInstance(ctx);
+        AttendanceExceptionLogInfo logInfo = new AttendanceExceptionLogInfo();
+        //推送类型为员工累计异常提醒
+        logInfo.setPushType(PushTypeEnum.EMPLOYEEEXCEPTIONALERT);
+        String msgId = UUID.randomUUID().toString();
+        logInfo.setMessageId(msgId);
+        //1.查询异常数据
         Date today = new Date();
-        //褰撳墠鏈堢�涓€澶�
+        //当前月第一天
         Date currentFirstDay = AtsDateUtils.getCurrentFirstDay(today);
-        //鏄ㄥぉ
+        //昨天
         Date preDay = AtsDateUtils.getPreDay(today);
-        getAttendanceExceptionData(ctx, currentFirstDay, preDay);
+        //getAttendanceExceptionData(ctx, currentFirstDay, preDay);
+        String yearMonth = DateTimeUtils.format(today, "yyyy年M月");
+        String content = MessageFormat.format(NOTIFYEMPLOYEECUMULATIVEMSGTEMPLATE, yearMonth, limit);
 
-        //2.璋冪敤鎺ュ彛缁欏�搴斿憳宸ュ彂閫佸紓甯搁�璀︽秷鎭�
+        //2.调用接口给对应员工发送异常预警消息
+        DingMsgBean dingMsgBean = new DingMsgBean(msgId, NOTIFYEMPLOYEECUMULATIVEMSGTitle, content, "");
 
-        //3.淇濆瓨娑堟伅璁板綍
-        IAttendanceExceptionLog iAttendanceExceptionLog = AttendanceExceptionLogFactory.getLocalInstance(ctx);
-        AttendanceExceptionLogInfo attendanceExceptionLogInfo = new AttendanceExceptionLogInfo();
-        //鎺ㄩ€佺被鍨嬩负鍛樺伐绱��寮傚父鎻愰啋
-        attendanceExceptionLogInfo.setPushType(PushTypeEnum.EMPLOYEEEXCEPTIONALERT);
-        attendanceExceptionLogInfo.setMessageResponse("");
-        attendanceExceptionLogInfo.setMessageRequest("");
+        //3.保存消息记录
+
+//        attendanceExceptionLogInfo.setMessageResponse("");
+//        attendanceExceptionLogInfo.setMessageRequest("");
 
 
         if (logger.isInfoEnabled()) {
@@ -106,12 +143,12 @@ public class AttendanceExceptionFacadeControllerBean extends AbstractAttendanceE
             logger.info("AttendanceExceptionFacadeControllerBean.alertLeaderExceptionTotal start");
         }
         super._alertLeaderExceptionTotal(ctx);
-        //涓�績璐熻矗浜哄叧绯昏〃
+        //中心负责人关系表
         ICenterLeaderRelation iCenterLeaderRelation = CenterLeaderRelationFactory.getLocalInstance(ctx);
-        //鑾峰彇涓�績璐熻矗浜�
+        //获取中心负责人
         Map<String, Set<String>> leaders = iCenterLeaderRelation.getLeaders();
         SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd E HH:mm:ss");
-        //鑾峰彇鑰冨嫟寮傚父鏁版嵁,鏈�懆鍛ㄤ竴鑷冲懆浜斾腑蹇冭€冨嫟寮傚父鏁版嵁
+        //获取考勤异常数据,本周周一至周五中心考勤异常数据
         Calendar calendar = Calendar.getInstance();
         Date endDate = calendar.getTime();
         int intWeek = calendar.get(7);
@@ -124,10 +161,15 @@ public class AttendanceExceptionFacadeControllerBean extends AbstractAttendanceE
         }
         logger.error("_alertLeaderExceptionTotal endDate: " + sdf.format(endDate));
 
-        getAttendanceExceptionData(ctx, monday, endDate);
-        //鎺ㄩ€佸紓甯镐俊鎭�
-        sendAttendanceExceptionMsg(ctx);
-        //鎺ㄩ€佸紓甯告暟鎹�
+        //getAttendanceExceptionData(ctx, monday, endDate);
+
+        String url = "http://10.0.6.222:8888/ehr/api/syncAttendanceData";
+
+        //pushAttendanceExceptionData(ctx, url, );
+
+        //推送异常信息
+        //sendAttendanceExceptionMsg(ctx);
+        //推送异常数据
         if (logger.isInfoEnabled()) {
             long endTime = System.currentTimeMillis();
             float duration = (endTime - startTime) / 1000f;
@@ -137,56 +179,339 @@ public class AttendanceExceptionFacadeControllerBean extends AbstractAttendanceE
     }
 
     /**
-     * 鑾峰彇鑰冨嫟寮傚父鏁版嵁
+     * 获取考勤异常数据
      *
      * @param ctx
-     * @param startDate 寮€濮嬫棩鏈�
-     * @param endDate   缁撴潫鏃ユ湡
+     * @param startDate 开始日期
+     * @param endDate   结束日期
      * @throws BOSException
      * @throws EASBizException
      */
     protected void getAttendanceExceptionData(
             Context ctx,
             Date startDate,
-            Date endDate
+            Date endDate,
+            String msgId,
+            PushTypeEnum pushType,
+            int limit
     ) throws BOSException, EASBizException {
+        String sql = getSql(startDate, endDate);
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+        try {
+            IRowSet iRowSet = DBUtil.executeQuery(ctx, sql);
+            Map<String, List<SyncAttendanceDataBean>> result = new HashMap<>();
+            Map<String, Integer> personExceptionTimes = new HashMap<>();
+            if (!PushTypeEnum.CENTERLEADERREMINDER.equals(pushType)) {
+                //非中心负责人提醒
+                while (iRowSet.next()) {
+                    SyncAttendanceDataBean data = new SyncAttendanceDataBean();
+                    data.setMsgId(msgId);
+                    String personNumber = iRowSet.getString("personNumber");
+                    data.setEmployeeId(personNumber);
+                    data.setEmployeeName(iRowSet.getString("personName"));
+                    Date attenceDate = iRowSet.getDate("attenceDate");
+                    if (attenceDate != null) {
+                        data.setExceptionDate(sdf.format(attenceDate));
+                    }
+                    data.setDepartmentCode(iRowSet.getString("adminOrgNumber"));
+                    data.setDepartmentName(iRowSet.getString("adminOrgName"));
+                    data.setDepartmentManagerCode(iRowSet.getString("adminOrgLongNumber"));
+                    data.setDepartmentSortCode(iRowSet.getString("sortCode"));
+                    data.setDepartmentManagerName(iRowSet.getString("displayName"));
+                    //String admintwoNumber = iRowSet.getString("admintwoNumber");
+                    //String admintwoName = iRowSet.getString("admintwoName");
+                    StringBuilder attendanceResult = new StringBuilder();
+                    int times = 0;
+                    Map<String, Boolean> attendanceFlags = new LinkedHashMap<>();
+                    int s19 = iRowSet.getInt("s19");
+                    int s21 = iRowSet.getInt("s21");
+                    BigDecimal s23 = iRowSet.getBigDecimal("s23");
+                    int s113 = iRowSet.getInt("s113");
+                    attendanceFlags.put("迟到", s19 > 0);
+                    attendanceFlags.put("早退", s21 > 0);
+                    attendanceFlags.put("旷工", s23.compareTo(BigDecimal.ZERO) > 0);
+                    attendanceFlags.put("个人原因补卡次数", s113 > 0);
+                    for (Map.Entry<String, Boolean> entry : attendanceFlags.entrySet()) {
+                        if (entry.getValue()) {
+                            times++;
+                            attendanceResult.append(entry.getKey()).append("、");
+                        }
+                    }
+                    // 移除最后一个顿号
+                    if (attendanceResult.length() > 0) {
+                        attendanceResult.setLength(attendanceResult.length() - 1);
+                    }
+                    //累计员工期间总异常次数
+                    if (personExceptionTimes.containsKey(personNumber)) {
+                        Integer i = personExceptionTimes.get(personNumber);
+                        personExceptionTimes.put(personNumber, i + times);
+                    } else {
+                        personExceptionTimes.put(personNumber, times);
+                    }
+                    data.setTimes(times);
+                    data.setAttendanceResult(attendanceResult.toString());
+                    if (!result.containsKey(personNumber)) {
+                        result.put(personNumber, new ArrayList<>());
+                    }
+                    result.get(personNumber).add(data);
+                }
+                if (PushTypeEnum.EMPLOYEEEXCEPTIONALERT.equals(pushType)) {
+                    //员工累计异常提醒
+                    for (Map.Entry<String, Integer> entry : personExceptionTimes.entrySet()) {
+                        if (entry.getValue() < limit) {
+                            //移除没有达到预警上限的数据
+                            result.remove(entry.getKey());
+                        }
+                    }
+                }
+            } else {
+                while (iRowSet.next()) {
+                    SyncAttendanceDataBean data = new SyncAttendanceDataBean();
+                    data.setMsgId(msgId);
+                    String personNumber = iRowSet.getString("personNumber");
+                    data.setEmployeeId(personNumber);
+                    data.setEmployeeName(iRowSet.getString("personName"));
+                    Date attenceDate = iRowSet.getDate("attenceDate");
+                    if (attenceDate != null) {
+                        data.setExceptionDate(sdf.format(attenceDate));
+                    }
+                    data.setDepartmentCode(iRowSet.getString("adminOrgNumber"));
+                    data.setDepartmentName(iRowSet.getString("adminOrgName"));
+                    data.setDepartmentManagerCode(iRowSet.getString("adminOrgLongNumber"));
+                    data.setDepartmentSortCode(iRowSet.getString("sortCode"));
+                    data.setDepartmentManagerName(iRowSet.getString("displayName"));
+                    String admintwoNumber = iRowSet.getString("admintwoNumber");
+                    StringBuilder attendanceResult = new StringBuilder();
+                    int times = 0;
+                    Map<String, Boolean> attendanceFlags = new LinkedHashMap<>();
+                    int s19 = iRowSet.getInt("s19");
+                    int s21 = iRowSet.getInt("s21");
+                    BigDecimal s23 = iRowSet.getBigDecimal("s23");
+                    int s113 = iRowSet.getInt("s113");
+                    attendanceFlags.put("迟到", s19 > 0);
+                    attendanceFlags.put("早退", s21 > 0);
+                    attendanceFlags.put("旷工", s23.compareTo(BigDecimal.ZERO) > 0);
+                    attendanceFlags.put("个人原因补卡次数", s113 > 0);
+                    for (Map.Entry<String, Boolean> entry : attendanceFlags.entrySet()) {
+                        if (entry.getValue()) {
+                            times++;
+                            attendanceResult.append(entry.getKey()).append("、");
+                        }
+                    }
+                    // 移除最后一个顿号
+                    if (attendanceResult.length() > 0) {
+                        attendanceResult.setLength(attendanceResult.length() - 1);
+                    }
+                    data.setTimes(times);
+                    data.setAttendanceResult(attendanceResult.toString());
+                    if (!result.containsKey(admintwoNumber)) {
+                        result.put(admintwoNumber, new ArrayList<>());
+                    }
+                    result.get(admintwoNumber).add(data);
+                }
+            }
+        } catch (SQLException e) {
+            throw new RuntimeException(e);
+        }
+
+    }
+
+    /**
+     * 获取考勤异常查询sql
+     *
+     * @param startDate
+     * @param endDate
+     * @return
+     * @throws BOSException
+     */
+    protected String getSql(
+            Date startDate,
+            Date endDate
+    ) throws BOSException {
         if (startDate == null || endDate == null) {
             logger.error("getAttendanceExceptionData startDate or endDate is null");
             throw new BOSException("getAttendanceExceptionData startDate or endDate is null");
         }
-
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+        StringBuilder sql = new StringBuilder()
+                .append("select").append("\n")
+                .append("    person.fid as personId,").append("\n")
+                .append("    person.fnumber as personNumber,").append("\n")
+                .append("    person.Fname_l2 as personName,").append("\n")
+                .append("    attendanceResult.FAttenceDate as attenceDate,").append("\n")
+                .append("    attendanceResult.s19 as s19,").append("\n")
+                .append("    attendanceResult.s21 as s21,").append("\n")
+                .append("    attendanceResult.s23 as s23,").append("\n")
+                .append("    attendanceResult.s113 as s113,").append("\n")
+                .append("    adminOrg.fid as adminOrgId,").append("\n")
+                .append("    adminOrg.fnumber as adminOrgNumber,").append("\n")
+                .append("    adminOrg.fname_l2 as adminOrgName,").append("\n")
+                .append("    adminOrg.FLongNumber as adminOrgLongNumber,").append("\n")
+                .append("    adminOrg.FSortCode as sortCode,").append("\n")
+                .append("    adminOrg.FDisplayName_L2 as displayName,").append("\n")
+                .append("    admintow.fid as admintowId,").append("\n")
+                .append("    admintow.fnumber as admintowNumber,").append("\n")
+                .append("    admintow.Fname_l2 as admintowName").append("\n")
+                .append("from").append("\n")
+                .append("    T_HR_ATS_AttendanceResult attendanceResult").append("\n")
+                .append("    left join t_bd_person person on person.fid = attendanceResult.FProposerID").append("\n")
+                .append("    left join T_ORG_admin adminOrg on attendanceResult.FAdminOrgUnitID = adminOrg.fid").append("\n")
+                .append("    left join T_ORG_admin admintow on adminOrg.FLevelTwoGroupID = admintow.fid").append("\n")
+                .append("where").append("\n")
+                .append("    attendanceResult.FAttenceDate >= { TS '").append(sdf.format(startDate)).append("' }").append("\n")
+                .append("    and attendanceResult.FAttenceDate <= { TS '").append(sdf.format(endDate)).append("' }").append("\n")
+                .append("    and (").append("\n")
+                .append("        attendanceResult.s19 > 0").append("\n")
+                .append("        or attendanceResult.s21 > 0").append("\n")
+                .append("        or attendanceResult.s23 > 0").append("\n")
+                .append("         or attendanceResult.S113 > 0").append("\n")
+                .append("    );").append("\n");
+        return sql.toString();
     }
 
-
     /**
-     * 鍙戦€佽€冨嫟寮傚父娑堟伅
+     * 发送考勤异常消息
      *
      * @param ctx
      * @throws BOSException
      * @throws EASBizException
      */
     protected void sendAttendanceExceptionMsg(
-            Context ctx
+            Context ctx,
+            String url
     ) throws BOSException, EASBizException {
 
+        try {
+//            if (list == null || list.size() <= 0) {
+//                logger.error("pushAttendanceExceptionData list is null");
+//                throw new BOSException("pushAttendanceExceptionData list is null");
+//            }
+            if (url == null || url.isEmpty()) {
+                logger.error("pushAttendanceExceptionData url is null");
+                throw new BOSException("pushAttendanceExceptionData url is null");
+            }
+//            String params = JSON.toJSONString(list);
+            //String url = "http://10.0.6.222:8888/ehr/api/syncAttendanceData";
+            OkHttpClient client = new OkHttpClient();
+
+            MediaType mediaType = MediaType.parse("application/json");
+            RequestBody body = RequestBody.create(mediaType, "{\r\n    \"msgId\": \"test_msg_id_12322\",\r\n    \"title\": \"考勤异常通知测试\",\r\n    \"content\": \"##### <font color=#6192f2>HR系统</font>\\n#### 员工考勤提醒:\\n您在2025年3月考勤异常次数已经达到5次,请您注意本月考勤 \\n###### (如有审批中的假勤单据,请及时催办)\",\r\n    \"toAllUser\": false,\r\n    \"alertUser\": \"SCY003987\",\r\n    \"alertType\": 2\r\n}");
+            Request request = new Request.Builder()
+                    .url("http://10.0.6.222:8888/ehr/api/sendDingMsg")
+                    .post(body)
+                    .addHeader("Accept", "*/*")
+                    .addHeader("Accept-Encoding", "gzip, deflate, br")
+                    .addHeader("User-Agent", "PostmanRuntime-ApipostRuntime/1.1.0")
+                    .addHeader("Connection", "keep-alive")
+                    .addHeader("Content-Type", "application/json")
+                    .build();
 
+            Response response = client.newCall(request).execute();
+            logger.error("response----" + response.isSuccessful());
+            if (response.isSuccessful()) {
+                //ObjectMapper mapper = new ObjectMapper();
+                String resultBody = response.body().string();
+                logger.error("resultBody----" + resultBody);
+                JSONObject result = JSONObject.parseObject(resultBody);
+                logger.error("respMap----" + result);
+                if (result.getBoolean("success")) {
+                    //                    String data = result.get("data").toString();
+                    //                    JSONArray jsonArray = JSONArray.parseArray(data);
+                    //                    logger.error("jsonArray---" + jsonArray.toString());
+                    //                    logger.error("jsonArray---" + jsonArray.size());
+                    //                    IPerson iPerson = PersonFactory.getLocalInstance(ctx);
+                    //                    PersonCollection personCollection = iPerson.getPersonCollection("select number ");
+                    //                    Set set = new HashSet();
+                    //                    for (int i = 0; i < personCollection.size(); i++) {
+                    //                        PersonInfo personInfo = personCollection.get(i);
+                    //                        set.add(personInfo.getNumber().toString());
+                    //                    }
+                    //                    for (int i = 0; i < jsonArray.size(); i++) {
+                    //                        JSONObject resultData = jsonArray.getJSONObject(i);
+                    //                        //保存门禁打卡记录
+                    //                    }
+                } else {
+                    //推送失败
+                    String msg = result.getString("msg");
+                }
+            }
+        } catch (IOException e) {
+            throw new RuntimeException(e);
+        }
     }
 
 
     /**
-     * 鎺ㄩ€佽€冨嫟寮傚父鏁版嵁
+     * 推送考勤异常数据
      *
      * @param ctx
-     * @param msgId 娑堟伅id
+     * @param msgId 消息id
      * @throws BOSException
      * @throws EASBizException
      */
     protected void pushAttendanceExceptionData(
             Context ctx,
-            String msgId
+            String url,
+            List list
     ) throws BOSException, EASBizException {
+        try {
+            if (list == null || list.size() <= 0) {
+                logger.error("pushAttendanceExceptionData list is null");
+                throw new BOSException("pushAttendanceExceptionData list is null");
+            }
+            if (url == null || url.isEmpty()) {
+                logger.error("pushAttendanceExceptionData url is null");
+                throw new BOSException("pushAttendanceExceptionData url is null");
+            }
+            String params = JSON.toJSONString(list);
+            //String url = "http://10.0.6.222:8888/ehr/api/syncAttendanceData";
+            OkHttpClient client = new OkHttpClient();
+            MediaType mediaType = MediaType.parse("application/json");
+            RequestBody body = RequestBody.create(mediaType, params);
+            Request request = new Request.Builder()
+                    .url(url)
+                    .post(body)
+                    .addHeader("Accept", "*/*")
+                    .addHeader("Accept-Encoding", "gzip, deflate, br")
+                    .addHeader("User-Agent", "PostmanRuntime-ApipostRuntime/1.1.0")
+                    .addHeader("Connection", "keep-alive")
+                    .addHeader("Content-Type", "application/json")
+                    .build();
+            Response response = client.newCall(request).execute();
+            logger.error("response----" + response.isSuccessful());
+            if (response.isSuccessful()) {
+                //ObjectMapper mapper = new ObjectMapper();
+                String resultBody = response.body().string();
+                logger.error("resultBody----" + resultBody);
+                JSONObject result = JSONObject.parseObject(resultBody);
+                logger.error("respMap----" + result);
+                if (result.getBoolean("success")) {
+//                    String data = result.get("data").toString();
+//                    JSONArray jsonArray = JSONArray.parseArray(data);
+//                    logger.error("jsonArray---" + jsonArray.toString());
+//                    logger.error("jsonArray---" + jsonArray.size());
+//                    IPerson iPerson = PersonFactory.getLocalInstance(ctx);
+//                    PersonCollection personCollection = iPerson.getPersonCollection("select number ");
+//                    Set set = new HashSet();
+//                    for (int i = 0; i < personCollection.size(); i++) {
+//                        PersonInfo personInfo = personCollection.get(i);
+//                        set.add(personInfo.getNumber().toString());
+//                    }
+//                    for (int i = 0; i < jsonArray.size(); i++) {
+//                        JSONObject resultData = jsonArray.getJSONObject(i);
+//                        //保存门禁打卡记录
+//                    }
+                } else {
+                    //推送失败
+                    String msg = result.getString("msg");
+                }
+            }
 
-
+        } catch (IOException e) {
+            logger.error("pushAttendanceExceptionData start", e);
+            throw new RuntimeException(e);
+        }
     }
 
+
 }

Some files were not shown because too many files changed in this diff