|
@@ -71,11 +71,26 @@ public class ContractbillApiPlugin implements Serializable {
|
|
CustomApiResult<Boolean> result = new CustomApiResult<>();
|
|
CustomApiResult<Boolean> result = new CustomApiResult<>();
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
// 0)数据校验
|
|
// 0)数据校验
|
|
|
|
+ // 收支类型
|
|
|
|
+ if(!"1".equals(billData.get("incometype"))) {
|
|
|
|
+ result.setMessage("收支类型不是1,星瀚不接收"); // 返回状态还是成功的,只是不接收
|
|
|
|
+ return result;
|
|
|
|
+ }
|
|
// 合同类型
|
|
// 合同类型
|
|
- if(!"1".equals(billData.get("contracttype"))) {
|
|
|
|
- result.setMessage("合同类型不是1,星瀚不接收"); // 返回状态还是成功的,只是不接收
|
|
|
|
|
|
+ String contracttypev = (String)billData.get("contracttype");
|
|
|
|
+ if (StringUtils.isEmpty(contracttypev)) {
|
|
|
|
+ result.setMessage("合同类型不能为空");
|
|
|
|
+ result.setStatus(false);
|
|
|
|
+ return result;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ DynamicObject contracttype = BusinessDataServiceHelper.loadSingle("pmct_conttype","id,name",new QFilter[]{new QFilter("number",QCP.equals,contracttypev)});
|
|
|
|
+ if (contracttype == null) {
|
|
|
|
+ result.setMessage("合同类型:" + contracttypev + "未在星瀚维护");
|
|
|
|
+ result.setStatus(false);
|
|
return result;
|
|
return result;
|
|
}
|
|
}
|
|
|
|
+
|
|
// fapplierid 经办人:员工编码_名称 ,由根据人员信息带出主职的公司、部门、职位、手机
|
|
// fapplierid 经办人:员工编码_名称 ,由根据人员信息带出主职的公司、部门、职位、手机
|
|
String fapplierid = (String)billData.get("applierid");
|
|
String fapplierid = (String)billData.get("applierid");
|
|
if (StringUtils.isEmpty(fapplierid)) {
|
|
if (StringUtils.isEmpty(fapplierid)) {
|
|
@@ -211,7 +226,6 @@ public class ContractbillApiPlugin implements Serializable {
|
|
|
|
|
|
dynamicObject.set("detailtype","biztype_applybill"); //(影响列表记录显示) 单据类型:biztype_applybill 合同台账 ,biztype_changebill 合同变更,biztype_stopbill 合同终止
|
|
dynamicObject.set("detailtype","biztype_applybill"); //(影响列表记录显示) 单据类型:biztype_applybill 合同台账 ,biztype_changebill 合同变更,biztype_stopbill 合同终止
|
|
|
|
|
|
- DynamicObject contracttype = BusinessDataServiceHelper.loadSingle("pmct_conttype","id,name",new QFilter[]{new QFilter("number",QCP.equals,"JYCONTYPE")});
|
|
|
|
dynamicObject.set("contracttype",contracttype); // 合同类型
|
|
dynamicObject.set("contracttype",contracttype); // 合同类型
|
|
dynamicObject.set("contractcode",fcontractcode); // 合同号
|
|
dynamicObject.set("contractcode",fcontractcode); // 合同号
|
|
dynamicObject.set("contractname",fcontractname); // 合同名称
|
|
dynamicObject.set("contractname",fcontractname); // 合同名称
|