物料推送优化

This commit is contained in:
mzr 2025-12-29 14:16:37 +08:00
parent c9a7551b1b
commit 0c8648106b
4 changed files with 28 additions and 4 deletions

View File

@ -236,11 +236,17 @@ public class MaterialToEpicMesCronPlugin implements IBackgroundWorkPlugin {
if (MMValueCheck.isEmpty(pk_material)) {
return;
}
BaseDAO dao = new BaseDAO();
/*
禁用时间戳ts,否则修改SQL里会自动添加ts,影响别的公司定时查询数据,
比如物料A被WMS或者箱变的定时同步修改了时间戳也会被查到进而推送外系统
*/
dao.setAddTimeStamp(false);
try {
String updateSql = "update bd_material set def30 = '[errorCode]' where pk_material = '[pk_material]'";
updateSql = updateSql.replace("[pk_material]", pk_material);
updateSql = updateSql.replace("[errorCode]", errorCode);
int updatedRows = getDao().executeUpdate(updateSql);
int updatedRows = dao.executeUpdate(updateSql);
} catch (BusinessException e) {
logDl.error("EpicMes-Material-handleSyncMaterialExp = " + e.getMessage(), e);
}

View File

@ -243,11 +243,17 @@ public class MaterialToEpicMesPlugin implements IBackgroundWorkPlugin {
if (MMValueCheck.isEmpty(pk_material)) {
return;
}
BaseDAO dao = new BaseDAO();
/*
禁用时间戳ts,否则修改SQL里会自动添加ts,影响别的公司定时查询数据,
比如物料A被WMS或者箱变的定时同步修改了时间戳也会被查到进而推送外系统
*/
dao.setAddTimeStamp(false);
try {
String updateSql = "update bd_material set def30 = '[errorCode]' where pk_material = '[pk_material]'";
updateSql = updateSql.replace("[pk_material]", pk_material);
updateSql = updateSql.replace("[errorCode]", errorCode);
int updatedRows = getDao().executeUpdate(updateSql);
int updatedRows = dao.executeUpdate(updateSql);
} catch (BusinessException e) {
logDl.error("EpicMes-Material-handleSyncMaterialExp = " + e.getMessage(), e);
}

View File

@ -186,9 +186,15 @@ public class MaterialToQmsAgainPlugin implements IBackgroundWorkPlugin {
}
private void updateBs(String pkMaterial) throws DAOException {
BaseDAO dao = new BaseDAO();
/*
禁用时间戳ts,否则修改SQL里会自动添加ts,影响别的公司定时查询数据,
比如物料A被WMS或者箱变的定时同步修改了时间戳也会被查到进而推送外系统
*/
dao.setAddTimeStamp(false);
String sql = "update BD_MATERIAL set def36='Y' where pk_material='"
+ pkMaterial + "'";
getDao().executeUpdate(sql);
dao.executeUpdate(sql);
}
private Object getMrlType(String pkMaterial, String xbOrg) throws DAOException {

View File

@ -180,9 +180,15 @@ public class MaterialToQmsPlugin implements IBackgroundWorkPlugin {
}
private void updateBs(String pkMaterial) throws DAOException {
BaseDAO dao = new BaseDAO();
/*
禁用时间戳ts,否则修改SQL里会自动添加ts,影响别的公司定时查询数据,
比如物料A被WMS或者箱变的定时同步修改了时间戳也会被查到进而推送外系统
*/
dao.setAddTimeStamp(false);
String sql = "update BD_MATERIAL set def36='Y' where pk_material='"
+ pkMaterial + "'";
getDao().executeUpdate(sql);
dao.executeUpdate(sql);
}
private Object getMrlType(String pkMaterial, String xbOrg) throws DAOException {