rev:修改单据查询
This commit is contained in:
@@ -0,0 +1,39 @@
|
|||||||
|
package org.nl.wms.flow_manage.flow.service.classprocessimpl;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.nl.common.domain.exception.BadRequestException;
|
||||||
|
import org.nl.wms.flow_manage.flow.framework.process.nodeType.excess.impl.process.classprocess.ClassProcess;
|
||||||
|
import org.nl.wms.pm_manage.form_data.service.IPmFormDataService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @author ZZQ
|
||||||
|
* @Date 2024/5/6 14:34
|
||||||
|
* 回传服务
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class SyncReceiptProcessHandler implements ClassProcess {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
IPmFormDataService iPmFormDataService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONObject process(JSONObject from, JSONObject param) {
|
||||||
|
//执行回传
|
||||||
|
String formType = from.getString("form_type");
|
||||||
|
String code = from.getString("code");
|
||||||
|
if (!formType.contains("RECEIPT")){
|
||||||
|
throw new BadRequestException("回传失败:单据类型不是回传类型单据");
|
||||||
|
}
|
||||||
|
//要回传的json数据
|
||||||
|
JSONObject formData = from.getJSONObject("form_data");
|
||||||
|
String formid = formData.getString("formid");
|
||||||
|
if (StringUtils.isEmpty(formid)){
|
||||||
|
throw new BadRequestException("回传失败:回传数据form_data中数据格式不是formid,data类型");
|
||||||
|
}
|
||||||
|
|
||||||
|
return from;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user