|
|
@@ -1,15 +1,32 @@
|
|
|
package com.kingdee.eas.custom.shuiyou.inter.handler;
|
|
|
|
|
|
+import java.util.HashSet;
|
|
|
+import java.util.Map;
|
|
|
+import java.util.Set;
|
|
|
+
|
|
|
import com.kingdee.bos.Context;
|
|
|
import com.kingdee.bos.dao.ormapping.ObjectUuidPK;
|
|
|
+import com.kingdee.bos.metadata.entity.FilterInfo;
|
|
|
+import com.kingdee.bos.metadata.entity.FilterItemCollection;
|
|
|
+import com.kingdee.bos.metadata.entity.FilterItemInfo;
|
|
|
import com.kingdee.bos.metadata.entity.SelectorItemCollection;
|
|
|
import com.kingdee.bos.metadata.entity.SelectorItemInfo;
|
|
|
+import com.kingdee.bos.metadata.query.util.CompareType;
|
|
|
+import com.kingdee.bos.sql.util.StringUtil;
|
|
|
import com.kingdee.eas.custom.shuiyou.task.ITask;
|
|
|
+import com.kingdee.eas.custom.shuiyou.task.TaskCatalogEnum;
|
|
|
import com.kingdee.eas.custom.shuiyou.task.TaskFactory;
|
|
|
import com.kingdee.eas.custom.shuiyou.task.TaskInfo;
|
|
|
import com.kingdee.shr.base.syssetting.context.SHRContext;
|
|
|
import com.kingdee.shr.base.syssetting.exception.SHRWebException;
|
|
|
import com.kingdee.shr.base.syssetting.web.handler.ListHandler;
|
|
|
+import com.kingdee.shr.base.syssetting.web.json.JSONUtils;
|
|
|
+import com.kingdee.shr.compensation.app.taxCal.TaxCalTaskCatalogEnum;
|
|
|
+import com.kingdee.shr.compensation.request.ParseRequestHelper;
|
|
|
+import com.kingdee.shr.compensation.util.filter.CmpTaxUnitPermFilter;
|
|
|
+
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
+import org.apache.log4j.Logger;
|
|
|
import org.springframework.ui.ModelMap;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
@@ -22,7 +39,8 @@ import javax.servlet.http.HttpServletResponse;
|
|
|
* version: 1.0 <br>
|
|
|
*/
|
|
|
public class TaskListHandler extends ListHandler {
|
|
|
-
|
|
|
+ private static Logger logger = Logger
|
|
|
+ .getLogger("com.kingdee.eas.custom.shuiyou.inter.handler.TaskListHandler");
|
|
|
|
|
|
public String enableAction(HttpServletRequest request, HttpServletResponse response, ModelMap modelMap) throws SHRWebException {
|
|
|
String billId = this.getBillId(request);
|
|
|
@@ -58,4 +76,97 @@ public class TaskListHandler extends ListHandler {
|
|
|
this.writeSuccessData(billId);
|
|
|
return null;
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ protected FilterInfo getDefaultFilter(HttpServletRequest request,
|
|
|
+ HttpServletResponse response) throws SHRWebException {
|
|
|
+ FilterInfo filterInfo = super.getDefaultFilter(request, response);
|
|
|
+ if (null == filterInfo) {
|
|
|
+ filterInfo = new FilterInfo();
|
|
|
+ }
|
|
|
+ Context ctx = SHRContext.getInstance().getContext();
|
|
|
+ FilterItemCollection filterItems = filterInfo.getFilterItems();
|
|
|
+ String catalog = StringUtil.cnulls(ParseRequestHelper.getParameterByRequest(request, "catalog"));
|
|
|
+
|
|
|
+ TaskCatalogEnum catalogEnum = null;
|
|
|
+ if (!(StringUtils.isEmpty(catalog))) {
|
|
|
+ catalogEnum = TaskCatalogEnum.getEnum(catalog);
|
|
|
+ }
|
|
|
+ String fastFilterItems = request.getParameter("fastFilterItems");
|
|
|
+ Map fastFilterMap = null;
|
|
|
+ if (fastFilterItems != null) {
|
|
|
+ fastFilterMap = JSONUtils.convertJsonToObject(ctx, fastFilterItems);
|
|
|
+ }
|
|
|
+ boolean isUseURLCatalog = true;
|
|
|
+ if ((null != fastFilterMap) && (fastFilterMap.containsKey("catalog"))) {
|
|
|
+ Map catalogMap = (Map) fastFilterMap.get("catalog");
|
|
|
+ String values = (String) catalogMap.get("values");
|
|
|
+ if (!(StringUtils.isEmpty(values))) {
|
|
|
+ isUseURLCatalog = false;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ if ((null != catalogEnum) && (isUseURLCatalog)) {
|
|
|
+ if (TaskCatalogEnum.CAL == catalogEnum) {
|
|
|
+ Set set = new HashSet();
|
|
|
+ set.add(Integer.valueOf(30));//税款计算
|
|
|
+ set.add(Integer.valueOf(32));//税款计算删除人员
|
|
|
+ set.add(Integer.valueOf(50));//专项附加扣除申报
|
|
|
+// set.add(Integer.valueOf(90));//不满6万人员获取
|
|
|
+ set.add(Integer.valueOf(35));//税款计算获取结果
|
|
|
+ FilterItemInfo catalogFilterItem = new FilterItemInfo(
|
|
|
+ "catalog", set, CompareType.INCLUDE);
|
|
|
+ filterItems.add(catalogFilterItem);
|
|
|
+ } else if (TaskCatalogEnum.TAX == catalogEnum) {
|
|
|
+ Set set = new HashSet();
|
|
|
+ set.add(Integer.valueOf(20));//个税申报
|
|
|
+ set.add(Integer.valueOf(40));//个税申报反馈
|
|
|
+ set.add(Integer.valueOf(131));//更正申报
|
|
|
+ set.add(Integer.valueOf(130));//撤销更正
|
|
|
+ set.add(Integer.valueOf(132));//作废申报
|
|
|
+ FilterItemInfo catalogFilterItem = new FilterItemInfo(
|
|
|
+ "catalog", set, CompareType.INCLUDE);
|
|
|
+ filterItems.add(catalogFilterItem);
|
|
|
+ } else if (TaskCatalogEnum.TAXPAYMENT == catalogEnum) {
|
|
|
+ Set set = new HashSet();
|
|
|
+ set.add(Integer.valueOf(60));//三方协议获取
|
|
|
+ set.add(Integer.valueOf(70));//税款缴纳
|
|
|
+ set.add(Integer.valueOf(110));//反算服务
|
|
|
+ set.add(Integer.valueOf(75));//税款缴纳查询
|
|
|
+
|
|
|
+ FilterItemInfo catalogFilterItem = new FilterItemInfo(
|
|
|
+ "catalog", set, CompareType.INCLUDE);
|
|
|
+ filterItems.add(catalogFilterItem);
|
|
|
+ } else if (TaskCatalogEnum.COLLECTION == catalogEnum) {
|
|
|
+ Set set = new HashSet();
|
|
|
+// set.add(Integer.valueOf(90));//不满6万人员获取
|
|
|
+// set.add(Integer.valueOf(100));//6万直接扣除人员确认
|
|
|
+ set.add(Integer.valueOf(90));//人员归集
|
|
|
+ set.add(Integer.valueOf(95));//
|
|
|
+ set.add(Integer.valueOf(100));//
|
|
|
+ set.add(Integer.valueOf(105));
|
|
|
+ FilterItemInfo catalogFilterItem = new FilterItemInfo(
|
|
|
+ "catalog", set, CompareType.INCLUDE);
|
|
|
+ filterItems.add(catalogFilterItem);
|
|
|
+ } else {
|
|
|
+ FilterItemInfo catalogFilterItem = new FilterItemInfo(
|
|
|
+ "catalog", catalogEnum, CompareType.EQUALS);
|
|
|
+ filterItems.add(catalogFilterItem);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+// String curPersonPermTaxUnitSql = CmpTaxUnitPermFilter .getCurPersonPermTaxUnitSql(ctx);
|
|
|
+// if (!(StringUtils.isEmpty(curPersonPermTaxUnitSql))) {
|
|
|
+// FilterItemInfo taxUnitFilterItem = new FilterItemInfo("taxUnit",
|
|
|
+// curPersonPermTaxUnitSql, CompareType.INNER);
|
|
|
+// filterItems.add(taxUnitFilterItem);
|
|
|
+// }
|
|
|
+ return filterInfo;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
}
|