Ver código fonte

Merge remote-tracking branch 'origin/master'

彭佳杰 6 dias atrás
pai
commit
90b2e5dd8e

+ 2 - 0
code/base/nckd-jxccl-base-common/src/main/java/nckd/jxccl/base/common/constant/FormConstant.java

@@ -178,6 +178,8 @@ public class FormConstant {
     public static final String HLCM_CONTRACTAPPLY_ENTITY = "hlcm_contractapply";
     /** 合同解除实体标识 */
     public static final String HLCM_CONTRACTAPPLYCANCEL_ENTITY = "hlcm_contractapplycancel";
+    /** 定额明细实体标识 */
+    public static final String WTP_QTLINEDETAIL_ENTITY = "wtp_qtlinedetail";
 
     //====================================== 标品op ======================================
     /** 确认框确认按钮 */

+ 15 - 0
code/base/nckd-jxccl-base-helper/src/main/java/nckd/jxccl/base/swc/helper/SWCHelper.java

@@ -250,6 +250,21 @@ public class SWCHelper {
         return empposorgreDyns;
     }
 
+    /**
+     * 根据emoloyeeId获取人员证件信息
+     * @param employeeId
+     * @return
+     */
+    public static DynamicObject[] queryPercreDyns (List<Long> employeeId) {
+        QFilter filter = new QFilter("ismajor", QCP.equals, "1"); // 启用
+        filter.and(new QFilter("employee.id", QCP.in, employeeId));
+
+        String selectFields1 = "employee.id,number";
+        DynamicObject[] percreDyns = BusinessDataServiceHelper.load("hsbs_percre", selectFields1, filter.toArray());
+
+        return percreDyns;
+    }
+
     /**
      * 判断集合是否为空
      * @param list

+ 7 - 3
code/hr/nckd-jxccl-hr/src/main/java/nckd/jxccl/hr/htm/plugin/form/quitapply/QuitApplyFormPlugin.java

@@ -2,6 +2,7 @@ package nckd.jxccl.hr.htm.plugin.form.quitapply;
 
 import kd.bos.common.enums.EnableEnum;
 import kd.bos.dataentity.entity.DynamicObject;
+import kd.bos.dataentity.serialization.SerializationUtils;
 import kd.bos.entity.datamodel.events.PropertyChangedArgs;
 import kd.bos.form.plugin.AbstractFormPlugin;
 import kd.bos.orm.query.QCP;
@@ -13,7 +14,9 @@ import nckd.jxccl.hr.htm.common.quitapply.QuitApplyConstant;
 import java.time.ZoneId;
 import java.util.Collections;
 import java.util.Date;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 /**
  * 离职申请单表单插件
@@ -77,13 +80,14 @@ public class QuitApplyFormPlugin extends AbstractFormPlugin {
      */
     private void setUnUsedAnnualLeave(Long employeeId, Date contractEndDate) {
         // 获取人员考勤档案
-        Long attFileBoId = DispatchServiceHelper.invokeService("nckd.jxccl.wtc.wtp.servicehelper", QuitApplyConstant.WTP_APP, "IWTPCustomerService", "getAttFileBoId", new Object[]{contractEndDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(), employeeId});
-        if (attFileBoId == 0L) {
+        String attFileSerializedString = DispatchServiceHelper.invokeService("nckd.jxccl.wtc.wtp.servicehelper", QuitApplyConstant.WTP_APP, "IWTPCustomerService", "getAttFile", new Object[]{contractEndDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(), employeeId});
+        if (attFileSerializedString == null) {
             getView().showTipNotification("未获取到应休未休剩余年假,请检查离职人员是否存在离职时间内有效的考勤档案");
             return;
         }
+        Map<String, Object> attFile = SerializationUtils.fromJsonString(attFileSerializedString, HashMap.class);
 
-        List<DynamicObject> quotaList = DispatchServiceHelper.invokeService("nckd.jxccl.wtc.wtp.servicehelper", QuitApplyConstant.WTP_APP, "IWTPCustomerService", "queryQuota", new Object[]{attFileBoId, Collections.singletonList(1666695290893207552L), 0, contractEndDate, contractEndDate});
+        List<DynamicObject> quotaList = DispatchServiceHelper.invokeService("nckd.jxccl.wtc.wtp.servicehelper", QuitApplyConstant.WTP_APP, "IWTPCustomerService", "queryQuota", new Object[]{attFile.get("boId"), Collections.singletonList(1666695290893207552L), 0, contractEndDate, contractEndDate});
         if (quotaList != null && !quotaList.isEmpty()) {
             DynamicObject quotaDy = quotaList.get(0);
             getModel().setValue(QuitApplyConstant.NCKD_UNUSEDANNUALLEAVE_KEY, quotaDy.getBigDecimal(QuitApplyConstant.USABLEVALUE_KEY));

+ 6 - 0
code/hrmp/nckd-jxccl-hrmp/src/main/java/nckd/jxccl/hrmp/hbpm/common/hr/PositionHRConstant.java

@@ -29,5 +29,11 @@ public class PositionHRConstant extends FormConstant {
     public static final String PARENT_KEY = "parent";
     /** 上级岗位 */
     public static final String NCKD_PARENT_KEY = "nckd_parent";
+    /** 岗级 */
+    public static final String NCKD_POSTGRADE_KEY = "nckd_postgrade";
+    /** 管理层级细项 */
+    public static final String NCKD_MGTLVLDTL_KEY = "nckd_mgtlvldtl";
+    /** 法人岗位层级 */
+    public static final String NCKD_LEGPOSTLV_KEY = "nckd_legpostlv";
 
 }

+ 8 - 2
code/hrmp/nckd-jxccl-hrmp/src/main/java/nckd/jxccl/hrmp/hbpm/plugin/form/hr/PositionAssignFormPlugin.java

@@ -142,10 +142,16 @@ public class PositionAssignFormPlugin extends AbstractFormPlugin {
             // 重置ID
             newDyo.set(PositionHRConstant.ID_KEY, null);
             newDyo.set(PositionHRConstant.BOID_KEY, null);
-            // 设置行政组织
+            // 设置 行政组织
             newDyo.set(PositionHRConstant.ADMINORG, entryEntityDy.get(PositionHRConstant.NCKD_ADMINORG));
-            // 设置上级岗位
+            // 设置 上级岗位
             newDyo.set(PositionHRConstant.PARENT_KEY, entryEntityDy.get(PositionHRConstant.NCKD_PARENT_KEY));
+            // 设置 岗级
+            newDyo.set(PositionHRConstant.NCKD_POSTGRADE_KEY, entryEntityDy.get(PositionHRConstant.NCKD_POSTGRADE_KEY));
+            // 设置 管理层级细项
+            newDyo.set(PositionHRConstant.NCKD_MGTLVLDTL_KEY, entryEntityDy.get(PositionHRConstant.NCKD_MGTLVLDTL_KEY));
+            // 设置 法人岗位层级
+            newDyo.set(PositionHRConstant.NCKD_LEGPOSTLV_KEY, entryEntityDy.get(PositionHRConstant.NCKD_LEGPOSTLV_KEY));
             // 设置编码
             orgId = newDyo.getString(String.join(".", PositionHRConstant.ORG_KEY, PositionHRConstant.ID_KEY));
             String positionNumber = CodeRuleServiceHelper.getNumber(PositionHRConstant.HBPM_POSITIONHR, newDyo, orgId);

+ 18 - 5
code/swc/nckd-jxccl-swc/src/main/java/nckd/jxccl/swc/hcdm/formplugin/agencybill/AgencyBillEdit.java

@@ -23,6 +23,7 @@ import kd.sdk.plugin.Plugin;
 import nckd.jxccl.base.swc.helper.SWCHelper;
 import nckd.jxccl.swc.constants.SwcConstant;
 
+import java.math.BigDecimal;
 import java.time.LocalDate;
 import java.time.ZoneId;
 import java.time.format.DateTimeFormatter;
@@ -117,6 +118,16 @@ public class AgencyBillEdit extends AbstractFormPlugin implements Plugin {
             return key2;
         }));
 
+        // 获取到人员证件信息
+        DynamicObject[] percreDyns = SWCHelper.queryPercreDyns(employeeId);
+        Map<Long, DynamicObject> percreMap = Arrays.stream(percreDyns).collect(Collectors.toMap((dyx) -> {
+            return dyx.getLong("employee.id");
+        }, (dyx) -> {
+            return dyx;
+        }, (key1, key2) -> {
+            return key2;
+        }));
+
         for (Object calPerson : calPersonIds) {
             DynamicObject row = entryCols.addNew();
             Long calPersonId = Long.valueOf(calPerson.toString());
@@ -125,7 +136,13 @@ public class AgencyBillEdit extends AbstractFormPlugin implements Plugin {
             row.set("nckd_adminorg", calPersonMap.get(calPersonId).getDynamicObject("empposorgrelsndet.adminorg"));
             //row.set("nckd_payrollgrp", model.getValue("nckd_payrollgroup"));
             row.set("nckd_belongdate", date);
-            row.set("nckd_amount", calTableMap.get(calPersonId).getBigDecimal("hsas_caltableentry.calamountvalue"));
+            row.set("nckd_idcardno", percreMap.get(row.getLong("nckd_employee.id")).getString("number"));
+            if(calTableMap.keySet().contains(calPersonId)) {
+                row.set("nckd_amount", calTableMap.get(calPersonId).getBigDecimal("hsas_caltableentry.calamountvalue"));
+            }
+            else {
+                row.set("nckd_amount", BigDecimal.ZERO);
+            }
         }
     }
 
@@ -140,10 +157,6 @@ public class AgencyBillEdit extends AbstractFormPlugin implements Plugin {
         return SwcConstant.CALPERSON_HELPER.queryOriginalCollection(selectFields, new QFilter[]{filter});
     }
 
-
-
-
-
     @Override
     public void beforeDoOperation(BeforeDoOperationEventArgs args) {
         super.beforeDoOperation(args);

+ 10 - 4
code/wtc/nckd-jxccl-wtc/src/main/java/nckd/jxccl/wtc/wtp/mservice/WTPCustomerService.java

@@ -1,10 +1,12 @@
 package nckd.jxccl.wtc.wtp.mservice;
 
 import kd.bos.dataentity.entity.DynamicObject;
+import kd.bos.dataentity.serialization.DataEntitySerializerOption;
+import kd.bos.dataentity.serialization.SerializationUtils;
 import kd.hr.hbp.business.servicehelper.HRMServiceHelper;
-import kd.hr.hbp.common.util.HRObjectUtils;
 import kd.sdk.wtc.wtp.business.attfile.AttFileVersion;
 import kd.sdk.wtc.wtp.business.helper.WTPServiceHelper;
+import nckd.jxccl.base.common.constant.FormConstant;
 import nckd.jxccl.wtc.wtp.mservice.api.IWTPCustomerService;
 
 import java.time.LocalDate;
@@ -19,14 +21,18 @@ import java.util.List;
 public class WTPCustomerService implements IWTPCustomerService {
 
     @Override
-    public Long getAttFileBoId(LocalDate localDate, long employeeId) {
+    public String getAttFile(LocalDate localDate, long employeeId) {
         AttFileVersion attFile = WTPServiceHelper.getAttFile(localDate, employeeId);
-        return HRObjectUtils.isEmpty(attFile) ? 0L : attFile.getBoId();
+        return attFile == null ? null : SerializationUtils.toJsonString(WTPServiceHelper.getAttFile(localDate, employeeId));
     }
 
     @Override
     public List<DynamicObject> queryQuota(long attFileBoId, List<Long> qtTypeIdList, int rangQueryType, Date startDate, Date endDate) {
-        return HRMServiceHelper.invokeBizService("wtc", "wtp", "IQTService", "queryQuota", new Object[]{attFileBoId, qtTypeIdList, rangQueryType, startDate, endDate});
+        List<DynamicObject> quotaDyList = HRMServiceHelper.invokeBizService(FormConstant.WTC_CLOUD, FormConstant.WTP_APP, "IQTService", "queryQuota", new Object[]{attFileBoId, qtTypeIdList, rangQueryType, startDate, endDate});
+        DataEntitySerializerOption dataEntitySerializerOption = new DataEntitySerializerOption();
+        //dataEntitySerializerOption.setIncludeComplexProperty(true);// 包含基础资料已有的所有属性
+        //return quotaDyList == null || quotaDyList.isEmpty() ? new String[0] : quotaDyList.stream().map(DataEntitySerializer::serializerToString).toArray(String[]::new);
+        return quotaDyList;
     }
 
 }

+ 2 - 2
code/wtc/nckd-jxccl-wtc/src/main/java/nckd/jxccl/wtc/wtp/mservice/api/IWTPCustomerService.java

@@ -13,13 +13,13 @@ import java.util.List;
  */
 public interface IWTPCustomerService {
     /**
-     * 获取人员考勤档案BOID
+     * 获取人员考勤档案
      * @from: kd.sdk.wtc.wtp.business.helper.WTPServiceHelper.getAttFile
      * @param localDate
      * @param employeeId
      * @return
      */
-    Long getAttFileBoId(LocalDate localDate, long employeeId);
+    String getAttFile(LocalDate localDate, long employeeId);
 
     /**
      * 查询定额明细