guoyujie
6 天以前 8fbb9414ac41fd267691356147757602f3b6371c
north-glass-erp/src/main/java/com/example/erp/service/sd/DeliveryService.java
@@ -10,6 +10,8 @@
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.example.erp.dto.sd.DeliveryDetailDTO;
import com.example.erp.dto.sd.DeliveryDetailProductDTO;
import com.example.erp.dto.sd.DeliverySearchDTO;
import com.example.erp.dto.sd.OrderSearchDTO;
import com.example.erp.entity.mm.FinishedOperateLog;
import com.example.erp.entity.sd.*;
import com.example.erp.entity.userInfo.Log;
@@ -60,7 +62,7 @@
    FinishedGoodsInventoryService finishedGoodsInventoryService;
    public Map<String, Object> getSelectShippingOrder(Integer pageNum, Integer pageSize,List<String> selectDate, Delivery delivery) throws JsonProcessingException {
    public Map<String, Object> getSelectShippingOrder(Integer pageNum, Integer pageSize,List<String> selectDate, Map<String,Object> config) throws JsonProcessingException {
        Integer offset = (pageNum - 1) * pageSize;
        String endDate = LocalDate.now().toString();
        String startDate = LocalDate.now().minusDays(15).toString();
@@ -72,8 +74,14 @@
                endDate = selectDate.get(1);
            }
        }
        JSONObject orderJson = new JSONObject(config);
        DeliverySearchDTO delivery = JSONObject.parseObject(JSONObject.toJSONString(orderJson.get("filter")), DeliverySearchDTO.class);
        Map<String,String> sortDate = (Map<String, String>) config.get("sort");
        String field = sortDate.get("field").replaceAll("(?<!^)([A-Z])", "_$1").toLowerCase();
        String orderBy = sortDate.get("order");
        Map<String, Object> map = new HashMap<>();
        map.put("data", deliveryMapper.getSelectShippingOrder(offset, pageSize,startDate,endDate, delivery));
        map.put("data", deliveryMapper.getSelectShippingOrder(offset, pageSize,startDate,endDate, delivery,field, orderBy));
        map.put("total", deliveryMapper.getSelectShippingOrderPageTotal(offset, pageSize,startDate,endDate, delivery));
        List<String> list = new ArrayList<>();
        list.add(startDate);