Merge remote-tracking branch 'origin/master'
# Conflicts: # ruoyi-ui/src/lang/zh.js
This commit is contained in:
@@ -0,0 +1,36 @@
|
|||||||
|
package com.ruoyi.api.controller;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.api.service.IJobStatisticsService;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 作业统计 Controller
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/api")
|
||||||
|
public class JobStatisticsController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IJobStatisticsService jobStatisticsService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取统计数据,包含:
|
||||||
|
* 1. 当日入库和出库数量统计
|
||||||
|
* 2. 货位状态统计
|
||||||
|
* 3. 当前任务列表
|
||||||
|
*/
|
||||||
|
@GetMapping("/daily")
|
||||||
|
public AjaxResult getDailyStatistics() {
|
||||||
|
Map<String, Object> result = jobStatisticsService.getDailyStatistics();
|
||||||
|
return AjaxResult.success(result);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package com.ruoyi.api.mapper;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 作业统计 Mapper 接口
|
||||||
|
*/
|
||||||
|
public interface JobStatisticsMapper {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询当日入库数量(inOrOut < 20)
|
||||||
|
*
|
||||||
|
* @param createTime 创建日期
|
||||||
|
* @return 入库数量
|
||||||
|
*/
|
||||||
|
public int selectDailyInCount(@Param("createTime") String createTime);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询当日出库数量(inOrOut >= 20)
|
||||||
|
*
|
||||||
|
* @param createTime 创建日期
|
||||||
|
* @return 出库数量
|
||||||
|
*/
|
||||||
|
public int selectDailyOutCount(@Param("createTime") String createTime);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询当月每日入库出库统计
|
||||||
|
*
|
||||||
|
* @param year 年份
|
||||||
|
* @param month 月份
|
||||||
|
* @return 每日入库出库统计列表
|
||||||
|
*/
|
||||||
|
public List<Map<String, Object>> selectMonthlyStatistics(@Param("year") int year, @Param("month") int month);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package com.ruoyi.api.service;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 作业统计 Service 接口
|
||||||
|
*/
|
||||||
|
public interface IJobStatisticsService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取统计数据,包含:
|
||||||
|
* 1. 当日入库和出库数量统计
|
||||||
|
* 2. 货位状态统计
|
||||||
|
* 3. 当前任务列表
|
||||||
|
*
|
||||||
|
* @return 统计结果
|
||||||
|
*/
|
||||||
|
public Map<String, Object> getDailyStatistics();
|
||||||
|
}
|
||||||
@@ -0,0 +1,91 @@
|
|||||||
|
package com.ruoyi.api.service.impl;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
|
import com.ruoyi.api.service.IJobStatisticsService;
|
||||||
|
import com.ruoyi.api.mapper.JobStatisticsMapper;
|
||||||
|
import com.ruoyi.bas.cargoSpace.mapper.BasCargoSpaceMapper;
|
||||||
|
import com.ruoyi.job.mydojob.mapper.MydoJobMapper;
|
||||||
|
import com.ruoyi.job.mydojob.domain.MydoJob;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 作业统计 Service 实现
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class JobStatisticsServiceImpl implements IJobStatisticsService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private JobStatisticsMapper jobStatisticsMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BasCargoSpaceMapper basCargoSpaceMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private MydoJobMapper mydoJobMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取当日入库和出库数量统计
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> getDailyStatistics() {
|
||||||
|
// 获取当前日期
|
||||||
|
String today = DateUtils.getDate();
|
||||||
|
|
||||||
|
// 查询当日入库数量
|
||||||
|
int inCount = jobStatisticsMapper.selectDailyInCount(today);
|
||||||
|
|
||||||
|
// 查询当日出库数量
|
||||||
|
int outCount = jobStatisticsMapper.selectDailyOutCount(today);
|
||||||
|
|
||||||
|
// 获取货位状态统计
|
||||||
|
List<Map<String, Object>> statusCounts = basCargoSpaceMapper.selectStatusCount();
|
||||||
|
List<Map<String, Object>> cargoSpaceStatus = new ArrayList<>();
|
||||||
|
Map<String, String> statusNameMap = new HashMap<>();
|
||||||
|
statusNameMap.put("1", "空货位");
|
||||||
|
statusNameMap.put("2", "满货位");
|
||||||
|
statusNameMap.put("3", "入库已分配");
|
||||||
|
statusNameMap.put("4", "出库已分配");
|
||||||
|
statusNameMap.put("5", "入库需盘点");
|
||||||
|
statusNameMap.put("6", "出库需盘点");
|
||||||
|
|
||||||
|
for (Map.Entry<String, String> entry : statusNameMap.entrySet()) {
|
||||||
|
Map<String, Object> item = new HashMap<>();
|
||||||
|
String status = entry.getKey();
|
||||||
|
item.put("name", entry.getValue());
|
||||||
|
item.put("value", 0);
|
||||||
|
for (Map<String, Object> count : statusCounts) {
|
||||||
|
if (status.equals(String.valueOf(count.get("status")))) {
|
||||||
|
item.put("value", count.get("count"));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
cargoSpaceStatus.add(item);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取当前任务列表
|
||||||
|
List<MydoJob> currentTasks = mydoJobMapper.selectCurrentTasks();
|
||||||
|
|
||||||
|
// 获取当前年月
|
||||||
|
int year = Integer.parseInt(DateUtils.dateTimeNow("yyyy"));
|
||||||
|
int month = Integer.parseInt(DateUtils.dateTimeNow("MM"));
|
||||||
|
|
||||||
|
// 获取当月每日统计数据
|
||||||
|
List<Map<String, Object>> dailyStats = jobStatisticsMapper.selectMonthlyStatistics(year, month);
|
||||||
|
|
||||||
|
// 返回统计结果
|
||||||
|
Map<String, Object> result = new HashMap<>();
|
||||||
|
result.put("drrk", String.valueOf(inCount));
|
||||||
|
result.put("drck", String.valueOf(outCount));
|
||||||
|
result.put("cargoSpaceStatus", cargoSpaceStatus);
|
||||||
|
result.put("currentTask", currentTasks);
|
||||||
|
result.put("statistic", dailyStats);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||||||
import com.ruoyi.bas.cargoSpace.domain.BasCargoSpace;
|
import com.ruoyi.bas.cargoSpace.domain.BasCargoSpace;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 库存信息Mapper接口
|
* 库存信息Mapper接口
|
||||||
@@ -61,5 +62,10 @@ public interface BasCargoSpaceMapper extends BaseMapper<BasCargoSpace>
|
|||||||
*/
|
*/
|
||||||
public int deleteBasCargoSpaceByCargoSpaceIds(String[] cargoSpaceIds);
|
public int deleteBasCargoSpaceByCargoSpaceIds(String[] cargoSpaceIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询不同状态的货位数量统计
|
||||||
|
*
|
||||||
|
* @return 状态统计结果列表
|
||||||
|
*/
|
||||||
|
public List<Map<String, Object>> selectStatusCount();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,8 +9,14 @@ import com.ruoyi.job.mydojob.domain.MydoJob;
|
|||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
* @date 2025-05-23
|
* @date 2025-05-23
|
||||||
*/
|
*/
|
||||||
public interface MydoJobMapper
|
public interface MydoJobMapper
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* 查询当前任务列表
|
||||||
|
*
|
||||||
|
* @return 当前任务列表
|
||||||
|
*/
|
||||||
|
public List<MydoJob> selectCurrentTasks();
|
||||||
/**
|
/**
|
||||||
* 查询任务表
|
* 查询任务表
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -0,0 +1,36 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.ruoyi.api.mapper.JobStatisticsMapper">
|
||||||
|
|
||||||
|
<!-- 查询当日入库数量 -->
|
||||||
|
<select id="selectDailyInCount" parameterType="String" resultType="Integer">
|
||||||
|
SELECT COUNT(1)
|
||||||
|
FROM mydo_job_finish
|
||||||
|
WHERE CONVERT(varchar(10), create_time, 120) = #{createTime}
|
||||||
|
AND in_or_out < 20
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 查询当日出库数量 -->
|
||||||
|
<select id="selectDailyOutCount" parameterType="String" resultType="Integer">
|
||||||
|
SELECT COUNT(1)
|
||||||
|
FROM mydo_job_finish
|
||||||
|
WHERE CONVERT(varchar(10), create_time, 120) = #{createTime}
|
||||||
|
AND in_or_out >= 20
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 查询当月每日入库出库统计 -->
|
||||||
|
<select id="selectMonthlyStatistics" resultType="java.util.Map">
|
||||||
|
SELECT
|
||||||
|
CONVERT(varchar(10), create_time, 120) as date,
|
||||||
|
SUM(CASE WHEN in_or_out < 20 THEN 1 ELSE 0 END) as '入库',
|
||||||
|
SUM(CASE WHEN in_or_out >= 20 THEN 1 ELSE 0 END) as '出库'
|
||||||
|
FROM mydo_job_finish
|
||||||
|
WHERE YEAR(create_time) = #{year}
|
||||||
|
AND MONTH(create_time) = #{month}
|
||||||
|
GROUP BY CONVERT(varchar(10), create_time, 120)
|
||||||
|
ORDER BY date
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -141,4 +141,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</foreach>
|
</foreach>
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
|
<select id="selectStatusCount" resultType="java.util.Map">
|
||||||
|
SELECT
|
||||||
|
status,
|
||||||
|
COUNT(*) as count
|
||||||
|
FROM bas_cargo_space
|
||||||
|
GROUP BY status
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -196,4 +196,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
#{jobId}
|
#{jobId}
|
||||||
</foreach>
|
</foreach>
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
|
<select id="selectCurrentTasks" resultMap="MydoJobResult">
|
||||||
|
<include refid="selectMydoJobVo"/>
|
||||||
|
where mj.status = '3'
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -115,6 +115,7 @@ public class SecurityConfig
|
|||||||
// 静态资源,可匿名访问
|
// 静态资源,可匿名访问
|
||||||
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
|
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
|
||||||
.antMatchers("/swagger-ui.html","/changeLanguage", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**","/pda/**").permitAll()
|
.antMatchers("/swagger-ui.html","/changeLanguage", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**","/pda/**").permitAll()
|
||||||
|
.antMatchers("/api/**").permitAll()
|
||||||
// 除上面外的所有请求全部需要鉴权认证
|
// 除上面外的所有请求全部需要鉴权认证
|
||||||
.anyRequest().authenticated();
|
.anyRequest().authenticated();
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# 页面标题
|
# 页面标题
|
||||||
VUE_APP_TITLE = 若依管理系统
|
VUE_APP_TITLE = ForTucky WMS system
|
||||||
|
|
||||||
# 开发环境配置
|
# 开发环境配置
|
||||||
ENV = 'development'
|
ENV = 'development'
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 23 KiB |
BIN
ruoyi-ui/src/assets/logo/logo1.png
Normal file
BIN
ruoyi-ui/src/assets/logo/logo1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.5 KiB |
@@ -1,12 +1,14 @@
|
|||||||
// en.js
|
// en.js
|
||||||
export default {
|
export default {
|
||||||
|
|
||||||
login: {
|
login: {
|
||||||
title: 'RuoYi Login Form',
|
title: 'FORTUCKY WMS SYSTEM',
|
||||||
logIn: 'Login in',
|
logIn: 'Login in',
|
||||||
username: 'Username',
|
username: 'Username',
|
||||||
password: 'Password',
|
password: 'Password',
|
||||||
code: 'Code',
|
code: 'Code',
|
||||||
rememberMe: 'Remember Me'
|
rememberMe: 'Remember Me',
|
||||||
|
bottom:'Copyright © 2025 ForTucky All Rights Reserved.400-1882-319'
|
||||||
},
|
},
|
||||||
tagsView: {
|
tagsView: {
|
||||||
refresh: 'Refresh',
|
refresh: 'Refresh',
|
||||||
@@ -627,6 +629,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
viewsMain: {
|
viewsMain: {
|
||||||
|
systemTitle: 'RuoYi Admin',
|
||||||
title: 'homePage',
|
title: 'homePage',
|
||||||
unfinishedInboundTask: 'Unfinished Inbound Task Overview',
|
unfinishedInboundTask: 'Unfinished Inbound Task Overview',
|
||||||
taskKey: 'Task Key',
|
taskKey: 'Task Key',
|
||||||
|
|||||||
@@ -5,12 +5,13 @@ import 'core-js/features/symbol'
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
login: {
|
login: {
|
||||||
title: '若依后台管理系统',
|
title: '福莱瑞达WMS系统',
|
||||||
logIn: '登录',
|
logIn: '登录',
|
||||||
username: '账号',
|
username: '账号',
|
||||||
password: '密码',
|
password: '密码',
|
||||||
code: '验证码',
|
code: '验证码',
|
||||||
rememberMe: '记住密码'
|
rememberMe: '记住密码',
|
||||||
|
bottom:'Copyright © 2025 ForTucky All Rights Reserved.400-1882-319'
|
||||||
},
|
},
|
||||||
tagsView: {
|
tagsView: {
|
||||||
refresh: '刷新',
|
refresh: '刷新',
|
||||||
@@ -633,6 +634,24 @@ export default {
|
|||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
viewsMain: {
|
||||||
|
systemTitle: '福莱瑞达管理系统',
|
||||||
|
title: '首页',
|
||||||
|
unfinishedInboundTask: '未完成入库任务概览',
|
||||||
|
taskKey: '任务键值',
|
||||||
|
unfinishedInboundTaskName: '未完成入库任务',
|
||||||
|
totalUnfinishedCount: '全部未完成数量',
|
||||||
|
todayUnfinishedCount: '今日未完成数量',
|
||||||
|
finishedInboundTask: '已完成入库任务概览',
|
||||||
|
finishedInboundTaskName: '已完成入库任务',
|
||||||
|
totalFinishedCount: '全部已完成数量',
|
||||||
|
todayFinishedCount: '今日已完成数量',
|
||||||
|
unfinishedOutboundTask: '未完成出库任务概览',
|
||||||
|
unfinishedOutboundTaskName: '未完成出库任务',
|
||||||
|
finishedOutboundTask: '已完成出库任务概览',
|
||||||
|
finishedOutboundTaskName: '已完成出库任务'
|
||||||
|
},
|
||||||
|
|
||||||
searchViewStockSecure: {
|
searchViewStockSecure: {
|
||||||
stockId: '库存ID',
|
stockId: '库存ID',
|
||||||
cargoSpaceId: '货位ID',
|
cargoSpaceId: '货位ID',
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
import defaultSettings from '@/settings'
|
import defaultSettings from '@/settings'
|
||||||
|
import i18n from '@/lang'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 动态修改标题
|
* 动态修改标题
|
||||||
*/
|
*/
|
||||||
export function useDynamicTitle() {
|
export function useDynamicTitle() {
|
||||||
if (store.state.settings.dynamicTitle) {
|
if (store.state.settings.dynamicTitle) {
|
||||||
document.title = store.state.settings.title + ' - ' + defaultSettings.title
|
document.title = store.state.settings.title + ' - ' + i18n.t(defaultSettings.title)
|
||||||
} else {
|
} else {
|
||||||
document.title = defaultSettings.title
|
document.title = i18n.t(defaultSettings.title)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -57,7 +57,7 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
<!-- 底部 -->
|
<!-- 底部 -->
|
||||||
<div class="el-login-footer">
|
<div class="el-login-footer">
|
||||||
<span>Copyright © 2018-2024 ruoyi.vip All Rights Reserved.</span>
|
<span>{{ $t('login.bottom') }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ import { makeUpHtml, vueTemplate, vueScript, cssStyle } from '@/utils/generator/
|
|||||||
import { makeUpJs } from '@/utils/generator/js'
|
import { makeUpJs } from '@/utils/generator/js'
|
||||||
import { makeUpCss } from '@/utils/generator/css'
|
import { makeUpCss } from '@/utils/generator/css'
|
||||||
import drawingDefault from '@/utils/generator/drawingDefault'
|
import drawingDefault from '@/utils/generator/drawingDefault'
|
||||||
import logo from '@/assets/logo/logo.png'
|
import logo from '@/assets/logo/logo1.png'
|
||||||
import CodeTypeDialog from './CodeTypeDialog'
|
import CodeTypeDialog from './CodeTypeDialog'
|
||||||
import DraggableItem from './DraggableItem'
|
import DraggableItem from './DraggableItem'
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user