科目初始化-科目维度;修改清账状态
This commit is contained in:
parent
4186bd47ae
commit
2e77b543c4
|
|
@ -24,7 +24,8 @@ public class ClearBillListPlugin extends AbstractListPlugin implements Plugin {
|
|||
|
||||
private final static Log logger = LogFactory.getLog(ClearBillListPlugin.class);
|
||||
private final static String unClearFormID = "shjh_df_unclear";//反清账界面标识
|
||||
private final static String updateStatusFormID = "shjh_df_updatestatus";//修改清账单状态界面标识
|
||||
//0407客户余老师反馈此界面不需要,按钮直接生效
|
||||
// private final static String updateStatusFormID = "shjh_df_updatestatus";//修改清账单状态界面标识
|
||||
|
||||
|
||||
@Override
|
||||
|
|
@ -62,8 +63,8 @@ public class ClearBillListPlugin extends AbstractListPlugin implements Plugin {
|
|||
}else if("updatestatus_check".equals(okey) && e.getOperationResult().isSuccess()){
|
||||
//点击修改清账单状态按钮
|
||||
//弹框填写修改原因。填写后,可由待清账改为已清账,单据状态改为已审核;
|
||||
FormShowParameter showParameter = createParam(okey,updateStatusFormID);
|
||||
this.getView().showForm(showParameter);
|
||||
// FormShowParameter showParameter = createParam(okey,updateStatusFormID);
|
||||
// this.getView().showForm(showParameter);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -106,7 +107,7 @@ public class ClearBillListPlugin extends AbstractListPlugin implements Plugin {
|
|||
this.getView().invokeOperation("unclearacctount");
|
||||
}else if("updatestatus_check".equals(callBackId) && "btnok".equals(e.getReturnData())){
|
||||
//修改清账单状态后续操作
|
||||
this.getView().invokeOperation("updatestatus");
|
||||
// this.getView().invokeOperation("updatestatus");
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
logger.error("回调父页面异常:"+ex.getMessage());
|
||||
|
|
|
|||
|
|
@ -40,6 +40,8 @@ public class InitAccountFormPlugin extends AbstractFormPlugin {
|
|||
private static final Map<String, DynamicObject> mapObject = new HashMap<>();//公司对象集合
|
||||
private static final Map<String, DynamicObject> hsxmMaps = new HashMap<>();//核算维度对象集合
|
||||
private static final String insertSql = "insert into T_BD_Account_U (fdataid,fuseorgid) values (?,?);";
|
||||
//处理科目在每个公司生成
|
||||
Map<String, DynamicObject> companyAcctMaps = null;
|
||||
|
||||
|
||||
@Override
|
||||
|
|
@ -134,8 +136,6 @@ public class InitAccountFormPlugin extends AbstractFormPlugin {
|
|||
}
|
||||
|
||||
list = (ArrayList) itemEntry.get("shjh_companys");//excel表格的某个页签-科目公司信息
|
||||
//处理科目在每个公司生成
|
||||
Map<String, DynamicObject> companyAcctMaps = null;
|
||||
if(list != null){
|
||||
log.info("科目导入shjh_companys"+list.size());
|
||||
iterator = list.iterator();//遍历页签
|
||||
|
|
|
|||
|
|
@ -34,6 +34,8 @@ import java.util.*;
|
|||
public class ClearAccountBillOperation extends AbstractOperationServicePlugIn implements Plugin {
|
||||
|
||||
private static final String updateClearStatus = "update tk_shjh_clear_account set fbillstatus='D' where fid=?;";
|
||||
//手动修改清账状态
|
||||
private static final String hadleClearStatusByID = "update tk_shjh_clear_account set fk_shjh_changereason='手工清账',fk_shjh_clearstatus='A',fbillstatus='C' where fid=?;";
|
||||
private static final String updateSap = "update tk_shjh_clear_account set fk_shjh_clearstatus='A',fk_shjh_pzh=?,fk_shjh_year=? where fid=?;";
|
||||
private static final String updateSrcClear = "update tk_shjh_clear_account set fk_shjh_iscopy=1 where fid=?;";
|
||||
private static final String updateUnClearStatus = "update tk_shjh_clear_account set fbillstatus='D',fk_shjh_clearstatus='C',fk_shjh_unpzh=? where fid=?;";
|
||||
|
|
@ -96,7 +98,7 @@ public class ClearAccountBillOperation extends AbstractOperationServicePlugIn im
|
|||
e.setCancelMessage(billno + "【单据状态】=作废 and【清账状态】=反清账 and【反清后处理方式】=收款信息变更 and【是否被复制】=否,才允许复制");
|
||||
e.setCancel(true);
|
||||
}
|
||||
} else if ("updatestatus_check".equals(eok)) {
|
||||
} else if ("updatestatus".equals(eok)) {
|
||||
//清账单【单据状态】=暂存 and【清账状态】=待清账,才允许点击修改清账单状态。
|
||||
if (!"A".equals(billstatus) || !"B".equals(clearstatus)) {
|
||||
e.setCancelMessage(billno + "【单据状态】=暂存 and【清账状态】=待清账,才允许修改清账单状态");
|
||||
|
|
@ -170,7 +172,8 @@ public class ClearAccountBillOperation extends AbstractOperationServicePlugIn im
|
|||
DynamicObject[] dos = e.getDataEntities();
|
||||
DynamicObject prinfo;
|
||||
for (int i = 0; i < dos.length; i++) {
|
||||
prinfo = BusinessDataServiceHelper.loadSingle(dos[i].getPkValue(), dos[i].getDataEntityType().getName());
|
||||
prinfo = dos[i];
|
||||
DB.update(DBRoute.of("fi"), hadleClearStatusByID, new Object[]{prinfo.getPkValue()});
|
||||
//TODO 反写上游收款单,分录行【清账状态】=已清账 C 反清账是D。
|
||||
if(reWriteCeceBill(prinfo,"C")){
|
||||
//下游清账明细单,【单据状态】=作废。若清账信息有误,需在SAP反清账后修改。
|
||||
|
|
@ -181,7 +184,7 @@ public class ClearAccountBillOperation extends AbstractOperationServicePlugIn im
|
|||
this.operationResult.addSuccessPkId(prinfo.getPkValue());
|
||||
}else{
|
||||
//提示反写收款单失败
|
||||
addErrorInfo(prinfo,"清账单未关联上游收款单分录信息,反写失败");
|
||||
addErrorInfo(prinfo,"清账单未关联上游收款单分录信息,反写收款单失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue