admin
2024-07-04 d8e6a522964374f72fab85a3f53fc7a8ffa56e04
030工位返回ocv测试结果删除方法根据电芯号批量删除
已修改5个文件
23 ■■■■■ 文件已修改
jcdm-main/src/main/java/com/jcdm/main/da/testDeviceInterfaceTemp/mapper/DaTestDeviceInterfaceTempMapper.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/da/testDeviceInterfaceTemp/service/IDaTestDeviceInterfaceTempService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/da/testDeviceInterfaceTemp/service/impl/DaTestDeviceInterfaceTempServiceImpl.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/resources/mapper/da/testDeviceInterfaceTemp/DaTestDeviceInterfaceTempMapper.xml 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/da/testDeviceInterfaceTemp/mapper/DaTestDeviceInterfaceTempMapper.java
@@ -4,6 +4,7 @@
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jcdm.main.da.testDeviceInterfaceTemp.domain.DaTestDeviceInterfaceTemp;
import org.apache.ibatis.annotations.Param;
/**
 * 测试设备接口数据备份Mapper接口
@@ -60,4 +61,6 @@
     * @return 结果
     */
    public int deleteDaTestDeviceInterfaceTempByIds(Long[] ids);
    void deleteDaTestDeviceInterfaceTempByProductNum(@Param("cellCode") String cellCode);
}
jcdm-main/src/main/java/com/jcdm/main/da/testDeviceInterfaceTemp/service/IDaTestDeviceInterfaceTempService.java
@@ -60,4 +60,6 @@
     * @return 结果
     */
    public int deleteDaTestDeviceInterfaceTempById(Long id);
    void deleteDaTestDeviceInterfaceTempByProductNum(String cellCode);
}
jcdm-main/src/main/java/com/jcdm/main/da/testDeviceInterfaceTemp/service/impl/DaTestDeviceInterfaceTempServiceImpl.java
@@ -95,4 +95,9 @@
    {
        return daTestDeviceInterfaceTempMapper.deleteDaTestDeviceInterfaceTempById(id);
    }
    @Override
    public void deleteDaTestDeviceInterfaceTempByProductNum(String cellCode) {
        daTestDeviceInterfaceTempMapper.deleteDaTestDeviceInterfaceTempByProductNum(cellCode);
    }
}
jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java
@@ -770,14 +770,15 @@
                .eq(DaTestDeviceInterfaceTemp::getStationCode, device)
                .eq(DaTestDeviceInterfaceTemp::getProductNum,cellCode));
        if (CollUtil.isNotEmpty(list)){
            DaTestDeviceInterfaceTemp daTestDeviceInterfaceTemp = list.get(0);
            DaTestDeviceInterfaceTemp daTestDeviceInterfaceTemp = list.get(list.size()-1);
            if (Constants.ONE.equals(daTestDeviceInterfaceTemp.getTotalResult())){
                miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(thoroughfare + "." + device + ".CellStatus_1").value(1).build());
            }else {
                flag = false;
                miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(thoroughfare + "." + device + ".CellStatus_1").value(2).build());
            }
            daTestDeviceInterfaceTempService.deleteDaTestDeviceInterfaceTempById(daTestDeviceInterfaceTemp.getId());
            daTestDeviceInterfaceTempService.deleteDaTestDeviceInterfaceTempByProductNum(cellCode);
        }
        return flag;
    }
jcdm-main/src/main/resources/mapper/da/testDeviceInterfaceTemp/DaTestDeviceInterfaceTempMapper.xml
@@ -141,4 +141,12 @@
            #{id}
        </foreach>
    </delete>
    <delete id="deleteDaTestDeviceInterfaceTempByProductNum" parameterType="String">
        DELETE
        FROM
            da_test_device_interface_temp
        WHERE
            product_num = #{cellCode}
    </delete>
</mapper>