Forráskód Böngészése

更新奖金业务代码

Heyuan 1 éve
szülő
commit
e2f9b4bb1d

+ 10 - 13
src/com/kingdee/eas/custom/projectbonus/app/BonusCycleBusDepProjectAssPersonnelDetailControllerBean.java

@@ -74,7 +74,7 @@ public class BonusCycleBusDepProjectAssPersonnelDetailControllerBean
         Date bonusDueDate = info.getBonusDueDate();
         if (bonusDueDate != null && bonusStartingDate != null) {
             if (bonusStartingDate.compareTo(bonusDueDate) >= 0) {
-                throw new BOSException("奖金期限截止日期 不得早于等于 奖金期限起算日期");
+                throw new BOSException("奖金期限截止日期 不得早于等于 奖金期限起算日期");
             }
             //出勤率 = (奖金期限截止日期-奖金期限起算日期)/180
             double day = DateTimeUtils.dateDiff(bonusStartingDate, bonusDueDate) / 86400000.0 / 180.0 * 100;
@@ -182,21 +182,18 @@ public class BonusCycleBusDepProjectAssPersonnelDetailControllerBean
                     //职等信息
                     JobGradeInfo jobGrade = getJobGradeInfo(ctx, personId);
                     info.setGrade(jobGrade);
-            } else {
-                throw new BOSException("分配人员不能为空!");
-            }
-        } else if ("initialProportion".equals(propertyName) && info.getInitialProportion() != null) {
-            BigDecimal initialProportion = info.getInitialProportion();
-            if (initialProportion.compareTo(BigDecimal.ZERO) < 0 || initialProportion.compareTo(BigDecimal.ONE) > 0) {
-                throw new BOSException("个人初始比例只能在[0,1]之间");
+                } else {
+                    throw new BOSException("分配人员不能为空!");
+                }
+            } else if ("initialProportion".equals(propertyName) && info.getInitialProportion() != null) {
+                BigDecimal initialProportion = info.getInitialProportion();
+                if (initialProportion.compareTo(BigDecimal.ZERO) < 0 || initialProportion.compareTo(BigDecimal.ONE) > 0) {
+                    throw new BOSException("个人初始比例只能在[0,1]之间");
+                }
             }
         }
+        super._updatePartial(ctx, model, sic);
     }
-        super.
-
-    _updatePartial(ctx, model, sic);
-
-}
 
     /**
      * 删除

+ 1 - 1
src/com/kingdee/eas/custom/projectbonus/app/BonusCycleBusDepProjectControllerBean.java

@@ -279,7 +279,7 @@ public class BonusCycleBusDepProjectControllerBean extends AbstractBonusCycleBus
                 throw new BOSException("员工[" + personName + "]的奖金期限截止日期为空!");
             }
             if (bonusStartingDate.compareTo(bonusDueDate) >= 0) {
-                throw new BaseItemException(BaseItemException.CUSTOM_EXCEPTION, new Object[]{"奖金期限截止日期 不得早于等于 奖金期限起算日期"});
+                throw new BaseItemException(BaseItemException.CUSTOM_EXCEPTION, new Object[]{"奖金期限截止日期 不得早于等于 奖金期限起算日期"});
             }
             //出勤率 = (奖金期限截止日期-奖金期限起算日期)/180
             double day = DateTimeUtils.dateDiff(bonusStartingDate, bonusDueDate) / 86400000.0 / 180.0 * 100;

+ 13 - 2
websrc/com/kingdee/eas/custom/projectbonus/web/handler/DetailListHandler.java

@@ -39,9 +39,14 @@ public class DetailListHandler extends ListHandler {
         String filter = filterInfo.toString();
         if (StringUtils.isEmpty(filter)) {
             filterSql.append(" bonusCycle.fid in ('')");
-        }else{
+        } else {
             filter = filter.replace("parent.parent", "bonusCycle.fid").replace("person.id", "bDPAPD.CFPERSONID");
             filterSql.append(filter);
+            String filterItems = request.getParameter("filterItems");//搜索条件
+            if(!StringUtils.isEmpty(filterItems)){
+                String replace = filterItems.replace("person.name", "person.fname_l2").replace("person.number", "person.fnumber");
+                filterSql.append(" and ").append(replace);
+            }
         }
         try {
             Boolean isAll = (Boolean) request.getAttribute("isAll");
@@ -51,7 +56,7 @@ public class DetailListHandler extends ListHandler {
             if (isAll) {
                 return exportAllToExcel(request, filterSql.toString());
             } else {
-                return getGridRequestDataForPage(request,  filterSql.toString());
+                return getGridRequestDataForPage(request, filterSql.toString());
             }
         } catch (
                 Exception e) {
@@ -59,6 +64,7 @@ public class DetailListHandler extends ListHandler {
             throw new ShrWebBizException(e.getMessage());
         }
     }
+
     /**
      * 查询汇总数据
      *
@@ -87,6 +93,7 @@ public class DetailListHandler extends ListHandler {
                 .append("            CT_PB_BonusCycle bonusCycle").append("\n")
                 .append("            inner JOIN CT_PB_BonusCycleBusDepProject bDP ON bDP.FPARENTID = bonusCycle.FID").append("\n")
                 .append("            inner JOIN CT_PB_BonusCAPD bDPAPD ON bDPAPD.FPARENTID = bDP.FID").append("\n")
+                .append("            inner JOIN t_bd_person person ON bDPAPD.cfpersonId = person.FID").append("\n")
                 .append("        WHERE").append("\n")
                 .append(filterSql).append("\n")
                 .append("            and bDP.cfstate = 2").append("\n")
@@ -140,6 +147,7 @@ public class DetailListHandler extends ListHandler {
         }
         return list;
     }
+
     /**
      * 页面查询
      *
@@ -168,6 +176,7 @@ public class DetailListHandler extends ListHandler {
         gridDataEntity.setPage(page);
         return gridDataEntity;
     }
+
     /**
      * 导出查询
      *
@@ -192,6 +201,7 @@ public class DetailListHandler extends ListHandler {
         gridDataEntity.setUserdata(new HashMap<String, Object>());
         return gridDataEntity;
     }
+
     /**
      * 查询汇总条数
      *
@@ -215,6 +225,7 @@ public class DetailListHandler extends ListHandler {
                 .append("            CT_PB_BonusCycle bonusCycle").append("\n")
                 .append("            inner JOIN CT_PB_BonusCycleBusDepProject bDP ON bDP.FPARENTID = bonusCycle.FID").append("\n")
                 .append("            inner JOIN CT_PB_BonusCAPD bDPAPD ON bDPAPD.FPARENTID = bDP.FID").append("\n")
+                .append("            inner JOIN t_bd_person person ON bDPAPD.cfpersonId = person.FID").append("\n")
                 .append("        WHERE").append("\n")
                 .append(filterSql).append("\n")
                 .append("            and bDP.cfstate = 2").append("\n")

+ 1 - 1
websrc/com/kingdee/eas/custom/projectbonus/web/service/PrincipalDetailImportServiceV2.java

@@ -39,8 +39,8 @@ public class PrincipalDetailImportServiceV2 extends PrincipalDetailImportService
         updateSic.add("performanceCoeffQ2");//Q2绩效系数
         updateSic.add("bonusStartingDate");//奖金期限起算日期
         updateSic.add("bonusDueDate");//奖金期限截止日期
-        updateSic.add("remarks");//备注
         updateSic.add("opinionAmount");//征求意见金额
+        updateSic.add("adjustmentdesc");//调整说明
     }
 
     /**