|
|
@@ -28,9 +28,12 @@ import com.kingdee.eas.framework.CoreBaseInfo;
|
|
|
import com.kingdee.eas.framework.util.FilterUtility;
|
|
|
import com.kingdee.eas.util.app.DbUtil;
|
|
|
import com.kingdee.jdbc.rowset.IRowSet;
|
|
|
+import com.kingdee.shr.base.permission.api.auth.SHRUserOrgPermissionApi;
|
|
|
+import com.kingdee.shr.base.syssetting.app.filter.HRFilterUtils;
|
|
|
import com.kingdee.shr.base.syssetting.context.SHRContext;
|
|
|
import com.kingdee.shr.base.syssetting.exception.SHRWebException;
|
|
|
import com.kingdee.shr.base.syssetting.exception.ShrWebBizException;
|
|
|
+import com.kingdee.shr.base.syssetting.util.SHRPermissionWebUtils;
|
|
|
import com.kingdee.shr.base.syssetting.util.SqlFilter;
|
|
|
import com.kingdee.shr.base.syssetting.web.json.JSONUtils;
|
|
|
import com.kingdee.shr.compensation.*;
|
|
|
@@ -80,7 +83,7 @@ public class TaxPersonRecordListHandlerEx extends TaxPersonRecordListHandler {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 人员报送
|
|
|
+ * 浜哄憳鎶ラ€�
|
|
|
*
|
|
|
* @param request
|
|
|
* @param response
|
|
|
@@ -103,7 +106,6 @@ public class TaxPersonRecordListHandlerEx extends TaxPersonRecordListHandler {
|
|
|
|
|
|
TaxPersonRecordEntryCollection taxRecordEntryCollection = iTaxPersonRecordEntry.getTaxPersonRecordEntryCollection(oql);
|
|
|
|
|
|
-
|
|
|
for (int i = 0; i < taxRecordEntryCollection.size(); ++i) {
|
|
|
TaxPersonRecordEntryInfo taxPersonRecordEntryInfo = taxRecordEntryCollection.get(i);
|
|
|
|
|
|
@@ -125,8 +127,8 @@ public class TaxPersonRecordListHandlerEx extends TaxPersonRecordListHandler {
|
|
|
|
|
|
String filter = this.getFilter(request, response, modelMap);
|
|
|
String curPersonPermTaxUnitSql = CmpTaxUnitPermFilter.getCurPersonPermTaxUnitSql(ctx);
|
|
|
- String oql = "select id,submitStatus,person.id,personstatus,lastreportmonth where (submitStatus=0 or submitStatus=3) ";
|
|
|
- logger.error("------------>>>>_report:" + oql);
|
|
|
+ String oql = "select id,submitStatus,taxUnit.id,person.id,personstatus,lastreportmonth where (submitStatus=0 or submitStatus=3) ";
|
|
|
+ logger.error("------------>>>>_report锛�" + oql);
|
|
|
if (!StringUtils.isEmpty(selectedIds)) {
|
|
|
oql = oql + " and taxUnit.id in (" + curPersonPermTaxUnitSql + ")";
|
|
|
oql = oql + " and id in (" + selectedIds + ")";
|
|
|
@@ -137,7 +139,7 @@ public class TaxPersonRecordListHandlerEx extends TaxPersonRecordListHandler {
|
|
|
|
|
|
oql = oql + " and " + filter;
|
|
|
}
|
|
|
- String msg = "该员工当月还有工资,不能申报为非正常人员。";
|
|
|
+ String msg = "璇ュ憳宸ュ綋鏈堣繕鏈夊伐璧勶紝涓嶈兘鐢虫姤涓洪潪姝e父浜哄憳銆�";
|
|
|
Boolean bf = false;
|
|
|
TaxPersonRecordEntryCollection taxRecordEntryCollection = iTaxPersonRecordEntry.getTaxPersonRecordEntryCollection(oql);
|
|
|
if (null != taxRecordEntryCollection && taxRecordEntryCollection.size() != 0) {
|
|
|
@@ -147,9 +149,9 @@ public class TaxPersonRecordListHandlerEx extends TaxPersonRecordListHandler {
|
|
|
if (PersonStatusEnum.NotNormal.equals(personStatusEnum)) {
|
|
|
String fid = info.getId().toString();
|
|
|
String personid = info.getPerson().getId().toString();
|
|
|
- String sel = "select fid from T_HR_SCmpCalTable where FPERSONID=? and FPERIODYEAR=? and FPERIODMONTH=?";
|
|
|
+ String sel = "select fid from T_HR_SCmpCalTable where FPERSONID=? and FTaxUnitID=? and FPERIODYEAR=? and FPERIODMONTH=?";
|
|
|
String[] strs = taxPeriodDate.split("-");
|
|
|
- IRowSet rs = DbUtil.executeQuery(ctx, sel, new String[]{personid, strs[0], strs[1]});
|
|
|
+ IRowSet rs = DbUtil.executeQuery(ctx, sel, new String[]{personid,info.getTaxUnit().getId().toString(), strs[0], strs[1]});
|
|
|
if (rs.next()) {
|
|
|
bf = true;
|
|
|
String upda = "update T_HR_STAXPERSONRECORDENTRY set FSUBMITSTATUS='3',FAILREASON=? where fid=?";
|
|
|
@@ -162,7 +164,7 @@ public class TaxPersonRecordListHandlerEx extends TaxPersonRecordListHandler {
|
|
|
map.put("message", msg);
|
|
|
} else {
|
|
|
|
|
|
- System.err.println("------------>>>>reportAction:taxPeriodDate" + taxPeriodDate);
|
|
|
+ System.err.println("------------>>>>reportAction锛歵axPeriodDate" + taxPeriodDate);
|
|
|
ITaxPersonReportExFacade iTaxPersonReportFacade = TaxPersonReportExFacadeFactory.getLocalInstance(ctx);
|
|
|
Map<String, Object> paramMap = Maps.newHashMap();
|
|
|
paramMap.put("filter", filter);
|
|
|
@@ -176,7 +178,7 @@ public class TaxPersonRecordListHandlerEx extends TaxPersonRecordListHandler {
|
|
|
} catch (Exception var14) {
|
|
|
var14.printStackTrace();
|
|
|
logger.error(var14.getMessage(), var14);
|
|
|
- System.err.println("--------------->>>>>>>>捕获异常:" + var14.getMessage().toString());
|
|
|
+ System.err.println("--------------->>>>>>>>鎹曡幏寮傚父锛�" + var14.getMessage().toString());
|
|
|
throw new ShrWebBizException(var14.getMessage());
|
|
|
}
|
|
|
}
|
|
|
@@ -311,7 +313,7 @@ public class TaxPersonRecordListHandlerEx extends TaxPersonRecordListHandler {
|
|
|
protected List<IObjectPK> _report(Context ctx, String entryIDs, String taxPeriodDate, String filter) throws BOSException {
|
|
|
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("------------>>>>_report锛�" + oql);
|
|
|
if (!StringUtils.isEmpty(entryIDs)) {
|
|
|
oql = oql + " and taxUnit.id in (" + curPersonPermTaxUnitSql + ")";
|
|
|
oql = oql + " and id in (" + entryIDs + ")";
|
|
|
@@ -360,22 +362,22 @@ public class TaxPersonRecordListHandlerEx extends TaxPersonRecordListHandler {
|
|
|
reMap.put("TAXUNITID", taxUnitInfo.getId().toString());
|
|
|
Set<String> persons = this.getPersonsSet(taxPersonEntitys, sdyf);
|
|
|
reMap.put("persons", persons);
|
|
|
- //二开开始
|
|
|
+ //浜屽紑寮€濮�
|
|
|
String bizNo = UUID.randomUUID().toString().replace("-", "");
|
|
|
- String qymc = taxUnitInfo.getName();//企业名称
|
|
|
- String mmlx = "0";//密码类型 0表示申报密码;2表示实名账号实名密码
|
|
|
- String smzh = "";//实名账号
|
|
|
- String smmm = "";//实名密码
|
|
|
- String jmsmmm = "";//加密实名密码
|
|
|
+ String qymc = taxUnitInfo.getName();//浼佷笟鍚嶇О
|
|
|
+ String mmlx = "0";//瀵嗙爜绫诲瀷 0琛ㄧず鐢虫姤瀵嗙爜锛�2琛ㄧず瀹炲悕璐﹀彿瀹炲悕瀵嗙爜
|
|
|
+ String smzh = "";//瀹炲悕璐﹀彿
|
|
|
+ String smmm = "";//瀹炲悕瀵嗙爜
|
|
|
+ String jmsmmm = "";//鍔犲瘑瀹炲悕瀵嗙爜
|
|
|
String sbmm = "";
|
|
|
sbmm = (Base64Utils.decode(taxUnitInfo.getDeclPassword()));
|
|
|
- String jmsbmm = "";//申报密码加密
|
|
|
- String djxhid = taxUnitInfo.getRegNumber();//登记序号
|
|
|
- String nsrsbh = taxUnitInfo.getTaxNumber();//税号
|
|
|
- String areaid = taxUnitInfo.getAreaCode();//地区编码
|
|
|
- String bmbh = "";//部门编号
|
|
|
- String bmmc = "";//部门编码
|
|
|
- String skssq = sdyf;//所属期
|
|
|
+ String jmsbmm = "";//鐢虫姤瀵嗙爜鍔犲瘑
|
|
|
+ String djxhid = taxUnitInfo.getRegNumber();//鐧昏�搴忓彿
|
|
|
+ String nsrsbh = taxUnitInfo.getTaxNumber();//绋庡彿
|
|
|
+ String areaid = taxUnitInfo.getAreaCode();//鍦板尯缂栫爜
|
|
|
+ String bmbh = "";//閮ㄩ棬缂栧彿
|
|
|
+ String bmmc = "";//閮ㄩ棬缂栫爜
|
|
|
+ String skssq = sdyf;//鎵€灞炴湡
|
|
|
String lzrqcl = "";
|
|
|
JSONObject postBody = new JSONObject();
|
|
|
postBody.put("bizNo", bizNo);
|
|
|
@@ -409,21 +411,21 @@ public class TaxPersonRecordListHandlerEx extends TaxPersonRecordListHandler {
|
|
|
}
|
|
|
person.put("skssq", sdyf);
|
|
|
Optional<IsOverseaEnum> oversea = Optional.ofNullable(rInfo.getIsOversea());
|
|
|
- person.put("rydq", "0".equals(oversea.orElse(IsOverseaEnum.NotOversea).getValue()) ? "境内" : "境外");
|
|
|
- person.put("grgbbl", rInfo.getInvestmentRate());//个人投资总额
|
|
|
- person.put("grgbze", rInfo.getInvestmentTotal());//个人投资比例
|
|
|
- person.put("khyhsfmz", rInfo.getBankCardProvince());//开户银行省份(名字)
|
|
|
- person.put("rybscl", "否");//开户银行省份(名字)
|
|
|
+ person.put("rydq", "0".equals(oversea.orElse(IsOverseaEnum.NotOversea).getValue()) ? "澧冨唴" : "澧冨�");
|
|
|
+ person.put("grgbbl", rInfo.getInvestmentRate());//涓�汉鎶曡祫鎬婚�
|
|
|
+ person.put("grgbze", rInfo.getInvestmentTotal());//涓�汉鎶曡祫姣斾緥
|
|
|
+ person.put("khyhsfmz", rInfo.getBankCardProvince());//寮€鎴烽摱琛岀渷浠�(鍚嶅瓧)
|
|
|
+ person.put("rybscl", "鍚�");//寮€鎴烽摱琛岀渷浠�(鍚嶅瓧)
|
|
|
rylb.add(person);
|
|
|
}
|
|
|
postBody.put("rylb", rylb);
|
|
|
String ip = propt.get("ip");
|
|
|
String url = ip + "/gateway/iit/declare/declareEmployeeInfo";
|
|
|
- logger.error("===请求参数==" + postBody + "========");
|
|
|
+ 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)) {
|
|
|
@@ -433,11 +435,11 @@ public class TaxPersonRecordListHandlerEx extends TaxPersonRecordListHandler {
|
|
|
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);
|
|
|
+ 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);
|
|
|
+ logger.info("--------->>>>>鏇存柊閾惰�鍗″彿鐘舵€侊細recordSql:" + recordSql + "------>>>>recordParamsList:" + recordParamsList);
|
|
|
arrayList.add(taskId);
|
|
|
}
|
|
|
}
|
|
|
@@ -445,7 +447,7 @@ public class TaxPersonRecordListHandlerEx extends TaxPersonRecordListHandler {
|
|
|
}
|
|
|
} catch (Exception var28) {
|
|
|
logger.error(var28.getMessage(), var28);
|
|
|
- logger.error("------------>>>>捕获异常:" + var28.getMessage());
|
|
|
+ logger.error("------------>>>>鎹曡幏寮傚父锛�" + var28.getMessage());
|
|
|
throw new BOSException(var28.getMessage(), var28);
|
|
|
}
|
|
|
}
|
|
|
@@ -470,24 +472,24 @@ public class TaxPersonRecordListHandlerEx extends TaxPersonRecordListHandler {
|
|
|
FilterInfo filter = defaultEntityViewInfo.getFilter();
|
|
|
HttpSession session = request.getSession();
|
|
|
EntityViewInfo sessionEV = null;
|
|
|
+ Context ctx = SHRContext.getInstance().getContext();
|
|
|
try {
|
|
|
sessionEV = new EntityViewInfo((String) session.getAttribute("queryFilter"));
|
|
|
FilterInfo filterInfo = new FilterInfo();
|
|
|
- filterInfo.getFilterItems().add(new FilterItemInfo("person.id in(" + this.getSCmpCalTablePersonsSql(request, null, null) + ")"));
|
|
|
+ //String sql = SHRPermissionWebUtils.getCurrentRequestAdminOrgRangeSQL(request);
|
|
|
+
|
|
|
+ filterInfo.getFilterItems().add(new FilterItemInfo("person.id in(" + this.getSCmpCalTablePersonsSql(request, null, null,ctx) + ")"));
|
|
|
if (FilterUtility.hasFilterItem(sessionEV.getFilter())) {
|
|
|
sessionEV.getFilter().mergeFilter(filterInfo, "AND");
|
|
|
-
|
|
|
} else {
|
|
|
sessionEV.setFilter(filterInfo);
|
|
|
-
|
|
|
}
|
|
|
FilterInfo filterInfo2 = new FilterInfo();
|
|
|
- filterInfo2.getFilterItems().add(new FilterItemInfo("person.id in(" + this.getSCmpCalTablePersonsSql(request, null, null) + ")"));
|
|
|
+ filterInfo2.getFilterItems().add(new FilterItemInfo("person.id in(" + this.getSCmpCalTablePersonsSql(request, null, null,ctx) + ")"));
|
|
|
if (FilterUtility.hasFilterItem(filter)) {
|
|
|
defaultEntityViewInfo.getFilter().mergeFilter(filterInfo2, "AND");
|
|
|
} else {
|
|
|
defaultEntityViewInfo.setFilter(filterInfo2);
|
|
|
-
|
|
|
}
|
|
|
session.setAttribute("queryFilter", sessionEV.toString());
|
|
|
} catch (ParserException e) {
|
|
|
@@ -498,17 +500,17 @@ public class TaxPersonRecordListHandlerEx extends TaxPersonRecordListHandler {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 获取薪酬核算人员
|
|
|
- *
|
|
|
- * @param year 统计年
|
|
|
- * @param month 统计月
|
|
|
- * @param request 纳税单位
|
|
|
+ * 鑾峰彇钖�叕鏍哥畻浜哄憳
|
|
|
+ * 瑕佹牴鎹�綋鍓嶅憳宸ヨ�鏀跨粍缁囪寖鍥寸殑钖�叕鏍哥畻鐨勭粍缁囧�鑷存參杩囨护
|
|
|
+ * @param year 缁熻�骞�
|
|
|
+ * @param month 缁熻�鏈�
|
|
|
+ * @param request 绾崇◣鍗曚綅
|
|
|
*/
|
|
|
- public String getSCmpCalTablePersonsSql(HttpServletRequest request, Integer year, Integer month) throws SHRWebException {
|
|
|
+ public String getSCmpCalTablePersonsSql(HttpServletRequest request, Integer year, Integer month,Context ctx) throws SHRWebException {
|
|
|
String userAdminOrgRangeSql = this.assembleTreeDataUserAdminOrgRangeSQL(request);
|
|
|
StringBuilder sb = new StringBuilder();
|
|
|
sb.append("SELECT").append("\n");
|
|
|
- sb.append("FPersonID as personId").append("\n");
|
|
|
+ sb.append(" DISTINCT FPersonID as personId").append("\n");
|
|
|
sb.append("FROM T_HR_SCmpCalTable").append("\n");
|
|
|
sb.append("WHERE").append("\n");
|
|
|
if (null != year && null != month) {
|
|
|
@@ -517,8 +519,14 @@ public class TaxPersonRecordListHandlerEx extends TaxPersonRecordListHandler {
|
|
|
sb.append("FPeriodMonth = '").append(month).append("'").append("\n");
|
|
|
sb.append(" and ").append("\n");
|
|
|
}
|
|
|
- sb.append("FADMINORGUNITID in (").append(userAdminOrgRangeSql).append(")").append("\n");
|
|
|
- sb.append("group by FPersonID ").append("\n");
|
|
|
+ String sql = CmpTaxUnitPermFilter.getCurPersonPermTaxUnitSql(ctx);
|
|
|
+ String inRange = "''";
|
|
|
+ if (!"".equals(sql)) {
|
|
|
+ sb.append("FTAXUNITID in ("+sql+")").append("\n");
|
|
|
+ sb.append(" and ").append("\n");
|
|
|
+ }
|
|
|
+ sb.append(" CFCalOrgUnitId in (").append(userAdminOrgRangeSql).append(")").append("\n");
|
|
|
+ //sb.append("group by FPersonID ").append("\n");
|
|
|
return sb.toString();
|
|
|
}
|
|
|
|
|
|
@@ -606,7 +614,7 @@ public class TaxPersonRecordListHandlerEx extends TaxPersonRecordListHandler {
|
|
|
}
|
|
|
|
|
|
public String personnelReportAction(HttpServletRequest request, HttpServletResponse response, ModelMap modelMap) throws SHRWebException {
|
|
|
- logger.error("==进入到==com.kingdee.eas.custom.shuiyou.TaxUnitListHandlerEx.personnelReportAction=====================");
|
|
|
+ logger.error("==杩涘叆鍒�==com.kingdee.eas.custom.shuiyou.TaxUnitListHandlerEx.personnelReportAction=====================");
|
|
|
Context context = SHRContext.getInstance().getContext();
|
|
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
Map<String, Object> returnMap = new HashMap<String, Object>();
|
|
|
@@ -623,23 +631,23 @@ public class TaxPersonRecordListHandlerEx extends TaxPersonRecordListHandler {
|
|
|
for (int i = 0; i < taxUnitCollection.size(); i++) {
|
|
|
TaxUnitInfo taxUnitInfo = taxUnitCollection.get(i);
|
|
|
String bizNo = UUID.randomUUID().toString().replace("-", "");
|
|
|
- String qymc = taxUnitInfo.getName();//企业名称
|
|
|
- String mmlx = "0";//密码类型 0表示申报密码;2表示实名账号实名密码
|
|
|
- String smzh = "";//实名账号
|
|
|
- String smmm = "";//实名密码
|
|
|
- String jmsmmm = "";//加密实名密码
|
|
|
+ String qymc = taxUnitInfo.getName();//浼佷笟鍚嶇О
|
|
|
+ String mmlx = "0";//瀵嗙爜绫诲瀷 0琛ㄧず鐢虫姤瀵嗙爜锛�2琛ㄧず瀹炲悕璐﹀彿瀹炲悕瀵嗙爜
|
|
|
+ String smzh = "";//瀹炲悕璐﹀彿
|
|
|
+ String smmm = "";//瀹炲悕瀵嗙爜
|
|
|
+ String jmsmmm = "";//鍔犲瘑瀹炲悕瀵嗙爜
|
|
|
String sbmm = "";
|
|
|
if (taxUnitInfo.getDeclPassword() != null && !"".equals(taxUnitInfo.getDeclPassword())) {
|
|
|
byte[] decode = Base64.getDecoder().decode(taxUnitInfo.getDeclPassword());
|
|
|
- sbmm = new String(decode);//;//申报密码
|
|
|
+ sbmm = new String(decode);//;//鐢虫姤瀵嗙爜
|
|
|
}
|
|
|
- String jmsbmm = "";//申报密码加密
|
|
|
- String djxhid = taxUnitInfo.getRegNumber();//登记序号
|
|
|
- String nsrsbh = taxUnitInfo.getTaxNumber();//税号
|
|
|
- String areaid = taxUnitInfo.getAreaCode();//地区编码
|
|
|
- String bmbh = "";//部门编号
|
|
|
- String bmmc = "";//部门编码
|
|
|
- String skssq = taxPeriodDate;//所属期 ----还不知道怎么定这个东西
|
|
|
+ String jmsbmm = "";//鐢虫姤瀵嗙爜鍔犲瘑
|
|
|
+ String djxhid = taxUnitInfo.getRegNumber();//鐧昏�搴忓彿
|
|
|
+ String nsrsbh = taxUnitInfo.getTaxNumber();//绋庡彿
|
|
|
+ String areaid = taxUnitInfo.getAreaCode();//鍦板尯缂栫爜
|
|
|
+ String bmbh = "";//閮ㄩ棬缂栧彿
|
|
|
+ String bmmc = "";//閮ㄩ棬缂栫爜
|
|
|
+ String skssq = taxPeriodDate;//鎵€灞炴湡 ----杩樹笉鐭ラ亾鎬庝箞瀹氳繖涓�笢瑗�
|
|
|
String lzrqcl = "";
|
|
|
JSONObject postBody = new JSONObject();
|
|
|
postBody.put("bizNo", bizNo);
|
|
|
@@ -679,99 +687,99 @@ public class TaxPersonRecordListHandlerEx extends TaxPersonRecordListHandler {
|
|
|
personInfo = new JSONObject();
|
|
|
TaxPersonRecordEntryInfo taxPersonRecordEntryInfo = taxPersonRecordEntrys.get(j);
|
|
|
TaxPersonRecordInfo bill = taxPersonRecordEntryInfo.getBill();
|
|
|
- String xm = bill.getReportName();//姓名
|
|
|
- String zzlx = bill.getCardType().getAlias();//证件类型
|
|
|
- String zzhm = bill.getCardNumber();//证件号码
|
|
|
- String s = cardTypeReflection(zzlx);//证件类型
|
|
|
+ String xm = bill.getReportName();//濮撳悕
|
|
|
+ String zzlx = bill.getCardType().getAlias();//璇佷欢绫诲瀷
|
|
|
+ String zzhm = bill.getCardNumber();//璇佷欢鍙风爜
|
|
|
+ String s = cardTypeReflection(zzlx);//璇佷欢绫诲瀷
|
|
|
Boolean cardType = isCardType(s);
|
|
|
- String qtzzlx = "";//其他证件类型
|
|
|
- String qtzzhm = "";//其他证件号码
|
|
|
+ String qtzzlx = "";//鍏朵粬璇佷欢绫诲瀷
|
|
|
+ String qtzzhm = "";//鍏朵粬璇佷欢鍙风爜
|
|
|
if (cardType) {
|
|
|
- qtzzlx = cardTypeReflection(bill.getOtherCardType().getAlias());//其他证件类型
|
|
|
- qtzzhm = bill.getOtherCardNumber();//其他证件号码
|
|
|
+ qtzzlx = cardTypeReflection(bill.getOtherCardType().getAlias());//鍏朵粬璇佷欢绫诲瀷
|
|
|
+ qtzzhm = bill.getOtherCardNumber();//鍏朵粬璇佷欢鍙风爜
|
|
|
}
|
|
|
- String bmbh1 = "";//部门编码
|
|
|
- String rybscl = "";//人员报送策略
|
|
|
- String gh = "";//工号
|
|
|
- String skssq1 = taxPeriodDate;//所属期
|
|
|
- String lxdh = bill.getPhoneNumber(); //电话
|
|
|
- String nsrzt = taxPersonRecordEntryInfo.getPersonStatus().getValue();//人员状态
|
|
|
- String sfgy = taxPersonRecordEntryInfo.getEmployedType().getAlias();//任职受雇类型
|
|
|
- String rzndjyqk = "";//入职年度就业情形
|
|
|
- String rzsgrq = "";//受雇日期
|
|
|
- if ("雇员、保险营销员、证券经纪人".indexOf(sfgy) >= 0) {
|
|
|
+ String bmbh1 = "";//閮ㄩ棬缂栫爜
|
|
|
+ String rybscl = "";//浜哄憳鎶ラ€佺瓥鐣�
|
|
|
+ String gh = "";//宸ュ彿
|
|
|
+ String skssq1 = taxPeriodDate;//鎵€灞炴湡
|
|
|
+ String lxdh = bill.getPhoneNumber(); //鐢佃瘽
|
|
|
+ String nsrzt = taxPersonRecordEntryInfo.getPersonStatus().getValue();//浜哄憳鐘舵€�
|
|
|
+ String sfgy = taxPersonRecordEntryInfo.getEmployedType().getAlias();//浠昏亴鍙楅泧绫诲瀷
|
|
|
+ String rzndjyqk = "";//鍏ヨ亴骞村害灏变笟鎯呭舰
|
|
|
+ String rzsgrq = "";//鍙楅泧鏃ユ湡
|
|
|
+ if ("闆囧憳銆佷繚闄╄惀閿€鍛樸€佽瘉鍒哥粡绾�汉".indexOf(sfgy) >= 0) {
|
|
|
Date employedDate = taxPersonRecordEntryInfo.getEmployedDate();
|
|
|
rzsgrq = simpleDateFormat.format(employedDate);
|
|
|
}
|
|
|
- String xb = bill.getGender().getAlias();//性别
|
|
|
- String csny = simpleDateFormat.format(bill.getBirthday());//出生日期
|
|
|
- String gj = NationalityFactory.getLocalInstance(context).getNationalityInfo(new ObjectUuidPK(bill.getNationality().getId())).getName();//国际
|
|
|
- String rydq = bill.getIsOversea().getAlias();//是否境内
|
|
|
- if (rydq.equals("否")) {
|
|
|
- rydq = "境内";
|
|
|
+ String xb = bill.getGender().getAlias();//鎬у埆
|
|
|
+ String csny = simpleDateFormat.format(bill.getBirthday());//鍑虹敓鏃ユ湡
|
|
|
+ String gj = NationalityFactory.getLocalInstance(context).getNationalityInfo(new ObjectUuidPK(bill.getNationality().getId())).getName();//鍥介檯
|
|
|
+ String rydq = bill.getIsOversea().getAlias();//鏄�惁澧冨唴
|
|
|
+ if (rydq.equals("鍚�")) {
|
|
|
+ rydq = "澧冨唴";
|
|
|
} else {
|
|
|
- rydq = "境外";
|
|
|
+ rydq = "澧冨�";
|
|
|
}
|
|
|
- String lzrq = "";//离职日期
|
|
|
+ String lzrq = "";//绂昏亴鏃ユ湡
|
|
|
if (nsrzt.equals("0")) {
|
|
|
lzrq = simpleDateFormat.format(taxPersonRecordEntryInfo.getDepartureDate());
|
|
|
}
|
|
|
- BigDecimal grgbbl = bill.getInvestmentRate();//个人投资总额
|
|
|
- BigDecimal grgbze = bill.getInvestmentTotal();//个人投资比例
|
|
|
- String sfcj = bill.isIsDisability() ? "是" : "否";
|
|
|
- String cjzjlx = "";//残疾证件类型
|
|
|
- String cjzh = "";//残疾证号
|
|
|
- if ("是".equals(sfcj)) {
|
|
|
- cjzjlx = "";// 系统没有需要加
|
|
|
+ BigDecimal grgbbl = bill.getInvestmentRate();//涓�汉鎶曡祫鎬婚�
|
|
|
+ BigDecimal grgbze = bill.getInvestmentTotal();//涓�汉鎶曡祫姣斾緥
|
|
|
+ String sfcj = bill.isIsDisability() ? "鏄�" : "鍚�";
|
|
|
+ String cjzjlx = "";//娈嬬柧璇佷欢绫诲瀷
|
|
|
+ String cjzh = "";//娈嬬柧璇佸彿
|
|
|
+ if ("鏄�".equals(sfcj)) {
|
|
|
+ cjzjlx = "";// 绯荤粺娌℃湁闇€瑕佸姞
|
|
|
cjzh = bill.getDisCardNumber();
|
|
|
}
|
|
|
- String sfls = bill.isIsHero() ? "是" : "否";
|
|
|
+ String sfls = bill.isIsHero() ? "鏄�" : "鍚�";
|
|
|
String lszh = "";
|
|
|
- if ("是".equals(sfls)) {
|
|
|
+ if ("鏄�".equals(sfls)) {
|
|
|
lszh = bill.getHeroCardNumber();
|
|
|
}
|
|
|
- String sfgl = ""; //是否孤老
|
|
|
- String sfzdw = "";//是否扣除减除费用
|
|
|
- String dzyx = "";//邮箱
|
|
|
+ String sfgl = ""; //鏄�惁瀛よ€�
|
|
|
+ String sfzdw = "";//鏄�惁鎵i櫎鍑忛櫎璐圭敤
|
|
|
+ String dzyx = "";//閭��
|
|
|
String xl = "";
|
|
|
- String zw = "";// 职务
|
|
|
- String khyh = "";// 开户银行
|
|
|
- String khyhsfmz = "";// 开户银行省份
|
|
|
- String yhzh = "";// 银行账号
|
|
|
- String lxdz_sheng = "";// 居住省份
|
|
|
- String lxdz_shi = "";// 居住城市
|
|
|
- String lxdz_qx = "";// 居住区县
|
|
|
- String lxdz_jd = "";// 居住街道
|
|
|
- String lxdz = "";// 居住详细地址
|
|
|
- String hjszd_sheng = "";// 户籍省份
|
|
|
- String hjszd_shi = "";// 户籍城市
|
|
|
- String hjszd_qx = "";// 户籍区县
|
|
|
- String hjszd_jd = "";// 户籍街道
|
|
|
- String hjszd_xxdz = "";// 户籍详细地址
|
|
|
- String bz = "";// 备注
|
|
|
+ String zw = "";// 鑱屽姟
|
|
|
+ String khyh = "";// 寮€鎴烽摱琛�
|
|
|
+ String khyhsfmz = "";// 寮€鎴烽摱琛岀渷浠�
|
|
|
+ String yhzh = "";// 閾惰�璐﹀彿
|
|
|
+ String lxdz_sheng = "";// 灞呬綇鐪佷唤
|
|
|
+ String lxdz_shi = "";// 灞呬綇鍩庡競
|
|
|
+ String lxdz_qx = "";// 灞呬綇鍖哄幙
|
|
|
+ String lxdz_jd = "";// 灞呬綇琛楅亾
|
|
|
+ String lxdz = "";// 灞呬綇璇︾粏鍦板潃
|
|
|
+ String hjszd_sheng = "";// 鎴风睄鐪佷唤
|
|
|
+ String hjszd_shi = "";// 鎴风睄鍩庡競
|
|
|
+ String hjszd_qx = "";// 鎴风睄鍖哄幙
|
|
|
+ String hjszd_jd = "";// 鎴风睄琛楅亾
|
|
|
+ String hjszd_xxdz = "";// 鎴风睄璇︾粏鍦板潃
|
|
|
+ String bz = "";// 澶囨敞
|
|
|
String csd = "";
|
|
|
String sssx = "";
|
|
|
- if (gj.indexOf("中国") < 0) {
|
|
|
+ if (gj.indexOf("涓�浗") < 0) {
|
|
|
logger.error(JSONObject.toJSONString(bill.getBirthPlace()));
|
|
|
logger.error(bill.getBirthPlace().getId());
|
|
|
csd = BirthplaceFactory.getLocalInstance(context).
|
|
|
getBirthplaceInfo(new ObjectUuidPK(bill.getBirthPlace().getId())).getName();
|
|
|
sssx = bill.getTaxReason().getAlias();
|
|
|
}
|
|
|
- String ss = "港澳居民来往内地通行证、港澳居民居住证、台湾居民来往大陆通行证、台湾居民居住证、外国护照、外国人永久居留身份证、外国人来华工作许可证A、外国人来华工作许可证B、外国人来华工作许可证C时";
|
|
|
+ String ss = "娓�境灞呮皯鏉ュ線鍐呭湴閫氳�璇併€佹腐婢冲眳姘戝眳浣忚瘉銆佸彴婀惧眳姘戞潵寰€澶ч檰閫氳�璇併€佸彴婀惧眳姘戝眳浣忚瘉銆佸�鍥芥姢鐓с€佸�鍥戒汉姘镐箙灞呯暀韬�唤璇併€佸�鍥戒汉鏉ュ崕宸ヤ綔璁稿彲璇丄銆佸�鍥戒汉鏉ュ崕宸ヤ綔璁稿彲璇丅銆佸�鍥戒汉鏉ュ崕宸ヤ綔璁稿彲璇丆鏃�";
|
|
|
String scrjsj = "";
|
|
|
String yjljsj = "";
|
|
|
if (ss.indexOf(s) >= 0) {
|
|
|
scrjsj = simpleDateFormat.format(bill.getEntryDate());
|
|
|
yjljsj = simpleDateFormat.format(bill.getLeaveDate());
|
|
|
}
|
|
|
- String wjrlxdz_sheng = "";// 联系地省份
|
|
|
- String wjrlxdz_shi = "";// 联系地城市
|
|
|
- String wjrlxdz_qx = "";// 联系地区县
|
|
|
- String wjrlxdz_jd = "";// 联系地街道
|
|
|
- String wjrlxdz_xxdz = "";// 联系地详细地址
|
|
|
- String xmzw = "";// 中文名
|
|
|
- ss = "外国护照、外国人永久居留身份证、外国人工作许可证(A类)、外国人工作许可证(B类)、外国人工作许可证(C类)";
|
|
|
+ String wjrlxdz_sheng = "";// 鑱旂郴鍦扮渷浠�
|
|
|
+ String wjrlxdz_shi = "";// 鑱旂郴鍦板煄甯�
|
|
|
+ String wjrlxdz_qx = "";// 鑱旂郴鍦板尯鍘�
|
|
|
+ String wjrlxdz_jd = "";// 鑱旂郴鍦拌�閬�
|
|
|
+ String wjrlxdz_xxdz = "";// 鑱旂郴鍦拌�缁嗗湴鍧€
|
|
|
+ String xmzw = "";// 涓�枃鍚�
|
|
|
+ ss = "澶栧浗鎶ょ収銆佸�鍥戒汉姘镐箙灞呯暀韬�唤璇併€佸�鍥戒汉宸ヤ綔璁稿彲璇侊紙A绫伙級銆佸�鍥戒汉宸ヤ綔璁稿彲璇侊紙B绫伙級銆佸�鍥戒汉宸ヤ綔璁稿彲璇侊紙C绫伙級";
|
|
|
if (ss.indexOf(s) < 0) {
|
|
|
xmzw = bill.getChineseName();
|
|
|
}
|
|
|
@@ -786,9 +794,9 @@ public class TaxPersonRecordListHandlerEx extends TaxPersonRecordListHandler {
|
|
|
personInfo.put("skssq", skssq1);
|
|
|
personInfo.put("lxdh", lxdh);
|
|
|
if (nsrzt.equals("1")) {
|
|
|
- nsrzt = "正常";
|
|
|
+ nsrzt = "姝e父";
|
|
|
} else {
|
|
|
- nsrzt = "非正常";
|
|
|
+ nsrzt = "闈炴�甯�";
|
|
|
}
|
|
|
personInfo.put("nsrzt", nsrzt);
|
|
|
personInfo.put("sfgy", sfgy);
|
|
|
@@ -841,16 +849,16 @@ public class TaxPersonRecordListHandlerEx extends TaxPersonRecordListHandler {
|
|
|
postBody.put("rylb", rylb);
|
|
|
String ip = propt.get("ip");
|
|
|
String url = ip + "/gateway/iit/declare/declareEmployeeInfo";
|
|
|
- logger.error("===请求参数==" + postBody + "========");
|
|
|
+ logger.error("===璇锋眰鍙傛暟==" + postBody + "========");
|
|
|
|
|
|
String post = localInstance.post(url, postBody.toJSONString());
|
|
|
System.out.println(post);
|
|
|
JSONObject postJSON = JSONObject.parseObject(post);
|
|
|
- //校验 请求是否成功
|
|
|
+ //鏍¢獙 璇锋眰鏄�惁鎴愬姛
|
|
|
JSONObject head = postJSON.getJSONObject("head");
|
|
|
if (head.getString("status").equals("N")) {
|
|
|
returnMap.put("code", 500);
|
|
|
- returnMap.put("error", "请求失败");
|
|
|
+ returnMap.put("error", "璇锋眰澶辫触");
|
|
|
JSONUtils.SUCCESS(returnMap);
|
|
|
return null;
|
|
|
}
|
|
|
@@ -858,10 +866,10 @@ public class TaxPersonRecordListHandlerEx extends TaxPersonRecordListHandler {
|
|
|
String string = body.getString("requestId");
|
|
|
|
|
|
String s = localInstance.addTask("personnelReportService", JSONUtil.toJsonStr(body), TaskCatalogEnum.PERSON, null);
|
|
|
- logger.error("返回参数:" + post);
|
|
|
- logger.error("返回参数:" + s);
|
|
|
+ logger.error("杩斿洖鍙傛暟锛�" + post);
|
|
|
+ logger.error("杩斿洖鍙傛暟锛�" + s);
|
|
|
returnMap.put("code", 200);
|
|
|
- returnMap.put("info", "报送成功");
|
|
|
+ returnMap.put("info", "鎶ラ€佹垚鍔�");
|
|
|
JSONUtils.SUCCESS(returnMap);
|
|
|
}
|
|
|
|
|
|
@@ -877,34 +885,34 @@ public class TaxPersonRecordListHandlerEx extends TaxPersonRecordListHandler {
|
|
|
|
|
|
public String cardTypeReflection(String cardTypeName) {
|
|
|
switch (cardTypeName) {
|
|
|
- case "居民身份证":
|
|
|
- return "居民身份证";
|
|
|
- case "中国护照":
|
|
|
- return "中国护照";
|
|
|
- case "港澳居民来往内地通行证":
|
|
|
- return "港澳居民来往内地通行证";
|
|
|
- case "中华人民共和国港澳居民居住证":
|
|
|
- return "港澳居民来往内地通行证";
|
|
|
- case "台湾居民来往大陆通行证":
|
|
|
- return "台湾居民来往大陆通行证";
|
|
|
- case "中华人民共和国台湾居民居住证":
|
|
|
- return "台湾居民居住证";
|
|
|
- case "外国护照":
|
|
|
- return "外国护照";
|
|
|
- case "外国人永久居留身份证":
|
|
|
- return "外国人永久居留身份证";
|
|
|
- case "中华人民共和国外国人工作许可证(A类)":
|
|
|
- return "外国人工作许可证(A类)";
|
|
|
- case "中华人民共和国外国人工作许可证(B类)":
|
|
|
- return "外国人工作许可证(B类)";
|
|
|
- case "中华人民共和国外国人工作许可证(C类)":
|
|
|
- return "外国人工作许可证(C类)";
|
|
|
+ case "灞呮皯韬�唤璇�":
|
|
|
+ return "灞呮皯韬�唤璇�";
|
|
|
+ case "涓�浗鎶ょ収":
|
|
|
+ return "涓�浗鎶ょ収";
|
|
|
+ case "娓�境灞呮皯鏉ュ線鍐呭湴閫氳�璇�":
|
|
|
+ return "娓�境灞呮皯鏉ュ線鍐呭湴閫氳�璇�";
|
|
|
+ case "涓�崕浜烘皯鍏卞拰鍥芥腐婢冲眳姘戝眳浣忚瘉":
|
|
|
+ return "娓�境灞呮皯鏉ュ線鍐呭湴閫氳�璇�";
|
|
|
+ case "鍙版咕灞呮皯鏉ュ線澶ч檰閫氳�璇�":
|
|
|
+ return "鍙版咕灞呮皯鏉ュ線澶ч檰閫氳�璇�";
|
|
|
+ case "涓�崕浜烘皯鍏卞拰鍥藉彴婀惧眳姘戝眳浣忚瘉":
|
|
|
+ return "鍙版咕灞呮皯灞呬綇璇�";
|
|
|
+ case "澶栧浗鎶ょ収":
|
|
|
+ return "澶栧浗鎶ょ収";
|
|
|
+ case "澶栧浗浜烘案涔呭眳鐣欒韩浠借瘉":
|
|
|
+ return "澶栧浗浜烘案涔呭眳鐣欒韩浠借瘉";
|
|
|
+ case "涓�崕浜烘皯鍏卞拰鍥藉�鍥戒汉宸ヤ綔璁稿彲璇侊紙A绫伙級":
|
|
|
+ return "澶栧浗浜哄伐浣滆�鍙�瘉锛圓绫伙級";
|
|
|
+ case "涓�崕浜烘皯鍏卞拰鍥藉�鍥戒汉宸ヤ綔璁稿彲璇侊紙B绫伙級":
|
|
|
+ return "澶栧浗浜哄伐浣滆�鍙�瘉锛圔绫伙級";
|
|
|
+ case "涓�崕浜烘皯鍏卞拰鍥藉�鍥戒汉宸ヤ綔璁稿彲璇侊紙C绫伙級":
|
|
|
+ return "澶栧浗浜哄伐浣滆�鍙�瘉锛圕绫伙級";
|
|
|
}
|
|
|
return "";
|
|
|
}
|
|
|
|
|
|
public Boolean isCardType(String cardType) {
|
|
|
- String cardTypes = "港澳居民居住证,台湾居民居住证,外国人永久居留身份证,外国人工作许可证(A类),外国人工作许可证(B类),外国人工作许可证(C类)";
|
|
|
+ String cardTypes = "娓�境灞呮皯灞呬綇璇�,鍙版咕灞呮皯灞呬綇璇�,澶栧浗浜烘案涔呭眳鐣欒韩浠借瘉,澶栧浗浜哄伐浣滆�鍙�瘉锛圓绫伙級,澶栧浗浜哄伐浣滆�鍙�瘉锛圔绫伙級,澶栧浗浜哄伐浣滆�鍙�瘉锛圕绫伙級";
|
|
|
if (cardTypes.indexOf(cardType) >= 0) {
|
|
|
return true;
|
|
|
} else {
|
|
|
@@ -913,8 +921,8 @@ public class TaxPersonRecordListHandlerEx extends TaxPersonRecordListHandler {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * todo 薪酬核算关联人员纳税信息
|
|
|
- * 同步人员纳税信息
|
|
|
+ * todo 钖�叕鏍哥畻鍏宠仈浜哄憳绾崇◣淇℃伅
|
|
|
+ * 鍚屾�浜哄憳绾崇◣淇℃伅
|
|
|
*
|
|
|
* @param request
|
|
|
* @param response
|
|
|
@@ -927,10 +935,10 @@ public class TaxPersonRecordListHandlerEx extends TaxPersonRecordListHandler {
|
|
|
String yearMonth = (String) request.getParameter("yearMonth");
|
|
|
String mack = (String) request.getParameter("mack");
|
|
|
if (StringUtils.isEmpty(taxUnitIds)) {
|
|
|
- throw new ShrWebBizException("纳税单位不可为空!!");
|
|
|
+ throw new ShrWebBizException("绾崇◣鍗曚綅涓嶅彲涓虹┖!!");
|
|
|
}
|
|
|
if (StringUtils.isEmpty(yearMonth)) {
|
|
|
- throw new ShrWebBizException("所属年月不可为空!!");
|
|
|
+ throw new ShrWebBizException("鎵€灞炲勾鏈堜笉鍙�负绌�!!");
|
|
|
}
|
|
|
try {
|
|
|
Context ctx = SHRContext.getInstance().getContext();
|
|
|
@@ -938,7 +946,7 @@ public class TaxPersonRecordListHandlerEx extends TaxPersonRecordListHandler {
|
|
|
IPerson iPerson = PersonFactory.getLocalInstance(ctx);
|
|
|
|
|
|
ITaxPersonRecordEntry iTaxPersonRecordEntry = TaxPersonRecordEntryFactory.getLocalInstance(ctx);
|
|
|
- //截取日期年月
|
|
|
+ //鎴�彇鏃ユ湡骞存湀
|
|
|
String[] parts = yearMonth.split("-");
|
|
|
int year = Integer.parseInt(parts[0]);
|
|
|
int month = Integer.parseInt(parts[1]);
|
|
|
@@ -964,32 +972,32 @@ public class TaxPersonRecordListHandlerEx extends TaxPersonRecordListHandler {
|
|
|
for (String taxUnitId : taxUnitIdArray) {
|
|
|
//IRowSet rsAlike = DbUtil.executeQuery(ctx,this.getSCmpCalTablePersonsSqlAlike(year,month,taxUnitId));
|
|
|
//if("AndNew".equals(mack)) {
|
|
|
- //新增
|
|
|
+ //鏂板�
|
|
|
IRowSet rsAndNew = DbUtil.executeQuery(ctx, this.getSCmpCalTablePersonsSqlAndNew(year, month, taxUnitId));
|
|
|
while (rsAndNew.next()) {
|
|
|
String person = rsAndNew.getString("FPERSONID");
|
|
|
String scctId = rsAndNew.getString("scctId");
|
|
|
PersonInfo personInfo = iPerson.getPersonInfo(new ObjectUuidPK(person), sic);
|
|
|
- //保存
|
|
|
+ //淇濆瓨
|
|
|
this.setTaxPersonRecordAndNew(personInfo, taxUnitId, yearMonth, oneDay, iTaxPersonRecord, iTaxPersonRecordEntry,scctId);
|
|
|
}
|
|
|
//}
|
|
|
// if("Del".equals(mack)) {
|
|
|
- //删除
|
|
|
+ //鍒犻櫎
|
|
|
IRowSet rsDel = DbUtil.executeQuery(ctx, this.getSCmpCalTablePersonsSqlDel(year, month, taxUnitId));
|
|
|
while (rsDel.next()) {
|
|
|
String person = rsDel.getString("FPERSONID");
|
|
|
PersonInfo personInfo = iPerson.getPersonInfo(new ObjectUuidPK(person), sic);
|
|
|
String rentryId = rsDel.getString("rentryId");
|
|
|
- //变更
|
|
|
+ //鍙樻洿
|
|
|
this.setTaxPersonRecordDel(rentryId, oneDay, iTaxPersonRecordEntry);
|
|
|
}
|
|
|
// }
|
|
|
}
|
|
|
- //第二遍处理变更
|
|
|
+ //绗�簩閬嶅�鐞嗗彉鏇�
|
|
|
for (String taxUnitId : taxUnitIdArray) {
|
|
|
//if("Alter".equals(mack)) {
|
|
|
- //变更
|
|
|
+ //鍙樻洿
|
|
|
IRowSet rsAlter = DbUtil.executeQuery(ctx, this.getSCmpCalTablePersonsSqlAlter(year, month, taxUnitId));
|
|
|
while (rsAlter.next()) {
|
|
|
String person = rsAlter.getString("FPERSONID");
|
|
|
@@ -998,7 +1006,7 @@ public class TaxPersonRecordListHandlerEx extends TaxPersonRecordListHandler {
|
|
|
String scctId = rsAlter.getString("scctId");
|
|
|
String rentryId = rsAlter.getString("rentryId");
|
|
|
String FBILLID = rsAlter.getString("FBILLID");
|
|
|
- //判断是否存在
|
|
|
+ //鍒ゆ柇鏄�惁瀛樺湪
|
|
|
StringBuilder sel = new StringBuilder();
|
|
|
sel.append(" select fid from T_HR_STAXPERSONRECORDENTRY ");
|
|
|
sel.append(" where fpersonid='" + person + "' and FTaxUnitID ='" + scctTaxUnitID + "' and FPERSONSTATUS=1 ");
|
|
|
@@ -1017,8 +1025,8 @@ public class TaxPersonRecordListHandlerEx extends TaxPersonRecordListHandler {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 离职状态
|
|
|
- * 在核算表里没查到该员工,在当前列表中能查到该员工,此情况为员工当月离职,处理逻辑为,把当前列表中状态为正常的这条数据做离职处理,状态改成非正常,离职日期为同步人员信息时选择月份的下个月月末
|
|
|
+ * 绂昏亴鐘舵€�
|
|
|
+ * 鍦ㄦ牳绠楄〃閲屾病鏌ュ埌璇ュ憳宸ワ紝鍦ㄥ綋鍓嶅垪琛ㄤ腑鑳芥煡鍒拌�鍛樺伐锛屾�鎯呭喌涓哄憳宸ュ綋鏈堢�鑱岋紝澶勭悊閫昏緫涓猴紝鎶婂綋鍓嶅垪琛ㄤ腑鐘舵€佷负姝e父鐨勮繖鏉℃暟鎹�仛绂昏亴澶勭悊锛岀姸鎬佹敼鎴愰潪姝e父锛岀�鑱屾棩鏈熶负鍚屾�浜哄憳淇℃伅鏃堕€夋嫨鏈堜唤鐨勪笅涓�湀鏈堟湯
|
|
|
*
|
|
|
* @param rentryId
|
|
|
* @param oneDay
|
|
|
@@ -1028,7 +1036,7 @@ public class TaxPersonRecordListHandlerEx extends TaxPersonRecordListHandler {
|
|
|
*/
|
|
|
public void setTaxPersonRecordDel(String rentryId, Date oneDay,
|
|
|
ITaxPersonRecordEntry iTaxPersonRecordEntry) throws EASBizException, BOSException {
|
|
|
- //变更
|
|
|
+ //鍙樻洿
|
|
|
SelectorItemCollection sics = new SelectorItemCollection();
|
|
|
sics.add("submitStatus");
|
|
|
sics.add("departureDate");
|
|
|
@@ -1040,7 +1048,7 @@ public class TaxPersonRecordListHandlerEx extends TaxPersonRecordListHandler {
|
|
|
entryInfo.setSubmitStatus(SubmitStatusEnum.NotSubmit);
|
|
|
Calendar departureDate = Calendar.getInstance();
|
|
|
departureDate.setTime(oneDay);
|
|
|
- departureDate.add(Calendar.MONTH, 1);
|
|
|
+ //departureDate.add(Calendar.MONTH, 1);
|
|
|
departureDate.add(Calendar.DAY_OF_MONTH, -1);
|
|
|
entryInfo.setDepartureDate(departureDate.getTime());
|
|
|
entryInfo.setPersonStatus(PersonStatusEnum.NotNormal);
|
|
|
@@ -1048,60 +1056,60 @@ public class TaxPersonRecordListHandlerEx extends TaxPersonRecordListHandler {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 纳税单位不一致,说明员工发生了调动,此时,需要把当前列表中状态为正常的这条数据做离职处理,状态改成非正常,离职日期为同步人员信息时选择月份的下个月月末,并且新增一条纳税单位为
|
|
|
- * 同步人员信息时选择的纳税单位下的纳税人员信息,受雇从业开始时间为同步人员信息时选择月份的下个月一号
|
|
|
+ * 绾崇◣鍗曚綅涓嶄竴鑷达紝璇存槑鍛樺伐鍙戠敓浜嗚皟鍔�紝姝ゆ椂锛岄渶瑕佹妸褰撳墠鍒楄〃涓�姸鎬佷负姝e父鐨勮繖鏉℃暟鎹�仛绂昏亴澶勭悊锛岀姸鎬佹敼鎴愰潪姝e父锛岀�鑱屾棩鏈熶负鍚屾�浜哄憳淇℃伅鏃堕€夋嫨鏈堜唤鐨勪笅涓�湀鏈堟湯锛屽苟涓旀柊澧炰竴鏉$撼绋庡崟浣嶄负
|
|
|
+ * 鍚屾�浜哄憳淇℃伅鏃堕€夋嫨鐨勭撼绋庡崟浣嶄笅鐨勭撼绋庝汉鍛樹俊鎭�紝鍙楅泧浠庝笟寮€濮嬫椂闂翠负鍚屾�浜哄憳淇℃伅鏃堕€夋嫨鏈堜唤鐨勪笅涓�湀涓€鍙�
|
|
|
*/
|
|
|
public void setTaxPersonRecordAlter(PersonInfo personInfo, String billId, String scctTaxUnitID, String yearMonth, Date oneDay,
|
|
|
String rentryId, ITaxPersonRecordEntry iTaxPersonRecordEntry,String sccid) throws EASBizException, BOSException {
|
|
|
- //变更
|
|
|
- //离职状态
|
|
|
+ //鍙樻洿
|
|
|
+ //绂昏亴鐘舵€�
|
|
|
this.setTaxPersonRecordDel(rentryId, oneDay, iTaxPersonRecordEntry);
|
|
|
- //人员纳税分录对象
|
|
|
+ //浜哄憳绾崇◣鍒嗗綍瀵硅薄
|
|
|
TaxPersonRecordEntryInfo taxPersonRecordEntryInfo = new TaxPersonRecordEntryInfo();
|
|
|
- //证件类型
|
|
|
+ //璇佷欢绫诲瀷
|
|
|
if (personInfo.getIdCardNO() != null || personInfo.getPassportNO() != null) {
|
|
|
if (null == personInfo.getIdCardNO()) {
|
|
|
- //护照
|
|
|
- //纳税人类型
|
|
|
+ //鎶ょ収
|
|
|
+ //绾崇◣浜虹被鍨�
|
|
|
taxPersonRecordEntryInfo.setPayerType(PayerTypeEnum.NotResident);
|
|
|
}
|
|
|
if (null == personInfo.getPassportNO()) {
|
|
|
- //证件号
|
|
|
- //纳税人类型
|
|
|
+ //璇佷欢鍙�
|
|
|
+ //绾崇◣浜虹被鍨�
|
|
|
taxPersonRecordEntryInfo.setPayerType(PayerTypeEnum.Resident);
|
|
|
}
|
|
|
TaxPersonRecordInfo taxPersonRecordInfo = new TaxPersonRecordInfo();
|
|
|
taxPersonRecordInfo.setId(BOSUuid.read(billId));
|
|
|
taxPersonRecordEntryInfo.setBill(taxPersonRecordInfo);
|
|
|
- //保存分录数据
|
|
|
+ //淇濆瓨鍒嗗綍鏁版嵁
|
|
|
taxPersonRecordEntryInfo.setPerson(personInfo);
|
|
|
- //获取纳税单位
|
|
|
+ //鑾峰彇绾崇◣鍗曚綅
|
|
|
TaxUnitInfo taxUnitInfo = new TaxUnitInfo();
|
|
|
taxUnitInfo.setId(BOSUuid.read(scctTaxUnitID));
|
|
|
taxPersonRecordEntryInfo.setTaxUnit(taxUnitInfo);
|
|
|
taxPersonRecordEntryInfo.setSimpleName(sccid);
|
|
|
|
|
|
- //人员状态
|
|
|
+ //浜哄憳鐘舵€�
|
|
|
taxPersonRecordEntryInfo.setPersonStatus(PersonStatusEnum.Normal);
|
|
|
- //获取下月的最后一天转成Date类型 //任职受雇从业日期为当前月第一天
|
|
|
+ //鑾峰彇涓嬫湀鐨勬渶鍚庝竴澶╄浆鎴怐ate绫诲瀷 //浠昏亴鍙楅泧浠庝笟鏃ユ湡涓哄綋鍓嶆湀绗�竴澶�
|
|
|
taxPersonRecordEntryInfo.setEmployedDate(oneDay);
|
|
|
- //报送状态
|
|
|
+ //鎶ラ€佺姸鎬�
|
|
|
taxPersonRecordEntryInfo.setSubmitStatus(SubmitStatusEnum.NotSubmit);
|
|
|
taxPersonRecordEntryInfo.setLastReportMonth(yearMonth);
|
|
|
- //任职受雇从业类型 默认雇员
|
|
|
+ //浠昏亴鍙楅泧浠庝笟绫诲瀷 榛樿�闆囧憳
|
|
|
taxPersonRecordEntryInfo.setEmployedType(EmployedTypeEnum.Employee);
|
|
|
- //是否扣除减除费用 默认是
|
|
|
+ //鏄�惁鎵i櫎鍑忛櫎璐圭敤 榛樿�鏄�
|
|
|
taxPersonRecordEntryInfo.setDeductFees(DeductFeesEnum.Deduct);
|
|
|
IObjectPK saveEntry = iTaxPersonRecordEntry.addnew(taxPersonRecordEntryInfo);
|
|
|
- logger.error("saveEntry--------分录新增返回ID" + saveEntry);
|
|
|
+ logger.error("saveEntry--------鍒嗗綍鏂板�杩斿洖ID" + saveEntry);
|
|
|
} else {
|
|
|
- logger.error(personInfo.getName() + "护照和身份证为空,证件类型保存失败!");
|
|
|
+ logger.error(personInfo.getName() + "鎶ょ収鍜岃韩浠借瘉涓虹┖锛岃瘉浠剁被鍨嬩繚瀛樺け璐ワ紒");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 1.在核算表里能查到该员工,在当前列表中查不到该员工,此情况为当月入职新员工,处理逻辑为新增一条纳税人员信息,纳税单位为同步人员信息时选择的纳税单位,状态为正常,受雇从业开始时间
|
|
|
- * 为同步人员信息时选择月份的下个月一号
|
|
|
+ * 1.鍦ㄦ牳绠楄〃閲岃兘鏌ュ埌璇ュ憳宸ワ紝鍦ㄥ綋鍓嶅垪琛ㄤ腑鏌ヤ笉鍒拌�鍛樺伐锛屾�鎯呭喌涓哄綋鏈堝叆鑱屾柊鍛樺伐锛屽�鐞嗛€昏緫涓烘柊澧炰竴鏉$撼绋庝汉鍛樹俊鎭�紝绾崇◣鍗曚綅涓哄悓姝ヤ汉鍛樹俊鎭�椂閫夋嫨鐨勭撼绋庡崟浣嶏紝鐘舵€佷负姝e父锛屽彈闆囦粠涓氬紑濮嬫椂闂�
|
|
|
+ * 涓哄悓姝ヤ汉鍛樹俊鎭�椂閫夋嫨鏈堜唤鐨勪笅涓�湀涓€鍙�
|
|
|
*
|
|
|
* @param personInfo
|
|
|
* @param taxUnitId
|
|
|
@@ -1122,7 +1130,7 @@ public class TaxPersonRecordListHandlerEx extends TaxPersonRecordListHandler {
|
|
|
EntityViewInfo entityViewInfo = EntityViewInfo.getInstance(filterInfo, sic, null);
|
|
|
TaxPersonRecordCollection collection = iTaxPersonRecord.getTaxPersonRecordCollection(entityViewInfo);
|
|
|
|
|
|
- //人员纳税分录对象
|
|
|
+ //浜哄憳绾崇◣鍒嗗綍瀵硅薄
|
|
|
TaxPersonRecordEntryInfo taxPersonRecordEntryInfo = new TaxPersonRecordEntryInfo();
|
|
|
BOSUuid save = null;
|
|
|
TaxPersonRecordInfo taxPersonRecordInfo = new TaxPersonRecordInfo();
|
|
|
@@ -1132,79 +1140,104 @@ public class TaxPersonRecordListHandlerEx extends TaxPersonRecordListHandler {
|
|
|
}
|
|
|
if (null == save) {
|
|
|
taxPersonRecordInfo = new TaxPersonRecordInfo();
|
|
|
- //人员
|
|
|
+ //浜哄憳
|
|
|
taxPersonRecordInfo.setPerson(personInfo);
|
|
|
- //报税姓名
|
|
|
+ //鎶ョ◣濮撳悕
|
|
|
taxPersonRecordInfo.setReportName(personInfo.getName());
|
|
|
- //证件类型
|
|
|
+ //璇佷欢绫诲瀷
|
|
|
if (personInfo.getIdCardNO() != null || personInfo.getPassportNO() != null) {
|
|
|
if (null == personInfo.getIdCardNO()) {
|
|
|
- //护照
|
|
|
+ //鎶ょ収
|
|
|
taxPersonRecordInfo.setCardType(CardTypeEnum.Passport);
|
|
|
taxPersonRecordInfo.setCardNumber(personInfo.getPassportNO());
|
|
|
}
|
|
|
if (null == personInfo.getPassportNO()) {
|
|
|
- //证件号
|
|
|
+ //璇佷欢鍙�
|
|
|
taxPersonRecordInfo.setCardType(CardTypeEnum.IdCard);
|
|
|
taxPersonRecordInfo.setCardNumber(personInfo.getIdCardNO());
|
|
|
}
|
|
|
- //性别
|
|
|
+ //鎬у埆
|
|
|
taxPersonRecordInfo.setGender(personInfo.getGender());
|
|
|
- //出生日期
|
|
|
+ //鍑虹敓鏃ユ湡
|
|
|
taxPersonRecordInfo.setBirthday(personInfo.getBirthday());
|
|
|
- //国籍
|
|
|
+ //鍥界睄
|
|
|
taxPersonRecordInfo.setNationality(personInfo.getNationality());
|
|
|
- //是否境外人员
|
|
|
+ //鏄�惁澧冨�浜哄憳
|
|
|
taxPersonRecordInfo.setIsOversea(IsOverseaEnum.NotOversea);
|
|
|
- //手机号码
|
|
|
+ //鎵嬫満鍙风爜
|
|
|
taxPersonRecordInfo.setPhoneNumber(personInfo.getCell());
|
|
|
IObjectPK pk= iTaxPersonRecord.addnew(taxPersonRecordInfo);
|
|
|
taxPersonRecordInfo.setId(BOSUuid.read(pk.toString()));
|
|
|
} else {
|
|
|
- new ShrWebBizException(personInfo.getName() + "护照和身份证为空,证件类型保存失败!");
|
|
|
+ new ShrWebBizException(personInfo.getName() + "鎶ょ収鍜岃韩浠借瘉涓虹┖锛岃瘉浠剁被鍨嬩繚瀛樺け璐ワ紒");
|
|
|
}
|
|
|
}
|
|
|
if (personInfo.getIdCardNO() != null || personInfo.getPassportNO() != null) {
|
|
|
if (null == personInfo.getIdCardNO()) {
|
|
|
- //纳税人类型
|
|
|
+ //绾崇◣浜虹被鍨�
|
|
|
taxPersonRecordEntryInfo.setPayerType(PayerTypeEnum.NotResident);
|
|
|
}
|
|
|
if (null == personInfo.getPassportNO()) {
|
|
|
- //纳税人类型
|
|
|
+ //绾崇◣浜虹被鍨�
|
|
|
taxPersonRecordEntryInfo.setPayerType(PayerTypeEnum.Resident);
|
|
|
}
|
|
|
} else {
|
|
|
- new ShrWebBizException(personInfo.getName() + "护照和身份证为空,证件类型保存失败!");
|
|
|
+ new ShrWebBizException(personInfo.getName() + "鎶ょ収鍜岃韩浠借瘉涓虹┖锛岃瘉浠剁被鍨嬩繚瀛樺け璐ワ紒");
|
|
|
}
|
|
|
+
|
|
|
+ SelectorItemCollection sice = new SelectorItemCollection();
|
|
|
+ sice.add(new SelectorItemInfo("id"));
|
|
|
+ sice.add(new SelectorItemInfo("bill.id"));
|
|
|
+ sice.add("taxUnit.id");
|
|
|
+ FilterInfo filtereInfo = new FilterInfo();
|
|
|
+ filtereInfo.getFilterItems().add(new FilterItemInfo("bill.id", taxPersonRecordInfo.getId().toString(), CompareType.EQUALS));
|
|
|
+ EntityViewInfo entityVieweInfo = EntityViewInfo.getInstance(filterInfo, sice, null);
|
|
|
+ TaxPersonRecordEntryCollection collecetion = iTaxPersonRecordEntry.getTaxPersonRecordEntryCollection(entityVieweInfo);
|
|
|
+ TaxPersonRecordEntryInfo tp=null;
|
|
|
+ if(null!=collecetion&&collecetion.size()>0) {
|
|
|
+ for (int i=0;i<collecetion.size();i++) {
|
|
|
+ tp = collecetion.get(i);
|
|
|
+ System.out.println(JSONUtils.convertObjectToJson(iTaxPersonRecordEntry.getContext(),collecetion));
|
|
|
+ if(null!=tp.getTaxUnit()&&null!=tp.getTaxUnit().getId()&&taxUnitId.equals(tp.getTaxUnit().getId().toString())) {
|
|
|
+ taxPersonRecordEntryInfo.setId(tp.getId());
|
|
|
+ }else {
|
|
|
+ TaxPersonRecordEntryInfo tpOld = iTaxPersonRecordEntry.getTaxPersonRecordEntryInfo(new ObjectUuidPK(tp.getId()));
|
|
|
+ tpOld.setPersonStatus(PersonStatusEnum.NotNormal);
|
|
|
+ iTaxPersonRecordEntry.save(tpOld);
|
|
|
+ System.out.println(JSONUtils.convertObjectToJson(iTaxPersonRecordEntry.getContext(),tpOld));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
taxPersonRecordEntryInfo.setBill(taxPersonRecordInfo);
|
|
|
taxPersonRecordEntryInfo.setSimpleName(sccid);
|
|
|
- //保存分录数据
|
|
|
+ //淇濆瓨鍒嗗綍鏁版嵁
|
|
|
taxPersonRecordEntryInfo.setPerson(personInfo);
|
|
|
- //获取纳税单位
|
|
|
+ //鑾峰彇绾崇◣鍗曚綅
|
|
|
TaxUnitInfo taxUnitInfo = new TaxUnitInfo();
|
|
|
taxUnitInfo.setId(BOSUuid.read(taxUnitId));
|
|
|
taxPersonRecordEntryInfo.setTaxUnit(taxUnitInfo);
|
|
|
- //人员状态
|
|
|
+ //浜哄憳鐘舵€�
|
|
|
taxPersonRecordEntryInfo.setPersonStatus(PersonStatusEnum.Normal);
|
|
|
- //获取下月的最后一天转成Date类型 //任职受雇从业日期为当前月第一天
|
|
|
+ //鑾峰彇涓嬫湀鐨勬渶鍚庝竴澶╄浆鎴怐ate绫诲瀷 //浠昏亴鍙楅泧浠庝笟鏃ユ湡涓哄綋鍓嶆湀绗�竴澶�
|
|
|
taxPersonRecordEntryInfo.setEmployedDate(oneDay);
|
|
|
- //报送状态
|
|
|
+ //鎶ラ€佺姸鎬�
|
|
|
taxPersonRecordEntryInfo.setSubmitStatus(SubmitStatusEnum.NotSubmit);
|
|
|
taxPersonRecordEntryInfo.setLastReportMonth(yearMonth);
|
|
|
- //任职受雇从业类型 默认雇员
|
|
|
+ //浠昏亴鍙楅泧浠庝笟绫诲瀷 榛樿�闆囧憳
|
|
|
taxPersonRecordEntryInfo.setEmployedType(EmployedTypeEnum.Employee);
|
|
|
- //是否扣除减除费用 默认是
|
|
|
+ //鏄�惁鎵i櫎鍑忛櫎璐圭敤 榛樿�鏄�
|
|
|
taxPersonRecordEntryInfo.setDeductFees(DeductFeesEnum.Deduct);
|
|
|
- IObjectPK saveEntry = iTaxPersonRecordEntry.addnew(taxPersonRecordEntryInfo);
|
|
|
+ IObjectPK saveEntry = iTaxPersonRecordEntry.save(taxPersonRecordEntryInfo);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 获取薪酬核算人员
|
|
|
- * 相同
|
|
|
+ * 鑾峰彇钖�叕鏍哥畻浜哄憳
|
|
|
+ * 鐩稿悓
|
|
|
*
|
|
|
- * @param year 统计年
|
|
|
- * @param month 统计月
|
|
|
- * @param taxUnitId 纳税单位
|
|
|
+ * @param year 缁熻�骞�
|
|
|
+ * @param month 缁熻�鏈�
|
|
|
+ * @param taxUnitId 绾崇◣鍗曚綅
|
|
|
*/
|
|
|
public String getSCmpCalTablePersonsSqlAlike(Integer year, Integer month, String taxUnitId) {
|
|
|
StringBuilder sb = new StringBuilder();
|
|
|
@@ -1214,19 +1247,19 @@ public class TaxPersonRecordListHandlerEx extends TaxPersonRecordListHandler {
|
|
|
sb.append(" and rentry.FPERSONSTATUS=1 and scct.FTaxUnitID=rentry.FTaxUnitID ");
|
|
|
sb.append(" where scct.FPeriodYear = '" + year + "' and scct.FPeriodMonth = '" + month + "' ");
|
|
|
sb.append(" and scct.FTaxUnitID ='" + taxUnitId + "' ");
|
|
|
- sb.append(" and scct.FEMPLOYEETYPEID not in( select t.fid from T_HR_BDEmployeeType t where t.FNUMBER='JZT006' ) ");
|
|
|
+ sb.append(" and scct.FEMPLOYEETYPEID not in( select t.fid from T_HR_BDEmployeeType t where t.FNUMBER in('JZT006','JZT022') ) ");
|
|
|
sb.append(" and rentry.fid is not null ");
|
|
|
System.out.println("getSCmpCalTablePersonsSqlAlike" + sb);
|
|
|
return sb.toString();
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 获取薪酬核算人员
|
|
|
- * 新增
|
|
|
+ * 鑾峰彇钖�叕鏍哥畻浜哄憳
|
|
|
+ * 鏂板�
|
|
|
*
|
|
|
- * @param year 统计年
|
|
|
- * @param month 统计月
|
|
|
- * @param taxUnitId 纳税单位
|
|
|
+ * @param year 缁熻�骞�
|
|
|
+ * @param month 缁熻�鏈�
|
|
|
+ * @param taxUnitId 绾崇◣鍗曚綅
|
|
|
*/
|
|
|
public String getSCmpCalTablePersonsSqlAndNew(Integer year, Integer month, String taxUnitId) {
|
|
|
StringBuilder sb = new StringBuilder();
|
|
|
@@ -1237,19 +1270,19 @@ public class TaxPersonRecordListHandlerEx extends TaxPersonRecordListHandler {
|
|
|
sb.append(" and rentry.FPERSONSTATUS=1 and scct.FTaxUnitID = rentry.FTaxUnitID ");
|
|
|
sb.append(" where scct.FPeriodYear = '" + year + "' and scct.FPeriodMonth = '" + month + "' ");
|
|
|
sb.append(" and scct.FTaxUnitID ='" + taxUnitId + "' ");
|
|
|
- sb.append(" and scct.FEMPLOYEETYPEID not in( select t.fid from T_HR_BDEmployeeType t where t.FNUMBER='JZT006' ) ");
|
|
|
+ sb.append(" and scct.FEMPLOYEETYPEID not in( select t.fid from T_HR_BDEmployeeType t where t.FNUMBER in('JZT006','JZT022') ) ");
|
|
|
sb.append(" and rentry.fid is null ");
|
|
|
System.out.println("getSCmpCalTablePersonsSqlAndNew" + sb);
|
|
|
return sb.toString();
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 获取薪酬核算人员
|
|
|
- * 变更
|
|
|
+ * 鑾峰彇钖�叕鏍哥畻浜哄憳
|
|
|
+ * 鍙樻洿
|
|
|
*
|
|
|
- * @param year 统计年
|
|
|
- * @param month 统计月
|
|
|
- * @param taxUnitId 纳税单位
|
|
|
+ * @param year 缁熻�骞�
|
|
|
+ * @param month 缁熻�鏈�
|
|
|
+ * @param taxUnitId 绾崇◣鍗曚綅
|
|
|
*/
|
|
|
public String getSCmpCalTablePersonsSqlAlter(Integer year, Integer month, String taxUnitId) {
|
|
|
StringBuilder sb = new StringBuilder();
|
|
|
@@ -1260,19 +1293,19 @@ public class TaxPersonRecordListHandlerEx extends TaxPersonRecordListHandler {
|
|
|
sb.append(" and rentry.FPERSONSTATUS=1 and scct.FTaxUnitID!=rentry.FTaxUnitID ");
|
|
|
sb.append(" where scct.FPeriodYear = '" + year + "' and scct.FPeriodMonth = '" + month + "' ");
|
|
|
sb.append(" and scct.FTaxUnitID ='" + taxUnitId + "' ");
|
|
|
- sb.append(" and scct.FEMPLOYEETYPEID not in( select t.fid from T_HR_BDEmployeeType t where t.FNUMBER='JZT006' ) ");
|
|
|
+ sb.append(" and scct.FEMPLOYEETYPEID not in( select t.fid from T_HR_BDEmployeeType t where t.FNUMBER in('JZT006','JZT022') ) ");
|
|
|
sb.append(" order by scct.FTaxUnitID,rentry.FTAXUNITID,rentry.fid ");
|
|
|
System.out.println("getSCmpCalTablePersonsSqlAlter" + sb);
|
|
|
return sb.toString();
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 获取薪酬核算人员
|
|
|
- * 删除
|
|
|
+ * 鑾峰彇钖�叕鏍哥畻浜哄憳
|
|
|
+ * 鍒犻櫎
|
|
|
*
|
|
|
- * @param year 统计年
|
|
|
- * @param month 统计月
|
|
|
- * @param taxUnitId 纳税单位
|
|
|
+ * @param year 缁熻�骞�
|
|
|
+ * @param month 缁熻�鏈�
|
|
|
+ * @param taxUnitId 绾崇◣鍗曚綅
|
|
|
*/
|
|
|
public String getSCmpCalTablePersonsSqlDel(Integer year, Integer month, String taxUnitId) {
|
|
|
StringBuilder sb = new StringBuilder();
|
|
|
@@ -1283,18 +1316,18 @@ public class TaxPersonRecordListHandlerEx extends TaxPersonRecordListHandler {
|
|
|
sb.append(" and scct.FTaxUnitID=rentry.FTaxUnitID ");
|
|
|
sb.append(" and scct.FPeriodYear = '"+year+"' and scct.FPeriodMonth = '"+month+"' ");
|
|
|
sb.append(" and scct.FTaxUnitID ='"+taxUnitId+"' ");
|
|
|
- sb.append(" and scct.FEMPLOYEETYPEID not in( select t.fid from T_HR_BDEmployeeType t where t.FNUMBER='JZT006' ) ");
|
|
|
+ sb.append(" and scct.FEMPLOYEETYPEID not in( select t.fid from T_HR_BDEmployeeType t where t.FNUMBER in('JZT006','JZT022') ) ");
|
|
|
sb.append(" where rentry.FPERSONSTATUS=1 and rentry.FTaxUnitID ='"+taxUnitId+"' and scct.fid is null ");
|
|
|
System.out.println("getSCmpCalTablePersonsSqlDel" + sb);
|
|
|
return sb.toString();
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 获取薪酬核算人员
|
|
|
+ * 鑾峰彇钖�叕鏍哥畻浜哄憳
|
|
|
*
|
|
|
- * @param year 统计年
|
|
|
- * @param month 统计月
|
|
|
- * @param taxUnitId 纳税单位
|
|
|
+ * @param year 缁熻�骞�
|
|
|
+ * @param month 缁熻�鏈�
|
|
|
+ * @param taxUnitId 绾崇◣鍗曚綅
|
|
|
*/
|
|
|
public String getSCmpCalTablePersonsSql(Integer year, Integer month, String taxUnitId) {
|
|
|
StringBuilder sb = new StringBuilder();
|
|
|
@@ -1307,7 +1340,7 @@ public class TaxPersonRecordListHandlerEx extends TaxPersonRecordListHandler {
|
|
|
sb.append("FPeriodMonth = '").append(month).append("'").append("\n");
|
|
|
sb.append(" and ").append("\n");
|
|
|
sb.append("FTaxUnitID = '").append(taxUnitId).append("'").append("\n");
|
|
|
- sb.append("and FEMPLOYEETYPEID not in(").append("select fid from T_HR_BDEmployeeType where FNUMBER='JZT006' ").append(") ").append("\n");
|
|
|
+ sb.append("and FEMPLOYEETYPEID not in(").append("select fid from T_HR_BDEmployeeType where FNUMBER in('JZT006','JZT022') ").append(") ").append("\n");
|
|
|
return sb.toString();
|
|
|
}
|
|
|
}
|