|
@@ -17,7 +17,9 @@ import org.junit.Test;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
|
|
+import javax.xml.crypto.Data;
|
|
|
import java.math.BigDecimal;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.*;
|
|
@@ -1519,17 +1521,22 @@ public class OmstruckOrderServiceImpl implements IOmstruckOrderService {
|
|
|
|
|
|
/**
|
|
|
* 根据运单id关闭订单
|
|
|
- * @param orderId
|
|
|
+ * @param map
|
|
|
* @return
|
|
|
*/
|
|
|
@Override
|
|
|
- public int closeOmstruckOrder(BigDecimal orderId) throws Exception {
|
|
|
+ public int closeOmstruckOrder(Map<String,Object> map) throws Exception {
|
|
|
+ //获取订单id
|
|
|
+ BigDecimal orderId = DataChange.dataToBigDecimal(map.get("orderId"));
|
|
|
+ String operationUserId = (String) map.get("userId");
|
|
|
BigDecimal i = omstruckOrderSeparateMapper.getWeightTask(orderId);
|
|
|
if(i != null){
|
|
|
throw new Exception("存在计量实绩,无法删除");
|
|
|
}
|
|
|
OmstruckOrder omstruckOrder = omstruckOrderMapper.selectByPrimaryKey(orderId);
|
|
|
omstruckOrder.setOrderStatus(new BigDecimal(7));
|
|
|
+ omstruckOrder.setInsertUpdateRemark("用户:" + operationUserId + "操作删除");
|
|
|
+ omstruckOrder.setUpdateTime(new Date());
|
|
|
int result = omstruckOrderMapper.updateByPrimaryKeySelective(omstruckOrder);
|
|
|
return result;
|
|
|
}
|