|
@@ -1,23 +1,49 @@
|
|
|
package com.steerinfo.dil.service.impl;
|
|
|
|
|
|
import com.steerinfo.dil.mapper.BackgroundProcessingMapper;
|
|
|
+import com.steerinfo.dil.mapper.UniversalMapper;
|
|
|
import com.steerinfo.dil.service.IBackgroundProcessService;
|
|
|
+import com.steerinfo.dil.util.DataChange;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
+import java.math.BigDecimal;
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.Arrays;
|
|
|
+import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
@Service(value = "backgroundProcessingService")
|
|
|
public class BackgroundProcessingServiceImpl implements IBackgroundProcessService {
|
|
|
|
|
|
@Autowired
|
|
|
- BackgroundProcessingMapper backgroundProcessingMapper;
|
|
|
+ private BackgroundProcessingMapper backgroundProcessingMapper;
|
|
|
+
|
|
|
|
|
|
+ /**
|
|
|
+ * 更新订单所属厂区
|
|
|
+ * @param map
|
|
|
+ * @return
|
|
|
+ */
|
|
|
@Override
|
|
|
- public int updatePurOrgId(Integer orderId) {
|
|
|
- //获取订单类型
|
|
|
- Integer orderType = backgroundProcessingMapper.getOrderType(orderId);
|
|
|
- if(orderType == 10 || orderType == 20){
|
|
|
- backgroundProcessingMapper.updatePurOrgId(orderId);
|
|
|
+ public int updatePurOrgId(Map<String, Object> map) {
|
|
|
+ return backgroundProcessingMapper.updatePurOrderOrgId(map);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 删除重复实绩
|
|
|
+ * @param orderNumber
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public int deleteErrorResult(String orderNumber) {
|
|
|
+ Map<String, Object> orderMes = backgroundProcessingMapper.getOrderMesByOrderNum(orderNumber);
|
|
|
+ int orderType = DataChange.dataToBigDecimal(orderMes.get("orderType")).intValue();
|
|
|
+ List<Integer> arrayList = Arrays.asList(11, 15, 16, 21); //没有固定路线不支持此操作
|
|
|
+ if(arrayList.contains(orderType)){
|
|
|
+ return 0;
|
|
|
}
|
|
|
- return 1;
|
|
|
+ BigDecimal resultTotalId = DataChange.dataToBigDecimal(orderMes.get("resultTotalId"));
|
|
|
+
|
|
|
+ return 0;
|
|
|
}
|
|
|
}
|