mmpac_生产报告openapi接口优化报告类型翻译
This commit is contained in:
parent
fa093b84ad
commit
74ff3c8976
|
@ -74,8 +74,8 @@ public class WrResource extends AbstractNCCRestResource {
|
|||
|
||||
@POST
|
||||
@Path("saveAndApprove")
|
||||
@Consumes({ "application/json" })
|
||||
@Produces({ "application/json" })
|
||||
@Consumes({"application/json"})
|
||||
@Produces({"application/json"})
|
||||
public JSONString saveAndApprove(List<Map<String, Object>> paramList) {
|
||||
if (MMValueCheck.isEmpty(paramList)) {
|
||||
return ResultMessageUtil.exceptionToJSON("传入数据异常,参数要包含表头信息和表体信息", "1");
|
||||
|
@ -261,8 +261,8 @@ public class WrResource extends AbstractNCCRestResource {
|
|||
|
||||
@POST
|
||||
@Path("deleteByMesIDs")
|
||||
@Consumes({ "application/json" })
|
||||
@Produces({ "application/json" })
|
||||
@Consumes({"application/json"})
|
||||
@Produces({"application/json"})
|
||||
public JSONString deleteByMesIDs(String[] mesIDs) {
|
||||
if (MMValueCheck.isEmpty(mesIDs)) {
|
||||
return ResultMessageUtil.exceptionToJSON("传入数据异常", "1");
|
||||
|
@ -279,14 +279,15 @@ public class WrResource extends AbstractNCCRestResource {
|
|||
|
||||
@POST
|
||||
@Path("newsave")
|
||||
@Consumes({ "application/json" })
|
||||
@Produces({ "application/json" })
|
||||
@Consumes({"application/json"})
|
||||
@Produces({"application/json"})
|
||||
public JSONString newsave(Map<String, Object> paramsMap) {
|
||||
List<Map<String, Object>> paramList = (List<Map<String, Object>>) paramsMap.get("data");
|
||||
if (MMValueCheck.isEmpty(paramList)) {
|
||||
return ResultMessageUtil.exceptionToJSON("传入数据异常,参数要包含表头信息和表体信息", "1");
|
||||
}
|
||||
List<AggWrVO> voList = new ArrayList<AggWrVO>();
|
||||
BaseDAO baseDAO = new BaseDAO();
|
||||
try {
|
||||
for (Map<String, Object> paramMap : paramList) {
|
||||
if (!paramMap.containsKey(HEADTABLE) || !paramMap.containsKey(BODYTABLE)) {
|
||||
|
@ -347,12 +348,16 @@ public class WrResource extends AbstractNCCRestResource {
|
|||
vo.setChildren(WrItemVO.class, items.toArray(new WrItemVO[0]));
|
||||
voList.add(vo);
|
||||
IAPIWrMaintain server = NCLocator.getInstance().lookup(IAPIWrMaintain.class);
|
||||
// List<AggWrVO> aggWrVOS = TransferCodeToPKTool.transferAggVO(voList);
|
||||
// //·Ò뱨¸æÀàÐÍ
|
||||
// List<BilltypeVO> collection = (List<BilltypeVO>) new BaseDAO().retrieveByClause(BilltypeVO.class, " pk_billtypecode='" + aggWrVOS.get(0).getParentVO().getVtrantypecode()+"'");
|
||||
// aggWrVOS.get(0).getParentVO().setVtrantypeid(collection.get(0).getPk_billtypeid());
|
||||
// aggWrVOS.get(0).getParentVO().setDbilldate(new UFDate());
|
||||
// AggWrVO[] aggvos = server.newsave(aggWrVOS.toArray(new AggWrVO[0]));
|
||||
List<AggWrVO> aggWrVOS = TransferCodeToPKTool.transferAggVO(voList);
|
||||
//翻译报告类型
|
||||
for (AggWrVO aggWrVO : aggWrVOS) {
|
||||
List<BilltypeVO> collection = (List<BilltypeVO>) baseDAO.retrieveByClause(BilltypeVO.class, " pk_billtypecode='" + aggWrVO.getParentVO().getVtrantypecode() + "'");
|
||||
if(collection==null||collection.size()==0){
|
||||
throw new BusinessException("翻译报告类型失败,检查报告类型编码【"+aggWrVO.getParentVO().getVtrantypecode()+"】");
|
||||
}
|
||||
aggWrVO.getParentVO().setVtrantypeid(collection.get(0).getPk_billtypeid());
|
||||
aggWrVO.getParentVO().setDbilldate(new UFDate());
|
||||
}
|
||||
AggWrVO[] aggvos = server.newsave(voList.toArray(new AggWrVO[0]));
|
||||
boolean successFlag = true;
|
||||
StringBuilder errMsg = new StringBuilder();
|
||||
|
@ -384,8 +389,8 @@ public class WrResource extends AbstractNCCRestResource {
|
|||
|
||||
@POST
|
||||
@Path("update")
|
||||
@Consumes({ "application/json" })
|
||||
@Produces({ "application/json" })
|
||||
@Consumes({"application/json"})
|
||||
@Produces({"application/json"})
|
||||
public JSONString update(Map<String, Object> paramsMap) throws BusinessException {
|
||||
List<Map<String, Object>> paramList = (List<Map<String, Object>>) paramsMap.get("data");
|
||||
if (MMValueCheck.isEmpty(paramList)) {
|
||||
|
@ -532,8 +537,8 @@ public class WrResource extends AbstractNCCRestResource {
|
|||
|
||||
@POST
|
||||
@Path("delete")
|
||||
@Consumes({ "application/json" })
|
||||
@Produces({ "application/json" })
|
||||
@Consumes({"application/json"})
|
||||
@Produces({"application/json"})
|
||||
public JSONString delete(Map<String, Object> paramMap) throws BusinessException {
|
||||
if (MMValueCheck.isEmpty(paramMap)) {
|
||||
return ResultMessageUtil.exceptionToJSON("传入数据异常", "1");
|
||||
|
|
Loading…
Reference in New Issue