金慧软件修改BIP销售订单明细
This commit is contained in:
parent
1c26c4e2ab
commit
5da447c7d3
|
@ -7,6 +7,7 @@ import nc.bs.framework.common.InvocationInfoProxy;
|
||||||
import nc.bs.framework.common.NCLocator;
|
import nc.bs.framework.common.NCLocator;
|
||||||
import nc.itf.bd.defdoc.IDefdocService;
|
import nc.itf.bd.defdoc.IDefdocService;
|
||||||
import nc.itf.pim.project.prv.IProject;
|
import nc.itf.pim.project.prv.IProject;
|
||||||
|
import nc.jdbc.framework.SQLParameter;
|
||||||
import nc.jdbc.framework.processor.ColumnListProcessor;
|
import nc.jdbc.framework.processor.ColumnListProcessor;
|
||||||
import nc.jdbc.framework.processor.ColumnProcessor;
|
import nc.jdbc.framework.processor.ColumnProcessor;
|
||||||
import nc.jdbc.framework.processor.MapProcessor;
|
import nc.jdbc.framework.processor.MapProcessor;
|
||||||
|
@ -21,6 +22,8 @@ import nccloud.api.rest.utils.NCCRestUtils;
|
||||||
import nccloud.api.rest.utils.ResultMessageUtil;
|
import nccloud.api.rest.utils.ResultMessageUtil;
|
||||||
import nccloud.api.so.m30.IAPISaleOrderMaitain;
|
import nccloud.api.so.m30.IAPISaleOrderMaitain;
|
||||||
import nccloud.api.so.m30.IAPISaleOrderQuery;
|
import nccloud.api.so.m30.IAPISaleOrderQuery;
|
||||||
|
import nccloud.baseapp.core.log.NCCForUAPLogger;
|
||||||
|
import nccloud.commons.lang.StringUtils;
|
||||||
import nccloud.openapi.scmpub.pub.NCCPubRestResource;
|
import nccloud.openapi.scmpub.pub.NCCPubRestResource;
|
||||||
import nccloud.openapi.scmpub.pub.TransferCodeToPKTool;
|
import nccloud.openapi.scmpub.pub.TransferCodeToPKTool;
|
||||||
import nccloud.openapi.scmpub.pub.TransferMapToVOTool;
|
import nccloud.openapi.scmpub.pub.TransferMapToVOTool;
|
||||||
|
@ -483,4 +486,45 @@ public class SaleOrderResource extends NCCPubRestResource {
|
||||||
return ResultMessageUtil.exceptionToJSON(e);
|
return ResultMessageUtil.exceptionToJSON(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 金慧软件修改BIP销售订单明细
|
||||||
|
*
|
||||||
|
* @author mzr
|
||||||
|
* @date 2025/05/14
|
||||||
|
*/
|
||||||
|
@POST
|
||||||
|
@Path("updateDef")
|
||||||
|
@Consumes({"application/json"})
|
||||||
|
@Produces({"application/json"})
|
||||||
|
public JSONString updateDef(Map<String, Object> paramMap) {
|
||||||
|
String csaleorderbid = (String) paramMap.get("csaleorderbid");
|
||||||
|
if (StringUtils.isEmpty(csaleorderbid)) {
|
||||||
|
return ResultMessageUtil.exceptionToJSON("传入参数为空,请检查", APIErrCodeEnum.BUSINESSEXCCODE.getCode());
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
StringBuilder sql = new StringBuilder("update so_saleorder_b set ");
|
||||||
|
SQLParameter parameter = new SQLParameter();
|
||||||
|
for (Map.Entry<String, Object> entry : paramMap.entrySet()) {
|
||||||
|
if (!"csaleorderbid".equals(entry.getKey())) {
|
||||||
|
sql.append(entry.getKey()).append(" = ?, ");
|
||||||
|
parameter.addParam(entry.getValue());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (parameter.getCountParams() <= 0) {
|
||||||
|
return ResultMessageUtil.toJSON("传入参数为空,请检查", APIErrCodeEnum.BUSINESSEXCCODE.getCode());
|
||||||
|
}
|
||||||
|
// 删除最后的", "
|
||||||
|
sql.delete(sql.length() - 2, sql.length());
|
||||||
|
sql.append(" where csaleorderbid = ?");
|
||||||
|
NCCForUAPLogger.debug("updateDef-sql:" + sql);
|
||||||
|
parameter.addParam(csaleorderbid);
|
||||||
|
BaseDAO baseDAO = new BaseDAO();
|
||||||
|
int num = baseDAO.executeUpdate(sql.toString(), parameter);
|
||||||
|
return ResultMessageUtil.toJSON(num, "销售订单修改成功");
|
||||||
|
} catch (BusinessException e) {
|
||||||
|
return ResultMessageUtil.exceptionToJSON(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue