From 03ca4f4f48b3bd60cd07832dfe748f9f69167ac6 Mon Sep 17 00:00:00 2001 From: zouyu <2723363702@qq.com> Date: 星期二, 14 十一月 2023 17:19:13 +0800 Subject: [PATCH] 销售订单-同步修改 --- mes-plan/src/main/java/com/chinaztt/mes/plan/service/impl/CustomerOrderServiceImpl.java | 15 ++++++++++++--- 1 files changed, 12 insertions(+), 3 deletions(-) diff --git a/mes-plan/src/main/java/com/chinaztt/mes/plan/service/impl/CustomerOrderServiceImpl.java b/mes-plan/src/main/java/com/chinaztt/mes/plan/service/impl/CustomerOrderServiceImpl.java index fd63ef6..cf0d2ca 100644 --- a/mes-plan/src/main/java/com/chinaztt/mes/plan/service/impl/CustomerOrderServiceImpl.java +++ b/mes-plan/src/main/java/com/chinaztt/mes/plan/service/impl/CustomerOrderServiceImpl.java @@ -187,6 +187,14 @@ private Environment environment; + private final static String OTC_MAIN_STATUS_CANCEL = "宸插彇娑�"; + + private final static String OTC_MAIN_STATUS_TRANSMIT = "宸蹭笅杈�"; + + private final static String AFFILIATED_CONTRACT = "涓ぉ娉ㄥ鍘�"; + + + @Override public void otcDownload(Long id, HttpServletResponse response) { customerOrderUtil.otcDownLoadFiles(id, response); @@ -655,6 +663,7 @@ * @return */ @Override + @Transactional(rollbackFor = Exception.class) public R otcCustomerOrderSync(String selectTime, String pathCode) { try { if (StringUtils.isBlank(selectTime)) { @@ -705,7 +714,7 @@ //鎵�灞炲伐鍘� String affiliatedContract=customerJSONObject.getString("affiliatedContract"); //鍙媺鍙栨墍灞炲叕鍙镐负涓ぉ娴锋磱绯荤粺鏈夐檺鍏徃鐨勬暟鎹� - if (!"涓ぉ鏉愭枡鍘�".equals(affiliatedContract)){ + if (!AFFILIATED_CONTRACT.equals(affiliatedContract)){ continue; } // 涓嶅湪杩欏嚑涓姸鎬佷腑鐨勬暟鎹氨璺宠繃 @@ -717,14 +726,14 @@ customer = new Customer(); } //濡傛灉OTC涓富琛ㄧ姸鎬佹槸鍙栨秷閭e氨璺宠繃鎴栬�呭垹闄ゅ凡缁忓悓姝ョ殑鏁版嵁 - if ("宸插彇娑�".equals(otcMainStatus)) { + if (OTC_MAIN_STATUS_CANCEL.equals(otcMainStatus)) { if (customer.getId() != null) { customerMapper.deleteById(customer.getId()); baseMapper.delete(Wrappers.<CustomerOrder>lambdaQuery().eq(CustomerOrder::getCustomerId, customer.getId())); } continue; } - if (!"宸蹭笅杈�".equals(otcMainStatus)) {//null == affiliatedCompany || !Arrays.asList("宸蹭笅杈�").contains(otcMainStatus) /*|| affiliatedCompany.equals("姹熻嫃涓ぉ绉戞妧鑲′唤鏈夐檺鍏徃")*/) { + if (!OTC_MAIN_STATUS_TRANSMIT.equals(otcMainStatus)) {//null == affiliatedCompany || !Arrays.asList("宸蹭笅杈�").contains(otcMainStatus) /*|| affiliatedCompany.equals("姹熻嫃涓ぉ绉戞妧鑲′唤鏈夐檺鍏徃")*/) { continue;//鍙幏鍙朞TC涓凡瀹℃牳鍙婂凡涓嬭揪鐨勮鍗曪紝 } //瀹㈡埛缂栧彿 -- Gitblit v1.9.3