jiangping
2024-12-13 9f4f6772a5ab5ae05b44be38f65dce3620108d01
最新版本541200007
已修改7个文件
114 ■■■■ 文件已修改
server/system_service/src/main/java/com/doumee/core/utils/Constants.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/board/PlatformJobRunActController.java 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/board/PlatformJobRunController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/cars/response/CarsDeviceDetaisResponse.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/PlatformBooksMapper.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/BoardServiceImpl.java 93 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/third/BoardService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/system_service/src/main/java/com/doumee/core/utils/Constants.java
@@ -153,6 +153,8 @@
    public static final String WMS_TOTAL_STOCK_NUM ="WMS_TOTAL_STOCK_NUM" ;
    public static final String WX_REDIRECT_URL = "WX_REDIRECT_URL";
    public static final String HK_CHANGNEI_SCREEN_INDEXCODES = "HK_CHANGNEI_SCREEN_INDEXCODES";
    public static final String CITY_XH_REASON_ID ="CITY_XH_REASON_ID" ;
    public static final String ATWL_XH_PLATFORM_ID ="ATWL_XH_PLATFORM_ID" ;
    public static  boolean DEALING_HK_SYNCPRIVILEGE= false;
    public static  boolean DEALING_HK_SYNCDEVICE = false;
    public static  boolean DEALING_HK_SYNCPLATFORM = false;
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/board/PlatformJobRunActController.java
@@ -36,7 +36,7 @@
@Api(tags = "【看板大屏】园区物流运行调度看板真实")
@RestController
@Slf4j
@RequestMapping(Constants.CLOUD_SERVICE_URL_INDEX+"/board/api/platformJobRunAct")
@RequestMapping(Constants.CLOUD_SERVICE_URL_INDEX+"/board/api/platformJobRun")
public class PlatformJobRunActController extends BaseController {
    @Autowired
@@ -126,14 +126,7 @@
    @ApiOperation("今日入库量统计")
    @GetMapping("/totalInList")
    public ApiResponse<List<GeneralVO>> totalInList() {
        List<GeneralVO> list = new ArrayList<>();
        for (int i = 1; i < 4; i++) {
            Random random = new Random();
            GeneralVO data = new GeneralVO();
            data.setName("厂区名称_"+i);
            data.setNum(BigDecimal.valueOf(random.nextInt(1000)));
            list.add(data);
        }
        List<GeneralVO> list = boardService.todayTotalInList();
        return ApiResponse.success(list);
    }
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/board/PlatformJobRunController.java
@@ -40,7 +40,7 @@
@Api(tags = "【看板大屏】园区物流运行调度看板")
@RestController
@Slf4j
@RequestMapping(Constants.CLOUD_SERVICE_URL_INDEX+"/board/api/platformJobRun")
@RequestMapping(Constants.CLOUD_SERVICE_URL_INDEX+"/board/api/platformJobRunOld")
public class PlatformJobRunController extends BaseController {
    @Autowired
server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/cars/response/CarsDeviceDetaisResponse.java
@@ -18,6 +18,7 @@
    private Integer supplementSign;//    补报标识(1:补报;0:正常上报)    Integer
    private String  createTime;//    系统收到GPS时间yyyy-MM-dd HH:mm:ss    String
    private Integer status;//设备状态 0:离线;1:在线;2:休眠
    private Integer jobStatus;//工作状态 //0空闲 1在途2离线
    private String plateNum;//车牌号
    private String  terminalID;//    终端手机号    String
}
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/PlatformBooksMapper.java
@@ -2,11 +2,12 @@
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.doumee.dao.business.model.PlatformBooks;
import com.github.yulichang.base.MPJBaseMapper;
/**
 * @author 江蹄蹄
 * @date 2024/06/28 10:03
 */
public interface PlatformBooksMapper extends BaseMapper<PlatformBooks> {
public interface PlatformBooksMapper extends MPJBaseMapper<PlatformBooks> {
}
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/BoardServiceImpl.java
@@ -67,6 +67,8 @@
    @Autowired
    private PlatformJobMapper platformJobMapper;
    @Autowired
    private PlatformBooksMapper platformBooksMapper;
    @Autowired
    private PlatformWmsDetailMapper platformWmsDetailMapper;
    @Autowired
    private PlatformWmsJobMapper platformWmsJobMapper;
@@ -78,6 +80,74 @@
    private RetentionMapper retentionMapper;
    @Autowired
    private PlatformGroupMapper platformGroupMapper;
    /**
     * 获取区域树形结构数据
     * @return
     */
    @Override
    public     List<GeneralVO> todayTotalInList(){
        /**
         * 1市公司:根据预约的入园原因为市公司卸货的任务为市公司入库的统计;
         * 2集散中心:WMS推送的入库单据;
         * 3加工入库:预约入园为重庆加工入库的(作业月台为安泰物流卸货月台);
         */
        String[] names = new String[]{"市公司","集散中心","加工入库"};
        String reason =systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.CITY_XH_REASON_ID).getCode();
        String platformGroupId =systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.ATWL_XH_PLATFORM_ID).getCode();;
        List<GeneralVO> list = new ArrayList<>();
        for (int i = 0; i < 3; i++) {
            Random random = new Random();
            GeneralVO data = new GeneralVO();
            data.setName(names[i]);
            BigDecimal num =new BigDecimal(0);
            if(i == 0){
                List<PlatformBooks> jobs = platformBooksMapper.selectJoinList(PlatformBooks.class, new MPJLambdaWrapper<PlatformBooks>()
                        .select(PlatformJob::getTotalNum)
                         .leftJoin(PlatformJob.class,PlatformJob::getId,PlatformBooks::getJobId)
                        .eq(PlatformBooks::getIsdeleted,Constants.ZERO)
                        .eq(PlatformBooks::getReasonId,reason)
                        .apply("to_days(t1.done_date) = to_days(now())")
                        .eq(PlatformBooks::getStatus,Constants.TWO));
                if(jobs!=null){
                    for(PlatformBooks j :jobs){
                        num =num.add(Constants.formatBigdecimal(j.getTotalNum()));
                    }
                }
            }else if(i ==1){
                List<PlatformJob> jobs = platformJobMapper.selectList (new MPJLambdaWrapper<PlatformJob>()
                        .select(PlatformJob::getTotalNum)
                        .eq(PlatformJob::getIsdeleted,Constants.ZERO)
                        .eq(PlatformJob::getOrigin,Constants.ONE)
                        .in(PlatformJob::getStatus, Constants.PlatformJobStatus.DONE.getKey()
                                , Constants.PlatformJobStatus.AUTHED_LEAVE.getKey()
                                , Constants.PlatformJobStatus.LEAVED.getKey())
                        .apply("to_days(done_date) = to_days(now())") );
                if(jobs!=null){
                    for(PlatformJob j :jobs){
                        num =num.add(Constants.formatBigdecimal(j.getTotalNum()));
                    }
                }
            }else{
                List<PlatformJob> jobs = platformJobMapper.selectList (new MPJLambdaWrapper<PlatformJob>()
                        .select(PlatformJob::getTotalNum)
                        .eq(PlatformJob::getIsdeleted,Constants.ZERO)
                        .eq(PlatformJob::getPlatformGroupId,platformGroupId)
                        .apply("to_days(done_date) = to_days(now())")
                        .in(PlatformJob::getStatus, Constants.PlatformJobStatus.DONE.getKey()
                                , Constants.PlatformJobStatus.AUTHED_LEAVE.getKey()
                                , Constants.PlatformJobStatus.LEAVED.getKey()) );
                if(jobs!=null){
                    for(PlatformJob j :jobs){
                        num = num.add(Constants.formatBigdecimal(j.getTotalNum()));
                    }
                }
            }
            data.setNum(num);
            list.add(data);
        }
        return list;
    }
    /**
     * 获取区域树形结构数据
     * @return
@@ -955,22 +1025,25 @@
    public     BoardCarsListVO platformJobCarsList(){
        BoardCarsListVO data = new BoardCarsListVO();
        List<CarsDeviceDetaisResponse> detaisResponses = HKCarOpenService.getAllCarsDetais();
        List<CarsAlarmResultListResponse> eventList = HKCarOpenService.getAlarmEvemtList(detaisResponses,new Date());
        data.setCarsList(detaisResponses);
        if(data.getCarsList()!=null && data.getCarsList().size()>0){
            List<String> codes = new ArrayList<>();
            //设备状态 0:离线;1:在线;2:休眠
            int online = 0;
            for(CarsDeviceDetaisResponse model:detaisResponses){
                if(Constants.equalsInteger(model.getStatus(),Constants.ONE) ||Constants.equalsInteger(model.getStatus(),Constants.TWO)){
                if(Constants.equalsInteger(model.getStatus(),Constants.ONE)
                        ||Constants.equalsInteger(model.getStatus(),Constants.TWO)){
                   //如果是在线或者休眠,查询在途还是空闲ty
                    codes.add(model.getPlateNum());
                    model.setJobStatus(Constants.ZERO);
                }else
                    model.setJobStatus(Constants.TWO);
                    data.setOfflineNum(data.getOfflineNum()+1);
                }
            if(codes.size()>0){
                //状态 0待确认 1待签到 2等待叫号 3入园等待 4已叫号 5作业中 6作业完成 7转移中 8异常挂起 9已授权离园 10已离园 11 已过号  12取消(WMS)
                long busyNum = platformJobMapper.selectCount(new QueryWrapper<PlatformJob>().lambda()
                List<PlatformJob> busyNum = platformJobMapper.selectList(new QueryWrapper<PlatformJob>() .lambda()
                                .select(PlatformJob::getCarCodeFront)
                        .eq(PlatformJob::getIsdeleted,Constants.ZERO)
                        .in(PlatformJob::getCarCodeFront,codes)
                        .in(PlatformJob::getStatus,Constants.PlatformJobStatus.WORKING.getKey()
@@ -982,8 +1055,20 @@
                                ,Constants.PlatformJobStatus.WAIT_CONFIRM.getKey()
                                ,Constants.PlatformJobStatus.EXCEPTION.getKey())
                        .groupBy(PlatformJob::getCarCodeFront));
                data.setBusyNum((int)busyNum);//在途有任务数量
                data.setBusyNum( busyNum!=null ?busyNum.size():0);//在途有任务数量
                data.setIdleNum(codes.size() -data.getBusyNum());//无任务空闲数量
                data.setEventList(HKCarOpenService.getAlarmEvemtList(detaisResponses,new Date()));
                if(busyNum != null){
                  FLAG:  for(CarsDeviceDetaisResponse model:detaisResponses){
                        for(PlatformJob job : busyNum){
                            if(StringUtils.equals(job.getCarCodeFront(),model.getPlateNum())){
                                model.setJobStatus(Constants.ONE);
                                continue FLAG;
                            }
                        }
                    }
                }
            }
        }
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/third/BoardService.java
@@ -87,4 +87,6 @@
    List<TransportMeasureVO> transportMeasure(Integer queryType);
    BoardStockListVO stockList();
    List<GeneralVO> todayTotalInList();
}