feat(material): 精密物料推启源-增加助记码赋值

This commit is contained in:
mzr 2025-10-30 19:14:13 +08:00
parent f04b8ddd91
commit ae84d49fb7
1 changed files with 21 additions and 0 deletions

View File

@ -45,6 +45,14 @@ public class MaterialJmPushToQyMesAction implements ICommonAction {
private static final String reqUrl = "/IF_QyErpApi.ashx?action=addwlxx";
private Map<String, String> configParams;
private String pkOrg1 = "";
private BaseDAO baseDAO = null;
private BaseDAO getDao() {
if (this.baseDAO == null) {
this.baseDAO = new BaseDAO();
}
return this.baseDAO;
}
@Override
public Object doAction(IRequest request) {
@ -115,6 +123,8 @@ public class MaterialJmPushToQyMesAction implements ICommonAction {
String defName = getDefName("zdy-jmzz001", wlbzId);
if (MMValueCheck.isNotEmpty(defName)) {
wlbz = defName;
} else {
throw new BusinessException("ÇëÏÈÉèÖÃÎïÁϱêÖ¾");
}
// 产品分类
String cpfl;
@ -154,9 +164,20 @@ public class MaterialJmPushToQyMesAction implements ICommonAction {
contentArr.add(contentObj);
singleObj.put("Content", contentArr);
pushData(singleObj);
updateBasicInfo(pkMaterial, qyCode);
}
}
private void updateBasicInfo(String pkMaterial, String qyCode) throws DAOException {
if (MMValueCheck.isEmpty(pkMaterial) || MMValueCheck.isEmpty(qyCode)) {
return;
}
String sql = " update bd_material set materialmnecode = '" + qyCode + "' where pk_material ='" + pkMaterial + "'";
getDao().executeUpdate(sql);
// sql = " update bd_material_v set materialmnecode = '" + qyCode + "' where pk_material ='" + pkMaterial + "'";
// getDao().executeUpdate(sql);
}
/**
* 设置自定义字段的值
*