Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
e67ec704f4
|
@ -1,33 +1,32 @@
|
|||
package nccloud.openapi.ic.onhand;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import javax.ws.rs.Consumes;
|
||||
import javax.ws.rs.POST;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.Produces;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import nc.bs.dao.BaseDAO;
|
||||
import nc.bs.dao.DAOException;
|
||||
import nc.bs.uapbd.util.MyHelper;
|
||||
import nc.bs.framework.common.NCLocator;
|
||||
import nc.impl.pubapp.pattern.database.SqlBuilderUtil;
|
||||
import nc.jdbc.framework.processor.MapProcessor;
|
||||
import nc.vo.bd.material.MaterialVO;
|
||||
import nc.vo.bd.stordoc.StordocVO;
|
||||
import nc.vo.cmp.util.StringUtils;
|
||||
import nc.vo.pub.BusinessException;
|
||||
import nc.vo.pubapp.pattern.pub.SqlBuilder;
|
||||
import org.json.JSONString;
|
||||
|
||||
import nc.bs.framework.common.NCLocator;
|
||||
import nc.vo.ic.onhand.entity.OnhandVO;
|
||||
import nc.vo.pub.BusinessException;
|
||||
import nc.vo.pub.lang.UFDouble;
|
||||
import nc.vo.pubapp.pattern.pub.SqlBuilder;
|
||||
import nc.ws.opm.pub.utils.result.APIErrCodeEnum;
|
||||
import nccloud.api.ic.onhand.IAPIOnhandQuery;
|
||||
import nccloud.api.rest.utils.ResultMessageUtil;
|
||||
import org.json.JSONString;
|
||||
|
||||
import javax.ws.rs.Consumes;
|
||||
import javax.ws.rs.POST;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.Produces;
|
||||
import java.time.LocalDate;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 现存量信息查询资源类
|
||||
|
@ -149,6 +148,8 @@ public class OnhandResource {
|
|||
.queryOnhandVOByCondition(paramMap);
|
||||
// 对数据进行整合组装
|
||||
if (null != onhandVOs && onhandVOs.length > 0) {
|
||||
LocalDate today = LocalDate.now();
|
||||
String nowDate = today.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
|
||||
JSONArray resArr = new JSONArray();
|
||||
for (OnhandVO onhandVO : onhandVOs) {
|
||||
String cmaterialvid = onhandVO.getCmaterialvid();
|
||||
|
@ -169,6 +170,7 @@ public class OnhandResource {
|
|||
oneJson.put("warehouseName", stordocMap.getOrDefault(StordocVO.NAME, ""));// 仓库名称
|
||||
oneJson.put("vbatchcode", onhandVO.getVbatchcode());// 批次号
|
||||
oneJson.put("onhandnum", onhandVO.getNonhandnum());
|
||||
oneJson.put("entryTime", nowDate);// 入库时间 实时查询,返回当前时间
|
||||
resArr.add(oneJson);
|
||||
}
|
||||
return ResultMessageUtil.toJSON(resArr, "现存量查询成功!");
|
||||
|
|
Loading…
Reference in New Issue