parent
19896db778
commit
03d462e63c
68 changed files with 1805 additions and 162 deletions
@ -0,0 +1,111 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.desk.dashboard.pojo.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField; |
||||
import com.baomidou.mybatisplus.annotation.TableId; |
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import io.swagger.v3.oas.annotations.media.Schema; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import org.springblade.core.mp.base.BaseEntity; |
||||
|
||||
import java.io.Serial; |
||||
|
||||
/** |
||||
* 填报明细表 实体类 |
||||
* |
||||
* @author BladeX |
||||
* @since 2025-11-12 |
||||
*/ |
||||
@Data |
||||
@TableName("BS_FILLING_DETAIL") |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class BsFillingDetailEntity extends BaseEntity { |
||||
|
||||
@Serial |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
|
||||
/** |
||||
* 业务ID |
||||
*/ |
||||
@Schema(description = "业务ID") |
||||
@TableField("bus_id") |
||||
private Long busId; |
||||
|
||||
/** |
||||
* 业务类型 |
||||
*/ |
||||
@Schema(description = "业务类型") |
||||
@TableField("bus_type") |
||||
private String busType; |
||||
|
||||
/** |
||||
* 事项 |
||||
*/ |
||||
@Schema(description = "事项") |
||||
@TableField("matter") |
||||
private String matter; |
||||
|
||||
/** |
||||
* 过程 |
||||
*/ |
||||
@Schema(description = "过程") |
||||
@TableField("process") |
||||
private String process; |
||||
|
||||
/** |
||||
* 备注 |
||||
*/ |
||||
@Schema(description = "备注") |
||||
@TableField("remarks") |
||||
private String remarks; |
||||
|
||||
/** |
||||
* 巡检任务 |
||||
*/ |
||||
public static String OEM_INSPECTION_TASK = "oem_inspection_task"; |
||||
/** |
||||
* 试验任务 |
||||
*/ |
||||
public static String OEM_TEXT_TASK = "oem_text_task"; |
||||
/** |
||||
* 工艺任务 |
||||
*/ |
||||
public static String DS_TASK_BILL = "ds_task_bill"; |
||||
/** |
||||
* 试验任务 |
||||
*/ |
||||
public static String QC_TASK_REVIEW = "qc_task_review"; |
||||
/** |
||||
* 外协 特殊过程任务 |
||||
*/ |
||||
public static String OEM_PROCESS_TASK = "oem_process_task"; |
||||
|
||||
|
||||
|
||||
} |
||||
@ -0,0 +1,76 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.desk.dashboard.pojo.entity; |
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import io.swagger.v3.oas.annotations.media.Schema; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import org.springblade.core.mp.base.BaseEntity; |
||||
import java.io.Serial; |
||||
|
||||
/** |
||||
* 零件信息表 实体类 |
||||
* |
||||
* @author BladeX |
||||
* @since 2025-11-12 |
||||
*/ |
||||
@Data |
||||
@TableName("DS_PART_VERSION") |
||||
@Schema(description = "DsPartVersion对象") |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class DsPartVersionEntity extends BaseEntity { |
||||
|
||||
@Serial |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
/** |
||||
* 零件ID |
||||
*/ |
||||
@Schema(description = "零件ID") |
||||
private Long partId; |
||||
/** |
||||
* 零件号 |
||||
*/ |
||||
@Schema(description = "零件号") |
||||
private String partCode; |
||||
/** |
||||
* 零件版本号 |
||||
*/ |
||||
@Schema(description = "零件版本号") |
||||
private String partVersion; |
||||
/** |
||||
* 工艺ID |
||||
*/ |
||||
@Schema(description = "工艺ID") |
||||
private Long craftId; |
||||
|
||||
/** |
||||
* 备注 |
||||
*/ |
||||
@Schema(description = "备注") |
||||
private String remarks; |
||||
|
||||
} |
||||
@ -0,0 +1,54 @@ |
||||
package org.springblade.desk.dashboard.pojo.entity; |
||||
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import io.swagger.v3.oas.annotations.media.Schema; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import org.springblade.core.mp.base.BaseEntity; |
||||
|
||||
import java.io.Serial; |
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* 产线电量推送信息表 实体类 |
||||
* |
||||
* @author BladeX |
||||
* @since 2024-01-01 |
||||
*/ |
||||
@Data |
||||
@TableName("EP_LINE_ELECTRIC") |
||||
@Schema(description = "EpLineElectric对象") |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class EpLineElectricEntity extends BaseEntity { |
||||
|
||||
@Serial |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
/** |
||||
* 设备编号 |
||||
*/ |
||||
@Schema(description = "设备编号") |
||||
private String deviceId; |
||||
|
||||
/** |
||||
* 槽位信息 |
||||
*/ |
||||
@Schema(description = "槽位信息") |
||||
private String workSlot; |
||||
|
||||
/** |
||||
* 电量 |
||||
*/ |
||||
@Schema(description = "电量值") |
||||
private String electric; |
||||
|
||||
|
||||
/** |
||||
* 推送数据(原始JSON格式) |
||||
*/ |
||||
@Schema(description = "推送数据") |
||||
private String pushData; |
||||
|
||||
|
||||
} |
||||
@ -0,0 +1,52 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.desk.dashboard.pojo.vo; |
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import org.springblade.desk.dashboard.pojo.entity.DsPartEntity; |
||||
|
||||
import java.io.Serial; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 零件信息表 视图实体类 |
||||
* |
||||
* @author BladeX |
||||
* @since 2025-11-12 |
||||
*/ |
||||
@Data |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class DsPartVersionVO extends DsPartEntity { |
||||
|
||||
/** |
||||
* 零件版本号 |
||||
*/ |
||||
@Schema(description = "零件版本号") |
||||
private String partVersion; |
||||
|
||||
} |
||||
@ -0,0 +1,54 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.desk.dashboard.pojo.vo; |
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import org.springblade.desk.dashboard.pojo.entity.DsTaskingEntity; |
||||
|
||||
import java.io.Serial; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 任务分派表 视图实体类 |
||||
* |
||||
* @author BladeX |
||||
* @since 2025-11-12 |
||||
*/ |
||||
@Data |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class DsTaskingIsCompletedVO extends DsTaskingEntity { |
||||
|
||||
/** |
||||
* 标识符 |
||||
*/ |
||||
@Schema(description = "标识符") |
||||
private boolean completed = true; |
||||
|
||||
|
||||
|
||||
} |
||||
@ -0,0 +1,48 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.desk.dashboard.mapper; |
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import org.apache.ibatis.annotations.Param; |
||||
import org.springblade.desk.dashboard.excel.DsTaskingExcel; |
||||
import org.springblade.desk.dashboard.pojo.entity.BsFillingDetailEntity; |
||||
import org.springblade.desk.dashboard.pojo.entity.DsTaskingEntity; |
||||
import org.springblade.desk.dashboard.pojo.vo.DsTaskingVO; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 填报明细表 Mapper 接口 |
||||
* |
||||
* @author BladeX |
||||
* @since 2025-11-12 |
||||
*/ |
||||
public interface BsFillingDetailMapper extends BaseMapper<BsFillingDetailEntity> { |
||||
|
||||
|
||||
} |
||||
@ -0,0 +1,57 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.desk.dashboard.mapper; |
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import org.apache.ibatis.annotations.Param; |
||||
import org.springblade.desk.dashboard.excel.DsPartExcel; |
||||
import org.springblade.desk.dashboard.pojo.entity.DsPartEntity; |
||||
import org.springblade.desk.dashboard.pojo.entity.DsPartVersionEntity; |
||||
import org.springblade.desk.dashboard.pojo.vo.*; |
||||
|
||||
import java.time.LocalDate; |
||||
import java.util.ArrayList; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 零件信息表 Mapper 接口 |
||||
* |
||||
* @author BladeX |
||||
* @since 2025-11-12 |
||||
*/ |
||||
public interface DsPartVersionMapper extends BaseMapper<DsPartVersionEntity> { |
||||
|
||||
|
||||
DsPartVersionEntity selectByPartId(@Param("partId") Long partId); |
||||
|
||||
List<DsPartVersionEntity> selectByPartCode(@Param("partCode") String partCode); |
||||
|
||||
List<DsPartVersionEntity> selectByPartIds(@Param("idList") List<Long> idList); |
||||
|
||||
DsPartVersionEntity selectByPartCodeAndPartVersion(@Param("partCode") String partCode, @Param("partVersion")String partVersion); |
||||
} |
||||
@ -0,0 +1,27 @@ |
||||
<?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="org.springblade.desk.dashboard.mapper.BsFillingDetailMapper"> |
||||
|
||||
<!-- 通用查询映射结果 --> |
||||
<resultMap id="bsFillingDetailResultMap" type="org.springblade.desk.dashboard.pojo.entity.BsFillingDetailEntity"> |
||||
<result column="ID" property="id"/> |
||||
<result column="BUS_ID" property="busId"/> |
||||
<result column="BUS_TYPE" property="busType"/> |
||||
<result column="MATTER" property="matter"/> |
||||
<result column="PROCESS" property="process"/> |
||||
<result column="REMARKS" property="remarks"/> |
||||
<result column="STATUS" property="status"/> |
||||
<result column="IS_DELETED" property="isDeleted"/> |
||||
<result column="CREATE_TIME" property="createTime"/> |
||||
<result column="CREATE_USER" property="createUser"/> |
||||
<result column="CREATE_DEPT" property="createDept"/> |
||||
<result column="UPDATE_TIME" property="updateTime"/> |
||||
<result column="UPDATE_USER" property="updateUser"/> |
||||
</resultMap> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</mapper> |
||||
@ -0,0 +1,39 @@ |
||||
<?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="org.springblade.desk.dashboard.mapper.DsPartVersionMapper"> |
||||
|
||||
<!-- 通用查询映射结果 --> |
||||
<resultMap id="dsPartVersionResultMap" type="org.springblade.desk.dashboard.pojo.entity.DsPartVersionEntity"> |
||||
<result column="ID" property="id"/> |
||||
<result column="PART_ID" property="partId"/> |
||||
<result column="PART_CODE" property="partCode"/> |
||||
<result column="PART_VERSION" property="partVersion"/> |
||||
<result column="CRAFT_ID" property="craftId"/> |
||||
<result column="CREATE_TIME" property="createTime"/> |
||||
<result column="CREATE_USER" property="createUser"/> |
||||
<result column="CREATE_DEPT" property="createDept"/> |
||||
<result column="UPDATE_TIME" property="updateTime"/> |
||||
<result column="UPDATE_USER" property="updateUser"/> |
||||
<result column="REMARKS" property="remarks"/> |
||||
<result column="STATUS" property="status"/> |
||||
<result column="IS_DELETED" property="isDeleted"/> |
||||
</resultMap> |
||||
<select id="selectByPartId" resultType="org.springblade.desk.dashboard.pojo.entity.DsPartVersionEntity"> |
||||
select * from DS_PART_VERSION where part_id = #{partId} |
||||
</select> |
||||
<select id="selectByPartCode" resultType="org.springblade.desk.dashboard.pojo.entity.DsPartVersionEntity"> |
||||
select * from DS_PART_VERSION where part_code = #{partCode} |
||||
</select> |
||||
<select id="selectByPartIds" resultType="org.springblade.desk.dashboard.pojo.entity.DsPartVersionEntity"> |
||||
select * from DS_PART_VERSION where part_id in |
||||
<foreach collection="idList" item="partId" open="(" close=")" separator=","> |
||||
#{partId} |
||||
</foreach> |
||||
</select> |
||||
<select id="selectByPartCodeAndPartVersion" |
||||
resultType="org.springblade.desk.dashboard.pojo.entity.DsPartVersionEntity"> |
||||
select * from DS_PART_VERSION where PART_CODE = #{partCode} and PART_VERSION = #{partVersion} |
||||
</select> |
||||
|
||||
|
||||
</mapper> |
||||
@ -0,0 +1,46 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.desk.dashboard.service; |
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import org.springblade.core.mp.base.BaseService; |
||||
import org.springblade.desk.dashboard.excel.BsCraftAbilityExcel; |
||||
import org.springblade.desk.dashboard.pojo.entity.BsCraftAbilityEntity; |
||||
import org.springblade.desk.dashboard.pojo.entity.BsFillingDetailEntity; |
||||
import org.springblade.desk.dashboard.pojo.vo.BsCraftAbilityVO; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 填报明细表 服务类 |
||||
* |
||||
* @author BladeX |
||||
* @since 2025-11-12 |
||||
*/ |
||||
public interface IBsFillingDetailService extends BaseService<BsFillingDetailEntity> { |
||||
|
||||
} |
||||
@ -0,0 +1,69 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.desk.dashboard.service; |
||||
|
||||
import org.springblade.core.mp.base.BaseService; |
||||
import org.springblade.desk.dashboard.pojo.entity.DsPartVersionEntity; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 零件版本信息表 服务类 |
||||
* |
||||
* @author BladeX |
||||
* @since 2025-11-12 |
||||
*/ |
||||
public interface IDsPartVersionService extends BaseService<DsPartVersionEntity> { |
||||
|
||||
/** |
||||
* 根据零件ID获取版本号 |
||||
* @param partId |
||||
* @return |
||||
*/ |
||||
DsPartVersionEntity selectByPartId(Long partId); |
||||
|
||||
/** |
||||
* 根据零件编码查询版本号 |
||||
* @param partCode |
||||
* @return |
||||
*/ |
||||
List<DsPartVersionEntity> selectByPartCode(String partCode); |
||||
|
||||
/** |
||||
* 根据零件Ids查询版本号 |
||||
* @param idList |
||||
* @return |
||||
*/ |
||||
List<DsPartVersionEntity> selectByPartIds(List<Long> idList); |
||||
|
||||
/** |
||||
* 根据零件号 和 版本号查询 |
||||
* @param partCode |
||||
* @param partVersion |
||||
* @return |
||||
*/ |
||||
DsPartVersionEntity selectByPartCodeAndPartVersion(String partCode, String partVersion); |
||||
} |
||||
@ -0,0 +1,45 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.desk.dashboard.service.impl; |
||||
|
||||
import org.springblade.core.mp.base.BaseServiceImpl; |
||||
import org.springblade.desk.dashboard.mapper.BsFillingDetailMapper; |
||||
import org.springblade.desk.dashboard.pojo.entity.BsFillingDetailEntity; |
||||
import org.springblade.desk.dashboard.service.IBsFillingDetailService; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
/** |
||||
* 填报明细表 服务实现类 |
||||
* |
||||
* @author BladeX |
||||
* @since 2025-11-12 |
||||
*/ |
||||
@Service |
||||
public class BsFillingDetailServiceImpl extends BaseServiceImpl<BsFillingDetailMapper, BsFillingDetailEntity> implements IBsFillingDetailService { |
||||
|
||||
|
||||
|
||||
} |
||||
@ -0,0 +1,80 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.desk.dashboard.service.impl; |
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import org.springblade.core.log.exception.ServiceException; |
||||
import org.springblade.core.mp.base.BaseServiceImpl; |
||||
import org.springblade.desk.dashboard.excel.DsSimilarPartsExcel; |
||||
import org.springblade.desk.dashboard.mapper.DsPartVersionMapper; |
||||
import org.springblade.desk.dashboard.mapper.DsSimilarPartsMapper; |
||||
import org.springblade.desk.dashboard.pojo.entity.DsPartEntity; |
||||
import org.springblade.desk.dashboard.pojo.entity.DsPartVersionEntity; |
||||
import org.springblade.desk.dashboard.pojo.entity.DsSimilarPartsEntity; |
||||
import org.springblade.desk.dashboard.pojo.vo.DsSimilarPartsVO; |
||||
import org.springblade.desk.dashboard.service.IDsPartService; |
||||
import org.springblade.desk.dashboard.service.IDsPartVersionService; |
||||
import org.springblade.desk.dashboard.service.IDsSimilarPartsService; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.stereotype.Service; |
||||
import org.springframework.util.CollectionUtils; |
||||
|
||||
import java.util.ArrayList; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 相似零件表 服务实现类 |
||||
* |
||||
* @author BladeX |
||||
* @since 2025-11-21 |
||||
*/ |
||||
@Service |
||||
public class DsPartsVersionServiceImpl extends BaseServiceImpl<DsPartVersionMapper, DsPartVersionEntity> implements IDsPartVersionService { |
||||
|
||||
@Autowired |
||||
DsPartVersionMapper partVersionMapper; |
||||
|
||||
@Override |
||||
public DsPartVersionEntity selectByPartId(Long partId) { |
||||
return partVersionMapper.selectByPartId(partId); |
||||
} |
||||
|
||||
@Override |
||||
public List<DsPartVersionEntity> selectByPartCode(String partCode) { |
||||
return partVersionMapper.selectByPartCode(partCode); |
||||
} |
||||
|
||||
@Override |
||||
public List<DsPartVersionEntity> selectByPartIds(List<Long> idList) { |
||||
return partVersionMapper.selectByPartIds(idList); |
||||
} |
||||
|
||||
@Override |
||||
public DsPartVersionEntity selectByPartCodeAndPartVersion(String partCode, String partVersion) { |
||||
return partVersionMapper.selectByPartCodeAndPartVersion(partCode,partVersion); |
||||
} |
||||
} |
||||
@ -0,0 +1,48 @@ |
||||
package org.springblade.desk.iot.controller; |
||||
|
||||
import com.alibaba.fastjson2.JSONObject; |
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
||||
import lombok.extern.slf4j.Slf4j; |
||||
import io.swagger.v3.oas.annotations.Operation; |
||||
import io.swagger.v3.oas.annotations.tags.Tag; |
||||
import lombok.AllArgsConstructor; |
||||
import org.hibernate.validator.internal.util.logging.Log; |
||||
import org.springblade.core.log.exception.ServiceException; |
||||
import org.springblade.core.mp.support.Condition; |
||||
import org.springblade.core.tool.api.R; |
||||
import org.springblade.desk.dashboard.pojo.entity.DsBatchPreservePlanEntity; |
||||
import org.springblade.desk.dashboard.pojo.vo.DsBatchPreservePlanVO; |
||||
import org.springblade.desk.dashboard.service.IDsPartService; |
||||
import org.springblade.desk.dashboard.wrapper.DsBatchPreservePlanWrapper; |
||||
import org.springblade.desk.device.service.IEquipmentService; |
||||
import org.springblade.desk.iot.setvice.IEpLineElectricService; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.web.bind.annotation.*; |
||||
|
||||
|
||||
@Slf4j |
||||
@RestController |
||||
@AllArgsConstructor |
||||
@RequestMapping("/iot") |
||||
@Tag(name = "iot回调专用", description = "iot回调专用") |
||||
public class IotWebApiController { |
||||
|
||||
@Autowired |
||||
IEpLineElectricService lineElectricService; |
||||
|
||||
|
||||
@Operation(summary = "产线电量信息调用接口") |
||||
@RequestMapping(value = "/saveDeviceAhm", method = RequestMethod.POST) |
||||
public R saveDeviceAhm(@RequestBody JSONObject data) throws Exception { |
||||
if (data == null || data.size() == 0) { |
||||
throw new ServiceException("参数传递异常!"); |
||||
} |
||||
log.info("产线电量信息调用接口:" + data.getString("deviceId") + " 时间:" + data.getString("pushTm") |
||||
+ " 数据:" + data.getString("ahmItems") + "pushData" + data.toJSONString()); |
||||
lineElectricService.saveDeviceAhm(data); |
||||
|
||||
return R.success(); |
||||
} |
||||
|
||||
|
||||
} |
||||
@ -0,0 +1,51 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.desk.iot.mapper; |
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import org.apache.ibatis.annotations.Param; |
||||
import org.springblade.desk.dashboard.pojo.entity.BsFillingDetailEntity; |
||||
import org.springblade.desk.dashboard.pojo.entity.DsBatchPreservePlanEntity; |
||||
import org.springblade.desk.dashboard.pojo.entity.EpLineElectricEntity; |
||||
|
||||
import java.util.Date; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 填报明细表 Mapper 接口 |
||||
* |
||||
* @author BladeX |
||||
* @since 2025-11-12 |
||||
*/ |
||||
public interface EpLineElectricMapper extends BaseMapper<EpLineElectricEntity> { |
||||
|
||||
|
||||
DsBatchPreservePlanEntity getDataBySlot(@Param("batchNo")String batchNo, |
||||
@Param("deviceCode") String deviceCode, |
||||
@Param("startDate")Date startDate, |
||||
@Param("endDate") Date endDate); |
||||
|
||||
} |
||||
@ -0,0 +1,48 @@ |
||||
<?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="org.springblade.desk.iot.mapper.EpLineElectricMapper"> |
||||
|
||||
<!-- 通用查询映射结果 --> |
||||
<!-- 通用查询映射结果 --> |
||||
<resultMap id="BaseResultMap" type="org.springblade.desk.dashboard.pojo.entity.EpLineElectricEntity"> |
||||
<result column="ID" property="id"/> |
||||
<result column="DEVICE_ID" property="deviceId" /> |
||||
<result column="WORK_SLOT" property="workSlot"/> |
||||
<result column="ELECTRIC" property="electric" /> |
||||
<result column="CREATE_TIME" property="createTime" /> |
||||
<result column="PUSH_DATA" property="pushData" /> |
||||
<result column="CREATE_USER" property="createUser" /> |
||||
<result column="CREATE_DEPT" property="createDept" /> |
||||
<result column="CREATE_TIME" property="createTime" /> |
||||
<result column="UPDATE_USER" property="updateUser" /> |
||||
<result column="UPDATE_TIME" property="updateTime" /> |
||||
<result column="STATUS" property="status" /> |
||||
<result column="IS_DELETED" property="isDeleted"/> |
||||
</resultMap> |
||||
<select id="getDataBySlot" |
||||
resultType="org.springblade.desk.dashboard.pojo.entity.DsBatchPreservePlanEntity"> |
||||
SELECT * |
||||
FROM ( |
||||
SELECT |
||||
ID, |
||||
DEVICE_ID, |
||||
WORK_SLOT, |
||||
ELECTRIC, |
||||
CREATE_TIME, |
||||
PUSH_DATA |
||||
FROM EP_LINE_ELECTRIC |
||||
WHERE DEVICE_ID = #{deviceCode} |
||||
AND WORK_SLOT = #{batchNo} |
||||
AND CREATE_TIME BETWEEN TO_DATE(#{startDate}, 'YYYY-MM-DD') |
||||
AND TO_DATE(#{{endDate}}, 'YYYY-MM-DD') |
||||
AND ELECTRIC IS NOT NULL |
||||
ORDER BY TO_NUMBER(ELECTRIC) DESC |
||||
) |
||||
WHERE ROWNUM = 1; |
||||
</select> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</mapper> |
||||
@ -0,0 +1,66 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.desk.iot.setvice; |
||||
|
||||
import com.alibaba.fastjson2.JSONObject; |
||||
import org.springblade.core.mp.base.BaseService; |
||||
import org.springblade.desk.dashboard.pojo.entity.BsFillingDetailEntity; |
||||
import org.springblade.desk.dashboard.pojo.entity.DsBatchPreservePlanEntity; |
||||
import org.springblade.desk.dashboard.pojo.entity.EpLineElectricEntity; |
||||
|
||||
import java.util.Date; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 填报明细表 服务类 |
||||
* |
||||
* @author BladeX |
||||
* @since 2025-11-12 |
||||
*/ |
||||
public interface IEpLineElectricService extends BaseService<EpLineElectricEntity> { |
||||
|
||||
/** |
||||
* 保存推送的数据 |
||||
* @param data |
||||
*/ |
||||
void saveDeviceAhm(JSONObject data); |
||||
|
||||
|
||||
|
||||
/** |
||||
* <p>方法描述: 根据槽号、设备号、时间查询数据 </p > |
||||
* <p>方法名: getDataBySlot </p > |
||||
* |
||||
* @param batchNo |
||||
* @param deviceCode |
||||
* @param startdate |
||||
* @param endDate |
||||
* @return |
||||
*/ |
||||
DsBatchPreservePlanEntity getDataBySlot(String batchNo, String deviceCode, Date startdate, Date endDate); |
||||
|
||||
|
||||
} |
||||
@ -0,0 +1,85 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.desk.iot.setvice.impl; |
||||
|
||||
import com.alibaba.fastjson2.JSONObject; |
||||
import org.checkerframework.checker.units.qual.A; |
||||
import org.springblade.core.log.exception.ServiceException; |
||||
import org.springblade.core.mp.base.BaseServiceImpl; |
||||
import org.springblade.desk.dashboard.mapper.BsFillingDetailMapper; |
||||
import org.springblade.desk.dashboard.pojo.entity.BsFillingDetailEntity; |
||||
import org.springblade.desk.dashboard.pojo.entity.DsBatchPreservePlanEntity; |
||||
import org.springblade.desk.dashboard.pojo.entity.EpLineElectricEntity; |
||||
import org.springblade.desk.dashboard.service.IBsFillingDetailService; |
||||
import org.springblade.desk.iot.mapper.EpLineElectricMapper; |
||||
import org.springblade.desk.iot.setvice.IEpLineElectricService; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import java.util.Date; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 填报明细表 服务实现类 |
||||
* |
||||
* @author BladeX |
||||
* @since 2025-11-12 |
||||
*/ |
||||
@Service |
||||
public class EpLineElectricServiceImpl extends BaseServiceImpl<EpLineElectricMapper, EpLineElectricEntity> implements IEpLineElectricService { |
||||
|
||||
@Autowired |
||||
EpLineElectricMapper lineElectricMapper; |
||||
|
||||
@Override |
||||
public void saveDeviceAhm(JSONObject params) { |
||||
EpLineElectricEntity epLineElectric; |
||||
List<JSONObject> ahmItems = params.getJSONArray("ahmItems").toJavaList(JSONObject.class); |
||||
if (ahmItems != null && ahmItems.size() > 0) { |
||||
String deviceId = params.getString("deviceId"); |
||||
Date pushTm = params.getDate("pushTm"); |
||||
for (JSONObject ahmItem : ahmItems) { |
||||
epLineElectric = new EpLineElectricEntity(); |
||||
epLineElectric.setDeviceId(deviceId); |
||||
epLineElectric.setWorkSlot(ahmItem.getString("WorkSlot")); |
||||
epLineElectric.setElectric(ahmItem.getString("AHM")); |
||||
epLineElectric.setCreateTime(pushTm); |
||||
epLineElectric.setPushData(params.toString()); |
||||
boolean save = this.save(epLineElectric); |
||||
if(!save){ |
||||
throw new ServiceException("保存推送的数据失败!"); |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
@Override |
||||
public DsBatchPreservePlanEntity getDataBySlot(String batchNo, String deviceCode, Date startDate, Date endDate) { |
||||
return lineElectricMapper.getDataBySlot(batchNo,deviceCode,startDate,endDate); |
||||
} |
||||
|
||||
|
||||
} |
||||
Loading…
Reference in new issue