Преглед на файлове

Merge remote-tracking branch 'origin/1.0.0_rzd_prod' into 1.0.0_rzd_prod

wuyx преди 3 години
родител
ревизия
a72e8996b4

+ 1 - 0
src/com/uas/erp/service/fa/impl/BatchDealServiceImpl.java

@@ -1659,6 +1659,7 @@ public class BatchDealServiceImpl implements BatchDealService {
 					if (toDate != null) {
 						baseDao.execute("update ARCHECK set ac_todate=to_date('" + toDate + "','yyyy-mm-dd') where ac_id=" + acid);
 					}
+					handlerService.handler(caller, "turn", "after", new Object[] { acid });
 					sb.append("转入成功,应收对账单号:" + "<a href=\"javascript:openUrl('jsps/fa/ars/arCheck.jsp?formCondition=ac_idIS" + acid
 							+ "&gridCondition=ad_acidIS" + acid + "')\">" + code + "</a>&nbsp;<hr>");
 					Emitter.progress((float) index++ / size);

+ 4 - 4
src/com/uas/erp/service/oa/impl/FeePleaseServiceImpl.java

@@ -1875,9 +1875,9 @@ public class FeePleaseServiceImpl implements FeePleaseService {
 		if (isRight != 0) {
 			BaseUtil.showError("申请金额为0,不允许提交!");
 		}
-		Object dept = baseDao.getFieldDataByCondition("feeplease", "fp_department", "fp_id=" + fp_id);
-		SqlRowList rs1 = baseDao.queryForRowSet("select fpd_detno,fpd_d1,fpd_id from FeePleaseDetail where fpd_fpid=?", fp_id);
+		SqlRowList rs1 = baseDao.queryForRowSet("select fpd_detno,fpd_d1,fpd_id,nvl(FPD_DEPARTMENT,fp_department) dept from FeePleaseDetail where fpd_fpid=?", fp_id);
 		while (rs1.next()) {
+			Object dept = rs1.getObject("dept");
 			SqlRowList rs = baseDao.queryForRowSet(
 					"select fcs_departmentname from FeeCategorySet where fcs_departmentname=? and fcs_itemname=?", dept,
 					rs1.getObject("fpd_d1"));
@@ -1886,12 +1886,12 @@ public class FeePleaseServiceImpl implements FeePleaseService {
 			} else {
 				sb.append("第" + rs1.getObject("fpd_detno") + "行部门[" + dept + "]费用用途[" + rs1.getObject("fpd_d1") + "]在费用申请科目没有设置,不能提交");
 			}
+			baseDao.execute("update FeePleaseDetail set fpd_catecode=(select max(fcs_catecode) from FeeCategorySet where fcs_departmentname='"
+					+ dept + "' and fcs_itemname=fpd_d1) where fpd_id=" + rs1.getObject("fpd_id"));
 		}
 		if (sb.length() > 0) {
 			BaseUtil.showError(sb.toString());
 		}
-		baseDao.execute("update FeePleaseDetail set fpd_catecode=(select max(fcs_catecode) from FeeCategorySet where fcs_departmentname='"
-				+ dept + "' and fcs_itemname=fpd_d1) where fpd_fpid=" + fp_id);
 	}
 
 	private void comitLogic_feelimit(int fp_id, String caller) {

+ 4 - 4
src/com/uas/erp/service/oa/impl/OAHandler.java

@@ -254,22 +254,22 @@ public class OAHandler {
 			BaseUtil.showError("申请金额为0,不能提交");
 		}
 		StringBuffer sb = new StringBuffer();
-		Object dept = baseDao.getFieldDataByCondition("feeplease", "fp_department", "fp_id=" + fp_id);
 		SqlRowList rs1 = baseDao.queryForRowSet(
-				"select fpd_detno,fpd_d1,fpd_id,fp_department from FeePleaseDetail,feeplease where fp_id=fpd_fpid and fpd_fpid=?", fp_id);
+				"select fpd_detno,fpd_d1,fpd_id,nvl(FPD_DEPARTMENT,fp_department) dept from FeePleaseDetail,feeplease where fp_id=fpd_fpid and fpd_fpid=?", fp_id);
 		while (rs1.next()) {
+			Object dept = rs1.getObject("dept");
 			SqlRowList rs = baseDao.queryForRowSet(
 					"select fcs_departmentname from FeeCategorySet where fcs_departmentname=? and fcs_itemname=?", dept,
 					rs1.getObject("fpd_d1"));
 			if (!rs.hasNext()) {
 				sb.append("第" + rs1.getObject("fpd_detno") + "行部门[" + dept + "]费用用途[" + rs1.getObject("fpd_d1") + "]在费用申请科目没有设置,不能提交");
 			}
+			baseDao.execute("update FeePleaseDetail set fpd_catecode=(select max(fcs_catecode) from FeeCategorySet where fcs_departmentname='"
+					+ dept + "' and fcs_itemname=fpd_d1 and nvl(fcs_nature,' ')=nvl(fpd_nature,' ')) where fpd_id=" + rs1.getObject("fpd_id"));
 		}
 		if (sb.length() > 0) {
 			BaseUtil.showError(sb.toString());
 		}
-		baseDao.execute("update FeePleaseDetail set fpd_catecode=(select max(fcs_catecode) from FeeCategorySet where fcs_departmentname='"
-				+ dept + "' and fcs_itemname=fpd_d1 and nvl(fcs_nature,' ')=nvl(fpd_nature,' ')) where fpd_fpid=" + fp_id);
 	}
 
 	/**

+ 5 - 4
src/com/uas/mobile/service/impl/OAMeetingServiceImpl.java

@@ -949,9 +949,9 @@ public class OAMeetingServiceImpl implements OAMeetingService {
 		if (isRight != 0) {
 			BaseUtil.showError("申请金额为0,不能提交");
 		}
-		Object dept = baseDao.getFieldDataByCondition("feeplease", "fp_department", "fp_id=" + object);
-		SqlRowList rs1 = baseDao.queryForRowSet("select fpd_detno,fpd_d1,fpd_id from FeePleaseDetail where fpd_fpid=?", object);
+		SqlRowList rs1 = baseDao.queryForRowSet("select fpd_detno,fpd_d1,fpd_id,nvl(FPD_DEPARTMENT,fp_department) dept from FeePleaseDetail where fpd_fpid=?", object);
 		while (rs1.next()) {
+			Object dept = rs1.getObject("dept");
 			SqlRowList rs = baseDao.queryForRowSet(
 					"select fcs_departmentname from FeeCategorySet where fcs_departmentname=? and fcs_itemname=?", dept,
 					rs1.getObject("fpd_d1"));
@@ -960,12 +960,13 @@ public class OAMeetingServiceImpl implements OAMeetingService {
 			} else {
 				sb.append("第" + rs1.getObject("fpd_detno") + "行部门[" + dept + "]费用用途[" + rs1.getObject("fpd_d1") + "]在费用申请科目没有设置,不能提交");
 			}
+			baseDao.execute("update FeePleaseDetail set fpd_catecode=(select max(fcs_catecode) from FeeCategorySet where fcs_departmentname='"
+					+ dept + "' and fcs_itemname=fpd_d1) where fpd_id=" + rs1.getObject("fpd_id"));
 		}
 		if (sb.length() > 0) {
 			BaseUtil.showError(sb.toString());
 		}
-		baseDao.execute("update FeePleaseDetail set fpd_catecode=(select max(fcs_catecode) from FeeCategorySet where fcs_departmentname='"
-				+ dept + "' and fcs_itemname=fpd_d1) where fpd_fpid=" + object);
+
 	}
 
 	@Override