看板
This commit is contained in:
parent
04fdd08b88
commit
b1aba0c921
@ -16,6 +16,8 @@ import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
import org.jeecg.modules.tms.carinout.vehicleinout.entity.VehicleInOut;
|
||||
import org.jeecg.modules.tms.carinout.vehicleinout.entity.VehicleInOutCount;
|
||||
import org.jeecg.modules.tms.carinout.vehicleinout.entity.VehicleParam;
|
||||
import org.jeecg.modules.tms.carinout.vehicleinout.service.IVehicleInOutService;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
@ -208,4 +210,27 @@ public class VehicleInOutController extends JeecgController<VehicleInOut, IVehic
|
||||
vehicleInOutService.save(vehicleInOut);
|
||||
return Result.OK("提货成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取车辆进出厂数量
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/getCount")
|
||||
public Result<?> getCount() {
|
||||
VehicleInOutCount vehicleInOutCount = vehicleInOutService.getCount();
|
||||
return Result.OK(vehicleInOutCount);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取车辆进出厂明细
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/getVehicle")
|
||||
public Result<?> getVehicle(VehicleParam vehicleParam) {
|
||||
List<VehicleInOut> vehicleInOuts = vehicleInOutService.getVehicle(vehicleParam);
|
||||
IPage<VehicleInOut> page = new Page<>(1, vehicleInOuts.size());
|
||||
page.setRecords(vehicleInOuts);
|
||||
page.setTotal(vehicleInOuts.size());
|
||||
return Result.OK(page);
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,20 @@
|
||||
package org.jeecg.modules.tms.carinout.vehicleinout.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Description
|
||||
* @Author admin
|
||||
* @Date 2025/5/7 9:42
|
||||
*/
|
||||
@Data
|
||||
public class VehicleInOutCount {
|
||||
/** 今日计划入厂数 */
|
||||
private Integer planCount;
|
||||
/** 当前排队数 */
|
||||
private Integer lineUpCount;
|
||||
/** 已入厂 */
|
||||
private Integer inCount;
|
||||
/** 已离厂 */
|
||||
private Integer outCount;
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package org.jeecg.modules.tms.carinout.vehicleinout.entity;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description
|
||||
* @Author admin
|
||||
* @Date 2025/5/7 10:54
|
||||
*/
|
||||
@Data
|
||||
public class VehicleParam {
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date beginDate;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date endDate;
|
||||
}
|
@ -5,6 +5,8 @@ import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.tms.carinout.vehicleinout.entity.VehicleInOut;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.jeecg.modules.tms.carinout.vehicleinout.entity.VehicleInOutCount;
|
||||
import org.jeecg.modules.tms.carinout.vehicleinout.entity.VehicleParam;
|
||||
|
||||
/**
|
||||
* @Description: 车辆出入厂流程管理报表
|
||||
@ -13,5 +15,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface VehicleInOutMapper extends BaseMapper<VehicleInOut> {
|
||||
VehicleInOutCount getCount();
|
||||
|
||||
List<VehicleInOut> getVehicle(VehicleParam vehicleParam);
|
||||
}
|
||||
|
@ -2,4 +2,25 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.jeecg.modules.tms.carinout.vehicleinout.mapper.VehicleInOutMapper">
|
||||
|
||||
<select id="getCount" resultType="org.jeecg.modules.tms.carinout.vehicleinout.entity.VehicleInOutCount">
|
||||
SELECT
|
||||
COUNT(*) AS plan_count,
|
||||
COUNT(CASE WHEN a.CURRENT_STATUS = '2' THEN 1 END) AS line_up_count,
|
||||
COUNT(CASE WHEN a.CURRENT_STATUS = '3' THEN 1 END) AS in_count,
|
||||
COUNT(CASE WHEN a.CURRENT_STATUS = '4' THEN 1 END) AS out_count
|
||||
FROM tms_vehicle_in_out a
|
||||
LEFT JOIN tms_vehicle_demand b
|
||||
ON a.VD_NO = b.VD_NO
|
||||
WHERE b.SHIP_DATE = TRUNC(SYSDATE);
|
||||
</select>
|
||||
|
||||
<select id="getVehicle" resultType="org.jeecg.modules.tms.carinout.vehicleinout.entity.VehicleInOut"
|
||||
parameterType="org.jeecg.modules.tms.carinout.vehicleinout.entity.VehicleParam">
|
||||
SELECT a.*
|
||||
FROM tms_vehicle_in_out a
|
||||
LEFT JOIN tms_vehicle_demand b
|
||||
ON a.VD_NO = b.VD_NO
|
||||
WHERE b.SHIP_DATE >= #{beginDate}
|
||||
and b.SHIP_DATE <= #{endDate};
|
||||
</select>
|
||||
</mapper>
|
@ -2,6 +2,10 @@ package org.jeecg.modules.tms.carinout.vehicleinout.service;
|
||||
|
||||
import org.jeecg.modules.tms.carinout.vehicleinout.entity.VehicleInOut;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.jeecg.modules.tms.carinout.vehicleinout.entity.VehicleInOutCount;
|
||||
import org.jeecg.modules.tms.carinout.vehicleinout.entity.VehicleParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 车辆出入厂流程管理报表
|
||||
@ -11,4 +15,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
*/
|
||||
public interface IVehicleInOutService extends IService<VehicleInOut> {
|
||||
|
||||
VehicleInOutCount getCount();
|
||||
|
||||
List<VehicleInOut> getVehicle(VehicleParam vehicleParam);
|
||||
}
|
||||
|
@ -1,12 +1,17 @@
|
||||
package org.jeecg.modules.tms.carinout.vehicleinout.service.impl;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.jeecg.modules.tms.carinout.vehicleinout.entity.VehicleInOut;
|
||||
import org.jeecg.modules.tms.carinout.vehicleinout.entity.VehicleInOutCount;
|
||||
import org.jeecg.modules.tms.carinout.vehicleinout.entity.VehicleParam;
|
||||
import org.jeecg.modules.tms.carinout.vehicleinout.mapper.VehicleInOutMapper;
|
||||
import org.jeecg.modules.tms.carinout.vehicleinout.service.IVehicleInOutService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 车辆出入厂流程管理报表
|
||||
* @Author: jeecg-boot
|
||||
@ -14,6 +19,17 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class VehicleInOutServiceImpl extends ServiceImpl<VehicleInOutMapper, VehicleInOut> implements IVehicleInOutService {
|
||||
private final VehicleInOutMapper vehicleInOutMapper;
|
||||
|
||||
@Override
|
||||
public VehicleInOutCount getCount() {
|
||||
return vehicleInOutMapper.getCount();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<VehicleInOut> getVehicle(VehicleParam vehicleParam) {
|
||||
return vehicleInOutMapper.getVehicle(vehicleParam);
|
||||
}
|
||||
}
|
||||
|
@ -12,9 +12,11 @@ import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
import org.jeecg.modules.tms.carinout.vehicleinout.entity.VehicleParam;
|
||||
import org.jeecg.modules.tms.outbound.deliverydemand.entity.DeliveryDemand;
|
||||
import org.jeecg.modules.tms.outbound.deliverydemand.entity.DeliveryDemandDetail;
|
||||
import org.jeecg.modules.tms.outbound.deliverydemand.service.IDeliveryDemandService;
|
||||
@ -221,4 +223,20 @@ public class DeliveryDemandController extends JeecgController<DeliveryDemand, ID
|
||||
List<DeliveryDemand> vdNos = deliveryDemandService.query().eq("vd_no", vdNo).list();
|
||||
return Result.OK(vdNos);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更具发货时间获取发货计划
|
||||
* @param vehicleParam
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/getDelivery")
|
||||
public Result<?> getDelivery(VehicleParam vehicleParam) {
|
||||
LambdaQueryWrapper<DeliveryDemand> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.ge(DeliveryDemand::getShipDate, vehicleParam.getBeginDate())
|
||||
.le(DeliveryDemand::getShipDate, vehicleParam.getEndDate());
|
||||
List<DeliveryDemand> list = deliveryDemandService.list(lambdaQueryWrapper);
|
||||
IPage<DeliveryDemand> page = new Page<>(1, list.size());
|
||||
page.setRecords(list).setTotal(list.size());
|
||||
return Result.OK(page);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user