|
|
@@ -11,6 +11,7 @@ import kd.bos.form.mcontrol.mobtable.events.MobTablePackageDataHandlerEvent;
|
|
|
import kd.bos.form.plugin.AbstractMobFormPlugin;
|
|
|
import kd.bos.orm.query.QCP;
|
|
|
import kd.bos.orm.query.QFilter;
|
|
|
+import kd.bos.servicehelper.QueryServiceHelper;
|
|
|
import kd.bos.servicehelper.user.UserServiceHelper;
|
|
|
import kd.sdk.plugin.Plugin;
|
|
|
import nckd.jxccl.swc.constants.SwcConstant;
|
|
|
@@ -32,11 +33,11 @@ public class EmpSalaryQueryMobFormPlugin extends AbstractMobFormPlugin implement
|
|
|
private static final String KEY_LAB_EMP_DESCRIPTION = "nckd_desc";
|
|
|
private static final String KEY_LAB_REALAMT = "nckd_realamt";
|
|
|
private static final String KEY_LAB_GROSSAMT = "nckd_grossamt";
|
|
|
+ private static final String KEY_LAB_SUBAMT = "nckd_subamt";
|
|
|
private static String KEY_CTL_STARTDATE = "startmonth";
|
|
|
private static String KEY_CTL_ENDDATE = "endmonth";
|
|
|
private static String KEY_META_PERUSER = "hrpi_personuserrel";
|
|
|
private static Long KEY_EMPID = 0L;
|
|
|
- private static Long KEY_USERID = 0L;
|
|
|
private static Date KEY_STARTDATE = new Date();
|
|
|
private static Date KEY_ENDDATE = new Date();
|
|
|
private static String KEY_TYPE = "10";
|
|
|
@@ -111,7 +112,6 @@ public class EmpSalaryQueryMobFormPlugin extends AbstractMobFormPlugin implement
|
|
|
KEY_STARTDATE = (Date)this.getModel().getValue(KEY_CTL_STARTDATE);
|
|
|
KEY_ENDDATE = (Date)this.getModel().getValue(KEY_CTL_ENDDATE);
|
|
|
showData();
|
|
|
- //this.getView().updateView("nckd_mob_empsalary") ;
|
|
|
this.getView().updateView();
|
|
|
}
|
|
|
if (fieldKey.equals("nckd_type")){
|
|
|
@@ -119,7 +119,6 @@ public class EmpSalaryQueryMobFormPlugin extends AbstractMobFormPlugin implement
|
|
|
|
|
|
KEY_TYPE = (String)this.getModel().getValue("nckd_type");
|
|
|
showData();
|
|
|
- //this.getView().updateView("nckd_mob_empsalary") ;
|
|
|
this.getView().updateView();
|
|
|
|
|
|
}
|
|
|
@@ -140,6 +139,16 @@ public class EmpSalaryQueryMobFormPlugin extends AbstractMobFormPlugin implement
|
|
|
this.getView().showMessage("未找到员工!");
|
|
|
return;
|
|
|
}
|
|
|
+ String selectFields1 = "id,company.name,adminorg.name,employee.id,employee.name";
|
|
|
+ QFilter filter1 = new QFilter("isprimary", QCP.equals, "1");
|
|
|
+ QFilter filter2 = new QFilter("iscurrentdata", QCP.equals, "1");
|
|
|
+ QFilter filter3 = new QFilter("employee.id", QFilter.equals, KEY_EMPID);
|
|
|
+ DynamicObject employeeDyn = QueryServiceHelper.queryOne("hrpi_empposorgrel",selectFields1, new QFilter[]{filter1, filter2, filter3});
|
|
|
+
|
|
|
+ if(employeeDyn == null){
|
|
|
+ this.getView().showMessage("未找到员工!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
|
|
|
List<Long> calPersonIds = SWCHelper.queryCalPersonList(KEY_EMPID);
|
|
|
if(calPersonIds == null && calPersonIds.size() == 0) {
|
|
|
@@ -147,7 +156,6 @@ public class EmpSalaryQueryMobFormPlugin extends AbstractMobFormPlugin implement
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
// 获取核算列表信息
|
|
|
QFilter filter = new QFilter("calpersonid", QCP.in, calPersonIds);
|
|
|
if(type.equals("10")){
|
|
|
@@ -162,10 +170,20 @@ public class EmpSalaryQueryMobFormPlugin extends AbstractMobFormPlugin implement
|
|
|
String selectFields = "calpersonid,hsas_caltableentry.salaryitem.number,hsas_caltableentry.salaryitem.name,hsas_caltableentry.calamountvalue";
|
|
|
DynamicObjectCollection calTableDyns = SwcConstant.CALTABLE_ENTITY.queryOriginalCollection(selectFields, new QFilter[]{filter});
|
|
|
|
|
|
- DynamicObject empDyn = SWCHelper.queryOne("hsas_calperson", calPersonIds.get(0));
|
|
|
-
|
|
|
Label label = this.getView().getControl(KEY_LAB_EMP_NAME);
|
|
|
- label.setText(empDyn.getString("name"));
|
|
|
+ label.setText(employeeDyn.getString("employee.name"));
|
|
|
+
|
|
|
+ Label labelDesc = this.getView().getControl(KEY_LAB_EMP_DESCRIPTION);
|
|
|
+ String companyName = employeeDyn.getString("company.name");
|
|
|
+ String adminorgName = employeeDyn.getString("adminorg.name");
|
|
|
+ String desc = "";
|
|
|
+ if(companyName != null){
|
|
|
+ desc = "公司:" + companyName;
|
|
|
+ }
|
|
|
+ if(adminorgName != null){
|
|
|
+ desc = desc + " 部门:" + adminorgName;
|
|
|
+ }
|
|
|
+ labelDesc.setText( desc);
|
|
|
|
|
|
Map<String, BigDecimal> calItemAmtMap = getCalItemAmt(calTableDyns);
|
|
|
Map<String, String> itemNameMap = getItemName(calTableDyns);
|
|
|
@@ -185,6 +203,12 @@ public class EmpSalaryQueryMobFormPlugin extends AbstractMobFormPlugin implement
|
|
|
}else {
|
|
|
label2.setText(df.format(calItemAmtMap.get("JT_283")));
|
|
|
}
|
|
|
+ Label label3 = this.getView().getControl(KEY_LAB_SUBAMT);
|
|
|
+ if(calItemAmtMap.get("JT383") == null){
|
|
|
+ label3.setText("0.00");
|
|
|
+ }else {
|
|
|
+ label3.setText(df.format(calItemAmtMap.get("JT383")));
|
|
|
+ }
|
|
|
|
|
|
MobTable mobTable = getControl("nckd_mobtable");
|
|
|
mobTable.setCustomParam("calItemAmt", calItemAmtMap);
|
|
|
@@ -195,6 +219,8 @@ public class EmpSalaryQueryMobFormPlugin extends AbstractMobFormPlugin implement
|
|
|
label1.setText("0.00");
|
|
|
Label label2 = this.getView().getControl(KEY_LAB_GROSSAMT);
|
|
|
label2.setText("0.00");
|
|
|
+ Label label3 = this.getView().getControl(KEY_LAB_SUBAMT);
|
|
|
+ label3.setText("0.00");
|
|
|
}
|
|
|
|
|
|
}
|