|
@@ -71,11 +71,26 @@ public class ContractbillApiPlugin implements Serializable {
|
|
|
CustomApiResult<Boolean> result = new CustomApiResult<>();
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
|
|
|
+
|
|
|
+ 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;
|
|
|
}
|
|
|
+
|
|
|
|
|
|
String fapplierid = (String)billData.get("applierid");
|
|
|
if (StringUtils.isEmpty(fapplierid)) {
|
|
@@ -211,7 +226,6 @@ public class ContractbillApiPlugin implements Serializable {
|
|
|
|
|
|
dynamicObject.set("detailtype","biztype_applybill");
|
|
|
|
|
|
- DynamicObject contracttype = BusinessDataServiceHelper.loadSingle("pmct_conttype","id,name",new QFilter[]{new QFilter("number",QCP.equals,"JYCONTYPE")});
|
|
|
dynamicObject.set("contracttype",contracttype);
|
|
|
dynamicObject.set("contractcode",fcontractcode);
|
|
|
dynamicObject.set("contractname",fcontractname);
|