Browse Source

Merge branch 'dev' into pre-production

single_db
zhenghaoyu 1 year ago
parent
commit
bd586e5baf
  1. 4
      blade-service-api/logpm-old-project-api/src/main/java/com/logpm/oldproject/feign/IOrderClient.java
  2. 5
      blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/feign/OrderClient.java
  3. 2
      blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/mapper/OrderMapper.java
  4. 10
      blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/mapper/OrderMapper.xml
  5. 2
      blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/IOrderService.java
  6. 5
      blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/impl/OrderServiceImpl.java
  7. 2
      blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/SyncOrderInfoToPlatform.java
  8. 2
      blade-service/logpm-patch/src/main/java/com/logpm/patch/service/ISyncOrderInfoService.java
  9. 6
      blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/SyncOrderInfoServiceImpl.java

4
blade-service-api/logpm-old-project-api/src/main/java/com/logpm/oldproject/feign/IOrderClient.java

@ -61,5 +61,9 @@ public interface IOrderClient {
@GetMapping(API_PREFIX + "/getTotalCountByInventory") @GetMapping(API_PREFIX + "/getTotalCountByInventory")
Integer getTotalCountByInventory(@RequestParam String param, @RequestParam Integer oldWarehouseId); Integer getTotalCountByInventory(@RequestParam String param, @RequestParam Integer oldWarehouseId);
@GetMapping(API_PREFIX + "/findOrderCodeListByPageWithInventoryId")
List<String> findOrderCodeListByPageWithInventoryId(@RequestParam String param, @RequestParam Integer oldWarehouseId, @RequestParam Integer pageNum, @RequestParam Integer pageSize); List<String> findOrderCodeListByPageWithInventoryId(@RequestParam String param, @RequestParam Integer oldWarehouseId, @RequestParam Integer pageNum, @RequestParam Integer pageSize);
@GetMapping(API_PREFIX + "/updateStatusWithTableName")
void updateStatusWithTableName(@RequestParam int isUpdate, @RequestParam String orderCode, @RequestParam String tableName);
} }

5
blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/feign/OrderClient.java

@ -81,4 +81,9 @@ public class OrderClient implements IOrderClient {
public List<String> findOrderCodeListByPageWithInventoryId(String param, Integer oldWarehouseId, Integer pageNum, Integer pageSize) { public List<String> findOrderCodeListByPageWithInventoryId(String param, Integer oldWarehouseId, Integer pageNum, Integer pageSize) {
return orderService.findOrderCodeListByPageWithInventoryId(param,oldWarehouseId,pageNum,pageSize); return orderService.findOrderCodeListByPageWithInventoryId(param,oldWarehouseId,pageNum,pageSize);
} }
@Override
public void updateStatusWithTableName(int isUpdate, String orderCode, String tableName) {
orderService.updateStatusWithTableName(isUpdate,orderCode,tableName);
}
} }

2
blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/mapper/OrderMapper.java

@ -43,4 +43,6 @@ public interface OrderMapper extends BaseMapper<OrderEntity> {
Integer getTotalCountByInventory(@Param("param") String param, @Param("oldWarehouseId") Integer oldWarehouseId); Integer getTotalCountByInventory(@Param("param") String param, @Param("oldWarehouseId") Integer oldWarehouseId);
List<String> findOrderCodeListByPageWithInventoryId(@Param("param") String param, @Param("oldWarehouseId") Integer oldWarehouseId, @Param("pageNum") Integer pageNum, @Param("pageSize") Integer pageSize); List<String> findOrderCodeListByPageWithInventoryId(@Param("param") String param, @Param("oldWarehouseId") Integer oldWarehouseId, @Param("pageNum") Integer pageNum, @Param("pageSize") Integer pageSize);
void updateStatusWithTableName(@Param("isUpdate") int isUpdate, @Param("orderCode") String orderCode, @Param("tableName") String tableName);
} }

10
blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/mapper/OrderMapper.xml

@ -77,8 +77,6 @@
`i`.`update_time` DESC `i`.`update_time` DESC
</select> </select>
<select id="findOrderCodeListByPageWithInventoryId" resultType="java.lang.String"> <select id="findOrderCodeListByPageWithInventoryId" resultType="java.lang.String">
SELECT SELECT
`i`.`orderSelfNum` `i`.`orderSelfNum`
@ -99,7 +97,7 @@
`i`.`id` ASC `i`.`id` ASC
LIMIT #{pageNum},#{pageSize} LIMIT #{pageNum},#{pageSize}
</select> </select>
findOrderCodeListByPage
<select id="findOrderCodeListByPage" resultType="java.lang.String"> <select id="findOrderCodeListByPage" resultType="java.lang.String">
select t.orderSelfNum select t.orderSelfNum
from ${tableName} `o` from ${tableName} `o`
@ -180,4 +178,10 @@
LIMIT #{pageNum},#{pageSize} LIMIT #{pageNum},#{pageSize}
</select> </select>
<update id="updateStatusWithTableName">
update ${tableName}
set is_update = #{isUpdate}
where order_code = #{orderCode}
</update>
</mapper> </mapper>

2
blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/IOrderService.java

@ -23,4 +23,6 @@ public interface IOrderService {
Integer getTotalCountByInventory(String param, Integer oldWarehouseId); Integer getTotalCountByInventory(String param, Integer oldWarehouseId);
List<String> findOrderCodeListByPageWithInventoryId(String param, Integer oldWarehouseId, Integer pageNum, Integer pageSize); List<String> findOrderCodeListByPageWithInventoryId(String param, Integer oldWarehouseId, Integer pageNum, Integer pageSize);
void updateStatusWithTableName(int isUpdate, String orderCode, String tableName);
} }

5
blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/impl/OrderServiceImpl.java

@ -68,4 +68,9 @@ public class OrderServiceImpl implements IOrderService {
public List<String> findOrderCodeListByPageWithInventoryId(String param, Integer oldWarehouseId, Integer pageNum, Integer pageSize) { public List<String> findOrderCodeListByPageWithInventoryId(String param, Integer oldWarehouseId, Integer pageNum, Integer pageSize) {
return orderMapper.findOrderCodeListByPageWithInventoryId(param,oldWarehouseId,pageNum,pageSize); return orderMapper.findOrderCodeListByPageWithInventoryId(param,oldWarehouseId,pageNum,pageSize);
} }
@Override
public void updateStatusWithTableName(int isUpdate, String orderCode, String tableName) {
orderMapper.updateStatusWithTableName(isUpdate,orderCode,tableName);
}
} }

2
blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/SyncOrderInfoToPlatform.java

@ -133,7 +133,7 @@ public class SyncOrderInfoToPlatform {
try{ try{
List<String> orderCodeList = orderClient.findOrderCodeListByPage(param,oldWarehouseId,j,pageSize,tableName); List<String> orderCodeList = orderClient.findOrderCodeListByPage(param,oldWarehouseId,j,pageSize,tableName);
syncOrderInfoService.handleData(orderCodeList,oldWarehouseId,newWarehouseId); syncOrderInfoService.handleData(orderCodeList,oldWarehouseId,newWarehouseId,tableName);
log.info("################syncOrderInfo: 同步成功{}个订单",orderCodeList.size()); log.info("################syncOrderInfo: 同步成功{}个订单",orderCodeList.size());
one.setCurrentPage(j+1); one.setCurrentPage(j+1);

2
blade-service/logpm-patch/src/main/java/com/logpm/patch/service/ISyncOrderInfoService.java

@ -3,7 +3,7 @@ package com.logpm.patch.service;
import java.util.List; import java.util.List;
public interface ISyncOrderInfoService { public interface ISyncOrderInfoService {
void handleData(List<String> orderCodeList,Integer oldWarehouseId,Long newWarehouseId); void handleData(List<String> orderCodeList,Integer oldWarehouseId,Long newWarehouseId,String tableName);
void handleDataZero(List<String> orderCodeList, Integer oldWarehouseId, Long newWarehouseId); void handleDataZero(List<String> orderCodeList, Integer oldWarehouseId, Long newWarehouseId);

6
blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/SyncOrderInfoServiceImpl.java

@ -84,7 +84,7 @@ public class SyncOrderInfoServiceImpl implements ISyncOrderInfoService {
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
@Override @Override
public void handleData(List<String> orderCodeList,Integer oldWarehouseId,Long newWarehouseId) { public void handleData(List<String> orderCodeList,Integer oldWarehouseId,Long newWarehouseId,String tableName) {
log.info("#############handleData: 处理订单开始"); log.info("#############handleData: 处理订单开始");
for (String orderCode:orderCodeList){ for (String orderCode:orderCodeList){
log.info("#############handleData: 当前处理orderCode={}的订单 ",orderCode); log.info("#############handleData: 当前处理orderCode={}的订单 ",orderCode);
@ -105,10 +105,14 @@ public class SyncOrderInfoServiceImpl implements ISyncOrderInfoService {
saveTrayTypeInfoPackage(orderCode,oldWarehouseId,newWarehouseId); saveTrayTypeInfoPackage(orderCode,oldWarehouseId,newWarehouseId);
orderClient.updateStatusWithTableName(1,orderCode,tableName);
}catch (CustomerException e){ }catch (CustomerException e){
log.error("同步订单"+orderCode+"失败: "+e.message,e); log.error("同步订单"+orderCode+"失败: "+e.message,e);
orderClient.updateStatusWithTableName(2,orderCode,tableName);
}catch (Exception e){ }catch (Exception e){
log.error("同步订单"+orderCode+"失败",e); log.error("同步订单"+orderCode+"失败",e);
orderClient.updateStatusWithTableName(2,orderCode,tableName);
} }
// } // }

Loading…
Cancel
Save