定时同步高压加工车间IMS的生产报告-调整
This commit is contained in:
parent
a4549be60b
commit
0fd69271b9
|
|
@ -39,8 +39,8 @@ import java.util.*;
|
||||||
* @date 20250929
|
* @date 20250929
|
||||||
*/
|
*/
|
||||||
public class ProductReportGyImsPlugin implements IBackgroundWorkPlugin {
|
public class ProductReportGyImsPlugin implements IBackgroundWorkPlugin {
|
||||||
private SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
private SimpleDateFormat DATE_FORMATTER = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
private SimpleDateFormat sdf_ts = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
private SimpleDateFormat DATETIME_FORMATTER = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
// BIP数据源
|
// BIP数据源
|
||||||
public static final BaseDAO baseDAO = new BaseDAO();
|
public static final BaseDAO baseDAO = new BaseDAO();
|
||||||
// IMS数据源
|
// IMS数据源
|
||||||
|
|
@ -98,15 +98,13 @@ public class ProductReportGyImsPlugin implements IBackgroundWorkPlugin {
|
||||||
hvo.setCreator("BIP");
|
hvo.setCreator("BIP");
|
||||||
hvo.setBillmaker("BIP");
|
hvo.setBillmaker("BIP");
|
||||||
String dmakedateStr = "";
|
String dmakedateStr = "";
|
||||||
if (mainMap.get("dmakedate") != null) {
|
if (mainMap.get("dmakedate") != null && mainMap.get("dmakedate") instanceof Timestamp dmakedate1) {
|
||||||
Timestamp dmakedate1 = (Timestamp) mainMap.get("dmakedate");
|
dmakedateStr = DATE_FORMATTER.format(dmakedate1);
|
||||||
dmakedateStr = sdf.format(dmakedate1);
|
|
||||||
UFDate dmakedate = new UFDate(dmakedateStr);
|
UFDate dmakedate = new UFDate(dmakedateStr);
|
||||||
hvo.setDmakedate(dmakedate);
|
hvo.setDmakedate(dmakedate);
|
||||||
}
|
}
|
||||||
if (mainMap.get("creationtime") != null) {
|
if (mainMap.get("creationtime") != null && mainMap.get("creationtime") instanceof Timestamp creationtime1) {
|
||||||
Timestamp creationtime1 = (Timestamp) mainMap.get("creationtime");
|
String creationtimeStr = DATETIME_FORMATTER.format(creationtime1);
|
||||||
String creationtimeStr = sdf_ts.format(creationtime1);
|
|
||||||
UFDateTime creationtime = new UFDateTime(creationtimeStr);
|
UFDateTime creationtime = new UFDateTime(creationtimeStr);
|
||||||
hvo.setCreationtime(creationtime);
|
hvo.setCreationtime(creationtime);
|
||||||
}
|
}
|
||||||
|
|
@ -125,8 +123,9 @@ public class ProductReportGyImsPlugin implements IBackgroundWorkPlugin {
|
||||||
// 如果物料不相等,则BIP物料替换为IMS物料
|
// 如果物料不相等,则BIP物料替换为IMS物料
|
||||||
String cbmaterialvid = bvo.getCbmaterialvid();
|
String cbmaterialvid = bvo.getCbmaterialvid();
|
||||||
String goodsCode = detailMap.get("cbmaterialvid") + "";
|
String goodsCode = detailMap.get("cbmaterialvid") + "";
|
||||||
|
String whereSql = MaterialVO.CODE + " = '" + goodsCode + "'" + " and pk_org = '" + hvo.getPk_org() + "'";
|
||||||
String goodsId = MyHelper.getStrValByCondition(MaterialVO.getDefaultTableName(), MaterialVO.PK_MATERIAL,
|
String goodsId = MyHelper.getStrValByCondition(MaterialVO.getDefaultTableName(), MaterialVO.PK_MATERIAL,
|
||||||
MaterialVO.CODE + " = '" + goodsCode + "'");
|
whereSql);
|
||||||
if (!cbmaterialvid.equals(goodsId)) {
|
if (!cbmaterialvid.equals(goodsId)) {
|
||||||
bvo.setCbmaterialvid(goodsId);
|
bvo.setCbmaterialvid(goodsId);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue