|
@@ -16,7 +16,7 @@ import com.kingdee.eas.custom.shuiyou.uitls.SYUtilsFacadeFactory;
|
|
|
import com.kingdee.eas.framework.CoreBaseCollection;
|
|
|
import com.kingdee.eas.framework.CoreBaseInfo;
|
|
|
import com.kingdee.eas.util.app.DbUtil;
|
|
|
-import com.kingdee.shr.base.syssetting.web.json.JSONUtils;
|
|
|
+
|
|
|
import com.kingdee.shr.compensation.BankCardStatusEnum;
|
|
|
import com.kingdee.shr.compensation.IdentityStatusEnume;
|
|
|
import com.kingdee.shr.compensation.IsOverseaEnum;
|
|
@@ -24,8 +24,7 @@ import com.kingdee.shr.compensation.SubmitStatusEnum;
|
|
|
import com.kingdee.shr.compensation.app.entity.TaxPersonEntity;
|
|
|
import com.kingdee.shr.compensation.app.entity.Triple;
|
|
|
import com.kingdee.shr.compensation.app.incomeTax.*;
|
|
|
-import com.kingdee.shr.compensation.app.tax.TaxUnitCollection;
|
|
|
-import com.kingdee.shr.compensation.app.tax.TaxUnitFactory;
|
|
|
+
|
|
|
import com.kingdee.shr.compensation.app.tax.TaxUnitInfo;
|
|
|
import com.kingdee.shr.compensation.util.Base64Utils;
|
|
|
import com.kingdee.shr.compensation.util.CmpDateUtil;
|
|
@@ -34,8 +33,6 @@ import com.kingdee.shr.compensation.util.filter.CmpTaxUnitPermFilter;
|
|
|
import com.kingdee.util.StringUtils;
|
|
|
import org.apache.log4j.Logger;
|
|
|
|
|
|
-import java.io.FileNotFoundException;
|
|
|
-import java.io.IOException;
|
|
|
import java.lang.reflect.Field;
|
|
|
|
|
|
import com.kingdee.bos.*;
|
|
@@ -53,13 +50,15 @@ public class TaxPersonReportExFacadeControllerBean extends AbstractTaxPersonRepo
|
|
|
* 养老金下载
|
|
|
*/
|
|
|
@Override
|
|
|
- protected List _pensionReport(Context ctx, String taxPeriodDate, String ids, String filter) throws BOSException {
|
|
|
-
|
|
|
+ protected List _pensionReport(Context ctx, Map paramMap) throws BOSException {
|
|
|
+ String taxPeriodDate = (String) paramMap.get("taxPeriodDate");
|
|
|
+ String ids = (String) paramMap.get("ids");
|
|
|
+ String filter=(String) paramMap.get("filter");
|
|
|
String curPersonPermTaxUnitSql = CmpTaxUnitPermFilter.getCurPersonPermTaxUnitSql(ctx);
|
|
|
String oql = "select *,bill.*,bill.person.*,bill.nationality.*,bill.position.*,bill.birthPlace.*,bill.eduLevel.*,bill.bank.name,bill.hrBank.name,taxUnit.id,taxUnit.areacode,taxUnit.name,taxUnit.taxNumber,taxUnit.areaCode,taxUnit.regNumber,taxUnit.declPassword,taxUnit.realPassword where (submitStatus=0 or submitStatus=3) ";
|
|
|
- logger.error("------------>>>>_report:" + oql);
|
|
|
+ //logger.error("------------>>>>_pensionReport:" + oql);
|
|
|
if (!StringUtils.isEmpty(ids)) {
|
|
|
- oql = oql + " and taxUnit.id in (" + curPersonPermTaxUnitSql + ")";
|
|
|
+ //oql = oql + " and taxUnit.id in (" + curPersonPermTaxUnitSql + ")";
|
|
|
oql = oql + " and id in (" + ids + ")";
|
|
|
} else {
|
|
|
if (StringUtils.isEmpty(filter)) {
|
|
@@ -70,6 +69,8 @@ public class TaxPersonReportExFacadeControllerBean extends AbstractTaxPersonRepo
|
|
|
}
|
|
|
List<String> resultList= Lists.newArrayList();
|
|
|
try {
|
|
|
+ String RELAYTASK = (String) paramMap.get("RELAYTASK");
|
|
|
+ logger.error("------------>>>>_pensionReport:" + oql);
|
|
|
ITaxPersonRecordEntry iTaxPersonRecordEntry = TaxPersonRecordEntryFactory.getLocalInstance(ctx);
|
|
|
TaxPersonRecordEntryCollection taxRecordEntryCollection = iTaxPersonRecordEntry.getTaxPersonRecordEntryCollection(oql);
|
|
|
if (taxRecordEntryCollection.size() == 0) {
|
|
@@ -80,7 +81,7 @@ public class TaxPersonReportExFacadeControllerBean extends AbstractTaxPersonRepo
|
|
|
SimpleDateFormat skssqFormat = new SimpleDateFormat("yyyyMM");
|
|
|
Map<String, Object> returnMap = new HashMap<String, Object>();
|
|
|
Calendar cal = Calendar.getInstance();
|
|
|
-
|
|
|
+ logger.error("------------>>>>_pensionReport:" + tripleMap);
|
|
|
ISYUtilsFacade localInstance = SYUtilsFacadeFactory.getLocalInstance(ctx);
|
|
|
Map<String, Object> propt = localInstance.getConfig();
|
|
|
Iterator i$ = tripleMap.entrySet().iterator();
|
|
@@ -154,7 +155,7 @@ public class TaxPersonReportExFacadeControllerBean extends AbstractTaxPersonRepo
|
|
|
String ip = (String) propt.get("ip");
|
|
|
String url = ip + "/gateway/iit/personalPension/download";
|
|
|
logger.error("===请求参数==" + postBody + "========");
|
|
|
- String taskId = localInstance.addTask("getPensionDownloadService",JSONUtil.toJsonStr(postBody),TaskCatalogEnum.PERSON,null);
|
|
|
+ String taskId = localInstance.addTask("getPensionDownloadService",JSONUtil.toJsonStr(postBody),TaskCatalogEnum.PERSONAL_PENSION,RELAYTASK);
|
|
|
resultList.add(taskId);
|
|
|
}
|
|
|
}
|
|
@@ -209,14 +210,16 @@ public class TaxPersonReportExFacadeControllerBean extends AbstractTaxPersonRepo
|
|
|
* 人员推送
|
|
|
*
|
|
|
* @param ctx
|
|
|
- * @param entryIDs
|
|
|
- * @param taxPeriodDate
|
|
|
- * @param filter
|
|
|
+ * @param paramMap
|
|
|
* @return
|
|
|
* @throws BOSException
|
|
|
*/
|
|
|
@Override
|
|
|
- protected List _report(Context ctx, String entryIDs, String taxPeriodDate, String filter) throws BOSException {
|
|
|
+ protected List _report(Context ctx, Map paramMap) throws BOSException {
|
|
|
+ String taxPeriodDate = (String) paramMap.get("taxPeriodDate");
|
|
|
+ String entryIDs = (String) paramMap.get("entryIDs");
|
|
|
+ String filter=(String) paramMap.get("filter");
|
|
|
+ String RELAYTASK = (String) paramMap.get("RELAYTASK");
|
|
|
String curPersonPermTaxUnitSql = CmpTaxUnitPermFilter.getCurPersonPermTaxUnitSql(ctx);
|
|
|
String oql = "select *,bill.*,bill.person.*,bill.nationality.*,bill.position.*,bill.birthPlace.*,bill.eduLevel.*,bill.bank.name,bill.hrBank.name,taxUnit.id,taxUnit.areacode,taxUnit.name,taxUnit.taxNumber,taxUnit.areaCode,taxUnit.regNumber,taxUnit.declPassword,taxUnit.realPassword where (submitStatus=0 or submitStatus=3) ";
|
|
|
logger.error("------------>>>>_report:" + oql);
|
|
@@ -323,6 +326,8 @@ public class TaxPersonReportExFacadeControllerBean extends AbstractTaxPersonRepo
|
|
|
person.put("grgbze", rInfo.getInvestmentTotal());//个人投资比例
|
|
|
person.put("khyhsfmz", rInfo.getBankCardProvince());//开户银行省份(名字)
|
|
|
person.put("rybscl", "否");//开户银行省份(名字)
|
|
|
+ person.remove("sfkcjcfy");
|
|
|
+ person.remove("khyh_sheng");
|
|
|
rylb.add(person);
|
|
|
}
|
|
|
postBody.put("rylb", rylb);
|
|
@@ -330,24 +335,28 @@ public class TaxPersonReportExFacadeControllerBean extends AbstractTaxPersonRepo
|
|
|
String url = ip + "/gateway/iit/declare/declareEmployeeInfo";
|
|
|
logger.error("===请求参数==" + postBody + "========");
|
|
|
String post = localInstance.post(url, postBody.toJSONString());
|
|
|
- System.out.println(post);
|
|
|
- JSONObject postJSON = JSONObject.parseObject(post);
|
|
|
- //校验 请求是否成功
|
|
|
- JSONObject head = postJSON.getJSONObject("head");
|
|
|
- String code = (String) head.get("code");
|
|
|
- if ("00000000".equals(code)) {
|
|
|
- JSONObject body = postJSON.getJSONObject("body");
|
|
|
-
|
|
|
- String taskId = localInstance.addTask("personnelReportService", JSONUtil.toJsonStr(body), TaskCatalogEnum.PERSON, null);
|
|
|
- List<Object[]> recordEntryParamsList = this.getParamsList(entryBaseCollection, taskId);
|
|
|
- String recordEntrySql = "update T_HR_STaxPersonRecordEntry set FSubmitStatus= ?, FIdentityStatus=?,CFTaskID=?, FLastReportMonth=?,FEndDate=? where fid =?";
|
|
|
- DbUtil.executeBatch(ctx, recordEntrySql, recordEntryParamsList);
|
|
|
- logger.info("--------->>>>>更新报送状态、验证状态:recordEntrySql:" + recordEntrySql + "------>>>>recordEntryParamsList:" + recordEntryParamsList + "---------->>>addTask:" + taskId);
|
|
|
- List<Object[]> recordParamsList = this.getParamsList(billBaseCollection, (String) null);
|
|
|
- String recordSql = "update T_HR_STaxPersonRecord set FBankCardStatus=? where fid =?";
|
|
|
- DbUtil.executeBatch(ctx, recordSql, recordParamsList);
|
|
|
- logger.info("--------->>>>>更新银行卡号状态:recordSql:" + recordSql + "------>>>>recordParamsList:" + recordParamsList);
|
|
|
- arrayList.add(taskId);
|
|
|
+ if(null!=post) {
|
|
|
+ System.out.println(post);
|
|
|
+ JSONObject postJSON = JSONObject.parseObject(post);
|
|
|
+ //校验 请求是否成功
|
|
|
+ JSONObject head = postJSON.getJSONObject("head");
|
|
|
+ String code = (String) head.get("code");
|
|
|
+ if ("00000000".equals(code)) {
|
|
|
+ JSONObject body = postJSON.getJSONObject("body");
|
|
|
+
|
|
|
+ String taskId = localInstance.addTask("personnelReportService", JSONUtil.toJsonStr(body), TaskCatalogEnum.PERSON, RELAYTASK);
|
|
|
+ List<Object[]> recordEntryParamsList = this.getParamsList(entryBaseCollection, taskId);
|
|
|
+ String recordEntrySql = "update T_HR_STaxPersonRecordEntry set FSubmitStatus= ?, FIdentityStatus=?,CFTaskID=?, FLastReportMonth=?,FEndDate=? where fid =?";
|
|
|
+ DbUtil.executeBatch(ctx, recordEntrySql, recordEntryParamsList);
|
|
|
+ logger.info("--------->>>>>更新报送状态、验证状态:recordEntrySql:" + recordEntrySql + "------>>>>recordEntryParamsList:" + recordEntryParamsList + "---------->>>addTask:" + taskId);
|
|
|
+ List<Object[]> recordParamsList = this.getParamsList(billBaseCollection, (String) null);
|
|
|
+ String recordSql = "update T_HR_STaxPersonRecord set FBankCardStatus=? where fid =?";
|
|
|
+ DbUtil.executeBatch(ctx, recordSql, recordParamsList);
|
|
|
+ logger.info("--------->>>>>更新银行卡号状态:recordSql:" + recordSql + "------>>>>recordParamsList:" + recordParamsList);
|
|
|
+ arrayList.add(taskId);
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ throw new BOSException("");
|
|
|
}
|
|
|
}
|
|
|
return arrayList;
|