解决冲突

This commit is contained in:
liuhanqing
2025-05-22 16:59:02 +08:00
parent 6bf81f9c40
commit b07dd7bfef
8 changed files with 27 additions and 430 deletions

View File

@@ -72,31 +72,15 @@
<artifactId>mybatis-plus-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>2.3.1</version>
</dependency>
<!-- mybatis-plus代码生成器-->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-generator</artifactId>
<version>3.5.12</version>
</dependency>
<!-- lombok -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.12</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.36</version>
</dependency>

View File

@@ -1,4 +1,4 @@
package com.ruoyi.kpi.domain;
package com.ruoyi.job.mydojobfinish.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

View File

@@ -1,11 +1,12 @@
package com.ruoyi.kpi.mapper;
package com.ruoyi.job.mydojobfinish.mapper;
import com.ruoyi.job.mydojobfinish.domain.MydoJobFinish;
import java.util.List;
import com.ruoyi.kpi.domain.MydoJobFinish;
/**
* MydoJobFinish Mapper 接口
*
*
* @author gw
* @date 2025-05-21
*/
@@ -13,7 +14,7 @@ public interface MydoJobFinishMapper
{
/**
* 查询 MydoJobFinish 列表
*
*
* @param mydoJobFinish MydoJobFinish
* @return MydoJobFinish 集合
*/

View File

@@ -1,309 +0,0 @@
package com.ruoyi.kpi.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 库存信息对象 bas_cargo_space
*
* @author lsy
* @date 2025-05-22
*/
public class BasCargoSpace extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 货位id 主键 */
private String cargoSpaceId;
/** 仓库id(不允许为空) */
@Excel(name = "仓库id", readConverterExp = "不=允许为空")
private String warehouseId;
/** 巷道id(允许为空) */
@Excel(name = "巷道id", readConverterExp = "允=许为空")
private String roadwayId;
/** 货区id(允许为空) */
@Excel(name = "货区id", readConverterExp = "允=许为空")
private String cargoAreaId;
/** 货位类型(允许为空) */
@Excel(name = "货位类型", readConverterExp = "允=许为空")
private String theType;
/** 货位类型名称 */
@Excel(name = "货位类型名称")
private String theTypeName;
/** 货位名称(不允许为空) */
@Excel(name = "货位名称", readConverterExp = "不=允许为空")
private String cargoSpaceName;
/** 排(不允许为空) */
@Excel(name = "排", readConverterExp = "不=允许为空")
private Long thePlatoon;
/** 列(不允许为空) */
@Excel(name = "列", readConverterExp = "不=允许为空")
private Long theColumn;
/** 层(不允许为空) */
@Excel(name = "层", readConverterExp = "不=允许为空")
private Long theFloor;
/** 货位状态1空2满 */
@Excel(name = "货位状态1空2满")
private String status;
/** 是否锁定(不允许为空)
Y锁、N开 */
@Excel(name = "是否锁定", readConverterExp = "不=允许为空")
private String locked;
/** 托盘条码(允许为空) */
@Excel(name = "托盘条码", readConverterExp = "允=许为空")
private String trayCode;
/** 货位高度 */
@Excel(name = "货位高度")
private String cargoHight;
/** 是否双伸 Y N */
@Excel(name = "是否双伸 Y N ")
private String issDouble;
/** 双货位分组编码(标识区分) */
@Excel(name = "双货位分组编码", readConverterExp = "标=识区分")
private String groupCodingNo;
/** 双货位分组编码1、2… */
@Excel(name = "双货位分组编码1、2… ")
private String groupCoding;
/** 双货位标识 0 外1内 */
@Excel(name = "双货位标识 0 外1内")
private String cargoSpaceLogo;
/** 本仓库区域 1--8 A
9--15 B */
@Excel(name = "本仓库区域 1--8 A 9--15 B")
private String thisCargoArea;
public void setCargoSpaceId(String cargoSpaceId)
{
this.cargoSpaceId = cargoSpaceId;
}
public String getCargoSpaceId()
{
return cargoSpaceId;
}
public void setWarehouseId(String warehouseId)
{
this.warehouseId = warehouseId;
}
public String getWarehouseId()
{
return warehouseId;
}
public void setRoadwayId(String roadwayId)
{
this.roadwayId = roadwayId;
}
public String getRoadwayId()
{
return roadwayId;
}
public void setCargoAreaId(String cargoAreaId)
{
this.cargoAreaId = cargoAreaId;
}
public String getCargoAreaId()
{
return cargoAreaId;
}
public void setTheType(String theType)
{
this.theType = theType;
}
public String getTheType()
{
return theType;
}
public void setTheTypeName(String theTypeName)
{
this.theTypeName = theTypeName;
}
public String getTheTypeName()
{
return theTypeName;
}
public void setCargoSpaceName(String cargoSpaceName)
{
this.cargoSpaceName = cargoSpaceName;
}
public String getCargoSpaceName()
{
return cargoSpaceName;
}
public void setThePlatoon(Long thePlatoon)
{
this.thePlatoon = thePlatoon;
}
public Long getThePlatoon()
{
return thePlatoon;
}
public void setTheColumn(Long theColumn)
{
this.theColumn = theColumn;
}
public Long getTheColumn()
{
return theColumn;
}
public void setTheFloor(Long theFloor)
{
this.theFloor = theFloor;
}
public Long getTheFloor()
{
return theFloor;
}
public void setStatus(String status)
{
this.status = status;
}
public String getStatus()
{
return status;
}
public void setLocked(String locked)
{
this.locked = locked;
}
public String getLocked()
{
return locked;
}
public void setTrayCode(String trayCode)
{
this.trayCode = trayCode;
}
public String getTrayCode()
{
return trayCode;
}
public void setCargoHight(String cargoHight)
{
this.cargoHight = cargoHight;
}
public String getCargoHight()
{
return cargoHight;
}
public void setIssDouble(String issDouble)
{
this.issDouble = issDouble;
}
public String getIssDouble()
{
return issDouble;
}
public void setGroupCodingNo(String groupCodingNo)
{
this.groupCodingNo = groupCodingNo;
}
public String getGroupCodingNo()
{
return groupCodingNo;
}
public void setGroupCoding(String groupCoding)
{
this.groupCoding = groupCoding;
}
public String getGroupCoding()
{
return groupCoding;
}
public void setCargoSpaceLogo(String cargoSpaceLogo)
{
this.cargoSpaceLogo = cargoSpaceLogo;
}
public String getCargoSpaceLogo()
{
return cargoSpaceLogo;
}
public void setThisCargoArea(String thisCargoArea)
{
this.thisCargoArea = thisCargoArea;
}
public String getThisCargoArea()
{
return thisCargoArea;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("cargoSpaceId", getCargoSpaceId())
.append("warehouseId", getWarehouseId())
.append("roadwayId", getRoadwayId())
.append("cargoAreaId", getCargoAreaId())
.append("theType", getTheType())
.append("theTypeName", getTheTypeName())
.append("cargoSpaceName", getCargoSpaceName())
.append("thePlatoon", getThePlatoon())
.append("theColumn", getTheColumn())
.append("theFloor", getTheFloor())
.append("status", getStatus())
.append("locked", getLocked())
.append("trayCode", getTrayCode())
.append("cargoHight", getCargoHight())
.append("issDouble", getIssDouble())
.append("groupCodingNo", getGroupCodingNo())
.append("groupCoding", getGroupCoding())
.append("cargoSpaceLogo", getCargoSpaceLogo())
.append("thisCargoArea", getThisCargoArea())
.toString();
}
}

View File

@@ -1,24 +0,0 @@
package com.ruoyi.kpi.mapper;
import java.util.List;
import com.ruoyi.kpi.domain.BasCargoSpace;
/**
* 库存信息Mapper接口
*
* @author lsy
* @date 2025-05-22
*/
public interface BasCargoSpaceMapper
{
/**
* 查询库存信息列表
*
* @param basCargoSpace 库存信息
* @return 库存信息集合
*/
public List<BasCargoSpace> selectBasCargoSpaceList(BasCargoSpace basCargoSpace);
}

View File

@@ -1,10 +1,13 @@
package com.ruoyi.kpi.service.impl;
import java.util.List;
import com.ruoyi.bas.cargoSpace.domain.BasCargoSpace;
import com.ruoyi.bas.cargoSpace.mapper.BasCargoSpaceMapper;
import com.ruoyi.job.mydojobfinish.domain.MydoJobFinish;
import com.ruoyi.job.mydojobfinish.mapper.MydoJobFinishMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.kpi.mapper.BasCargoSpaceMapper;
import com.ruoyi.kpi.domain.BasCargoSpace;
import java.util.ArrayList;
import java.util.HashMap;
@@ -12,13 +15,11 @@ import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import com.ruoyi.kpi.mapper.MydoJobFinishMapper;
import com.ruoyi.kpi.domain.MydoJobFinish;
import com.ruoyi.kpi.service.KpiService;
/**
* KPI 统计分析 服务实现类
*
*
* @author gw
* @date 2025-05-21
*/
@@ -32,7 +33,7 @@ public class KpiServiceImpl implements KpiService
private BasCargoSpaceMapper basCargoSpaceMapper;
/**
* 获取入库均匀分析数据
*
*
* @param warehouseId 仓库ID
* @param yearMonth 年月(格式:yyyy-MM)
* @return 入库均匀分析数据
@@ -51,19 +52,19 @@ public class KpiServiceImpl implements KpiService
if (job.getInOrOut() == null || Integer.parseInt(job.getInOrOut()) >= 10) {
continue;
}
// 按仓库ID筛选
if (!warehouseId.equals(job.getWarehouseId())) {
continue;
}
// 如果指定了年月,则按年月筛选
if (yearMonth != null && !yearMonth.isEmpty()) {
if (job.getStartTime() == null || !job.getStartTime().startsWith(yearMonth)) {
continue;
}
}
String roadwayId = job.getRoadwayId();
if (roadwayId != null) {
roadwayCount.put(roadwayId, roadwayCount.getOrDefault(roadwayId, 0) + 1);
@@ -73,7 +74,7 @@ public class KpiServiceImpl implements KpiService
// 将结果转换为指定格式
List<String> tunnels = new ArrayList<>();
List<Integer> counts = new ArrayList<>();
for (Map.Entry<String, Integer> entry : roadwayCount.entrySet()) {
tunnels.add(entry.getKey() + "巷道");
counts.add(entry.getValue());
@@ -165,7 +166,7 @@ public class KpiServiceImpl implements KpiService
if (!warehouseId.equals(job.getWarehouseId())) {
continue;
}
// 按时间范围筛选
if (startTime != null && !startTime.isEmpty()) {
if (job.getStartTime() == null || job.getStartTime().compareTo(startTime) < 0) {
@@ -177,7 +178,7 @@ public class KpiServiceImpl implements KpiService
continue;
}
}
String roadwayId = job.getRoadwayId();
if (roadwayId != null) {
// 区分入库和出库作业
@@ -203,7 +204,7 @@ public class KpiServiceImpl implements KpiService
List<String> tunnels = new ArrayList<>();
List<Integer> inCountsList = new ArrayList<>();
List<Integer> outCountsList = new ArrayList<>();
for (String roadwayId : allRoadways) {
tunnels.add(roadwayId + "巷道");
inCountsList.add(inCounts.getOrDefault(roadwayId, 0));
@@ -262,12 +263,12 @@ public class KpiServiceImpl implements KpiService
for (Map.Entry<String, Map<String, Integer>> entry : roadwayStats.entrySet()) {
Map<String, Object> statusData = new HashMap<>();
statusData.put("status", entry.getKey());
// 为每个巷道添加数量,如果没有数据则为0
for (String roadwayId : roadwayIds) {
statusData.put("巷道" + roadwayId, entry.getValue().getOrDefault(roadwayId, 0));
}
result.add(statusData);
}
@@ -277,4 +278,4 @@ public class KpiServiceImpl implements KpiService
}
}
}

View File

@@ -2,8 +2,8 @@
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.kpi.mapper.MydoJobFinishMapper">
<mapper namespace="com.ruoyi.job.mydojobfinish.mapper.MydoJobFinishMapper">
<resultMap type="MydoJobFinish" id="MydoJobFinishResult">
<result property="jobId" column="job_id" />
<result property="status" column="status" />
@@ -60,7 +60,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectMydoJobFinishList" parameterType="MydoJobFinish" resultMap="MydoJobFinishResult">
<include refid="selectMydoJobFinishVo"/>
<where>
<where>
<if test="jobId != null and jobId != ''"> and job_id = #{jobId}</if>
<if test="status != null and status != ''"> and status = #{status}</if>
<if test="onLineType != null and onLineType != ''"> and on_line_type = #{onLineType}</if>
@@ -109,4 +109,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="photoPath != null and photoPath != ''"> and photo_path = #{photoPath}</if>
</where>
</select>
</mapper>
</mapper>

View File

@@ -1,56 +0,0 @@
<?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.kpi.mapper.BasCargoSpaceMapper">
<resultMap type="BasCargoSpace" id="BasCargoSpaceResult">
<result property="cargoSpaceId" column="cargo_space_id" />
<result property="warehouseId" column="warehouse_id" />
<result property="roadwayId" column="roadway_id" />
<result property="cargoAreaId" column="cargo_area_id" />
<result property="theType" column="the_type" />
<result property="theTypeName" column="the_type_name" />
<result property="cargoSpaceName" column="cargo_space_name" />
<result property="thePlatoon" column="the_platoon" />
<result property="theColumn" column="the_column" />
<result property="theFloor" column="the_floor" />
<result property="status" column="status" />
<result property="locked" column="locked" />
<result property="trayCode" column="tray_code" />
<result property="cargoHight" column="cargo_hight" />
<result property="issDouble" column="iss_double" />
<result property="groupCodingNo" column="group_coding_no" />
<result property="groupCoding" column="group_coding" />
<result property="cargoSpaceLogo" column="cargo_space_logo" />
<result property="thisCargoArea" column="this_cargo_area" />
</resultMap>
<sql id="selectBasCargoSpaceVo">
select cargo_space_id, warehouse_id, roadway_id, cargo_area_id, the_type, the_type_name, cargo_space_name, the_platoon, the_column, the_floor, status, locked, tray_code, cargo_hight, iss_double, group_coding_no, group_coding, cargo_space_logo, this_cargo_area from bas_cargo_space
</sql>
<select id="selectBasCargoSpaceList" parameterType="BasCargoSpace" resultMap="BasCargoSpaceResult">
<include refid="selectBasCargoSpaceVo"/>
<where>
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
<if test="roadwayId != null and roadwayId != ''"> and roadway_id = #{roadwayId}</if>
<if test="cargoAreaId != null and cargoAreaId != ''"> and cargo_area_id = #{cargoAreaId}</if>
<if test="theType != null and theType != ''"> and the_type = #{theType}</if>
<if test="theTypeName != null and theTypeName != ''"> and the_type_name like concat('%', #{theTypeName}, '%')</if>
<if test="cargoSpaceName != null and cargoSpaceName != ''"> and cargo_space_name like concat('%', #{cargoSpaceName}, '%')</if>
<if test="thePlatoon != null "> and the_platoon = #{thePlatoon}</if>
<if test="theColumn != null "> and the_column = #{theColumn}</if>
<if test="theFloor != null "> and the_floor = #{theFloor}</if>
<if test="status != null and status != ''"> and status = #{status}</if>
<if test="locked != null and locked != ''"> and locked = #{locked}</if>
<if test="trayCode != null and trayCode != ''"> and tray_code = #{trayCode}</if>
<if test="cargoHight != null and cargoHight != ''"> and cargo_hight = #{cargoHight}</if>
<if test="issDouble != null and issDouble != ''"> and iss_double = #{issDouble}</if>
<if test="groupCodingNo != null and groupCodingNo != ''"> and group_coding_no = #{groupCodingNo}</if>
<if test="groupCoding != null and groupCoding != ''"> and group_coding = #{groupCoding}</if>
<if test="cargoSpaceLogo != null and cargoSpaceLogo != ''"> and cargo_space_logo = #{cargoSpaceLogo}</if>
<if test="thisCargoArea != null and thisCargoArea != ''"> and this_cargo_area = #{thisCargoArea}</if>
</where>
</select>
</mapper>